summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-02-14 12:24:46 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2019-02-15 14:39:12 +0000
commit88d1d92728d7a46a56075760c13e4bf76677d7a2 (patch)
treed24766c1404741aa53b9cb3ffbf73931adf90ec8 /src
parent66fd5abe583629cc2609e0724f0912e449e9d569 (diff)
downloadqt-creator-88d1d92728d7a46a56075760c13e4bf76677d7a2.tar.gz
Bump minimum Qt version (to build Qt Creator) to 5.11
Recent adaptations to Qt 5.13's API deprecations require using APIs which were introduces in Qt 5.11. Change-Id: I6c077d824c9ce716e019543b290c355a5d512fad Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/libs/languageserverprotocol/jsonobject.cpp4
-rw-r--r--src/libs/utils/consoleprocess_unix.cpp7
-rw-r--r--src/libs/utils/mimetypes/mimeprovider.cpp4
-rw-r--r--src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp4
-rw-r--r--src/plugins/coreplugin/dialogs/filepropertiesdialog.cpp4
-rw-r--r--src/plugins/cpptools/cpptoolsreuse.cpp9
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp5
-rw-r--r--src/plugins/perfprofiler/perfprofilertraceview.cpp4
-rw-r--r--src/plugins/projectexplorer/environmentwidget.cpp3
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp2
-rw-r--r--src/plugins/texteditor/texteditor.cpp4
-rw-r--r--src/tools/clangpchmanagerbackend/source/taskscheduler.h33
12 files changed, 0 insertions, 83 deletions
diff --git a/src/libs/languageserverprotocol/jsonobject.cpp b/src/libs/languageserverprotocol/jsonobject.cpp
index 1f471db47b..0156276a67 100644
--- a/src/libs/languageserverprotocol/jsonobject.cpp
+++ b/src/libs/languageserverprotocol/jsonobject.cpp
@@ -61,11 +61,7 @@ JsonObject &JsonObject::operator=(const JsonObject &other) = default;
JsonObject &JsonObject::operator=(JsonObject &&other)
{
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
m_jsonObject.swap(other.m_jsonObject);
-#else
- m_jsonObject = other.m_jsonObject; // NOTE use QJsonObject::swap when minimum required Qt version >= 5.10
-#endif
return *this;
}
diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp
index 92b69952f6..53a8c95848 100644
--- a/src/libs/utils/consoleprocess_unix.cpp
+++ b/src/libs/utils/consoleprocess_unix.cpp
@@ -436,12 +436,6 @@ bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &w
const Utils::Environment &env)
{
const TerminalCommand term = terminalEmulator(settings);
-#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
- // for 5.9 and below we cannot set the environment
- Q_UNUSED(env);
- return QProcess::startDetached(term.command, QtcProcess::splitArgs(term.openArgs),
- workingDir);
-#else
QProcess process;
process.setProgram(term.command);
process.setArguments(QtcProcess::splitArgs(term.openArgs));
@@ -449,7 +443,6 @@ bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &w
process.setWorkingDirectory(workingDir);
return process.startDetached();
-#endif
}
} // namespace Utils
diff --git a/src/libs/utils/mimetypes/mimeprovider.cpp b/src/libs/utils/mimetypes/mimeprovider.cpp
index d444aa899c..46d3eb71bd 100644
--- a/src/libs/utils/mimetypes/mimeprovider.cpp
+++ b/src/libs/utils/mimetypes/mimeprovider.cpp
@@ -803,11 +803,7 @@ void MimeXMLProvider::ensureLoaded()
// if (!fdoXmlFound) {
// // We could instead install the file as part of installing Qt?
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
const char freedesktopOrgXml[] = ":/qt-project.org/qmime/packages/freedesktop.org.xml";
-#else
- const char freedesktopOrgXml[] = ":/qt-project.org/qmime/freedesktop.org.xml";
-#endif
allFiles.prepend(QLatin1String(freedesktopOrgXml));
// }
diff --git a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp
index af8c13e76d..4811e1b543 100644
--- a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp
+++ b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp
@@ -386,14 +386,10 @@ private:
static int widthLimit()
{
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
auto screen = QGuiApplication::screenAt(QCursor::pos());
if (!screen)
screen = QGuiApplication::primaryScreen();
return screen->availableGeometry().width() / 2;
-#else
- return QApplication::desktop()->availableGeometry(QCursor::pos()).width() / 2;
-#endif
}
private:
diff --git a/src/plugins/coreplugin/dialogs/filepropertiesdialog.cpp b/src/plugins/coreplugin/dialogs/filepropertiesdialog.cpp
index 33d2123238..e4ed48648b 100644
--- a/src/plugins/coreplugin/dialogs/filepropertiesdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/filepropertiesdialog.cpp
@@ -78,11 +78,7 @@ void FilePropertiesDialog::refresh()
m_ui->owner->setText(fileInfo.owner());
m_ui->group->setText(fileInfo.group());
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
m_ui->size->setText(locale.formattedDataSize(fileInfo.size()));
-#else
- m_ui->size->setText(tr("%1 Bytes").arg(locale.toString(fileInfo.size())));
-#endif
m_ui->readable->setChecked(fileInfo.isReadable());
m_ui->writable->setChecked(fileInfo.isWritable());
m_ui->executable->setChecked(fileInfo.isExecutable());
diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp
index 9bcf806b7d..da1c79b4c0 100644
--- a/src/plugins/cpptools/cpptoolsreuse.cpp
+++ b/src/plugins/cpptools/cpptoolsreuse.cpp
@@ -323,18 +323,9 @@ bool fileSizeExceedsLimit(const QFileInfo &fileInfo, int sizeLimitInMb)
"C++ Indexer: Skipping file \"%1\" because it is too big.")
.arg(absoluteFilePath);
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
QMetaObject::invokeMethod(Core::MessageManager::instance(), [msg]() {
Core::MessageManager::write(msg, Core::MessageManager::Silent);
});
-#else
- QMetaObject::invokeMethod(Core::MessageManager::instance(),
- "write",
- Qt::QueuedConnection,
- Q_ARG(QString, msg),
- Q_ARG(Core::MessageManager::PrintToOutputPaneFlags,
- Core::MessageManager::Silent));
-#endif
qWarning().noquote() << msg;
return true;
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 6f23a9df62..5821f43a11 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -624,15 +624,10 @@ void DebuggerToolTipWidget::computeSize()
// Add a bit of space to account for tooltip border, and not
// touch the border of the screen.
QPoint pos(x(), y());
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
auto screen = QGuiApplication::screenAt(pos);
if (!screen)
screen = QGuiApplication::primaryScreen();
QRect desktopRect = screen->availableGeometry();
-#else
- QTC_ASSERT(QApplication::desktop(), return);
- QRect desktopRect = QApplication::desktop()->availableGeometry();
-#endif
const int maxWidth = desktopRect.right() - pos.x() - 5 - 5;
const int maxHeight = desktopRect.bottom() - pos.y() - 5 - 5;
diff --git a/src/plugins/perfprofiler/perfprofilertraceview.cpp b/src/plugins/perfprofiler/perfprofilertraceview.cpp
index a55bdd4830..69ac873686 100644
--- a/src/plugins/perfprofiler/perfprofilertraceview.cpp
+++ b/src/plugins/perfprofiler/perfprofilertraceview.cpp
@@ -74,11 +74,7 @@ PerfProfilerTraceView::PerfProfilerTraceView(QWidget *parent, PerfProfilerTool *
bool PerfProfilerTraceView::isUsable() const
{
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
return quickWindow()->rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL;
-#else
- return true;
-#endif
}
void PerfProfilerTraceView::selectByTypeId(int typeId)
diff --git a/src/plugins/projectexplorer/environmentwidget.cpp b/src/plugins/projectexplorer/environmentwidget.cpp
index ad643e78be..bcc7e4174b 100644
--- a/src/plugins/projectexplorer/environmentwidget.cpp
+++ b/src/plugins/projectexplorer/environmentwidget.cpp
@@ -208,9 +208,6 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, QWidget *additionalDetails
d->m_terminalButton->setText(tr("Open &Terminal"));
d->m_terminalButton->setToolTip(tr("Open a terminal with this environment set up."));
buttonLayout->addWidget(d->m_terminalButton);
-#if defined(Q_OS_UNIX) && QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
- d->m_terminalButton->setVisible(false);
-#endif
buttonLayout->addStretch();
horizontalLayout->addLayout(buttonLayout);
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index dad44d2700..ed66ee746b 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -889,7 +889,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_openTerminalHereBuildEnv = new QAction(tr("Build Environment"), this);
dd->m_openTerminalHereRunEnv = new QAction(tr("Run Environment"), this);
-#if !defined(Q_OS_UNIX) || QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
cmd = ActionManager::registerAction(dd->m_openTerminalHereBuildEnv,
"ProjectExplorer.OpenTerminalHereBuildEnv",
projecTreeContext);
@@ -899,7 +898,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
"ProjectExplorer.OpenTerminalHereRunEnv",
projecTreeContext);
dd->m_openTerminalMenu->addAction(dd->m_openTerminalHereRunEnv);
-#endif
// Open With menu
mfileContextMenu->addMenu(openWith, Constants::G_FILE_OPEN);
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 5ac69be40c..51a7da5e31 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -8252,11 +8252,7 @@ void TextEditorWidgetPrivate::updateTabStops()
// to be set as an int. A work around is to access directly the QTextOption.
qreal charWidth = QFontMetricsF(q->font()).width(QLatin1Char(' '));
QTextOption option = q->document()->defaultTextOption();
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
option.setTabStopDistance(charWidth * m_document->tabSettings().m_tabSize);
-#else
- option.setTabStop(charWidth * m_document->tabSettings().m_tabSize);
-#endif
q->document()->setDefaultTextOption(option);
}
diff --git a/src/tools/clangpchmanagerbackend/source/taskscheduler.h b/src/tools/clangpchmanagerbackend/source/taskscheduler.h
index 37fdc744a8..6bc7dc7976 100644
--- a/src/tools/clangpchmanagerbackend/source/taskscheduler.h
+++ b/src/tools/clangpchmanagerbackend/source/taskscheduler.h
@@ -149,38 +149,6 @@ private:
m_futures.erase(split, m_futures.end());
}
- #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
- template <typename CallableType>
- class CallableEvent : public QEvent {
- public:
- using Callable = std::decay_t<CallableType>;
- CallableEvent(Callable &&callable)
- : QEvent(QEvent::None),
- callable(std::move(callable))
- {}
- CallableEvent(const Callable &callable)
- : QEvent(QEvent::None),
- callable(callable)
- {}
-
- ~CallableEvent()
- {
- callable();
- }
- public:
- Callable callable;
- };
-
- template <typename Callable>
- void executeInLoop(Callable &&callable, QObject *object = QCoreApplication::instance()) {
- if (QThread *thread = qobject_cast<QThread*>(object))
- object = QAbstractEventDispatcher::instance(thread);
-
- QCoreApplication::postEvent(object,
- new CallableEvent<Callable>(std::forward<Callable>(callable)),
- Qt::HighEventPriority);
- }
- #else
template <typename Callable>
void executeInLoop(Callable &&callable, QObject *object = QCoreApplication::instance()) {
if (QThread *thread = qobject_cast<QThread*>(object))
@@ -188,7 +156,6 @@ private:
QMetaObject::invokeMethod(object, std::forward<Callable>(callable));
}
- #endif
private:
std::vector<Future> m_futures;