diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index da093d2b..0e11f3bf 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -1,7 +1,6 @@ QT += core gui printsupport network svg xml widgets -# without `c++14` old versions of qmake will explicitly set `-std=gnu++98` -CONFIG += c++14 c++17 +CONFIG += c++17 CONFIG += nokey # uncomment the following line to enable vcs (git) support diff --git a/RedPandaIDE/compiler/compilermanager.cpp b/RedPandaIDE/compiler/compilermanager.cpp index 6339ddf1..6cc8efd0 100644 --- a/RedPandaIDE/compiler/compilermanager.cpp +++ b/RedPandaIDE/compiler/compilermanager.cpp @@ -37,15 +37,9 @@ #endif CompilerManager::CompilerManager(QObject *parent) : QObject(parent), -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) mCompileMutex(), mBackgroundSyntaxCheckMutex(), mRunnerMutex() -#else - mCompileMutex(QMutex::Recursive), - mBackgroundSyntaxCheckMutex(QMutex::Recursive), - mRunnerMutex(QMutex::Recursive) -#endif { mCompiler = nullptr; mBackgroundSyntaxChecker = nullptr; diff --git a/RedPandaIDE/compiler/compilermanager.h b/RedPandaIDE/compiler/compilermanager.h index bcf541d8..af657806 100644 --- a/RedPandaIDE/compiler/compilermanager.h +++ b/RedPandaIDE/compiler/compilermanager.h @@ -104,15 +104,9 @@ private: Compiler* mBackgroundSyntaxChecker; Runner* mRunner; PNonExclusiveTemporaryFileOwner mTempFileOwner; -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QRecursiveMutex mCompileMutex; QRecursiveMutex mBackgroundSyntaxCheckMutex; QRecursiveMutex mRunnerMutex; -#else - QMutex mCompileMutex; - QMutex mBackgroundSyntaxCheckMutex; - QMutex mRunnerMutex; -#endif }; class CompileError : public BaseError { diff --git a/RedPandaIDE/debugger/debugger.cpp b/RedPandaIDE/debugger/debugger.cpp index 5315ee41..8e5297f1 100644 --- a/RedPandaIDE/debugger/debugger.cpp +++ b/RedPandaIDE/debugger/debugger.cpp @@ -1108,11 +1108,7 @@ bool Debugger::executing() const } DebuggerClient::DebuggerClient(Debugger* debugger, QObject *parent) : QThread(parent), -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) mCmdQueueMutex(), -#else - mCmdQueueMutex(QMutex::Recursive), -#endif mStartSemaphore(0) { mDebugger = debugger; @@ -2469,11 +2465,7 @@ void MemoryModel::updateMemory(const QStringList &value) QList newModel; for (int i=0;i= QT_VERSION_CHECK(5, 15, 0) QStringList dataLst = line.split(delimiter,Qt::SkipEmptyParts); -#else - QStringList dataLst = line.split(delimiter,QString::SkipEmptyParts); -#endif PMemoryLine memoryLine = std::make_shared(); memoryLine->startAddress = -1; if (dataLst.length()>0) { diff --git a/RedPandaIDE/debugger/debugger.h b/RedPandaIDE/debugger/debugger.h index d084fe70..0df7985a 100644 --- a/RedPandaIDE/debugger/debugger.h +++ b/RedPandaIDE/debugger/debugger.h @@ -595,11 +595,7 @@ signals: bool hasMore); void varsValueUpdated(); protected: -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QRecursiveMutex mCmdQueueMutex; -#else - QMutex mCmdQueueMutex; -#endif bool mCmdRunning; diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 70f8afc2..884e6b76 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -3564,7 +3564,6 @@ void Editor::showCompletion(const QString& preWord,bool autoComplete, CodeComple // Position it at the top of the next line QPoint popupPos = mapToGlobal(displayCoordToPixels(displayXY())); -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QSize desktopSize = screen()->virtualSize(); if (desktopSize.height() - popupPos.y() < mCompletionPopup->height() && popupPos.y() > mCompletionPopup->height()) popupPos-=QPoint(0, mCompletionPopup->height()+2); @@ -3574,9 +3573,6 @@ void Editor::showCompletion(const QString& preWord,bool autoComplete, CodeComple if (desktopSize.width() - popupPos.x() < mCompletionPopup->width() ) { popupPos.setX(std::max(0, desktopSize.width()-mCompletionPopup->width())-10); } -#else - popupPos+=QPoint(0,textHeight()+2); -#endif mCompletionPopup->move(popupPos); @@ -4560,13 +4556,8 @@ void Editor::cancelHoverLink() QSize Editor::calcCompletionPopupSize() { -#if QT_VERSION_MAJOR==5 && QT_VERSION_MINOR < 15 - int screenHeight = qApp->primaryScreen()->size().height(); - int screenWidth = qApp->primaryScreen()->size().width(); -#else int screenHeight = screen()->size().height(); int screenWidth = screen()->size().width(); -#endif int popWidth = std::min(pSettings->codeCompletion().widthInColumns() * charWidth(), screenWidth / 2) + 4; int popHeight = std::min(pSettings->codeCompletion().heightInLines() * textHeight(), diff --git a/RedPandaIDE/main.cpp b/RedPandaIDE/main.cpp index cd3c1def..9c5a183c 100644 --- a/RedPandaIDE/main.cpp +++ b/RedPandaIDE/main.cpp @@ -413,12 +413,8 @@ int main(int argc, char *argv[]) MainWindow mainWindow; pMainWindow = &mainWindow; -#if QT_VERSION_MAJOR==5 && QT_VERSION_MINOR < 15 - setScreenDPI(qApp->primaryScreen()->logicalDotsPerInch()); -#else if (mainWindow.screen()) setScreenDPI(mainWindow.screen()->logicalDotsPerInch()); -#endif mainWindow.show(); if (app.arguments().count()>1) { QStringList filesToOpen = app.arguments(); diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index d5705040..d764b721 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -4645,12 +4645,7 @@ void MainWindow::onFilesViewCreateFile() fileName = QString("untitled%1").arg(count)+suffix; } QFile file(dir.filePath(fileName)); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) file.open(QFile::NewOnly); -#else - // workaround: try create but do not truncate - file.open(QFile::ReadWrite); -#endif file.close(); QModelIndex newIndex = mFileSystemModel.index(dir.filePath(fileName)); connect(&mFileSystemModel,&QFileSystemModel::directoryLoaded, @@ -7716,19 +7711,11 @@ void MainWindow::doFilesViewRemoveFile(const QModelIndex &index) + tr("Do you really want to delete it?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No)!=QMessageBox::Yes) return; -#if QT_VERSION >= QT_VERSION_CHECK(5,15,2) if (!QFile::moveToTrash(dir.absolutePath())) dir.removeRecursively(); -#else - dir.removeRecursively(); -#endif } else { -#if QT_VERSION >= QT_VERSION_CHECK(5,15,2) if (!QFile::moveToTrash(mFileSystemModel.filePath(index))) QFile::remove(mFileSystemModel.filePath(index)); -#else - QFile::remove(mFileSystemModel.filePath(index)); -#endif } } diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 5c6e6025..26bdb838 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -39,11 +39,7 @@ static QString calcFullname(const QString& parentName, const QString& name) { } CppParser::CppParser(QObject *parent) : QObject(parent), -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) mMutex() -#else - mMutex(QMutex::Recursive) -#endif { mParserId = cppParserCount.fetchAndAddRelaxed(1); mLanguage = ParserLanguage::CPlusPlus; @@ -6659,12 +6655,7 @@ void CppParser::setLanguage(ParserLanguage newLanguage) mCppTypeKeywords = CppTypeKeywords; #ifdef ENABLE_SDCC if (mLanguage == ParserLanguage::SDCC) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) mCppKeywords.insert(SDCCKeywords); -#else - for (auto &k : SDCCKeywords.keys()) - mCppKeywords[k] = SDCCKeywords[k]; -#endif mCppTypeKeywords.unite(SDCCTypeKeywords); } #endif diff --git a/RedPandaIDE/parser/cppparser.h b/RedPandaIDE/parser/cppparser.h index 6a8d9f25..b7d7f5cb 100644 --- a/RedPandaIDE/parser/cppparser.h +++ b/RedPandaIDE/parser/cppparser.h @@ -729,11 +729,7 @@ private: #ifdef QT_DEBUG int mLastIndex; #endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QRecursiveMutex mMutex; -#else - QMutex mMutex; -#endif QMap mCppKeywords; QSet mCppTypeKeywords; }; diff --git a/RedPandaIDE/parser/cpppreprocessor.cpp b/RedPandaIDE/parser/cpppreprocessor.cpp index 46164dbe..1399820c 100644 --- a/RedPandaIDE/parser/cpppreprocessor.cpp +++ b/RedPandaIDE/parser/cpppreprocessor.cpp @@ -195,12 +195,7 @@ void CppPreprocessor::dumpDefinesTo(const QString &fileName) const for (const PDefine& define:mDefines) { stream<name,define->args,define->value) - .arg(define->hardCoded).arg(define->formatValue) -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - <hardCoded).arg(define->formatValue)<fileName()<<" : " - #if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - <= QT_VERSION_CHECK(5,15,0) - <fileName()<<" : "<includes()) { - stream<<"\t--"+s - #if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - <line).arg(token->text).arg(token->matchIndex) -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - <line).arg(token->text).arg(token->matchIndex)<fileName) .arg(statement->line) .arg(statement->definitionFileName) - .arg(statement->definitionLine)<< -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::endl; -#else - endl; -#endif + .arg(statement->definitionLine)<line) .arg(statement->definitionFileName) .arg(statement->definitionLine); - out - #if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - <children.isEmpty()) continue; - out<command<<" {" - #if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - <command<<" {"<children,out,level+1); - out<= QT_VERSION_CHECK(5,15,0) - <= QT_VERSION_CHECK(5,15,2) if (!QFile::moveToTrash(unit->fileName())) QFile::remove(unit->fileName()); -#else - QFile::remove(unit->fileName()); -#endif } //if not fUnits.GetItem(index).fNew then @@ -1635,13 +1631,7 @@ void Project::checkProjectFileForUpdate(SimpleIni &ini) if (!oldRes.isEmpty()) { QFile::copy(mFilename,mFilename+".bak"); QStringList sl; - sl = oldRes.split(';', -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - ); + sl = oldRes.split(';', Qt::SkipEmptyParts); for (int i=0;i= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - )); - mOptions.libDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Libs", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - )); - mOptions.includeDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Includes", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - )); + mOptions.binDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Bins", "")).split(";", Qt::SkipEmptyParts)); + mOptions.libDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Libs", "")).split(";", Qt::SkipEmptyParts)); + mOptions.includeDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Includes", "")).split(";", Qt::SkipEmptyParts)); mOptions.privateResource = fromByteArray(ini.GetValue("Project", "PrivateResource", "")); - mOptions.resourceIncludes = absolutePaths(fromByteArray(ini.GetValue("Project", "ResourceIncludes", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - )); - mOptions.makeIncludes = absolutePaths(fromByteArray(ini.GetValue("Project", "MakeIncludes", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - )); + mOptions.resourceIncludes = absolutePaths(fromByteArray(ini.GetValue("Project", "ResourceIncludes", "")).split(";", Qt::SkipEmptyParts)); + mOptions.makeIncludes = absolutePaths(fromByteArray(ini.GetValue("Project", "MakeIncludes", "")).split(";", Qt::SkipEmptyParts)); mOptions.isCpp = ini.GetBoolValue("Project", "IsCpp", false); mOptions.folderForOutput = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "ExeOutput", ""))); mOptions.folderForObjFiles = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "ObjectOutput", ""))); @@ -2041,13 +2001,7 @@ void Project::loadOptions(SimpleIni& ini) mOptions.usePrecompiledHeader = ini.GetBoolValue("Project", "UsePrecompiledHeader", false); mOptions.precompiledHeader = generateAbsolutePath(directory(),fromByteArray(ini.GetValue("Project", "PrecompiledHeader", ""))); mOptions.cmdLineArgs = fromByteArray(ini.GetValue("Project", "CommandLine", "")); - mFolders = fromByteArray(ini.GetValue("Project", "Folders", "")).split(";", - #if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts - #else - QString::SkipEmptyParts - #endif - ); + mFolders = fromByteArray(ini.GetValue("Project", "Folders", "")).split(";", Qt::SkipEmptyParts); mOptions.includeVersionInfo = ini.GetBoolValue("Project", "IncludeVersionInfo", false); mOptions.supportXPThemes = ini.GetBoolValue("Project", "SupportXPThemes", false); mOptions.compilerSet = ini.GetLongValue("Project", "CompilerSet", pSettings->compilerSets().defaultIndex()); diff --git a/RedPandaIDE/projecttemplate.cpp b/RedPandaIDE/projecttemplate.cpp index 077503bf..9ac2c4ed 100644 --- a/RedPandaIDE/projecttemplate.cpp +++ b/RedPandaIDE/projecttemplate.cpp @@ -115,36 +115,12 @@ void ProjectTemplate::readTemplateFile(const QString &fileName) mOptions.icon = mIni->GetValue("Project", "Icon", ""); mOptions.type = static_cast(mIni->GetLongValue("Project", "Type", 0)); // default = gui - mOptions.includeDirs = fromByteArray(mIni->GetValue("Project", "Includes", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - ); - mOptions.binDirs = fromByteArray(mIni->GetValue("Project", "Bins", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - ); + mOptions.includeDirs = fromByteArray(mIni->GetValue("Project", "Includes", "")).split(";", Qt::SkipEmptyParts); + mOptions.binDirs = fromByteArray(mIni->GetValue("Project", "Bins", "")).split(";", Qt::SkipEmptyParts); - mOptions.libDirs = fromByteArray(mIni->GetValue("Project", "Libs", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - ); + mOptions.libDirs = fromByteArray(mIni->GetValue("Project", "Libs", "")).split(";", Qt::SkipEmptyParts); - mOptions.resourceIncludes = fromByteArray(mIni->GetValue("Project", "ResourceIncludes", "")).split(";", -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - Qt::SkipEmptyParts -#else - QString::SkipEmptyParts -#endif - ); + mOptions.resourceIncludes = fromByteArray(mIni->GetValue("Project", "ResourceIncludes", "")).split(";", Qt::SkipEmptyParts); mOptions.compilerCmd = fromByteArray(mIni->GetValue("Project", "Compiler", "")); mOptions.cppCompilerCmd = fromByteArray(mIni->GetValue("Project", "CppCompiler", "")); mOptions.linkerCmd = fromByteArray(mIni->GetValue("Project", "Linker","")); diff --git a/RedPandaIDE/settingsdialog/projectgeneralwidget.cpp b/RedPandaIDE/settingsdialog/projectgeneralwidget.cpp index 796e5b38..f0a274fc 100644 --- a/RedPandaIDE/settingsdialog/projectgeneralwidget.cpp +++ b/RedPandaIDE/settingsdialog/projectgeneralwidget.cpp @@ -147,12 +147,7 @@ void ProjectGeneralWidget::doSave() project->options().isCpp = ui->cbDefaultCpp->isChecked(); project->options().supportXPThemes = ui->cbSupportXPTheme->isChecked(); - if (mIconPath.isEmpty() -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) - || ui->lbIcon->pixmap(Qt::ReturnByValue).isNull()) { -#else - || !ui->lbIcon->pixmap() || ui->lbIcon->pixmap()->isNull()) { -#endif + if (mIconPath.isEmpty() || ui->lbIcon->pixmap(Qt::ReturnByValue).isNull()) { project->options().icon = ""; } else { QString iconPath = generateAbsolutePath(project->directory(),"app.ico"); @@ -168,11 +163,7 @@ void ProjectGeneralWidget::doSave() } } if (!mIconPath.endsWith(".ico",PATH_SENSITIVITY) && QImageWriter::supportedImageFormats().contains("ico")) { -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) ui->lbIcon->pixmap(Qt::ReturnByValue).save(iconPath,"ico"); -#else - ui->lbIcon->pixmap()->save(iconPath,"ico"); -#endif } else copyFile(mIconPath, iconPath,true); } diff --git a/RedPandaIDE/todoparser.cpp b/RedPandaIDE/todoparser.cpp index 0a00500a..4b65a6a1 100644 --- a/RedPandaIDE/todoparser.cpp +++ b/RedPandaIDE/todoparser.cpp @@ -24,11 +24,7 @@ static QRegularExpression todoReg("\\b(todo|fixme)\\b", QRegularExpression::CaseInsensitiveOption); TodoParser::TodoParser(QObject *parent) : QObject(parent), -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) mMutex() -#else - mMutex(QMutex::Recursive) -#endif { mThread = nullptr; } diff --git a/RedPandaIDE/todoparser.h b/RedPandaIDE/todoparser.h index f72394b1..82066ebe 100644 --- a/RedPandaIDE/todoparser.h +++ b/RedPandaIDE/todoparser.h @@ -100,11 +100,7 @@ public: private: TodoThread* mThread; -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QRecursiveMutex mMutex; -#else - QMutex mMutex; -#endif }; using PTodoParser = std::shared_ptr; diff --git a/RedPandaIDE/widgets/classbrowser.cpp b/RedPandaIDE/widgets/classbrowser.cpp index 80d96152..09a34236 100644 --- a/RedPandaIDE/widgets/classbrowser.cpp +++ b/RedPandaIDE/widgets/classbrowser.cpp @@ -26,11 +26,7 @@ #include "../iconsmanager.h" ClassBrowserModel::ClassBrowserModel(QObject *parent):QAbstractItemModel(parent), -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) mMutex() -#else - mMutex(QMutex::Recursive) -#endif { mClassBrowserType = ProjectClassBrowserType::CurrentFile; mRoot = new ClassBrowserNode(); diff --git a/RedPandaIDE/widgets/classbrowser.h b/RedPandaIDE/widgets/classbrowser.h index ef4db137..6ba9dc02 100644 --- a/RedPandaIDE/widgets/classbrowser.h +++ b/RedPandaIDE/widgets/classbrowser.h @@ -86,11 +86,7 @@ private: PCppParser mParser; bool mUpdating; int mUpdateCount; -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QRecursiveMutex mMutex; -#else - QMutex mMutex; -#endif QString mCurrentFile; std::shared_ptr > > mColors; ProjectClassBrowserType mClassBrowserType; diff --git a/RedPandaIDE/widgets/codecompletionpopup.cpp b/RedPandaIDE/widgets/codecompletionpopup.cpp index b5f4d4a2..e192b03f 100644 --- a/RedPandaIDE/widgets/codecompletionpopup.cpp +++ b/RedPandaIDE/widgets/codecompletionpopup.cpp @@ -32,11 +32,7 @@ CodeCompletionPopup::CodeCompletionPopup(QWidget *parent) : QWidget(parent), -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) mMutex() -#else - mMutex(QMutex::Recursive) -#endif { setWindowFlags(Qt::Popup); mListView = new CodeCompletionListView(this); diff --git a/RedPandaIDE/widgets/codecompletionpopup.h b/RedPandaIDE/widgets/codecompletionpopup.h index 3593e5ef..3ca8953a 100644 --- a/RedPandaIDE/widgets/codecompletionpopup.h +++ b/RedPandaIDE/widgets/codecompletionpopup.h @@ -183,11 +183,7 @@ private: QSet mAddedStatements; QString mMemberPhrase; QString mMemberOperator; -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QRecursiveMutex mMutex; -#else - QMutex mMutex; -#endif std::shared_ptr > > mColors; CodeCompletionListItemDelegate* mDelegate; diff --git a/RedPandaIDE/widgets/newprojectdialog.cpp b/RedPandaIDE/widgets/newprojectdialog.cpp index 1057bdf7..dfc04f16 100644 --- a/RedPandaIDE/widgets/newprojectdialog.cpp +++ b/RedPandaIDE/widgets/newprojectdialog.cpp @@ -31,9 +31,7 @@ NewProjectDialog::NewProjectDialog(QWidget *parent) : { setWindowFlag(Qt::WindowContextHelpButtonHint,false); ui->setupUi(this); -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) ui->lstTemplates->setItemAlignment(Qt::AlignCenter); -#endif mTemplatesTabBar = new QTabBar(this); mTemplatesTabBar->setExpanding(false); ui->verticalLayout->insertWidget(0,mTemplatesTabBar); diff --git a/libs/qsynedit/qsynedit.pro b/libs/qsynedit/qsynedit.pro index 2bea26ff..60b03dd2 100644 --- a/libs/qsynedit/qsynedit.pro +++ b/libs/qsynedit/qsynedit.pro @@ -2,8 +2,7 @@ TEMPLATE = lib QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -# without `c++14` old versions of qmake will explicitly set `-std=gnu++98` -CONFIG += c++14 c++17 +CONFIG += c++17 CONFIG += nokey CONFIG += staticlib contains(QMAKE_HOST.arch, x86_64):{ diff --git a/libs/qsynedit/qsynedit/document.cpp b/libs/qsynedit/qsynedit/document.cpp index 229315dd..1b2c0d9b 100644 --- a/libs/qsynedit/qsynedit/document.cpp +++ b/libs/qsynedit/qsynedit/document.cpp @@ -36,11 +36,7 @@ Document::Document(const QFont& font, QObject *parent): mForceMonospace{false}, mSetLineWidthLockCount{0}, mMaxLineChangedInSetLinesWidth{false}, -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - mMutex{} -#else - mMutex{QMutex::Recursive} -#endif + mMutex{} { mAppendNewLineAtEOF = true; mNewlineType = NewlineType::Windows; diff --git a/libs/qsynedit/qsynedit/document.h b/libs/qsynedit/qsynedit/document.h index 811f7f94..7f549ac4 100644 --- a/libs/qsynedit/qsynedit/document.h +++ b/libs/qsynedit/qsynedit/document.h @@ -621,11 +621,7 @@ private: int mSetLineWidthLockCount; bool mMaxLineChangedInSetLinesWidth; -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) QRecursiveMutex mMutex; -#else - QMutex mMutex; -#endif friend class QSynEditPainter; }; diff --git a/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp b/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp index 763bcd9b..9553696d 100644 --- a/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp +++ b/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp @@ -147,11 +147,7 @@ QString RTFExporter::getFormatName() QString RTFExporter::getHeader() { QFontMetrics fm(mFont); -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) int tabWidth = mTabSize * fm.horizontalAdvance("M")*72*20/fm.fontDpi(); -#else - int tabWidth = mTabSize * fm.horizontalAdvance("M")*72*20/96; -#endif QString result = QString("{\\rtf1\\ansi\\deff0\\deftab%1").arg(tabWidth) + getFontTable(); // all the colors diff --git a/libs/qsynedit/qsynedit/syntaxer/asm.cpp b/libs/qsynedit/qsynedit/syntaxer/asm.cpp index 7c537a77..a889f1d9 100644 --- a/libs/qsynedit/qsynedit/syntaxer/asm.cpp +++ b/libs/qsynedit/qsynedit/syntaxer/asm.cpp @@ -1565,14 +1565,7 @@ void ASMSyntaxer::initData() Instructions.insert("vxorps",QObject::tr("Bitwise Logical XOR for Single-Precision Floating-Point Values.")); Instructions.insert("vpclmulqdq",QObject::tr("Carry-Less Multiplication Quadword, Requires PCLMULQDQ CPUID-flag.")); #endif -#if QT_VERSION >= QT_VERSION_CHECK(5,15,0) InstructionNames=QSet(Instructions.keyBegin(),Instructions.keyEnd()); -#else - InstructionNames.clear(); - foreach(const QString& s,Instructions.keys()) { - InstructionNames.insert(s); - } -#endif } } diff --git a/libs/redpanda_qt_utils/qt_utils/utils.cpp b/libs/redpanda_qt_utils/qt_utils/utils.cpp index 3e8722dd..a183cd72 100644 --- a/libs/redpanda_qt_utils/qt_utils/utils.cpp +++ b/libs/redpanda_qt_utils/qt_utils/utils.cpp @@ -400,12 +400,7 @@ bool stringsToFile(const QStringList &list, const QString &fileName) return false; QTextStream stream(&file); for (const QString& s:list) { - stream<= QT_VERSION_CHECK(5,15,0) - <