From baaeee4d711bd2a8ef5d4472ede6f33534f73e30 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Fri, 11 Jan 2013 09:11:11 +0100 Subject: Fix the missing webview Qt Designer plugin. Task-number: QTBUG-29031 Change-Id: Ie91ec524292358388586827acbd69ec2fed44072 Reviewed-by: Friedemann Kleint --- src/designer/src/plugins/plugins.pro | 3 +-- src/designer/src/src.pro | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.1 From 0439b71d1cb9d741cebb3cccc09d644685b1be96 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sat, 12 Jan 2013 09:12:00 +0100 Subject: doc: Fix namespace version to 5.0.1 for qhp documentation Change-Id: Idc6c21d77739a14b1eb31b2296422f57d67fb478 Reviewed-by: hjk --- src/assistant/assistant/doc/qtassistant.qdocconf | 2 +- src/assistant/help/doc/qthelp.qdocconf | 2 +- src/designer/src/designer/doc/qtdesigner.qdocconf | 2 +- src/designer/src/uitools/doc/qtuitools.qdocconf | 2 +- src/linguist/linguist/doc/qtlinguist.qdocconf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/assistant/assistant/doc/qtassistant.qdocconf b/src/assistant/assistant/doc/qtassistant.qdocconf index 76e65903d..3c2689e49 100644 --- a/src/assistant/assistant/doc/qtassistant.qdocconf +++ b/src/assistant/assistant/doc/qtassistant.qdocconf @@ -7,7 +7,7 @@ url = http://qt-project.org/doc/qtassistant qhp.projects = QtAssistant qhp.QtAssistant.file = qtassistant.qhp -qhp.QtAssistant.namespace = org.qt-project.assistant.500 +qhp.QtAssistant.namespace = org.qt-project.assistant.501 qhp.QtAssistant.virtualFolder = assistant qhp.QtAssistant.indexTitle = Qt Assistant Manual diff --git a/src/assistant/help/doc/qthelp.qdocconf b/src/assistant/help/doc/qthelp.qdocconf index 2d05db5a5..b2072adc6 100644 --- a/src/assistant/help/doc/qthelp.qdocconf +++ b/src/assistant/help/doc/qthelp.qdocconf @@ -10,7 +10,7 @@ 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.501 qhp.QtHelp.virtualFolder = qthelp qhp.QtHelp.indexTitle = Qt Help qhp.QtHelp.indexRoot = diff --git a/src/designer/src/designer/doc/qtdesigner.qdocconf b/src/designer/src/designer/doc/qtdesigner.qdocconf index 5130ae5b0..dc04cae4f 100644 --- a/src/designer/src/designer/doc/qtdesigner.qdocconf +++ b/src/designer/src/designer/doc/qtdesigner.qdocconf @@ -7,7 +7,7 @@ url = http://qt-project.org/doc/qtdesigner qhp.projects = QtDesigner qhp.QtDesigner.file = qtdesigner.qhp -qhp.QtDesigner.namespace = org.qt-project.designer.500 +qhp.QtDesigner.namespace = org.qt-project.designer.501 qhp.QtDesigner.virtualFolder = qtdesigner qhp.QtDesigner.indexTitle = Qt Designer Manual diff --git a/src/designer/src/uitools/doc/qtuitools.qdocconf b/src/designer/src/uitools/doc/qtuitools.qdocconf index 34407302b..793847f19 100644 --- a/src/designer/src/uitools/doc/qtuitools.qdocconf +++ b/src/designer/src/uitools/doc/qtuitools.qdocconf @@ -10,7 +10,7 @@ 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.501 qhp.QtUiTools.virtualFolder = qtuitools qhp.QtUiTools.indexTitle = Qt UI Tools qhp.QtHelp.indexRoot = diff --git a/src/linguist/linguist/doc/qtlinguist.qdocconf b/src/linguist/linguist/doc/qtlinguist.qdocconf index c09f52b63..6699f3173 100644 --- a/src/linguist/linguist/doc/qtlinguist.qdocconf +++ b/src/linguist/linguist/doc/qtlinguist.qdocconf @@ -7,7 +7,7 @@ url = http://qt-project.org/doc/qtlinguist qhp.projects = QtLinguist qhp.QtLinguist.file = qtlinguist.qhp -qhp.QtLinguist.namespace = org.qt-project.linguist.500 +qhp.QtLinguist.namespace = org.qt-project.linguist.501 qhp.QtLinguist.virtualFolder = qtlinguist qhp.QtLinguist.indexTitle = Qt Linguist Manual -- cgit v1.2.1 From 86cd4b7dc01c98c1a483b578a8e44023c2358ee8 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Fri, 14 Dec 2012 15:27:17 +0100 Subject: Doc: Corrected spelling of Qt UITools in formbuilder.cpp Linked to landing page Task-number: QTBUG-28623 Change-Id: I9b263b9e44470c860a72d77eddfcbce93007ec26 Reviewed-by: Jerome Pasion --- src/designer/src/lib/uilib/formbuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/designer/src/lib/uilib/formbuilder.cpp b/src/designer/src/lib/uilib/formbuilder.cpp index b285eaf3c..326fcc4c7 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} */ /*! -- cgit v1.2.1 From f5504bb8df83bb0b011f57b4bd0caa60f29c932e Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Mon, 21 Jan 2013 15:59:15 +0100 Subject: Doc: corrected reference to customwidget.pro paragraph Referred to par 1. Corrected to 3. Task-number: QTBUG-29101 Change-Id: Icaa0e4eb06f24fcc7f2d369401fa8f49ed3b1d29 Reviewed-by: Jerome Pasion Reviewed-by: Friedemann Kleint --- src/designer/src/designer/doc/src/designer-manual.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/designer/src/designer/doc/src/designer-manual.qdoc b/src/designer/src/designer/doc/src/designer-manual.qdoc index 72b80a709..016764285 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 -- cgit v1.2.1 From 05dab891649b76fe7351d51950edf3caba2bfece Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 24 Jan 2013 21:03:13 +0100 Subject: Use path() as we need the path without the filename On Windows, filePath() was used for a function that was supposed to get the bin directory for Qt. However path() should be used instead as this will remove the filename from the originally obtained string. Change-Id: I16f8bda91fe9666c935318f8d73c715d2ea908f5 Reviewed-by: Laszlo Papp Reviewed-by: Oswald Buddenhagen --- src/linguist/lrelease/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.1 From d5a6d9a4145fda39932749901d4cd4d6828ce766 Mon Sep 17 00:00:00 2001 From: kh1 Date: Tue, 29 Jan 2013 14:58:03 +0100 Subject: Fix crash (QFont access) by using a qt gui application. Task-number: QTBUG-29218 Change-Id: Id7a926dce61cfac2a8c67ffaee52d305604cb34f Reviewed-by: Kai Koehne Reviewed-by: Christian Kandeler --- src/assistant/qcollectiongenerator/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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 #include -#include #include #include #include @@ -57,6 +56,7 @@ #include #include +#include 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; -- cgit v1.2.1 From f676f59fc63bb12f7c8a5fba029eab22fa3c5314 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 30 Jan 2013 14:34:34 +0100 Subject: FilterWidget: Fix valgrind warning about uninitialized variable. Change-Id: I7ae99af02d5d61626eac97ddb8a6f62da9c2d638 Reviewed-by: Jarek Kobus --- src/designer/src/lib/shared/filterwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.1 From 7b4b31bc145ba7e3de24eb7627b7e257c0eb1f8c Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 31 Jan 2013 10:38:49 +0100 Subject: Look into the right variable to determine whether Qt is built statically. Change-Id: I2a9a6613bad5de19fadc0361eda3fe7dbb4b0a44 Reviewed-by: Oswald Buddenhagen --- src/assistant/assistant/assistant.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/assistant/assistant/assistant.pro b/src/assistant/assistant/assistant.pro index 168725c4c..c5f9e5e93 100644 --- a/src/assistant/assistant/assistant.pro +++ b/src/assistant/assistant/assistant.pro @@ -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 -- cgit v1.2.1 From 6463881156d05b0e39bbca91f2d0c5892b0a9368 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 1 Feb 2013 09:34:41 +0100 Subject: QtDBus-tools: Remove module includes. Change-Id: I4b6754c7bd513a2c479c52a0428bd7eee857c6ca Reviewed-by: Kai Koehne --- src/qdbus/qdbus/qdbus.cpp | 8 +++++++- src/qdbus/qdbusviewer/qdbusmodel.cpp | 6 +++++- src/qdbus/qdbusviewer/qdbusmodel.h | 3 ++- src/qdbus/qdbusviewer/qdbusviewer.cpp | 5 ++++- src/qdbus/qdbusviewer/qdbusviewer.h | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) (limited to 'src') 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 #include #include -#include +#include +#include +#include +#include +#include +#include +#include #include 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 -#include +#include +#include +#include +#include +#include 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 -#include +#include 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 #include #include #include +#include #include #include #include @@ -58,6 +58,9 @@ #include #include #include +#include +#include +#include #include 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 -#include +#include QT_FORWARD_DECLARE_CLASS(QTreeView) QT_FORWARD_DECLARE_CLASS(QTreeWidget) -- cgit v1.2.1 From cf169e3b90a4f3a27772e9bb99001667e01c1b96 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 17 Dec 2012 12:56:02 +0100 Subject: add base parameter to ProString::toInt and ProString::toShort Change-Id: I0c8b48e6491486ca829ce24ca2e284294ba0138a Reviewed-by: Oswald Buddenhagen (cherry picked from qtbase/9a1183b400748aa51132dd17d004d9d6e560b5b8) Reviewed-by: Joerg Bornemann --- src/linguist/shared/proitems.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/linguist/shared/proitems.h b/src/linguist/shared/proitems.h index 6e2c74606..a67aa4852 100644 --- a/src/linguist/shared/proitems.h +++ b/src/linguist/shared/proitems.h @@ -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); -- cgit v1.2.1 From 9c80f8fc9f058ec5b34a7ee688a3a77fd6a0e414 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Fri, 21 Dec 2012 10:24:44 +0800 Subject: qmake:Add a case sensitivity flag to ProString::{starts,ends}With() Change-Id: I457cd8288ae8a0138f7b28321fe87be3308b5215 Reviewed-by: Oswald Buddenhagen (cherry picked from qtbase/4d55b473b3a1514c53dc5ee8116e2c86e4f62eb6) Reviewed-by: Joerg Bornemann --- src/linguist/shared/proitems.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/linguist/shared/proitems.h b/src/linguist/shared/proitems.h index a67aa4852..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); } -- cgit v1.2.1 From 94d5d3fd3b0fb7c8ab796b4f4137025e1a40bbef Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 18:37:11 +0100 Subject: don't flush qmake command line twice otherwise variable assignments (including -config options) from $QMAKEFLAGS are lost. Change-Id: I818e9372d2b0ff44333dc3eb8fc3420f84ab01c5 Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen (cherry picked from qtbase/864e1ceaf628e823103ae2d28d2c983400ba38c7) --- src/linguist/shared/qmakeglobals.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 -- cgit v1.2.1 From 85bb82534ceb6387326dd6ff8ab67e1e6ce98e71 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 1 Feb 2013 20:03:02 +0100 Subject: support alternative and multiple suffixes in $$resolve_depends() this is undeniably a new feature, but it's needed for a bugfix. Change-Id: I951a3128eb580404ee0c7e3cdcb4d6170e899f70 Reviewed-by: Joerg Bornemann (cherry picked from qtbase/87054805872429c1c17135f9ae5364b050d3fdff) Reviewed-by: Friedemann Kleint --- src/linguist/shared/qmakebuiltins.cpp | 15 ++++++++++----- src/linguist/shared/qmakeevaluator.h | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp index 22f29911f..41d81aa06 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 > &dependencies, ProValueMap &dependees, ProStringList &rootSet) const { foreach (const ProString &item, deps) if (!dependencies.contains(item.toKey())) { QSet &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); } } } @@ -916,14 +918,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 > 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); 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 > &dependencies, ProValueMap &dependees, ProStringList &rootSet) const; -- cgit v1.2.1 From 2bc8f3ae31aabffc4834cb6753eac0555b897758 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 17:41:47 +0100 Subject: substitute fixed version numbers in qdocconf files with variables Change-Id: Ib53e90616e5dc98d6fbfdef5172eb96216a6a60e Reviewed-by: Jerome Pasion --- src/assistant/assistant/doc/qtassistant.qdocconf | 4 ++-- src/assistant/help/doc/qthelp.qdocconf | 10 +++++----- src/designer/src/designer/doc/qtdesigner.qdocconf | 4 ++-- src/designer/src/uitools/doc/qtuitools.qdocconf | 10 +++++----- src/linguist/linguist/doc/qtlinguist.qdocconf | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/assistant/assistant/doc/qtassistant.qdocconf b/src/assistant/assistant/doc/qtassistant.qdocconf index 3c2689e49..74085713c 100644 --- a/src/assistant/assistant/doc/qtassistant.qdocconf +++ b/src/assistant/assistant/doc/qtassistant.qdocconf @@ -7,11 +7,11 @@ url = http://qt-project.org/doc/qtassistant qhp.projects = QtAssistant qhp.QtAssistant.file = qtassistant.qhp -qhp.QtAssistant.namespace = org.qt-project.assistant.501 +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/help/doc/qthelp.qdocconf b/src/assistant/help/doc/qthelp.qdocconf index b2072adc6..20177af48 100644 --- a/src/assistant/help/doc/qthelp.qdocconf +++ b/src/assistant/help/doc/qthelp.qdocconf @@ -3,21 +3,21 @@ 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 +version = $QT_VERSION examplesinstallpath = help qhp.projects = QtHelp qhp.QtHelp.file = qthelp.qhp -qhp.QtHelp.namespace = org.qt-project.qthelp.501 +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/designer/src/designer/doc/qtdesigner.qdocconf b/src/designer/src/designer/doc/qtdesigner.qdocconf index dc04cae4f..decfde1d4 100644 --- a/src/designer/src/designer/doc/qtdesigner.qdocconf +++ b/src/designer/src/designer/doc/qtdesigner.qdocconf @@ -7,11 +7,11 @@ url = http://qt-project.org/doc/qtdesigner qhp.projects = QtDesigner qhp.QtDesigner.file = qtdesigner.qhp -qhp.QtDesigner.namespace = org.qt-project.designer.501 +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/uitools/doc/qtuitools.qdocconf b/src/designer/src/uitools/doc/qtuitools.qdocconf index 793847f19..1c8bdeae0 100644 --- a/src/designer/src/uitools/doc/qtuitools.qdocconf +++ b/src/designer/src/uitools/doc/qtuitools.qdocconf @@ -3,21 +3,21 @@ 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 +version = $QT_VERSION examplesinstallpath = uitools qhp.projects = QtUiTools qhp.QtUiTools.file = qtuitools.qhp -qhp.QtUiTools.namespace = org.qt-project.qtuitools.501 +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 6699f3173..6b2300ac0 100644 --- a/src/linguist/linguist/doc/qtlinguist.qdocconf +++ b/src/linguist/linguist/doc/qtlinguist.qdocconf @@ -7,11 +7,11 @@ url = http://qt-project.org/doc/qtlinguist qhp.projects = QtLinguist qhp.QtLinguist.file = qtlinguist.qhp -qhp.QtLinguist.namespace = org.qt-project.linguist.501 +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 -- cgit v1.2.1 From 579d1d96ba2e718260eb13899a41e0a56f098848 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Feb 2013 12:21:11 +0100 Subject: Qt Designer: Fix message about file open failure. Change-Id: Ic59e7fc11c9a67546a22901b82681dd75831455a Reviewed-by: Oswald Buddenhagen --- src/designer/src/designer/qdesigner_workbench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 %1 could not be opened: %1").arg(file.fileName(), file.errorString()); + *errorMessage = tr("The file %1 could not be opened: %2").arg(file.fileName(), file.errorString()); return 0; } -- cgit v1.2.1 From e5551987684f6304aec92466444b4f1119f6f6b3 Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 31 Jan 2013 15:54:07 +0100 Subject: Do not use webkit in case of static build. Since linking against a statically build qtwebkit fails, fallback to use QTextBrowser. I guess we need to fix static webkit builds first. Change-Id: I1bc6c1ae70f0e57fa179a3ffe8750bde97809d12 Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- src/assistant/assistant/assistant.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/assistant/assistant/assistant.pro b/src/assistant/assistant/assistant.pro index c5f9e5e93..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 -- cgit v1.2.1 From 80805bd0a87cbac358bc629d6c7338406384eefc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 18:11:56 +0100 Subject: fix doc page urls they are versioned nowadays Change-Id: I136d9073acd9f2c19d1b41ed1d071250c8e86048 Reviewed-by: Oswald Buddenhagen --- src/assistant/assistant/doc/qtassistant.qdocconf | 2 +- src/assistant/help/doc/qthelp.qdocconf | 2 +- src/designer/src/designer/doc/qtdesigner.qdocconf | 2 +- src/designer/src/uitools/doc/qtuitools.qdocconf | 2 +- src/linguist/linguist/doc/qtlinguist.qdocconf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/assistant/assistant/doc/qtassistant.qdocconf b/src/assistant/assistant/doc/qtassistant.qdocconf index 74085713c..a01c7caa5 100644 --- a/src/assistant/assistant/doc/qtassistant.qdocconf +++ b/src/assistant/assistant/doc/qtassistant.qdocconf @@ -2,7 +2,7 @@ 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 diff --git a/src/assistant/help/doc/qthelp.qdocconf b/src/assistant/help/doc/qthelp.qdocconf index 20177af48..a047d8576 100644 --- a/src/assistant/help/doc/qthelp.qdocconf +++ b/src/assistant/help/doc/qthelp.qdocconf @@ -2,7 +2,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtHelp description = Qt Help Reference Documentation -url = http://qt-project.org/doc/qthelp +url = http://qt-project.org/doc/qt-$QT_VER/qthelp version = $QT_VERSION examplesinstallpath = help diff --git a/src/designer/src/designer/doc/qtdesigner.qdocconf b/src/designer/src/designer/doc/qtdesigner.qdocconf index decfde1d4..0f6a4a837 100644 --- a/src/designer/src/designer/doc/qtdesigner.qdocconf +++ b/src/designer/src/designer/doc/qtdesigner.qdocconf @@ -2,7 +2,7 @@ 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 diff --git a/src/designer/src/uitools/doc/qtuitools.qdocconf b/src/designer/src/uitools/doc/qtuitools.qdocconf index 1c8bdeae0..2f707cb66 100644 --- a/src/designer/src/uitools/doc/qtuitools.qdocconf +++ b/src/designer/src/uitools/doc/qtuitools.qdocconf @@ -2,7 +2,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = QtUiTools description = Qt UI Tools Reference Documentation -url = http://qt-project.org/doc/qtuitools +url = http://qt-project.org/doc/qt-$QT_VER/qtuitools version = $QT_VERSION examplesinstallpath = uitools diff --git a/src/linguist/linguist/doc/qtlinguist.qdocconf b/src/linguist/linguist/doc/qtlinguist.qdocconf index 6b2300ac0..8341041ed 100644 --- a/src/linguist/linguist/doc/qtlinguist.qdocconf +++ b/src/linguist/linguist/doc/qtlinguist.qdocconf @@ -2,7 +2,7 @@ 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 -- cgit v1.2.1 From 5f579919e900a3e53b7021a528c85970776d0111 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 8 Jan 2013 03:32:53 +0200 Subject: Remove braces for single lines of conditions #!/usr/bin/env ruby Dir.glob('**/*.cpp') { |file| # skip ast (excluding paste, astpath, and canv'ast'imer) next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i s = File.read(file) next if s.include?('qlalr') orig = s.dup s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m| res = $& if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces res else res.gsub!('} else', 'else') res.gsub!(/\n +} *\n/m, "\n") res.gsub(/ *{$/, '') end } s.gsub!(/ *$/, '') File.open(file, 'wb').write(s) if s != orig } Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc Reviewed-by: hjk (cherry picked from qtcreator/29a93998df8405e8799ad23934a56cd99fb36403) Reviewed-by: Joerg Bornemann --- src/linguist/shared/qmakebuiltins.cpp | 11 ++++------- src/linguist/shared/qmakeglobals.cpp | 23 +++++++++++------------ src/linguist/shared/qmakeparser.cpp | 5 ++--- 3 files changed, 17 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp index 41d81aa06..dfa55a091 100644 --- a/src/linguist/shared/qmakebuiltins.cpp +++ b/src/linguist/shared/qmakebuiltins.cpp @@ -697,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; @@ -1187,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; @@ -1448,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/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/qmakeparser.cpp b/src/linguist/shared/qmakeparser.cpp index ffe16687e..2c8c3ade2 100644 --- a/src/linguist/shared/qmakeparser.cpp +++ b/src/linguist/shared/qmakeparser.cpp @@ -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; } } -- cgit v1.2.1 From a4f0d86a8805111aac6969822e16332eb75a76a8 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 22 Jan 2013 11:00:20 +0100 Subject: QMakeParser: save one ByteArray construction Change-Id: I2845fdefb8b32de227f08017e0e3ad98923d1c87 Reviewed-by: hjk (cherry picked from qtcreator/52be02d1cbbf69d4f82c517c7b633ed3d13b1007) Reviewed-by: Joerg Bornemann --- src/linguist/shared/qmakeparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/linguist/shared/qmakeparser.cpp b/src/linguist/shared/qmakeparser.cpp index 2c8c3ade2..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())); -- cgit v1.2.1 From 8961b476885ce537048bf9f07d928f01ba12bfa3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 11 Feb 2013 09:40:28 +0100 Subject: Fix CONFIG of tool-plugins. Change-Id: I09c9abb08ba9f1ba171bf468e6cbc9010aaf0b53 Reviewed-by: Oswald Buddenhagen --- src/designer/src/plugins/plugins.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.1 From 7598c22441b357d8bdb768f4ec31deb0cb6655e9 Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 11 Feb 2013 13:26:07 +0100 Subject: Ctrl+W shortcut on last open tab causes Assistant to crash. Task-number: QTBUG-29499 This happend as nobody did inform the menu about the page changes, the shortcut remained active even for the last viewer. Also make some constructors and functions private, so we can no longer mess from the outside with the viewers, except thru OpenPagesManager. Change-Id: I2675996d4b30ab8b1db657e5157b497a73b96196 Reviewed-by: Christian Kandeler --- src/assistant/assistant/centralwidget.h | 16 ++++++++++------ src/assistant/assistant/mainwindow.cpp | 16 ++++++---------- src/assistant/assistant/mainwindow.h | 2 +- src/assistant/assistant/openpagesmanager.cpp | 8 ++++++++ src/assistant/assistant/openpagesmanager.h | 7 +++++++ src/assistant/assistant/openpagesmodel.h | 8 ++++++-- 6 files changed, 38 insertions(+), 19 deletions(-) (limited to 'src') 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/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 #include @@ -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; @@ -67,6 +68,9 @@ public: private slots: void handleTitleChanged(); +private: + OpenPagesModel(QObject *parent); + private: QList m_pages; }; -- cgit v1.2.1 From d4f66be77d802222f3764a2cf1826ddb8f11b30c Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 12 Feb 2013 17:24:51 +0100 Subject: Doc: Edited Qt Help page and clarified .qhp file location. -replaced "html" with "HTML" -noted that the .qhp files are in the HTML directories Task-number: QTBUG-29576 Change-Id: I0ba1c9534d730648c25dcdf15fcb1448fa9eb8fc Reviewed-by: Leena Miettinen --- src/assistant/help/doc/src/qthelp.qdoc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src') 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 -- cgit v1.2.1 From eb1feab9918691519c30f92e9506f066f91192df Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 14 Feb 2013 08:46:54 +0100 Subject: Add Linguist comments to palette editor preview widget. Change-Id: Ib2cffaddacdddcc84070310a7f8e7c387ef3972a Reviewed-by: Robert Loehning --- .../src/components/propertyeditor/previewwidget.ui | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src') 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 @@ - Preview Window + Preview Window @@ -78,7 +78,7 @@ - LineEdit + LineEdit @@ -86,7 +86,7 @@ - ComboBox + ComboBox @@ -105,7 +105,7 @@ - PushButton + PushButton @@ -163,7 +163,7 @@ - ButtonGroup2 + ButtonGroup2 @@ -175,7 +175,7 @@ - CheckBox1 + CheckBox1 true @@ -185,7 +185,7 @@ - CheckBox2 + CheckBox2 @@ -195,7 +195,7 @@ - ButtonGroup + ButtonGroup @@ -207,7 +207,7 @@ - RadioButton1 + RadioButton1 true @@ -217,14 +217,14 @@ - RadioButton2 + RadioButton2 - RadioButton3 + RadioButton3 -- cgit v1.2.1