summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-15 21:45:47 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-15 21:47:27 +0200
commit81eb502b85008c8d50c2e0c947ae59fcf9263f00 (patch)
tree92bc0a22446bfc8df42bded24f98988ca5f2373e
parent9099c8934ebc042b38435eae293cd46e4fd9b883 (diff)
parentc7a44cfb5b243028bfe187715297c6deb2c09ffa (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: .qmake.conf examples/examples.pro Change-Id: I1b10716619d6a07466db9d5407a958062e7cd38a
-rw-r--r--dist/changes-5.9.228
-rw-r--r--examples/assistant/doc/src/simpletextviewer.qdoc17
-rw-r--r--examples/assistant/remotecontrol/main.cpp8
-rw-r--r--examples/assistant/remotecontrol/remotecontrol.cpp15
-rw-r--r--examples/assistant/remotecontrol/remotecontrol.h9
-rw-r--r--examples/assistant/simpletextviewer/assistant.cpp17
-rw-r--r--examples/assistant/simpletextviewer/assistant.h4
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.cpp26
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.h6
-rw-r--r--examples/assistant/simpletextviewer/main.cpp6
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp20
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.h9
-rw-r--r--examples/assistant/simpletextviewer/textedit.cpp8
-rw-r--r--examples/assistant/simpletextviewer/textedit.h8
-rw-r--r--src/assistant/assistant/doc/snippets/simpletextviewer/assistant.cpp119
-rw-r--r--src/assistant/assistant/doc/snippets/simpletextviewer/findfiledialog.cpp231
-rw-r--r--src/assistant/assistant/doc/snippets/simpletextviewer/mainwindow.cpp156
-rw-r--r--src/assistant/assistant/main.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_taskmenu.cpp7
-rw-r--r--src/kmap2qmap/main.cpp4
-rw-r--r--src/qdoc/qdocdatabase.h2
-rw-r--r--src/windeployqt/main.cpp10
22 files changed, 121 insertions, 591 deletions
diff --git a/dist/changes-5.9.2 b/dist/changes-5.9.2
new file mode 100644
index 000000000..8fa99a525
--- /dev/null
+++ b/dist/changes-5.9.2
@@ -0,0 +1,28 @@
+Qt 5.9.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.9.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.9 series is binary compatible with the 5.8.x series.
+Applications compiled for 5.8 will continue to run with 5.9.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Qt 5.9.2 Changes *
+****************************************************************************
+
+androiddeployqt
+---------------
+
+ - [QTBUG-61636] Fixed a crash when using ANDROID_DEPLOYMENT_DEPENDENCIES
+ to specify the files to deploy.
diff --git a/examples/assistant/doc/src/simpletextviewer.qdoc b/examples/assistant/doc/src/simpletextviewer.qdoc
index 7afef1a78..4954fbfc5 100644
--- a/examples/assistant/doc/src/simpletextviewer.qdoc
+++ b/examples/assistant/doc/src/simpletextviewer.qdoc
@@ -34,15 +34,14 @@
\image simpletextviewer-example.png
- This is done in two stages. Firstly, documentation is created and \QA
- is customized; secondly, the functionality to launch and control
- \QA is added to the application.
+ This example shows how to use \QA as a customized help viewer in
+ a custom application. This is done in two stages. Firstly,
+ documentation is created and \QA is customized; secondly, the
+ functionality to launch and control \QA is added to the application.
The Simple Text Viewer application lets the user select and view
- existing files.
-
- The application provides its own custom documentation that is
- available from the \gui Help menu in the main window's menu bar
+ existing files. The application provides its own custom documentation
+ that is available from the \gui Help menu in the main window's menu bar
or by clicking the \gui Help button in the application's find file
dialog.
@@ -353,8 +352,8 @@
The implementation for \c showDocumentation() is now straightforward.
Firstly, we ensure that \QA is running, then we send the request to
display the \a page via the \c stdin channel of the process. It is very
- important here that the command is terminated by the '\\0' character
- followed by an end of line token to flush the channel.
+ important here that the command is terminated by an end of line token
+ to flush the channel.
\snippet simpletextviewer/assistant.cpp 1
diff --git a/examples/assistant/remotecontrol/main.cpp b/examples/assistant/remotecontrol/main.cpp
index 3652e6251..ee5201b79 100644
--- a/examples/assistant/remotecontrol/main.cpp
+++ b/examples/assistant/remotecontrol/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,16 +48,14 @@
**
****************************************************************************/
-#include <QtWidgets/QApplication>
#include "remotecontrol.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
- Q_INIT_RESOURCE(remotecontrol);
-
QApplication a(argc, argv);
RemoteControl w;
w.show();
- a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
return a.exec();
}
diff --git a/examples/assistant/remotecontrol/remotecontrol.cpp b/examples/assistant/remotecontrol/remotecontrol.cpp
index 3ee8bb27d..916a08efd 100644
--- a/examples/assistant/remotecontrol/remotecontrol.cpp
+++ b/examples/assistant/remotecontrol/remotecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,15 +48,14 @@
**
****************************************************************************/
-#include <QtCore/QDir>
-#include <QtCore/QProcess>
-#include <QtCore/QTextStream>
-#include <QtCore/QLibraryInfo>
-
-#include <QtWidgets/QMessageBox>
-
#include "remotecontrol.h"
+#include <QDir>
+#include <QLibraryInfo>
+#include <QMessageBox>
+#include <QProcess>
+#include <QTextStream>
+
RemoteControl::RemoteControl(QWidget *parent, Qt::WindowFlags flags)
: QMainWindow(parent, flags)
{
diff --git a/examples/assistant/remotecontrol/remotecontrol.h b/examples/assistant/remotecontrol/remotecontrol.h
index 16a9f9441..40e370f71 100644
--- a/examples/assistant/remotecontrol/remotecontrol.h
+++ b/examples/assistant/remotecontrol/remotecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -51,19 +51,20 @@
#ifndef REMOTECONTROL_H
#define REMOTECONTROL_H
-#include <QtWidgets/QMainWindow>
#include "ui_remotecontrol.h"
+#include <QMainWindow>
+
QT_BEGIN_NAMESPACE
class QProcess;
-QT_END_NAMESPACE;
+QT_END_NAMESPACE
class RemoteControl : public QMainWindow
{
Q_OBJECT
public:
- RemoteControl(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ RemoteControl(QWidget *parent = nullptr, Qt::WindowFlags flags = 0);
~RemoteControl();
private:
diff --git a/examples/assistant/simpletextviewer/assistant.cpp b/examples/assistant/simpletextviewer/assistant.cpp
index a9b2776b6..9e668bb7f 100644
--- a/examples/assistant/simpletextviewer/assistant.cpp
+++ b/examples/assistant/simpletextviewer/assistant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,15 +48,14 @@
**
****************************************************************************/
-#include <QtCore/QByteArray>
-#include <QtCore/QDir>
-#include <QtCore/QLibraryInfo>
-#include <QtCore/QProcess>
-
-#include <QtWidgets/QMessageBox>
-
#include "assistant.h"
+#include <QByteArray>
+#include <QDir>
+#include <QLibraryInfo>
+#include <QMessageBox>
+#include <QProcess>
+
Assistant::Assistant()
: proc(0)
{
@@ -109,7 +108,7 @@ bool Assistant::startAssistant()
proc->start(app, args);
if (!proc->waitForStarted()) {
- QMessageBox::critical(0, QObject::tr("Simple Text Viewer"),
+ QMessageBox::critical(nullptr, QObject::tr("Simple Text Viewer"),
QObject::tr("Unable to launch Qt Assistant (%1)").arg(app));
return false;
}
diff --git a/examples/assistant/simpletextviewer/assistant.h b/examples/assistant/simpletextviewer/assistant.h
index fce67f0da..dada5a1ee 100644
--- a/examples/assistant/simpletextviewer/assistant.h
+++ b/examples/assistant/simpletextviewer/assistant.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -51,7 +51,7 @@
#ifndef ASSISTANT_H
#define ASSISTANT_H
-#include <QtCore/QString>
+#include <QString>
QT_BEGIN_NAMESPACE
class QProcess;
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
index b34b8aeae..cf64e9a6a 100644
--- a/examples/assistant/simpletextviewer/findfiledialog.cpp
+++ b/examples/assistant/simpletextviewer/findfiledialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,21 +48,21 @@
**
****************************************************************************/
-#include <QtCore/QDir>
-#include <QtWidgets/QLayout>
-#include <QtWidgets/QComboBox>
-#include <QtWidgets/QTreeWidget>
-#include <QtWidgets/QLayout>
-#include <QtWidgets/QFileDialog>
-#include <QtWidgets/QDialogButtonBox>
-#include <QtWidgets/QToolButton>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QLabel>
-
-#include "findfiledialog.h"
#include "assistant.h"
+#include "findfiledialog.h"
#include "textedit.h"
+#include <QComboBox>
+#include <QDialogButtonBox>
+#include <QDir>
+#include <QFileDialog>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QToolButton>
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+
//! [0]
FindFileDialog::FindFileDialog(TextEdit *editor, Assistant *assistant)
: QDialog(editor)
diff --git a/examples/assistant/simpletextviewer/findfiledialog.h b/examples/assistant/simpletextviewer/findfiledialog.h
index 2d5b1378a..6ca57b061 100644
--- a/examples/assistant/simpletextviewer/findfiledialog.h
+++ b/examples/assistant/simpletextviewer/findfiledialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -51,7 +51,7 @@
#ifndef FINDFILEDIALOG_H
#define FINDFILEDIALOG_H
-#include <QtWidgets/QDialog>
+#include <QDialog>
QT_BEGIN_NAMESPACE
class QComboBox;
@@ -76,7 +76,7 @@ public:
private slots:
void browse();
void help();
- void openFile(QTreeWidgetItem *item = 0);
+ void openFile(QTreeWidgetItem *item = nullptr);
void update();
private:
diff --git a/examples/assistant/simpletextviewer/main.cpp b/examples/assistant/simpletextviewer/main.cpp
index 30c886f5a..55c1039f8 100644
--- a/examples/assistant/simpletextviewer/main.cpp
+++ b/examples/assistant/simpletextviewer/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,10 +48,10 @@
**
****************************************************************************/
-#include <QtWidgets/QApplication>
-
#include "mainwindow.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
index 0660a0426..5b0564ca1 100644
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ b/examples/assistant/simpletextviewer/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,18 +48,18 @@
**
****************************************************************************/
-#include <QtCore/QLibraryInfo>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QMenu>
-#include <QtWidgets/QMenuBar>
-#include <QtWidgets/QMessageBox>
-
-#include "mainwindow.h"
-#include "findfiledialog.h"
#include "assistant.h"
+#include "findfiledialog.h"
+#include "mainwindow.h"
#include "textedit.h"
+#include <QAction>
+#include <QApplication>
+#include <QLibraryInfo>
+#include <QMenu>
+#include <QMenuBar>
+#include <QMessageBox>
+
// ![0]
MainWindow::MainWindow()
{
diff --git a/examples/assistant/simpletextviewer/mainwindow.h b/examples/assistant/simpletextviewer/mainwindow.h
index 7026b5eca..e8e917ea3 100644
--- a/examples/assistant/simpletextviewer/mainwindow.h
+++ b/examples/assistant/simpletextviewer/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -51,7 +51,12 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtWidgets/QMainWindow>
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+QT_END_NAMESPACE
class Assistant;
class TextEdit;
diff --git a/examples/assistant/simpletextviewer/textedit.cpp b/examples/assistant/simpletextviewer/textedit.cpp
index 81cb3251a..18cd767eb 100644
--- a/examples/assistant/simpletextviewer/textedit.cpp
+++ b/examples/assistant/simpletextviewer/textedit.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,11 +48,11 @@
**
****************************************************************************/
-#include <QtCore/QFileInfo>
-#include <QtCore/QFile>
-
#include "textedit.h"
+#include <QFile>
+#include <QFileInfo>
+
TextEdit::TextEdit(QWidget *parent)
: QTextEdit(parent)
{
diff --git a/examples/assistant/simpletextviewer/textedit.h b/examples/assistant/simpletextviewer/textedit.h
index 70bcf75af..b1cb243fb 100644
--- a/examples/assistant/simpletextviewer/textedit.h
+++ b/examples/assistant/simpletextviewer/textedit.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -51,15 +51,15 @@
#ifndef TEXTEDIT_H
#define TEXTEDIT_H
-#include <QtCore/QUrl>
-#include <QtWidgets/QTextEdit>
+#include <QTextEdit>
+#include <QUrl>
class TextEdit : public QTextEdit
{
Q_OBJECT
public:
- TextEdit(QWidget *parent = 0);
+ TextEdit(QWidget *parent = nullptr);
void setContents(const QString &fileName);
private:
diff --git a/src/assistant/assistant/doc/snippets/simpletextviewer/assistant.cpp b/src/assistant/assistant/doc/snippets/simpletextviewer/assistant.cpp
deleted file mode 100644
index 5bdac96f2..000000000
--- a/src/assistant/assistant/doc/snippets/simpletextviewer/assistant.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QByteArray>
-#include <QtCore/QDir>
-#include <QtCore/QLibraryInfo>
-#include <QtCore/QProcess>
-
-#include <QtWidgets/QMessageBox>
-
-#include "assistant.h"
-
-Assistant::Assistant()
- : proc(0)
-{
-}
-
-//! [0]
-Assistant::~Assistant()
-{
- if (proc && proc->state() == QProcess::Running) {
- proc->terminate();
- proc->waitForFinished(3000);
- }
- delete proc;
-}
-//! [0]
-
-//! [1]
-void Assistant::showDocumentation(const QString &page)
-{
- if (!startAssistant())
- return;
-
- QByteArray ba("SetSource ");
- ba.append("qthelp://com.trolltech.examples.simpletextviewer/doc/");
-
- proc->write(ba + page.toLocal8Bit() + '\n');
-}
-//! [1]
-
-//! [2]
-bool Assistant::startAssistant()
-{
- if (!proc)
- proc = new QProcess();
-
- if (proc->state() != QProcess::Running) {
- QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
-#if !defined(Q_OS_MAC)
- app += QLatin1String("assistant");
-#else
- app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");
-#endif
-
- QStringList args;
- args << QLatin1String("-collectionFile")
- << QLibraryInfo::location(QLibraryInfo::ExamplesPath)
- + QLatin1String("/help/simpletextviewer/documentation/simpletextviewer.qhc")
- << QLatin1String("-enableRemoteControl");
-
- proc->start(app, args);
-
- if (!proc->waitForStarted()) {
- QMessageBox::critical(0, QObject::tr("Simple Text Viewer"),
- QObject::tr("Unable to launch Qt Assistant (%1)").arg(app));
- return false;
- }
- }
- return true;
-}
-//! [2]
diff --git a/src/assistant/assistant/doc/snippets/simpletextviewer/findfiledialog.cpp b/src/assistant/assistant/doc/snippets/simpletextviewer/findfiledialog.cpp
deleted file mode 100644
index 3d2206e9a..000000000
--- a/src/assistant/assistant/doc/snippets/simpletextviewer/findfiledialog.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QDir>
-#include <QtWidgets/QLayout>
-#include <QtWidgets/QComboBox>
-#include <QtWidgets/QTreeWidget>
-#include <QtWidgets/QLayout>
-#include <QtWidgets/QFileDialog>
-#include <QtWidgets/QDialogButtonBox>
-#include <QtWidgets/QToolButton>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QLabel>
-
-#include "findfiledialog.h"
-#include "assistant.h"
-#include "textedit.h"
-
-//! [0]
-FindFileDialog::FindFileDialog(TextEdit *editor, Assistant *assistant)
- : QDialog(editor)
-{
- currentAssistant = assistant;
- currentEditor = editor;
-//! [0]
-
- createButtons();
- createComboBoxes();
- createFilesTree();
- createLabels();
- createLayout();
-
- directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
- fileNameComboBox->addItem("*");
- findFiles();
-
- setWindowTitle(tr("Find File"));
-//! [1]
-}
-//! [1]
-
-void FindFileDialog::browse()
-{
- QString currentDirectory = directoryComboBox->currentText();
- QString newDirectory = QFileDialog::getExistingDirectory(this,
- tr("Select Directory"), currentDirectory);
- if (!newDirectory.isEmpty()) {
- directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
- directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
- update();
- }
-}
-
-//! [2]
-void FindFileDialog::help()
-{
- currentAssistant->showDocumentation("filedialog.html");
-}
-//! [2]
-
-void FindFileDialog::openFile(QTreeWidgetItem *item)
-{
- if (!item) {
- item = foundFilesTree->currentItem();
- if (!item)
- return;
- }
-
- QString fileName = item->text(0);
- QString path = directoryComboBox->currentText() + QDir::separator();
-
- currentEditor->setContents(path + fileName);
- close();
-}
-
-void FindFileDialog::update()
-{
- findFiles();
- buttonBox->button(QDialogButtonBox::Open)->setEnabled(
- foundFilesTree->topLevelItemCount() > 0);
-}
-
-void FindFileDialog::findFiles()
-{
- QRegExp filePattern(fileNameComboBox->currentText() + "*");
- filePattern.setPatternSyntax(QRegExp::Wildcard);
-
- QDir directory(directoryComboBox->currentText());
-
- QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
- QStringList matchingFiles;
-
- foreach (QString file, allFiles) {
- if (filePattern.exactMatch(file))
- matchingFiles << file;
- }
- showFiles(matchingFiles);
-}
-
-void FindFileDialog::showFiles(const QStringList &files)
-{
- foundFilesTree->clear();
-
- for (int i = 0; i < files.count(); ++i) {
- QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
- item->setText(0, files[i]);
- }
-
- if (files.count() > 0)
- foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
-}
-
-void FindFileDialog::createButtons()
-{
- browseButton = new QToolButton;
- browseButton->setText(tr("..."));
- connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
-
- buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
- | QDialogButtonBox::Cancel
- | QDialogButtonBox::Help);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
-}
-
-void FindFileDialog::createComboBoxes()
-{
- directoryComboBox = new QComboBox;
- fileNameComboBox = new QComboBox;
-
- fileNameComboBox->setEditable(true);
- fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- directoryComboBox->setMinimumContentsLength(30);
- directoryComboBox->setSizeAdjustPolicy(
- QComboBox::AdjustToMinimumContentsLength);
- directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- connect(fileNameComboBox, SIGNAL(editTextChanged(QString)),
- this, SLOT(update()));
- connect(directoryComboBox, SIGNAL(currentIndexChanged(QString)),
- this, SLOT(update()));
-}
-
-void FindFileDialog::createFilesTree()
-{
- foundFilesTree = new QTreeWidget;
- foundFilesTree->setColumnCount(1);
- foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
- foundFilesTree->setRootIsDecorated(false);
- foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
-
- connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
- this, SLOT(openFile(QTreeWidgetItem*)));
-}
-
-void FindFileDialog::createLabels()
-{
- directoryLabel = new QLabel(tr("Search in:"));
- fileNameLabel = new QLabel(tr("File name (including wildcards):"));
-}
-
-void FindFileDialog::createLayout()
-{
- QHBoxLayout *fileLayout = new QHBoxLayout;
- fileLayout->addWidget(fileNameLabel);
- fileLayout->addWidget(fileNameComboBox);
-
- QHBoxLayout *directoryLayout = new QHBoxLayout;
- directoryLayout->addWidget(directoryLabel);
- directoryLayout->addWidget(directoryComboBox);
- directoryLayout->addWidget(browseButton);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addLayout(fileLayout);
- mainLayout->addLayout(directoryLayout);
- mainLayout->addWidget(foundFilesTree);
- mainLayout->addStretch();
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-}
diff --git a/src/assistant/assistant/doc/snippets/simpletextviewer/mainwindow.cpp b/src/assistant/assistant/doc/snippets/simpletextviewer/mainwindow.cpp
deleted file mode 100644
index 8028e4a11..000000000
--- a/src/assistant/assistant/doc/snippets/simpletextviewer/mainwindow.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QLibraryInfo>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QMenu>
-#include <QtWidgets/QMenuBar>
-#include <QtWidgets/QMessageBox>
-
-#include "mainwindow.h"
-#include "findfiledialog.h"
-#include "assistant.h"
-#include "textedit.h"
-
-// ![0]
-MainWindow::MainWindow()
-{
- assistant = new Assistant;
-// ![0]
- textViewer = new TextEdit;
- textViewer->setContents(QLibraryInfo::location(QLibraryInfo::ExamplesPath)
- + QLatin1String("/help/simpletextviewer/documentation/intro.html"));
- setCentralWidget(textViewer);
-
- createActions();
- createMenus();
-
- setWindowTitle(tr("Simple Text Viewer"));
- resize(750, 400);
-// ![1]
-}
-//! [1]
-
-//! [2]
-void MainWindow::closeEvent(QCloseEvent *)
-{
- delete assistant;
-}
-//! [2]
-
-void MainWindow::about()
-{
- QMessageBox::about(this, tr("About Simple Text Viewer"),
- tr("This example demonstrates how to use\n"
- "Qt Assistant as help system for your\n"
- "own application."));
-}
-
-//! [3]
-void MainWindow::showDocumentation()
-{
- assistant->showDocumentation("index.html");
-}
-//! [3]
-
-void MainWindow::open()
-{
- FindFileDialog dialog(textViewer, assistant);
- dialog.exec();
-}
-
-//! [4]
-void MainWindow::createActions()
-{
- assistantAct = new QAction(tr("Help Contents"), this);
- assistantAct->setShortcut(QKeySequence::HelpContents);
- connect(assistantAct, SIGNAL(triggered()), this, SLOT(showDocumentation()));
-//! [4]
-
- openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(QKeySequence::Open);
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
-
- clearAct = new QAction(tr("&Clear"), this);
- clearAct->setShortcut(tr("Ctrl+C"));
- connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
-
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcuts(QKeySequence::Quit);
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-
- aboutAct = new QAction(tr("&About"), this);
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
-
- aboutQtAct = new QAction(tr("About &Qt"), this);
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-//! [5]
-}
-//! [5]
-
-void MainWindow::createMenus()
-{
- fileMenu = new QMenu(tr("&File"), this);
- fileMenu->addAction(openAct);
- fileMenu->addAction(clearAct);
- fileMenu->addSeparator();
- fileMenu->addAction(exitAct);
-
- helpMenu = new QMenu(tr("&Help"), this);
- helpMenu->addAction(assistantAct);
- helpMenu->addSeparator();
- helpMenu->addAction(aboutAct);
- helpMenu->addAction(aboutQtAct);
-
-
- menuBar()->addMenu(fileMenu);
- menuBar()->addMenu(helpMenu);
-}
diff --git a/src/assistant/assistant/main.cpp b/src/assistant/assistant/main.cpp
index b9ca5f071..04f0fc968 100644
--- a/src/assistant/assistant/main.cpp
+++ b/src/assistant/assistant/main.cpp
@@ -270,7 +270,9 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
TRACE_OBJ
QScopedPointer<QCoreApplication> a(createApplication(argc, argv));
+#if QT_CONFIG(library)
a->addLibraryPath(a->applicationDirPath() + QLatin1String("/plugins"));
+#endif
setupTranslations();
#if defined(BROWSER_QTWEBKIT)
diff --git a/src/designer/src/lib/shared/qdesigner_taskmenu.cpp b/src/designer/src/lib/shared/qdesigner_taskmenu.cpp
index 4ae9bee12..af3c2af83 100644
--- a/src/designer/src/lib/shared/qdesigner_taskmenu.cpp
+++ b/src/designer/src/lib/shared/qdesigner_taskmenu.cpp
@@ -88,9 +88,10 @@ static QString objName(const QDesignerFormEditorInterface *core, QObject *object
const QString objectNameProperty = QStringLiteral("objectName");
const int index = sheet->indexOf(objectNameProperty);
- const qdesigner_internal::PropertySheetStringValue objectNameValue
- = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(sheet->property(index));
- return objectNameValue.value();
+ const QVariant v = sheet->property(index);
+ if (v.canConvert<qdesigner_internal::PropertySheetStringValue>())
+ return v.value<qdesigner_internal::PropertySheetStringValue>().value();
+ return v.toString();
}
enum { ApplyMinimumWidth = 0x1, ApplyMinimumHeight = 0x2, ApplyMaximumWidth = 0x4, ApplyMaximumHeight = 0x8 };
diff --git a/src/kmap2qmap/main.cpp b/src/kmap2qmap/main.cpp
index 60d49ddca..84125497e 100644
--- a/src/kmap2qmap/main.cpp
+++ b/src/kmap2qmap/main.cpp
@@ -697,8 +697,8 @@ bool KeymapParser::parseKmap(QFile *f)
if (kcpos >= 0 && kcpos < (tokens.count()-3) && tokens[kcpos+2] == "=") {
quint16 keycode = tokens[kcpos+1].toInt();
- if (keycode <= 0 || keycode > 0x1ff /* KEY_MAX */) {
- parseWarning("keycode out of range [0..0x1ff]");
+ if (keycode <= 0 || keycode > 0x2ff /* KEY_MAX */) {
+ parseWarning("keycode out of range [0..0x2ff]");
break;
}
diff --git a/src/qdoc/qdocdatabase.h b/src/qdoc/qdocdatabase.h
index 0af094878..4645754f4 100644
--- a/src/qdoc/qdocdatabase.h
+++ b/src/qdoc/qdocdatabase.h
@@ -147,7 +147,7 @@ class QDocForest
{
int flags = SearchBaseClasses | SearchEnumValues | NonFunction;
Node::Genus genus = Node::DontCare;
- if (relative)
+ if (relative && relative->genus() != Node::DOC)
genus = relative->genus();
foreach (Tree* t, searchOrder()) {
const Node* n = t->findNode(path, relative, flags, genus);
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index 8ed6fffdf..ba61b2c3c 100644
--- a/src/windeployqt/main.cpp
+++ b/src/windeployqt/main.cpp
@@ -37,6 +37,7 @@
#include <QtCore/QJsonArray>
#include <QtCore/QCommandLineParser>
#include <QtCore/QCommandLineOption>
+#include <QtCore/QOperatingSystemVersion>
#include <QtCore/QSharedPointer>
#include <QtCore/QVector>
@@ -1048,13 +1049,16 @@ static QString vcRedistDir()
// Look in reverse order for folder containing the debug redist folder
const QFileInfoList subDirs =
QDir(vc2017RedistDirName).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed);
+ const bool isWindows10 = QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10;
for (const QFileInfo &f : subDirs) {
QString path = f.absoluteFilePath();
if (QFileInfo(path + slash + vcDebugRedistDir()).isDir())
return path;
- path += QStringLiteral("/onecore");
- if (QFileInfo(path + slash + vcDebugRedistDir()).isDir())
- return path;
+ if (isWindows10) {
+ path += QStringLiteral("/onecore");
+ if (QFileInfo(path + slash + vcDebugRedistDir()).isDir())
+ return path;
+ }
}
std::wcerr << "Warning: Cannot find Visual Studio redist directory under "
<< QDir::toNativeSeparators(vc2017RedistDirName).toStdWString() << ".\n";