summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-18 16:09:29 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-18 16:09:29 +0100
commitd3ec09c1c0b6079335136e25f7957ea75ec4e76c (patch)
tree3063b7815c56ed5db187967c45b53ec0f19b3650 /src
parent6afde37f3e3dfe707dcaf81994d34e94f74d9537 (diff)
parent98cbd8ba0b1b91206ddd9cbf88ed4fc255e9aeb8 (diff)
downloadqttools-d3ec09c1c0b6079335136e25f7957ea75ec4e76c.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Icc911c4f334091c0e1ece149ac68fab25ca07bd0
Diffstat (limited to 'src')
-rw-r--r--src/assistant/assistant/assistant.pro6
-rw-r--r--src/assistant/assistant/centralwidget.h16
-rw-r--r--src/assistant/assistant/doc/qtassistant.qdocconf6
-rw-r--r--src/assistant/assistant/mainwindow.cpp16
-rw-r--r--src/assistant/assistant/mainwindow.h2
-rw-r--r--src/assistant/assistant/openpagesmanager.cpp8
-rw-r--r--src/assistant/assistant/openpagesmanager.h7
-rw-r--r--src/assistant/assistant/openpagesmodel.h8
-rw-r--r--src/assistant/help/doc/qthelp.qdocconf12
-rw-r--r--src/assistant/help/doc/src/qthelp.qdoc22
-rw-r--r--src/assistant/qcollectiongenerator/main.cpp7
-rw-r--r--src/designer/src/components/propertyeditor/previewwidget.ui22
-rw-r--r--src/designer/src/designer/doc/qtdesigner.qdocconf6
-rw-r--r--src/designer/src/designer/doc/src/designer-manual.qdoc2
-rw-r--r--src/designer/src/designer/qdesigner_workbench.cpp2
-rw-r--r--src/designer/src/lib/shared/filterwidget.cpp2
-rw-r--r--src/designer/src/lib/uilib/formbuilder.cpp2
-rw-r--r--src/designer/src/plugins/plugins.pri2
-rw-r--r--src/designer/src/plugins/plugins.pro3
-rw-r--r--src/designer/src/src.pro2
-rw-r--r--src/designer/src/uitools/doc/qtuitools.qdocconf12
-rw-r--r--src/linguist/linguist/doc/qtlinguist.qdocconf6
-rw-r--r--src/linguist/lrelease/main.cpp2
-rw-r--r--src/linguist/shared/proitems.h20
-rw-r--r--src/linguist/shared/qmakebuiltins.cpp26
-rw-r--r--src/linguist/shared/qmakeevaluator.h2
-rw-r--r--src/linguist/shared/qmakeglobals.cpp23
-rw-r--r--src/linguist/shared/qmakeglobals.h2
-rw-r--r--src/linguist/shared/qmakeparser.cpp7
-rw-r--r--src/qdbus/qdbus/qdbus.cpp8
-rw-r--r--src/qdbus/qdbusviewer/qdbusmodel.cpp6
-rw-r--r--src/qdbus/qdbusviewer/qdbusmodel.h3
-rw-r--r--src/qdbus/qdbusviewer/qdbusviewer.cpp5
-rw-r--r--src/qdbus/qdbusviewer/qdbusviewer.h2
34 files changed, 158 insertions, 119 deletions
diff --git a/src/assistant/assistant/assistant.pro b/src/assistant/assistant/assistant.pro
index 168725c4c..1ad63f0a1 100644
--- a/src/assistant/assistant/assistant.pro
+++ b/src/assistant/assistant/assistant.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
LANGUAGE = C++
TARGET = assistant
DESTDIR = $$QT.help.bins
-qtHaveModule(webkitwidgets) {
+qtHaveModule(webkitwidgets):!contains(QT_CONFIG, static) {
QT += webkitwidgets
} else {
DEFINES += QT_NO_WEBKIT
@@ -79,7 +79,7 @@ SOURCES += aboutdialog.cpp \
openpageswidget.cpp \
openpagesmanager.cpp \
openpagesswitcher.cpp
-qtHaveModule(webkitwidgets) {
+qtHaveModule(webkitwidgets):!contains(QT_CONFIG, static) {
SOURCES += helpviewer_qwv.cpp
} else {
SOURCES += helpviewer_qtb.cpp
@@ -107,7 +107,7 @@ mac {
QMAKE_INFO_PLIST = Info_mac.plist
}
-contains(CONFIG, static): {
+contains(QT_CONFIG, static): {
SQLPLUGINS = $$unique(sql-plugins)
contains(SQLPLUGINS, sqlite): {
QTPLUGIN += qsqlite
diff --git a/src/assistant/assistant/centralwidget.h b/src/assistant/assistant/centralwidget.h
index c3ef835d7..f0d524b36 100644
--- a/src/assistant/assistant/centralwidget.h
+++ b/src/assistant/assistant/centralwidget.h
@@ -57,8 +57,9 @@ class QPrinter;
class TabBar : public QTabBar
{
Q_OBJECT
+ friend class CentralWidget;
+
public:
- TabBar(QWidget *parent = 0);
~TabBar();
int addNewTab(const QString &title);
@@ -72,6 +73,9 @@ signals:
void currentTabChanged(HelpViewer *viewer);
void addBookmark(const QString &title, const QString &url);
+private:
+ TabBar(QWidget *parent = 0);
+
private slots:
void slotCurrentChanged(int index);
void slotTabCloseRequested(int index);
@@ -81,6 +85,7 @@ private slots:
class CentralWidget : public QWidget
{
Q_OBJECT
+ friend class OpenPagesManager;
public:
CentralWidget(QWidget *parent = 0);
@@ -97,12 +102,7 @@ public:
HelpViewer *viewerAt(int index) const;
HelpViewer *currentHelpViewer() const;
-
- void addPage(HelpViewer *page, bool fromSearch = false);
- void removePage(int index);
-
int currentIndex() const;
- void setCurrentPage(HelpViewer *page);
void connectTabBar();
@@ -162,6 +162,10 @@ private:
void connectSignals(HelpViewer *page);
bool eventFilter(QObject *object, QEvent *e);
+ void removePage(int index);
+ void setCurrentPage(HelpViewer *page);
+ void addPage(HelpViewer *page, bool fromSearch = false);
+
private:
#ifndef QT_NO_PRINTER
QPrinter *m_printer;
diff --git a/src/assistant/assistant/doc/qtassistant.qdocconf b/src/assistant/assistant/doc/qtassistant.qdocconf
index 76e65903d..a01c7caa5 100644
--- a/src/assistant/assistant/doc/qtassistant.qdocconf
+++ b/src/assistant/assistant/doc/qtassistant.qdocconf
@@ -2,16 +2,16 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtAssistant
description = Qt Assistant Manual
-url = http://qt-project.org/doc/qtassistant
+url = http://qt-project.org/doc/qt-$QT_VER/qtassistant
qhp.projects = QtAssistant
qhp.QtAssistant.file = qtassistant.qhp
-qhp.QtAssistant.namespace = org.qt-project.assistant.500
+qhp.QtAssistant.namespace = org.qt-project.assistant.$QT_VERSION_TAG
qhp.QtAssistant.virtualFolder = assistant
qhp.QtAssistant.indexTitle = Qt Assistant Manual
-qhp.QtAssistant.filterAttributes = qt 5.0.1 tools assistant
+qhp.QtAssistant.filterAttributes = qt $QT_VERSION tools assistant
qhp.QtAssistant.customFilters.QtAssistant.name = Qt Assistant Manual
qhp.QtAssistant.customFilters.QtAssistant.filterAttributes = qt tools assistant
qhp.QtAssistant.subprojects = manual examples
diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp
index 6f20e8221..0bffe93ce 100644
--- a/src/assistant/assistant/mainwindow.cpp
+++ b/src/assistant/assistant/mainwindow.cpp
@@ -473,15 +473,15 @@ void MainWindow::setupActions()
#endif
QMenu *menu = menuBar()->addMenu(tr("&File"));
- connect(menu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowFileMenu()));
-
OpenPagesManager * const openPages = OpenPagesManager::instance();
- m_newTabAction
- = menu->addAction(tr("New &Tab"), openPages, SLOT(createPage()));
+ m_newTabAction = menu->addAction(tr("New &Tab"), openPages, SLOT(createPage()));
m_newTabAction->setShortcut(QKeySequence::AddTab);
m_closeTabAction = menu->addAction(tr("&Close Tab"),
openPages, SLOT(closeCurrentPage()));
m_closeTabAction->setShortcuts(QKeySequence::Close);
+ m_closeTabAction->setEnabled(openPages->pageCount() > 1);
+ connect(openPages, SIGNAL(pageClosed()), this, SLOT(handlePageCountChanged()));
+ connect(openPages, SIGNAL(pageAdded(int)), this, SLOT(handlePageCountChanged()));
menu->addSeparator();
@@ -1129,13 +1129,9 @@ void MainWindow::registerDocumentation(const QString &component,
}
}
-void MainWindow::aboutToShowFileMenu()
+void MainWindow::handlePageCountChanged()
{
- OpenPagesManager * const openPages = OpenPagesManager::instance();
- if (openPages->pageCount() > 1)
- m_closeTabAction->setEnabled(true);
- else
- m_closeTabAction->setEnabled(false);
+ m_closeTabAction->setEnabled(OpenPagesManager::instance()->pageCount() > 1);
}
QT_END_NAMESPACE
diff --git a/src/assistant/assistant/mainwindow.h b/src/assistant/assistant/mainwindow.h
index ec35cf46e..891a0410c 100644
--- a/src/assistant/assistant/mainwindow.h
+++ b/src/assistant/assistant/mainwindow.h
@@ -136,7 +136,7 @@ private:
private slots:
void showBookmarksDockWidget();
void hideBookmarksDockWidget();
- void aboutToShowFileMenu();
+ void handlePageCountChanged();
private:
QWidget *m_bookmarkWidget;
diff --git a/src/assistant/assistant/openpagesmanager.cpp b/src/assistant/assistant/openpagesmanager.cpp
index f86927cc9..0d8f71bff 100644
--- a/src/assistant/assistant/openpagesmanager.cpp
+++ b/src/assistant/assistant/openpagesmanager.cpp
@@ -196,11 +196,15 @@ HelpViewer *OpenPagesManager::createPage(const QUrl &url, bool fromSearch)
if (HelpViewer::launchWithExternalApp(url))
return 0;
+ emit aboutToAddPage();
+
m_model->addPage(url);
const int index = m_model->rowCount() - 1;
HelpViewer * const page = m_model->pageAt(index);
CentralWidget::instance()->addPage(page, fromSearch);
setCurrentPage(index);
+
+ emit pageAdded(index);
return page;
}
@@ -289,9 +293,13 @@ void OpenPagesManager::setCurrentPage(HelpViewer *page)
void OpenPagesManager::removePage(int index)
{
TRACE_OBJ
+ emit aboutToClosePage(index);
+
CentralWidget::instance()->removePage(index);
m_model->removePage(index);
m_openPagesWidget->selectCurrentPage();
+
+ emit pageClosed();
}
diff --git a/src/assistant/assistant/openpagesmanager.h b/src/assistant/assistant/openpagesmanager.h
index 6565b6a5a..b14b49b6b 100644
--- a/src/assistant/assistant/openpagesmanager.h
+++ b/src/assistant/assistant/openpagesmanager.h
@@ -86,6 +86,13 @@ public slots:
void closePage(HelpViewer *page);
void setCurrentPage(HelpViewer *page);
+signals:
+ void aboutToAddPage();
+ void pageAdded(int index);
+
+ void pageClosed();
+ void aboutToClosePage(int index);
+
private slots:
void setCurrentPage(const QModelIndex &index);
void closePage(const QModelIndex &index);
diff --git a/src/assistant/assistant/openpagesmodel.h b/src/assistant/assistant/openpagesmodel.h
index 2d955126f..a64bdd9ed 100644
--- a/src/assistant/assistant/openpagesmodel.h
+++ b/src/assistant/assistant/openpagesmodel.h
@@ -42,6 +42,8 @@
#ifndef OPENPAGESMODEL_H
#define OPENPAGESMODEL_H
+#include "openpagesmanager.h"
+
#include <QtCore/QAbstractTableModel>
#include <QtCore/QList>
@@ -53,9 +55,8 @@ class QUrl;
class OpenPagesModel : public QAbstractTableModel
{
Q_OBJECT
+ friend class OpenPagesManager;
public:
- OpenPagesModel(QObject *parent);
-
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
@@ -68,6 +69,9 @@ private slots:
void handleTitleChanged();
private:
+ OpenPagesModel(QObject *parent);
+
+private:
QList<HelpViewer *> m_pages;
};
diff --git a/src/assistant/help/doc/qthelp.qdocconf b/src/assistant/help/doc/qthelp.qdocconf
index 2d05db5a5..a047d8576 100644
--- a/src/assistant/help/doc/qthelp.qdocconf
+++ b/src/assistant/help/doc/qthelp.qdocconf
@@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtHelp
description = Qt Help Reference Documentation
-url = http://qt-project.org/doc/qthelp
-version = 5.0.1
+url = http://qt-project.org/doc/qt-$QT_VER/qthelp
+version = $QT_VERSION
examplesinstallpath = help
qhp.projects = QtHelp
qhp.QtHelp.file = qthelp.qhp
-qhp.QtHelp.namespace = org.qt-project.qthelp.500
+qhp.QtHelp.namespace = org.qt-project.qthelp.$QT_VERSION_TAG
qhp.QtHelp.virtualFolder = qthelp
qhp.QtHelp.indexTitle = Qt Help
qhp.QtHelp.indexRoot =
-qhp.QtHelp.filterAttributes = qthelp 5.0.1 tools assistant qtrefdoc
-qhp.QtHelp.customFilters.QtHelp.name = QtHelp 5.0.1
-qhp.QtHelp.customFilters.QtHelp.filterAttributes = qthelp 5.0.1
+qhp.QtHelp.filterAttributes = qthelp $QT_VERSION tools assistant qtrefdoc
+qhp.QtHelp.customFilters.QtHelp.name = QtHelp $QT_VERSION
+qhp.QtHelp.customFilters.QtHelp.filterAttributes = qthelp $QT_VERSION
qhp.QtHelp.subprojects = classes
qhp.QtHelp.subprojects.classes.title = C++ Classes
qhp.QtHelp.subprojects.classes.indexTitle = Qt Help C++ Classes
diff --git a/src/assistant/help/doc/src/qthelp.qdoc b/src/assistant/help/doc/src/qthelp.qdoc
index 4e685907c..a191b0261 100644
--- a/src/assistant/help/doc/src/qthelp.qdoc
+++ b/src/assistant/help/doc/src/qthelp.qdoc
@@ -64,7 +64,7 @@
help into Qt applications.
The actual help data, meaning the table of contents, index
- keywords or html documents, is contained in Qt compressed help
+ keywords or HTML documents, is contained in Qt compressed help
files. So, one such a help file represents usually one manual
or documentation set. Since most products are more comprehensive
and consist of a number of tools, one manual is rarely enough.
@@ -85,7 +85,7 @@
generation of the compressed help file.
As already mentioned, the Qt compressed help file contains all
- data, so there is no need any longer to ship all single html
+ data, so there is no need any longer to ship all single HTML
files. Instead, only the compressed help file and optionally the
collection file has to be distributed. The collection file is
optional since any existing collection file, e.g. from an older
@@ -134,21 +134,23 @@
\section1 Generating Qt Help
- Building help files for the Qt help system assumes that the html
- documentation files already exist, i.e. the Qt help system does
- not offer the possibility to create html files like e.g. Doxygen.
+ Building help files for the Qt help system assumes that the HTML
+ documentation files already exist.
- Once the html documentents are in place, a \l {Qt Help Project} file
- has to be created. After specifying all relevant information in
- this file, it needs to be compiled by calling:
+ Once the HTML documents are in place, a \l {Qt Help Project} file, with
+ an extension of \c .qhp, has to be created. After specifying all relevant
+ information in this file, it needs to be compiled by calling:
- \snippet doc_src_qthelp.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 2
- The file 'doc.qch' contains then all html files in compressed
+ The file 'doc.qch' contains then all HTML files in compressed
form along with the table of contents and index keywords. To
test if the generated file is correct, open Qt Assistant and
install the file via the Settings|Documentation page.
+ For the standard Qt source build, the .qhp file is generated and placed
+ in the same directory as the HTML pages.
+
\target Qt Help Collection Project
\section2 Creating a Qt Help Collection
diff --git a/src/assistant/qcollectiongenerator/main.cpp b/src/assistant/qcollectiongenerator/main.cpp
index 57857e5f9..d96fff0df 100644
--- a/src/assistant/qcollectiongenerator/main.cpp
+++ b/src/assistant/qcollectiongenerator/main.cpp
@@ -45,7 +45,6 @@
#include <private/qhelpgenerator_p.h>
#include <private/qhelpprojectdata_p.h>
-#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
#include <QtCore/QMap>
#include <QtCore/QFileInfo>
@@ -57,6 +56,7 @@
#include <QtHelp/QHelpEngineCore>
#include <QtCore/QXmlStreamReader>
+#include <QtGui/QGuiApplication>
QT_USE_NAMESPACE
@@ -362,7 +362,10 @@ int main(int argc, char *argv[])
bool showHelp = false;
bool showVersion = false;
- QCoreApplication app(argc, argv);
+ // don't require a window manager even though we're a QGuiApplication
+ qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("minimal"));
+ QGuiApplication app(argc, argv);
+
#ifndef Q_OS_WIN32
QTranslator translator;
QTranslator qtTranslator;
diff --git a/src/designer/src/components/propertyeditor/previewwidget.ui b/src/designer/src/components/propertyeditor/previewwidget.ui
index a7ef2f62f..b4d6340c4 100644
--- a/src/designer/src/components/propertyeditor/previewwidget.ui
+++ b/src/designer/src/components/propertyeditor/previewwidget.ui
@@ -58,7 +58,7 @@
</sizepolicy>
</property>
<property name="windowTitle" >
- <string>Preview Window</string>
+ <string extracomment="Palette Editor Preview Widget">Preview Window</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
@@ -78,7 +78,7 @@
<item>
<widget class="QLineEdit" name="LineEdit1" >
<property name="text" >
- <string>LineEdit</string>
+ <string extracomment="Palette Editor Preview Widget">LineEdit</string>
</property>
</widget>
</item>
@@ -86,7 +86,7 @@
<widget class="QComboBox" name="ComboBox1" >
<item>
<property name="text" >
- <string>ComboBox</string>
+ <string extracomment="Palette Editor Preview Widget">ComboBox</string>
</property>
</item>
</widget>
@@ -105,7 +105,7 @@
<item>
<widget class="QPushButton" name="PushButton1" >
<property name="text" >
- <string>PushButton</string>
+ <string extracomment="Palette Editor Preview Widget">PushButton</string>
</property>
</widget>
</item>
@@ -163,7 +163,7 @@
<item row="1" column="0" >
<widget class="QGroupBox" name="ButtonGroup2" >
<property name="title" >
- <string>ButtonGroup2</string>
+ <string extracomment="Palette Editor Preview Widget">ButtonGroup2</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
@@ -175,7 +175,7 @@
<item>
<widget class="QCheckBox" name="CheckBox1" >
<property name="text" >
- <string>CheckBox1</string>
+ <string extracomment="Palette Editor Preview Widget">CheckBox1</string>
</property>
<property name="checked" >
<bool>true</bool>
@@ -185,7 +185,7 @@
<item>
<widget class="QCheckBox" name="CheckBox2" >
<property name="text" >
- <string>CheckBox2</string>
+ <string extracomment="Palette Editor Preview Widget">CheckBox2</string>
</property>
</widget>
</item>
@@ -195,7 +195,7 @@
<item row="0" column="0" >
<widget class="QGroupBox" name="ButtonGroup1" >
<property name="title" >
- <string>ButtonGroup</string>
+ <string extracomment="Palette Editor Preview Widget">ButtonGroup</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
@@ -207,7 +207,7 @@
<item>
<widget class="QRadioButton" name="RadioButton1" >
<property name="text" >
- <string>RadioButton1</string>
+ <string extracomment="Palette Editor Preview Widget">RadioButton1</string>
</property>
<property name="checked" >
<bool>true</bool>
@@ -217,14 +217,14 @@
<item>
<widget class="QRadioButton" name="RadioButton2" >
<property name="text" >
- <string>RadioButton2</string>
+ <string extracomment="Palette Editor Preview Widget">RadioButton2</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="RadioButton3" >
<property name="text" >
- <string>RadioButton3</string>
+ <string extracomment="Palette Editor Preview Widget">RadioButton3</string>
</property>
</widget>
</item>
diff --git a/src/designer/src/designer/doc/qtdesigner.qdocconf b/src/designer/src/designer/doc/qtdesigner.qdocconf
index 5130ae5b0..0f6a4a837 100644
--- a/src/designer/src/designer/doc/qtdesigner.qdocconf
+++ b/src/designer/src/designer/doc/qtdesigner.qdocconf
@@ -2,16 +2,16 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtDesigner
description = Qt Designer Manual
-url = http://qt-project.org/doc/qtdesigner
+url = http://qt-project.org/doc/qt-$QT_VER/qtdesigner
qhp.projects = QtDesigner
qhp.QtDesigner.file = qtdesigner.qhp
-qhp.QtDesigner.namespace = org.qt-project.designer.500
+qhp.QtDesigner.namespace = org.qt-project.designer.$QT_VERSION_TAG
qhp.QtDesigner.virtualFolder = qtdesigner
qhp.QtDesigner.indexTitle = Qt Designer Manual
-qhp.QtDesigner.filterAttributes = qt 5.0.1 tools designer
+qhp.QtDesigner.filterAttributes = qt $QT_VERSION tools designer
qhp.QtDesigner.customFilters.QtDesigner.name = Qt Designer Manual
qhp.QtDesigner.customFilters.QtDesigner.filterAttributes = qt tools designer
qhp.QtDesigner.subprojects = manual examples
diff --git a/src/designer/src/designer/doc/src/designer-manual.qdoc b/src/designer/src/designer/doc/src/designer-manual.qdoc
index 3540d687b..6c852df29 100644
--- a/src/designer/src/designer/doc/src/designer-manual.qdoc
+++ b/src/designer/src/designer/doc/src/designer-manual.qdoc
@@ -2534,7 +2534,7 @@ pixmap property in the property editor.
with specific plugin support for \QD. This is done with the following
declarations:
- \snippet customwidgetplugin/customwidgetplugin.pro 1
+ \snippet customwidgetplugin/customwidgetplugin.pro 3
If Qt is configured to build in both debug and release modes, \QD will be
built in release mode. When this occurs, it is necessary to ensure that
diff --git a/src/designer/src/designer/qdesigner_workbench.cpp b/src/designer/src/designer/qdesigner_workbench.cpp
index 38c822ec6..578d9cc73 100644
--- a/src/designer/src/designer/qdesigner_workbench.cpp
+++ b/src/designer/src/designer/qdesigner_workbench.cpp
@@ -926,7 +926,7 @@ QDesignerFormWindow * QDesignerWorkbench::loadForm(const QString &fileName,
}
if (!file.open(QFile::ReadOnly|QFile::Text)) {
- *errorMessage = tr("The file <b>%1</b> could not be opened: %1").arg(file.fileName(), file.errorString());
+ *errorMessage = tr("The file <b>%1</b> could not be opened: %2").arg(file.fileName(), file.errorString());
return 0;
}
diff --git a/src/designer/src/lib/shared/filterwidget.cpp b/src/designer/src/lib/shared/filterwidget.cpp
index 3c8516f8d..15346b371 100644
--- a/src/designer/src/lib/shared/filterwidget.cpp
+++ b/src/designer/src/lib/shared/filterwidget.cpp
@@ -70,7 +70,7 @@ HintLineEdit::HintLineEdit(QWidget *parent) :
}
IconButton::IconButton(QWidget *parent)
- : QToolButton(parent)
+ : QToolButton(parent), m_fader(1.0f)
{
setCursor(Qt::ArrowCursor);
}
diff --git a/src/designer/src/lib/uilib/formbuilder.cpp b/src/designer/src/lib/uilib/formbuilder.cpp
index fe4df79d0..dfa10807d 100644
--- a/src/designer/src/lib/uilib/formbuilder.cpp
+++ b/src/designer/src/lib/uilib/formbuilder.cpp
@@ -94,7 +94,7 @@ namespace QFormInternal {
dynamically generate user interfaces at run-time use the
QUiLoader class, found in the QtUiTools module.
- \sa QAbstractFormBuilder, {QtUiTools Module}
+ \sa QAbstractFormBuilder, {Qt UI Tools}
*/
/*!
diff --git a/src/designer/src/plugins/plugins.pri b/src/designer/src/plugins/plugins.pri
index 79d10952c..c4613d1a6 100644
--- a/src/designer/src/plugins/plugins.pri
+++ b/src/designer/src/plugins/plugins.pri
@@ -1,5 +1,5 @@
QT += designer
PLUGIN_TYPE = designer
-CNOFIG += tool_plugin
+CONFIG += tool_plugin
load(qt_plugin)
diff --git a/src/designer/src/plugins/plugins.pro b/src/designer/src/plugins/plugins.pro
index 44f5e34e9..7cd16f2da 100644
--- a/src/designer/src/plugins/plugins.pro
+++ b/src/designer/src/plugins/plugins.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
CONFIG += ordered
-REQUIRES = !CONFIG(static,shared|static)
# qtHaveModule(opengl): SUBDIRS += tools/view3d
qtHaveModule(webkitwidgets): SUBDIRS += qwebview
-# win32: contains(QT_CONFIG, activeqt): SUBDIRS += activeqt
+# win32: qtHaveModule(activeqt): SUBDIRS += activeqt
diff --git a/src/designer/src/src.pro b/src/designer/src/src.pro
index 9802c653d..64d1c3708 100644
--- a/src/designer/src/src.pro
+++ b/src/designer/src/src.pro
@@ -7,4 +7,4 @@ SUBDIRS = \
components \
designer
-CONFIG(shared,shared|static):SUBDIRS += plugins
+contains(QT_CONFIG, shared): SUBDIRS += plugins
diff --git a/src/designer/src/uitools/doc/qtuitools.qdocconf b/src/designer/src/uitools/doc/qtuitools.qdocconf
index 34407302b..2f707cb66 100644
--- a/src/designer/src/uitools/doc/qtuitools.qdocconf
+++ b/src/designer/src/uitools/doc/qtuitools.qdocconf
@@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtUiTools
description = Qt UI Tools Reference Documentation
-url = http://qt-project.org/doc/qtuitools
-version = 5.0.1
+url = http://qt-project.org/doc/qt-$QT_VER/qtuitools
+version = $QT_VERSION
examplesinstallpath = uitools
qhp.projects = QtUiTools
qhp.QtUiTools.file = qtuitools.qhp
-qhp.QtUiTools.namespace = org.qt-project.qtuitools.500
+qhp.QtUiTools.namespace = org.qt-project.qtuitools.$QT_VERSION_TAG
qhp.QtUiTools.virtualFolder = qtuitools
qhp.QtUiTools.indexTitle = Qt UI Tools
qhp.QtHelp.indexRoot =
-qhp.QtUiTools.filterAttributes = qtuitools 5.0.1 tools designer qtrefdoc
-qhp.QtUiTools.customFilters.QtUiTools.name = QtUiTools 5.0.1
-qhp.QtUiTools.customFilters.QtUiTools.filterAttributes = qtuitools 5.0.1
+qhp.QtUiTools.filterAttributes = qtuitools $QT_VERSION tools designer qtrefdoc
+qhp.QtUiTools.customFilters.QtUiTools.name = QtUiTools $QT_VERSION
+qhp.QtUiTools.customFilters.QtUiTools.filterAttributes = qtuitools $QT_VERSION
qhp.QtUiTools.subprojects = classes
qhp.QtUiTools.subprojects.classes.title = C++ Classes
qhp.QtUiTools.subprojects.classes.indexTitle = Qt UI Tools C++ Classes
diff --git a/src/linguist/linguist/doc/qtlinguist.qdocconf b/src/linguist/linguist/doc/qtlinguist.qdocconf
index c09f52b63..8341041ed 100644
--- a/src/linguist/linguist/doc/qtlinguist.qdocconf
+++ b/src/linguist/linguist/doc/qtlinguist.qdocconf
@@ -2,16 +2,16 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtLinguist
description = Qt Linguist Manual
-url = http://qt-project.org/doc/qtlinguist
+url = http://qt-project.org/doc/qt-$QT_VER/qtlinguist
qhp.projects = QtLinguist
qhp.QtLinguist.file = qtlinguist.qhp
-qhp.QtLinguist.namespace = org.qt-project.linguist.500
+qhp.QtLinguist.namespace = org.qt-project.linguist.$QT_VERSION_TAG
qhp.QtLinguist.virtualFolder = qtlinguist
qhp.QtLinguist.indexTitle = Qt Linguist Manual
-qhp.QtLinguist.filterAttributes = qt 5.0.1 tools qtlinguist
+qhp.QtLinguist.filterAttributes = qt $QT_VERSION tools qtlinguist
qhp.QtLinguist.customFilters.QtLinguist.name = Qt Linguist Manual
qhp.QtLinguist.customFilters.QtLinguist.filterAttributes = qt tools qtlinguist
qhp.QtLinguist.subprojects = manual examples
diff --git a/src/linguist/lrelease/main.cpp b/src/linguist/lrelease/main.cpp
index 6383bd431..f3cd8624f 100644
--- a/src/linguist/lrelease/main.cpp
+++ b/src/linguist/lrelease/main.cpp
@@ -381,7 +381,7 @@ static void initBinaryDir(
wchar_t module_name[MAX_PATH];
GetModuleFileName(0, module_name, MAX_PATH);
QFileInfo filePath = QString::fromWCharArray(module_name);
- binDir = filePath.filePath();
+ binDir = filePath.path();
#else
QString argv0 = QFile::decodeName(QByteArray(_argv0));
QString absPath;
diff --git a/src/linguist/shared/proitems.h b/src/linguist/shared/proitems.h
index 6e2c74606..05f79259d 100644
--- a/src/linguist/shared/proitems.h
+++ b/src/linguist/shared/proitems.h
@@ -126,14 +126,14 @@ public:
int compare(const ProString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().compare(sub.toQStringRef(), cs); }
int compare(const QString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().compare(sub, cs); }
int compare(const char *sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().compare(QLatin1String(sub), cs); }
- bool startsWith(const ProString &sub) const { return toQStringRef().startsWith(sub.toQStringRef()); }
- bool startsWith(const QString &sub) const { return toQStringRef().startsWith(sub); }
- bool startsWith(const char *sub) const { return toQStringRef().startsWith(QLatin1String(sub)); }
- bool startsWith(QChar c) const { return toQStringRef().startsWith(c); }
- bool endsWith(const ProString &sub) const { return toQStringRef().endsWith(sub.toQStringRef()); }
- bool endsWith(const QString &sub) const { return toQStringRef().endsWith(sub); }
- bool endsWith(const char *sub) const { return toQStringRef().endsWith(QLatin1String(sub)); }
- bool endsWith(QChar c) const { return toQStringRef().endsWith(c); }
+ bool startsWith(const ProString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(sub.toQStringRef(), cs); }
+ bool startsWith(const QString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(sub, cs); }
+ bool startsWith(const char *sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(QLatin1String(sub), cs); }
+ bool startsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(c, cs); }
+ bool endsWith(const ProString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(sub.toQStringRef(), cs); }
+ bool endsWith(const QString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(sub, cs); }
+ bool endsWith(const char *sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(QLatin1String(sub), cs); }
+ bool endsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(c, cs); }
int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().indexOf(s, from, cs); }
int indexOf(const char *s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().indexOf(QLatin1String(s), from, cs); }
int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().indexOf(c, from, cs); }
@@ -143,8 +143,8 @@ public:
bool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(s, 0, cs) >= 0; }
bool contains(const char *s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(QLatin1String(s), 0, cs) >= 0; }
bool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(c, 0, cs) >= 0; }
- int toInt(bool *ok = 0) const { return toQString().toInt(ok); } // XXX optimize
- short toShort(bool *ok = 0) const { return toQString().toShort(ok); } // XXX optimize
+ int toInt(bool *ok = 0, int base = 10) const { return toQString().toInt(ok, base); } // XXX optimize
+ short toShort(bool *ok = 0, int base = 10) const { return toQString().toShort(ok, base); } // XXX optimize
static uint hash(const QChar *p, int n);
diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp
index 22f29911f..dfa55a091 100644
--- a/src/linguist/shared/qmakebuiltins.cpp
+++ b/src/linguist/shared/qmakebuiltins.cpp
@@ -385,14 +385,16 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
}
void QMakeEvaluator::populateDeps(
- const ProStringList &deps, const ProString &prefix,
+ const ProStringList &deps, const ProString &prefix, const ProStringList &suffixes,
QHash<ProKey, QSet<ProKey> > &dependencies, ProValueMap &dependees,
ProStringList &rootSet) const
{
foreach (const ProString &item, deps)
if (!dependencies.contains(item.toKey())) {
QSet<ProKey> &dset = dependencies[item.toKey()]; // Always create entry
- ProStringList depends = values(ProKey(prefix + item + QString::fromLatin1(".depends")));
+ ProStringList depends;
+ foreach (const ProString &suffix, suffixes)
+ depends += values(ProKey(prefix + item + suffix));
if (depends.isEmpty()) {
rootSet << item;
} else {
@@ -400,7 +402,7 @@ void QMakeEvaluator::populateDeps(
dset.insert(dep.toKey());
dependees[dep.toKey()] << item;
}
- populateDeps(depends, prefix, dependencies, dependees, rootSet);
+ populateDeps(depends, prefix, suffixes, dependencies, dependees, rootSet);
}
}
}
@@ -695,11 +697,10 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
}
break;
case E_EVAL:
- if (args.count() != 1) {
+ if (args.count() != 1)
evalError(fL1S("eval(variable) requires one argument."));
- } else {
+ else
ret += values(map(args.at(0)));
- }
break;
case E_LIST: {
QString tmp;
@@ -916,14 +917,17 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
break;
case E_SORT_DEPENDS:
case E_RESOLVE_DEPENDS:
- if (args.count() < 1 || args.count() > 2) {
- evalError(fL1S("%1(var, prefix) requires one or two arguments.").arg(func.toQString(m_tmp1)));
+ if (args.count() < 1 || args.count() > 3) {
+ evalError(fL1S("%1(var, [prefix, [suffixes]]) requires one to three arguments.")
+ .arg(func.toQString(m_tmp1)));
} else {
QHash<ProKey, QSet<ProKey> > dependencies;
ProValueMap dependees;
ProStringList rootSet;
ProStringList orgList = values(args.at(0).toKey());
populateDeps(orgList, (args.count() < 2 ? ProString() : args.at(1)),
+ args.count() < 3 ? ProStringList(ProString(".depends"))
+ : split_value_list(args.at(2).toQString(m_tmp2)),
dependencies, dependees, rootSet);
for (int i = 0; i < rootSet.size(); ++i) {
const ProString &item = rootSet.at(i);
@@ -1182,9 +1186,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
for (int i = configs.size() - 1; i >= 0; i--) {
for (int mut = 0; mut < mutuals.count(); mut++) {
- if (configs[i] == mutuals[mut].trimmed()) {
+ if (configs[i] == mutuals[mut].trimmed())
return returnBool(configs[i] == args[0]);
- }
}
}
return ReturnFalse;
@@ -1443,9 +1446,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
}
const QString &file = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1)));
- if (IoUtils::exists(file)) {
+ if (IoUtils::exists(file))
return ReturnTrue;
- }
int slsh = file.lastIndexOf(QLatin1Char('/'));
QString fn = file.mid(slsh+1);
if (fn.contains(QLatin1Char('*')) || fn.contains(QLatin1Char('?'))) {
diff --git a/src/linguist/shared/qmakeevaluator.h b/src/linguist/shared/qmakeevaluator.h
index 19f3a5cbe..69f4e9651 100644
--- a/src/linguist/shared/qmakeevaluator.h
+++ b/src/linguist/shared/qmakeevaluator.h
@@ -219,7 +219,7 @@ public:
bool isActiveConfig(const QString &config, bool regex = false);
void populateDeps(
- const ProStringList &deps, const ProString &prefix,
+ const ProStringList &deps, const ProString &prefix, const ProStringList &suffixes,
QHash<ProKey, QSet<ProKey> > &dependencies,
ProValueMap &dependees, ProStringList &rootSet) const;
diff --git a/src/linguist/shared/qmakeglobals.cpp b/src/linguist/shared/qmakeglobals.cpp
index 12bfd97f3..a5ff7aeac 100644
--- a/src/linguist/shared/qmakeglobals.cpp
+++ b/src/linguist/shared/qmakeglobals.cpp
@@ -164,29 +164,28 @@ QMakeGlobals::ArgumentReturn QMakeGlobals::addCommandLineArguments(
break;
default:
if (arg.startsWith(QLatin1Char('-'))) {
- if (arg == QLatin1String("-after")) {
+ if (arg == QLatin1String("-after"))
state.after = true;
- } else if (arg == QLatin1String("-config")) {
+ else if (arg == QLatin1String("-config"))
argState = ArgConfig;
- } else if (arg == QLatin1String("-nocache")) {
+ else if (arg == QLatin1String("-nocache"))
do_cache = false;
- } else if (arg == QLatin1String("-cache")) {
+ else if (arg == QLatin1String("-cache"))
argState = ArgCache;
- } else if (arg == QLatin1String("-platform") || arg == QLatin1String("-spec")) {
+ else if (arg == QLatin1String("-platform") || arg == QLatin1String("-spec"))
argState = ArgSpec;
- } else if (arg == QLatin1String("-xplatform") || arg == QLatin1String("-xspec")) {
+ else if (arg == QLatin1String("-xplatform") || arg == QLatin1String("-xspec"))
argState = ArgXSpec;
- } else if (arg == QLatin1String("-template") || arg == QLatin1String("-t")) {
+ else if (arg == QLatin1String("-template") || arg == QLatin1String("-t"))
argState = ArgTmpl;
- } else if (arg == QLatin1String("-template_prefix") || arg == QLatin1String("-tp")) {
+ else if (arg == QLatin1String("-template_prefix") || arg == QLatin1String("-tp"))
argState = ArgTmplPfx;
- } else if (arg == QLatin1String("-win32")) {
+ else if (arg == QLatin1String("-win32"))
dir_sep = QLatin1Char('\\');
- } else if (arg == QLatin1String("-unix")) {
+ else if (arg == QLatin1String("-unix"))
dir_sep = QLatin1Char('/');
- } else {
+ else
return ArgumentUnknown;
- }
} else if (arg.contains(QLatin1Char('='))) {
if (state.after)
state.postcmds << arg;
diff --git a/src/linguist/shared/qmakeglobals.h b/src/linguist/shared/qmakeglobals.h
index 3a77a4c70..f69581ac2 100644
--- a/src/linguist/shared/qmakeglobals.h
+++ b/src/linguist/shared/qmakeglobals.h
@@ -99,6 +99,8 @@ public:
QString pwd;
QStringList precmds, preconfigs, postcmds, postconfigs;
bool after;
+
+ void flush() { after = false; }
};
class QMAKE_EXPORT QMakeGlobals
diff --git a/src/linguist/shared/qmakeparser.cpp b/src/linguist/shared/qmakeparser.cpp
index ffe16687e..2205026b2 100644
--- a/src/linguist/shared/qmakeparser.cpp
+++ b/src/linguist/shared/qmakeparser.cpp
@@ -233,7 +233,7 @@ bool QMakeParser::read(ProFile *pro)
}
QByteArray bcont = file.readAll();
- if (bcont.startsWith(QByteArray("\xef\xbb\xbf"))) {
+ if (bcont.startsWith("\xef\xbb\xbf")) {
// UTF-8 BOM will cause subtle errors
m_handler->message(QMakeParserHandler::ParserIoError,
fL1S("Unexpected UTF-8 BOM in %1").arg(pro->fileName()));
@@ -1097,11 +1097,10 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg
uint nlen = uce[1];
if (uce[nlen + 2] == TokFuncTerminator) {
m_tmp.setRawData((QChar *)uce + 2, nlen);
- if (m_tmp == statics.strhost_build) {
+ if (m_tmp == statics.strhost_build)
m_proFile->setHostBuild(true);
- } else {
+ else
parseError(fL1S("Unknown option() %1.").arg(m_tmp));
- }
return;
}
}
diff --git a/src/qdbus/qdbus/qdbus.cpp b/src/qdbus/qdbus/qdbus.cpp
index b92cb92b8..0349c6008 100644
--- a/src/qdbus/qdbus/qdbus.cpp
+++ b/src/qdbus/qdbus/qdbus.cpp
@@ -47,7 +47,13 @@
#include <QtCore/qmetaobject.h>
#include <QtXml/QDomDocument>
#include <QtXml/QDomElement>
-#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusConnectionInterface>
+#include <QtDBus/QDBusVariant>
+#include <QtDBus/QDBusArgument>
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusReply>
#include <private/qdbusutil_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qdbus/qdbusviewer/qdbusmodel.cpp b/src/qdbus/qdbusviewer/qdbusmodel.cpp
index 8fe0fed3e..558effd61 100644
--- a/src/qdbus/qdbusviewer/qdbusmodel.cpp
+++ b/src/qdbus/qdbusviewer/qdbusmodel.cpp
@@ -42,7 +42,11 @@
#include "qdbusmodel.h"
#include <QtCore/qvector.h>
-#include <QtXml/QtXml>
+#include <QtCore/QDebug>
+#include <QtXml/QDomDocument>
+#include <QtDBus/QDBusObjectPath>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusReply>
struct QDBusItem
{
diff --git a/src/qdbus/qdbusviewer/qdbusmodel.h b/src/qdbus/qdbusviewer/qdbusmodel.h
index a00dffaa3..9a3472366 100644
--- a/src/qdbus/qdbusviewer/qdbusmodel.h
+++ b/src/qdbus/qdbusviewer/qdbusmodel.h
@@ -43,12 +43,13 @@
#define QDBUSMODEL_H
#include <QtCore/qabstractitemmodel.h>
-#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
struct QDBusItem;
QT_FORWARD_DECLARE_CLASS(QDomDocument);
QT_FORWARD_DECLARE_CLASS(QDomElement);
+QT_FORWARD_DECLARE_CLASS(QDBusObjectPath)
class QDBusModel: public QAbstractItemModel
diff --git a/src/qdbus/qdbusviewer/qdbusviewer.cpp b/src/qdbus/qdbusviewer/qdbusviewer.cpp
index 8a38d25e0..403e954d7 100644
--- a/src/qdbus/qdbusviewer/qdbusviewer.cpp
+++ b/src/qdbus/qdbusviewer/qdbusviewer.cpp
@@ -43,11 +43,11 @@
#include "qdbusmodel.h"
#include "propertydialog.h"
-#include <QtXml/QtXml>
#include <QtWidgets/QTreeWidget>
#include <QtCore/QStringListModel>
#include <QtCore/QSortFilterProxyModel>
+#include <QtCore/QMetaProperty>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QListView>
#include <QtWidgets/QTextBrowser>
@@ -58,6 +58,9 @@
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QMenu>
+#include <QtDBus/QDBusConnectionInterface>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusMetaType>
#include <private/qdbusutil_p.h>
diff --git a/src/qdbus/qdbusviewer/qdbusviewer.h b/src/qdbus/qdbusviewer/qdbusviewer.h
index f77f84cfe..92523cce3 100644
--- a/src/qdbus/qdbusviewer/qdbusviewer.h
+++ b/src/qdbus/qdbusviewer/qdbusviewer.h
@@ -43,7 +43,7 @@
#define QDBUSVIEWER_H
#include <QtWidgets/QWidget>
-#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
QT_FORWARD_DECLARE_CLASS(QTreeView)
QT_FORWARD_DECLARE_CLASS(QTreeWidget)