diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-05 14:38:14 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-05 14:04:50 +0000 |
commit | df68df8489d393a5800a0a183b6151ec0342662e (patch) | |
tree | 68ae78b1d137de3186b5d0d5c8d0ab667ab3cdd0 | |
parent | 38229772c4d82266ba2c4e05163367fbf773a170 (diff) |
Fix deprecation warningsv5.13.0-beta1v5.13.0-alpha1
mainwindow.cpp:397:51: warning: 'static QPixmap QPixmap::grabWidget(QObject*, int, int, int, int)' is deprecated: Use QWidget::grab() instead [-Wdeprecated-declarations]
changeproperties.cpp:206:47: warning: 'void QTreeWidgetItem::setTextColor(int, const QColor&)' is deprecated: Use QTreeWidgetItem::setForeground() instead [-Wdeprecated-declarations]
...
qaxserver.cpp:290:101: warning: 'QVariant::QVariant(const char*)' is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations]
Change-Id: I500ef8a7b5ecf6d7c189388113f217a8bd5a6e55
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
-rw-r--r-- | src/activeqt/control/qaxserver.cpp | 2 | ||||
-rw-r--r-- | tools/testcon/changeproperties.cpp | 6 | ||||
-rw-r--r-- | tools/testcon/controlinfo.cpp | 4 | ||||
-rw-r--r-- | tools/testcon/mainwindow.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp index eb64fd4..8ae62a2 100644 --- a/src/activeqt/control/qaxserver.cpp +++ b/src/activeqt/control/qaxserver.cpp @@ -287,7 +287,7 @@ HRESULT UpdateRegistry(BOOL bRegister) if (qAxOutProcServer) settings->setValue(QLatin1String("/AppID/") + module + QLatin1String(".EXE/AppID"), appId); else - settings->setValue(QLatin1String("/AppID/") + appId + QLatin1String("/DllSurrogate"), ""); + settings->setValue(QLatin1String("/AppID/") + appId + QLatin1String("/DllSurrogate"), QString()); const QStringList keys = qAxFactory()->featureList(); for (const QString &classNameIn : keys) { diff --git a/tools/testcon/changeproperties.cpp b/tools/testcon/changeproperties.cpp index cae1f84..9b5cca2 100644 --- a/tools/testcon/changeproperties.cpp +++ b/tools/testcon/changeproperties.cpp @@ -202,9 +202,9 @@ void ChangeProperties::updateProperties() item->setText(0, QString::fromLatin1(property.name())); item->setText(1, QString::fromLatin1(property.typeName())); if (!property.isDesignable()) { - item->setTextColor(0, Qt::gray); - item->setTextColor(1, Qt::gray); - item->setTextColor(2, Qt::gray); + item->setForeground(0, Qt::gray); + item->setForeground(1, Qt::gray); + item->setForeground(2, Qt::gray); } QVariant var = activex->property(property.name()); diff --git a/tools/testcon/controlinfo.cpp b/tools/testcon/controlinfo.cpp index 5782c7d..4c19fd1 100644 --- a/tools/testcon/controlinfo.cpp +++ b/tools/testcon/controlinfo.cpp @@ -99,8 +99,8 @@ void ControlInfo::setControl(QWidget *activex) item->setText(0, QString::fromLatin1(property.name())); item->setText(1, QString::fromLatin1(property.typeName())); if (!property.isDesignable()) { - item->setTextColor(0, Qt::gray); - item->setTextColor(1, Qt::gray); + item->setForeground(0, Qt::gray); + item->setForeground(1, Qt::gray); } } group->setText(1, QString::number(count)); diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp index ae496e7..0c3d3e8 100644 --- a/tools/testcon/mainwindow.cpp +++ b/tools/testcon/mainwindow.cpp @@ -394,7 +394,7 @@ void MainWindow::on_actionControlPixmap_triggered() return; QLabel *label = new QLabel; - label->setPixmap(QPixmap::grabWidget(container)); + label->setPixmap(container->grab()); QMdiSubWindow *subWindow = m_mdiArea->addSubWindow(label); subWindow->setWindowTitle(tr("%1 - Pixmap").arg(container->windowTitle())); label->show(); |