summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-07-09 10:50:00 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-07-29 12:46:41 +0200
commit6b2f32f3dc9de965801927a4bc5d970028a318a6 (patch)
treef62db38cfe9aa441b4bcb877ccc8f4bcbeb7974a
parentf7a50cab668c27ab8e17be96add02e515e9b1681 (diff)
downloadqttools-6b2f32f3dc9de965801927a4bc5d970028a318a6.tar.gz
Fix Qt6 build
Change-Id: Ie413ca2e2f81ac0e92628ffd2f3e93047a91bd0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/assistant/assistant/aboutdialog.cpp8
-rw-r--r--src/assistant/assistant/aboutdialog.h5
-rw-r--r--src/assistant/assistant/helpviewer.h4
-rw-r--r--src/assistant/assistant/helpviewer_qtb.cpp7
-rw-r--r--src/assistant/help/qhelpsearchresultwidget.cpp4
-rw-r--r--src/designer/src/designer/assistantclient.cpp2
-rw-r--r--src/designer/src/lib/shared/zoomwidget.cpp2
-rw-r--r--src/linguist/linguist/mainwindow.cpp2
-rw-r--r--src/linguist/shared/po.cpp2
-rw-r--r--src/linguist/shared/ts.cpp2
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp4
-rw-r--r--src/macdeployqt/shared/shared.cpp11
-rw-r--r--src/pixeltool/qpixeltool.cpp4
-rw-r--r--src/qtdiag/qtdiag.cpp6
14 files changed, 47 insertions, 16 deletions
diff --git a/src/assistant/assistant/aboutdialog.cpp b/src/assistant/assistant/aboutdialog.cpp
index 3682f1291..f5a38101d 100644
--- a/src/assistant/assistant/aboutdialog.cpp
+++ b/src/assistant/assistant/aboutdialog.cpp
@@ -82,9 +82,17 @@ QVariant AboutLabel::loadResource(int type, const QUrl &name)
return QVariant();
}
+
+#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
void AboutLabel::setSource(const QUrl &url)
+#else
+void AboutLabel::doSetSource(const QUrl &url, QTextDocument::ResourceType type)
+#endif
{
TRACE_OBJ
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ Q_UNUSED(type);
+#endif
if (url.isValid() && (!HelpViewer::isLocalUrl(url)
|| !HelpViewer::canOpenPage(url.path()))) {
if (!QDesktopServices::openUrl(url)) {
diff --git a/src/assistant/assistant/aboutdialog.h b/src/assistant/assistant/aboutdialog.h
index b791a4891..720292d7b 100644
--- a/src/assistant/assistant/aboutdialog.h
+++ b/src/assistant/assistant/aboutdialog.h
@@ -49,7 +49,12 @@ public:
private:
QVariant loadResource(int type, const QUrl &name) override;
+
+#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
void setSource(const QUrl &url) override;
+#else
+ void doSetSource(const QUrl &name, QTextDocument::ResourceType type) override;
+#endif
QMap<QString, QByteArray> m_resourceMap;
};
diff --git a/src/assistant/assistant/helpviewer.h b/src/assistant/assistant/helpviewer.h
index 00e941000..1b4f23a9a 100644
--- a/src/assistant/assistant/helpviewer.h
+++ b/src/assistant/assistant/helpviewer.h
@@ -82,7 +82,11 @@ public:
void setTitle(const QString &title);
QUrl source() const;
+#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
void setSource(const QUrl &url) TEXTBROWSER_OVERRIDE;
+#else
+ void doSetSource(const QUrl &url, QTextDocument::ResourceType type) TEXTBROWSER_OVERRIDE;
+#endif
QString selectedText() const;
bool isForwardAvailable() const;
diff --git a/src/assistant/assistant/helpviewer_qtb.cpp b/src/assistant/assistant/helpviewer_qtb.cpp
index b522e1ba2..b4df3af0f 100644
--- a/src/assistant/assistant/helpviewer_qtb.cpp
+++ b/src/assistant/assistant/helpviewer_qtb.cpp
@@ -143,9 +143,16 @@ QUrl HelpViewer::source() const
return QTextBrowser::source();
}
+#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
void HelpViewer::setSource(const QUrl &url)
+#else
+void HelpViewer::doSetSource(const QUrl &url, QTextDocument::ResourceType type)
+#endif
{
TRACE_OBJ
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ Q_UNUSED(type);
+#endif
if (launchWithExternalApp(url))
return;
diff --git a/src/assistant/help/qhelpsearchresultwidget.cpp b/src/assistant/help/qhelpsearchresultwidget.cpp
index b7d61b494..c439e53f7 100644
--- a/src/assistant/help/qhelpsearchresultwidget.cpp
+++ b/src/assistant/help/qhelpsearchresultwidget.cpp
@@ -113,7 +113,11 @@ signals:
void requestShowLink(const QUrl &url);
private slots:
+#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
void setSource(const QUrl & /* name */) override {}
+#else
+ void doSetSource(const QUrl & /*name*/, QTextDocument::ResourceType /*type*/) override {}
+#endif
};
diff --git a/src/designer/src/designer/assistantclient.cpp b/src/designer/src/designer/assistantclient.cpp
index bf8026c3c..fb8bb5dde 100644
--- a/src/designer/src/designer/assistantclient.cpp
+++ b/src/designer/src/designer/assistantclient.cpp
@@ -85,7 +85,7 @@ bool AssistantClient::sendCommand(const QString &cmd, QString *errorMessage)
return false;
}
QTextStream str(m_process);
- str << cmd << QLatin1Char('\n') << endl;
+ str << cmd << QLatin1Char('\n') << Qt::endl;
return true;
}
diff --git a/src/designer/src/lib/shared/zoomwidget.cpp b/src/designer/src/lib/shared/zoomwidget.cpp
index fef509a39..1ca74f44b 100644
--- a/src/designer/src/lib/shared/zoomwidget.cpp
+++ b/src/designer/src/lib/shared/zoomwidget.cpp
@@ -290,7 +290,7 @@ ZoomWidget::ZoomWidget(QWidget *parent) :
void ZoomWidget::setWidget(QWidget *w, Qt::WindowFlags wFlags)
{
if (debugZoomWidget)
- qDebug() << "ZoomWidget::setWidget" << w << bin << wFlags;
+ qDebug() << "ZoomWidget::setWidget" << w << Qt::bin << wFlags;
if (m_proxy) {
scene().removeItem(m_proxy);
diff --git a/src/linguist/linguist/mainwindow.cpp b/src/linguist/linguist/mainwindow.cpp
index f443d25ea..a738896f9 100644
--- a/src/linguist/linguist/mainwindow.cpp
+++ b/src/linguist/linguist/mainwindow.cpp
@@ -1347,7 +1347,7 @@ void MainWindow::manual()
<< (QT_VERSION >> 16) << ((QT_VERSION >> 8) & 0xFF)
<< (QT_VERSION & 0xFF)
<< QLatin1String("/qtlinguist/qtlinguist-index.html")
- << QLatin1Char('\n') << endl;
+ << QLatin1Char('\n') << Qt::endl;
}
void MainWindow::about()
diff --git a/src/linguist/shared/po.cpp b/src/linguist/shared/po.cpp
index 4e623e6a3..19ba12b96 100644
--- a/src/linguist/shared/po.cpp
+++ b/src/linguist/shared/po.cpp
@@ -779,7 +779,7 @@ bool savePO(const Translator &translator, QIODevice &dev, ConversionData &)
out << poEscapedString(QString(), QString::fromLatin1("msgstr"), true, hdrStr);
foreach (const TranslatorMessage &msg, translator.messages()) {
- out << endl;
+ out << Qt::endl;
if (!msg.translatorComment().isEmpty())
out << poEscapedLines(QLatin1String("#"), true, msg.translatorComment());
diff --git a/src/linguist/shared/ts.cpp b/src/linguist/shared/ts.cpp
index 153f9708b..6a3f56d52 100644
--- a/src/linguist/shared/ts.cpp
+++ b/src/linguist/shared/ts.cpp
@@ -486,7 +486,7 @@ static void writeExtras(QTextStream &t, const char *indent,
}
outs.sort();
foreach (const QString &out, outs)
- t << indent << out << endl;
+ t << indent << out << Qt::endl;
}
static void writeVariants(QTextStream &t, const char *indent, const QString &input)
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 0599b739e..698176cbc 100644
--- a/src/macdeployqt/macdeployqt/main.cpp
+++ b/src/macdeployqt/macdeployqt/main.cpp
@@ -210,7 +210,9 @@ int main(int argc, char **argv)
// Update deploymentInfo.deployedFrameworks - the QML imports
// may have brought in extra frameworks as dependencies.
deploymentInfo.deployedFrameworks += findAppFrameworkNames(appBundlePath);
- deploymentInfo.deployedFrameworks = deploymentInfo.deployedFrameworks.toSet().toList();
+ deploymentInfo.deployedFrameworks =
+ QSet<QString>(deploymentInfo.deployedFrameworks.begin(),
+ deploymentInfo.deployedFrameworks.end()).values();
}
if (plugins && !deploymentInfo.qtPath.isEmpty()) {
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index a248d8ccd..23a2f9c49 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -1463,11 +1463,12 @@ QSet<QString> codesignBundle(const QString &identity,
continue;
// Check if there are unsigned dependencies, sign these first.
- QStringList dependencies =
- getBinaryDependencies(rootBinariesPath, binary, additionalBinariesContainingRpaths).toSet()
- .subtract(signedBinaries)
- .subtract(pendingBinariesSet)
- .toList();
+ QStringList dependencies = getBinaryDependencies(rootBinariesPath, binary,
+ additionalBinariesContainingRpaths);
+ dependencies = QSet<QString>(dependencies.begin(), dependencies.end())
+ .subtract(signedBinaries)
+ .subtract(pendingBinariesSet)
+ .values();
if (!dependencies.isEmpty()) {
pendingBinaries.push(binary);
diff --git a/src/pixeltool/qpixeltool.cpp b/src/pixeltool/qpixeltool.cpp
index 67e2afdf5..aebe13df1 100644
--- a/src/pixeltool/qpixeltool.cpp
+++ b/src/pixeltool/qpixeltool.cpp
@@ -682,8 +682,8 @@ QTextStream &operator<<(QTextStream &str, const QScreen *screen)
{
const QRect geometry = screen->geometry();
str << '"' << screen->name() << "\" " << geometry.width()
- << 'x' << geometry.height() << forcesign << geometry.x() << geometry.y()
- << noforcesign << ", " << qRound(screen->logicalDotsPerInch()) << "DPI"
+ << 'x' << geometry.height() << Qt::forcesign << geometry.x() << geometry.y()
+ << Qt::noforcesign << ", " << qRound(screen->logicalDotsPerInch()) << "DPI"
<< ", Depth: " << screen->depth() << ", " << screen->refreshRate() << "Hz";
const qreal dpr = screen->devicePixelRatio();
if (!qFuzzyCompare(dpr, qreal(1)))
diff --git a/src/qtdiag/qtdiag.cpp b/src/qtdiag/qtdiag.cpp
index 9b082e37e..04cc72dfb 100644
--- a/src/qtdiag/qtdiag.cpp
+++ b/src/qtdiag/qtdiag.cpp
@@ -102,7 +102,7 @@ QTextStream &operator<<(QTextStream &str, const QDpi &d)
QTextStream &operator<<(QTextStream &str, const QRect &r)
{
- str << r.size() << forcesign << r.x() << r.y() << noforcesign;
+ str << r.size() << Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
return str;
}
@@ -480,7 +480,7 @@ QString qtDiag(unsigned flags)
# ifndef QT_NO_SSL
if (QSslSocket::supportsSsl()) {
str << "Using \"" << QSslSocket::sslLibraryVersionString() << "\", version: 0x"
- << hex << QSslSocket::sslLibraryVersionNumber() << dec;
+ << Qt::hex << QSslSocket::sslLibraryVersionNumber() << Qt::dec;
} else {
str << "\nSSL is not supported.";
}
@@ -528,7 +528,7 @@ QString qtDiag(unsigned flags)
if (passwordMaskCharacter.unicode() >= 32 && passwordMaskCharacter.unicode() < 128)
str << '\'' << passwordMaskCharacter << '\'';
else
- str << "U+" << qSetFieldWidth(4) << qSetPadChar('0') << uppercasedigits << hex << passwordMaskCharacter.unicode() << dec << qSetFieldWidth(0);
+ str << "U+" << qSetFieldWidth(4) << qSetPadChar('0') << Qt::uppercasedigits << Qt::hex << passwordMaskCharacter.unicode() << Qt::dec << qSetFieldWidth(0);
str << '\n'
<< " fontSmoothingGamma: " << styleHints->fontSmoothingGamma() << '\n'
<< " useRtlExtensions: " << styleHints->useRtlExtensions() << '\n'