aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2019-02-11 10:17:53 +0100
committerFriedemann Kleint <[email protected]>2019-02-11 09:32:06 +0000
commit963dc84cc5d1e412344e3a0fbf4a476541da2d19 (patch)
tree9d893123584c152e17f5220ed8a72d2970c7061f /src/plugins/debugger
parent77392c7dea8ed5fb41618b05abb9e2ec7ba5a5c0 (diff)
Fix some deprecation warnings in basic plugins
Fix warnings apppearing in 5.13, for example: warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations] ... warning: ‘static QRgb QColorDialog::getRgba(QRgb, bool*, QWidget*)’ is deprecated: Use getColor() [-Wdeprecated-declarations] warning: ‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations] warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] ... warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations] ... warning: ‘void QTextOption::setTabStop(qreal)’ is deprecated [-Wdeprecated-declarations] warning: ‘void QList<T>::swap(int, int) [with T = ProjectExplorer::BuildStep*]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations] warning: ‘void QProcess::setReadChannelMode(QProcess::ProcessChannelMode)’ is deprecated: Use QProcess::setProcessChannelMode() instead [-Wdeprecated-declarations] ... warning: ‘QString QFileInfo::readLink() const’ is deprecated: Use QFileInfo::symLinkTarget() instead [-Wdeprecated-declarations] Change-Id: I1d893d42d372245892f2de8406f52dbe7bbd552a Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp2
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp4
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp6
3 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 28fa1bcf9ae..5e62bf5bb6d 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -203,7 +203,7 @@ CdbEngine::CdbEngine() :
connect(action(CreateFullBacktrace), &QAction::triggered,
this, &CdbEngine::createFullBacktrace);
- connect(&m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished),
+ connect(&m_process, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &CdbEngine::processFinished);
connect(&m_process, &QProcess::errorOccurred, this, &CdbEngine::processError);
connect(&m_process, &QProcess::readyReadStandardOutput,
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index c08e5ea471e..a664d30c406 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -105,7 +105,7 @@ public:
this, &LocalProcessRunner::handleStandardOutput);
connect(&m_proc, &QProcess::readyReadStandardError,
this, &LocalProcessRunner::handleStandardError);
- connect(&m_proc, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
+ connect(&m_proc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, &LocalProcessRunner::handleFinished);
}
@@ -213,7 +213,7 @@ private:
}
m_coreUnpackProcess.setWorkingDirectory(TemporaryDirectory::masterDirectoryPath());
- connect(&m_coreUnpackProcess, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
+ connect(&m_coreUnpackProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, &CoreUnpacker::reportStarted);
const QString msg = DebuggerRunTool::tr("Unpacking core file to %1");
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 9aba76fa88f..2f8cef1d243 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -62,6 +62,7 @@
#include <QDesktopWidget>
#include <QFileInfo>
#include <QLabel>
+#include <QScreen>
#include <QScrollBar>
#include <QSortFilterProxyModel>
#include <QStack>
@@ -624,7 +625,10 @@ void DebuggerToolTipWidget::computeSize()
// touch the border of the screen.
QPoint pos(x(), y());
QTC_ASSERT(QApplication::desktop(), return);
- QRect desktopRect = QApplication::desktop()->availableGeometry(pos);
+ auto screen = QGuiApplication::screenAt(pos);
+ if (!screen)
+ screen = QGuiApplication::primaryScreen();
+ QRect desktopRect = screen->availableGeometry();
const int maxWidth = desktopRect.right() - pos.x() - 5 - 5;
const int maxHeight = desktopRect.bottom() - pos.y() - 5 - 5;