From cd6ecebad770932034b4b5efa8e288acc1c92c9e Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 24 May 2013 20:25:40 +0200 Subject: Fix combobox not opening in treeview item delegate editor This is the same fix as for QTBUG-30715, which leads me to think that we should spend some more time and re-think how QComboBox gets focus. See also qtbase 3b992f831. Task-number: QTBUG-31298 Change-Id: I4393af00c8896051e9ed8b5d8af510633106913c Reviewed-by: Friedemann Kleint Reviewed-by: Shawn Rutledge --- src/shared/qtpropertybrowser/qtpropertybrowser.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/shared/qtpropertybrowser/qtpropertybrowser.cpp b/src/shared/qtpropertybrowser/qtpropertybrowser.cpp index 495c71c82..bd1305f19 100644 --- a/src/shared/qtpropertybrowser/qtpropertybrowser.cpp +++ b/src/shared/qtpropertybrowser/qtpropertybrowser.cpp @@ -1867,7 +1867,14 @@ QWidget *QtAbstractPropertyBrowser::createEditor(QtProperty *property, if (!factory) return 0; - return factory->createEditor(property, parent); + QWidget *w = factory->createEditor(property, parent); + // Since some editors can be QComboBoxes, and we changed their focus policy in Qt 5 + // to make them feel more native on Mac, we need to relax the focus policy to something + // more permissive to keep the combo box from losing focus, allowing it to stay alive, + // when the user clicks on it to show the popup. + if (w) + w->setFocusPolicy(Qt::WheelFocus); + return w; } bool QtAbstractPropertyBrowser::addFactory(QtAbstractPropertyManager *abstractManager, -- cgit v1.2.1 From e5de212fdcd56c3a6207cd1a863cf1489339709a Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 3 May 2013 13:29:54 +0200 Subject: fix warning in ProStringList_join Fix C4267 MSVC warning. Make sepSize an int, because this function is never called with a size_t. Change-Id: I2b834fe7c1408e34d55d9f137231e2f5816f3f1d Reviewed-by: Oswald Buddenhagen (cherry picked from qtbase/98a73e16012f75934ce4b6e4c85fb4d6a2ad0a28) Reviewed-by: Joerg Bornemann Reviewed-by: hjk --- src/linguist/shared/proitems.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linguist/shared/proitems.cpp b/src/linguist/shared/proitems.cpp index 59029bc5d..8db3026eb 100644 --- a/src/linguist/shared/proitems.cpp +++ b/src/linguist/shared/proitems.cpp @@ -345,7 +345,7 @@ QTextStream &operator<<(QTextStream &t, const ProString &str) return t; } -static QString ProStringList_join(const ProStringList &this_, const QChar *sep, const size_t sepSize) +static QString ProStringList_join(const ProStringList &this_, const QChar *sep, const int sepSize) { int totalLength = 0; const int sz = this_.size(); -- cgit v1.2.1 From 8b4084c7bdfc15c8df7a29d95072d2da9696b8c4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 12 Mar 2013 12:23:34 +0100 Subject: Fix Krazy warnings about includes/header guards in proparser. Change-Id: Ie0067544492a207255a3ff3f43d95d2976c73c5e Reviewed-by: Oswald Buddenhagen (cherry picked from qtcreator/80011dde399cfa43372dd23ff1b1f12afa4b7938) Reviewed-by: Friedemann Kleint Reviewed-by: hjk --- src/linguist/shared/qmakeevaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index 404974cc6..06dff33e2 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -40,10 +40,10 @@ ****************************************************************************/ #include "qmakeevaluator.h" +#include "qmakeevaluator_p.h" #include "qmakeglobals.h" #include "qmakeparser.h" -#include "qmakeevaluator_p.h" #include "ioutils.h" #include -- cgit v1.2.1 From 651e8b805d7517c5f3e6ccee966a56cca624517f Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 16 Sep 2012 11:15:08 +0300 Subject: Fix warning Warnings came up using MinGW 4.4: * qmakebuiltins.cpp: 'QString windowsErrorCode()' defined but not used [...] Change-Id: I80827f7f740ff380f13cef96d6b43baaa7e179cb Reviewed-by: Orgad Shaneh Reviewed-by: Joerg Bornemann (cherry picked from qtbase/81f4ecdd7920ffcec4244bf70a0aedf4fbfb66e3, (cherry picked from qtcreator/0e13cf3faffc7463ae2bf535dfdb008202112cc4)) Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- src/linguist/shared/qmakebuiltins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp index b2132c35f..0b36a1698 100644 --- a/src/linguist/shared/qmakebuiltins.cpp +++ b/src/linguist/shared/qmakebuiltins.cpp @@ -195,7 +195,7 @@ static bool isTrue(const ProString &_str, QString &tmp) return !str.compare(statics.strtrue, Qt::CaseInsensitive) || str.toInt(); } -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && defined(PROEVALUATOR_FULL) static QString windowsErrorCode() { wchar_t *string = 0; -- cgit v1.2.1 From ead793c527e22d181b92bbbec8332d3090a51870 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 Aug 2012 19:24:30 +0200 Subject: add missing ifdefery sync up implementation with qtcreator. Change-Id: I6a1578818512fa3b0773faf276a1d56881eb06d7 (cherry picked from qtcreator/0ad234b691aafedd5b78669780220334b951b045) Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- src/linguist/shared/qmake_global.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/linguist/shared/qmake_global.h b/src/linguist/shared/qmake_global.h index e9b518624..5a712dda9 100644 --- a/src/linguist/shared/qmake_global.h +++ b/src/linguist/shared/qmake_global.h @@ -64,4 +64,8 @@ # define ALWAYS_INLINE inline #endif +#ifdef PROEVALUATOR_FULL +# define PROEVALUATOR_DEBUG +#endif + #endif -- cgit v1.2.1 From 5c22a5eccee5a9abb47412537b5ac783353196d6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 5 Sep 2012 21:26:28 +0200 Subject: update size calculations for assignment statements this was forgotten when the value lists were extended by a size hint. Change-Id: I6f9b55ed671224a9b8735c8d937f94aac4a73a42 Reviewed-by: Daniel Teske (cherry picked from qtcreator/f24c9865306624c2fc150d4bd262a5c4d5a3689a) Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- src/linguist/shared/proitems.h | 1 + src/linguist/shared/qmakeparser.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/linguist/shared/proitems.h b/src/linguist/shared/proitems.h index 71db00486..734355474 100644 --- a/src/linguist/shared/proitems.h +++ b/src/linguist/shared/proitems.h @@ -275,6 +275,7 @@ enum ProToken { TokRemove, // variable -= TokReplace, // variable ~= // previous literal/expansion is a variable manipulation + // - lower bound for expected output length (1) // - value expression + TokValueTerminator TokValueTerminator, // assignment value terminator TokLiteral, // literal string (fully dequoted) diff --git a/src/linguist/shared/qmakeparser.cpp b/src/linguist/shared/qmakeparser.cpp index 93c7a54ab..d4e9e575d 100644 --- a/src/linguist/shared/qmakeparser.cpp +++ b/src/linguist/shared/qmakeparser.cpp @@ -298,12 +298,12 @@ bool QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra // Worst-case size calculations: // - line marker adds 1 (2-nl) to 1st token of each line // - empty assignment "A=":2 => - // TokHashLiteral(1) + hash(2) + len(1) + "A"(1) + TokAssign(1) + - // TokValueTerminator(1) == 7 (8) + // TokHashLiteral(1) + hash(2) + len(1) + "A"(1) + TokAssign(1) + 0(1) + + // TokValueTerminator(1) == 8 (9) // - non-empty assignment "A=B C":5 => - // TokHashLiteral(1) + hash(2) + len(1) + "A"(1) + TokAssign(1) + + // TokHashLiteral(1) + hash(2) + len(1) + "A"(1) + TokAssign(1) + 2(1) + // TokLiteral(1) + len(1) + "B"(1) + - // TokLiteral(1) + len(1) + "C"(1) + TokValueTerminator(1) == 13 (14) + // TokLiteral(1) + len(1) + "C"(1) + TokValueTerminator(1) == 14 (15) // - variable expansion: "$$f":3 => // TokVariable(1) + hash(2) + len(1) + "f"(1) = 5 // - function expansion: "$$f()":5 => -- cgit v1.2.1 From f8cd4b981041c1cb68355b4ce7f38a4397dc208e Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 9 Oct 2012 10:17:43 +0200 Subject: QMakeEvaluator: Set pro file as source for internal variables Task-number: QTCREATORBUG-7006 Change-Id: I3f599f92d03b6f9fdf65b12cf4090e28cc497fbd Reviewed-by: Oswald Buddenhagen (cherry picked from qtcreator/6e3af2bf2e2833e0ecbc9b366af8e06abd7ecf96) Reviewed-by: Orgad Shaneh Reviewed-by: hjk --- src/linguist/shared/qmakeevaluator.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index 06dff33e2..98f3018a3 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -1239,10 +1239,11 @@ void QMakeEvaluator::setupProject() { setTemplate(); ProValueMap &vars = m_valuemapStack.top(); - vars[ProKey("TARGET")] << ProString(QFileInfo(currentFileName()).baseName()); - vars[ProKey("_PRO_FILE_")] << ProString(currentFileName()); - vars[ProKey("_PRO_FILE_PWD_")] << ProString(currentDirectory()); - vars[ProKey("OUT_PWD")] << ProString(m_outputDir); + ProFile *proFile = currentProFile(); + vars[ProKey("TARGET")] << ProString(QFileInfo(currentFileName()).baseName()).setSource(proFile); + vars[ProKey("_PRO_FILE_")] << ProString(currentFileName()).setSource(proFile); + vars[ProKey("_PRO_FILE_PWD_")] << ProString(currentDirectory()).setSource(proFile); + vars[ProKey("OUT_PWD")] << ProString(m_outputDir).setSource(proFile); } void QMakeEvaluator::evaluateCommand(const QString &cmds, const QString &where) -- cgit v1.2.1 From b8cd09210681be4cec6b2896cfa7f26b917f0ed0 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 23 Oct 2012 17:40:10 +0200 Subject: excerpt from "Qt4Project: Do a build_pass evaluation" sync up the implementation with qtcreator Change-Id: I3673dd93b37b10102a0c1f1ce053e1aef8aaf53f Reviewed-by: Oswald Buddenhagen Reviewed-by: Daniel Teske Reviewed-by: Joerg Bornemann (cherry picked from qtcreator/95169eb8e39c6f43b7e74fbb18d4db19a38b0124) Reviewed-by: hjk --- src/linguist/shared/profileevaluator.cpp | 15 +++++++++++++++ src/linguist/shared/profileevaluator.h | 2 ++ src/linguist/shared/qmakeevaluator.cpp | 10 ++-------- src/linguist/shared/qmakeevaluator.h | 4 ---- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/linguist/shared/profileevaluator.cpp b/src/linguist/shared/profileevaluator.cpp index b391200bd..3d135cde8 100644 --- a/src/linguist/shared/profileevaluator.cpp +++ b/src/linguist/shared/profileevaluator.cpp @@ -222,6 +222,21 @@ void ProFileEvaluator::setCumulative(bool on) } #endif +void ProFileEvaluator::setExtraVars(const QHash &extraVars) +{ + ProValueMap map; + QHash::const_iterator it = extraVars.constBegin(); + QHash::const_iterator end = extraVars.constEnd(); + for ( ; it != end; ++it) + map.insert(ProKey(it.key()), ProStringList(it.value())); + d->setExtraVars(map); +} + +void ProFileEvaluator::setExtraConfigs(const QStringList &extraConfigs) +{ + d->setExtraConfigs(ProStringList(extraConfigs)); +} + void ProFileEvaluator::setOutputDir(const QString &dir) { d->m_outputDir = dir; diff --git a/src/linguist/shared/profileevaluator.h b/src/linguist/shared/profileevaluator.h index 854b42d10..50ec282d4 100644 --- a/src/linguist/shared/profileevaluator.h +++ b/src/linguist/shared/profileevaluator.h @@ -84,6 +84,8 @@ public: #ifdef PROEVALUATOR_CUMULATIVE void setCumulative(bool on); // Default is false #endif + void setExtraVars(const QHash &extraVars); + void setExtraConfigs(const QStringList &extraConfigs); void setOutputDir(const QString &dir); // Default is empty bool loadNamedSpec(const QString &specDir, bool hostSpec); diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index 98f3018a3..51d42e415 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -1350,11 +1350,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( loadDefaults(); } -#ifdef QT_BUILD_QMAKE for (ProValueMap::ConstIterator it = m_extraVars.constBegin(); it != m_extraVars.constEnd(); ++it) m_valuemapStack.first().insert(it.key(), it.value()); -#endif m_handler->aboutToEval(currentProFile(), pro, type); m_profileStack.push(pro); @@ -1366,11 +1364,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( evaluateCommand(m_option->precmds, fL1S("(command line)")); -#ifdef QT_BUILD_QMAKE // After user configs, to override them if (!m_extraConfigs.isEmpty()) - evaluateCommand("CONFIG += " + m_extraConfigs.join(' '), fL1S("(extra configs)")); -#endif + evaluateCommand(fL1S("CONFIG += ") + m_extraConfigs.join(QLatin1Char(' ')), fL1S("(extra configs)")); } debugMsg(1, "visiting file %s", qPrintable(pro->fileName())); @@ -1380,13 +1376,11 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( if (flags & LoadPostFiles) { evaluateCommand(m_option->postcmds, fL1S("(command line -after)")); -#ifdef QT_BUILD_QMAKE // Again, to ensure the project does not mess with us. // Specifically, do not allow a project to override debug/release within a // debug_and_release build pass - it's too late for that at this point anyway. if (!m_extraConfigs.isEmpty()) - evaluateCommand("CONFIG += " + m_extraConfigs.join(' '), fL1S("(extra configs)")); -#endif + evaluateCommand(fL1S("CONFIG += ") + m_extraConfigs.join(QLatin1Char(' ')), fL1S("(extra configs)")); evaluateFeatureFile(QLatin1String("default_post.prf")); diff --git a/src/linguist/shared/qmakeevaluator.h b/src/linguist/shared/qmakeevaluator.h index 2eb762331..dee73d104 100644 --- a/src/linguist/shared/qmakeevaluator.h +++ b/src/linguist/shared/qmakeevaluator.h @@ -112,10 +112,8 @@ public: QMakeHandler *handler); ~QMakeEvaluator(); -#ifdef QT_BUILD_QMAKE void setExtraVars(const ProValueMap &extraVars) { m_extraVars = extraVars; } void setExtraConfigs(const ProStringList &extraConfigs) { m_extraConfigs = extraConfigs; } -#endif void setOutputDir(const QString &outputDir) { m_outputDir = outputDir; } ProStringList values(const ProKey &variableName) const; @@ -268,10 +266,8 @@ public: QStack m_locationStack; // All execution location changes QStack m_profileStack; // Includes only -#ifdef QT_BUILD_QMAKE ProValueMap m_extraVars; ProStringList m_extraConfigs; -#endif QString m_outputDir; int m_listCount; -- cgit v1.2.1 From b48c0d1307597eb8576cae2cb3fec969af9a1f80 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 4 Sep 2012 11:41:32 +0200 Subject: add ProFileEvaluator::resolvedMkSpec() sync up implementation with qtcreator. Change-Id: I9408541a09a6a687fdbae879bd1ab4c92e62aa1e Reviewed-by: Oswald Buddenhagen (cherry picked from qtcreator/867d655278398561c2bfe879e42062f93ae85453) (cherry picked from qtcreator/7d4e3b7b4c69c9bcc42aa278ce91f4188fc06534) Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- src/linguist/shared/profileevaluator.cpp | 5 +++++ src/linguist/shared/profileevaluator.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/linguist/shared/profileevaluator.cpp b/src/linguist/shared/profileevaluator.cpp index 3d135cde8..f22b3f48b 100644 --- a/src/linguist/shared/profileevaluator.cpp +++ b/src/linguist/shared/profileevaluator.cpp @@ -215,6 +215,11 @@ QString ProFileEvaluator::propertyValue(const QString &name) const return d->m_option->propertyValue(ProKey(name)).toQString(); } +QString ProFileEvaluator::resolvedMkSpec() const +{ + return d->m_qmakespec; +} + #ifdef PROEVALUATOR_CUMULATIVE void ProFileEvaluator::setCumulative(bool on) { diff --git a/src/linguist/shared/profileevaluator.h b/src/linguist/shared/profileevaluator.h index 50ec282d4..6046b1bae 100644 --- a/src/linguist/shared/profileevaluator.h +++ b/src/linguist/shared/profileevaluator.h @@ -102,6 +102,8 @@ public: const ProFile *pro) const; QString propertyValue(const QString &val) const; + QString resolvedMkSpec() const; + private: QString sysrootify(const QString &path, const QString &baseDir) const; -- cgit v1.2.1 From cdc456281617cffc12e6f406d8e2c7fcf7e97144 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 19 Sep 2012 21:56:16 +0200 Subject: make error() abort the qmake run, not just the current file sync up implementation with qmake. this doesn't actually have an effect on lupdate, as error() is disarmed in cumulative mode. Change-Id: I82fc55680f9ffb227e25acb39c797596225ba89e Reviewed-by: Daniel Teske Reviewed-by: Oswald Buddenhagen (cherry picked from qtbase/0da7f097249f71726140a38647bb4824b09fad7b) Reviewed-by: hjk --- src/linguist/shared/qmakebuiltins.cpp | 22 ++++--- src/linguist/shared/qmakeevaluator.cpp | 105 ++++++++++++++++++++------------- src/linguist/shared/qmakeevaluator.h | 18 +++--- 3 files changed, 86 insertions(+), 59 deletions(-) diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp index 0b36a1698..37ab82ff3 100644 --- a/src/linguist/shared/qmakebuiltins.cpp +++ b/src/linguist/shared/qmakebuiltins.cpp @@ -688,7 +688,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand( ProValueMap vars; QString fn = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1))); fn.detach(); - if (evaluateFileInto(fn, &vars, LoadProOnly)) + if (evaluateFileInto(fn, &vars, LoadProOnly) == ReturnTrue) ret = vars.value(map(args.at(1))); } break; @@ -1098,8 +1098,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( ProValueMap vars; QString fn = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1))); fn.detach(); - if (!evaluateFileInto(fn, &vars, LoadProOnly)) - return ReturnFalse; + VisitReturn ok = evaluateFileInto(fn, &vars, LoadProOnly); + if (ok != ReturnTrue) + return ok; if (args.count() == 2) return returnBool(vars.contains(map(args.at(1)))); QRegExp regx; @@ -1308,12 +1309,12 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( } QString fn = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1))); fn.detach(); - bool ok; + VisitReturn ok; if (parseInto.isEmpty()) { ok = evaluateFileChecked(fn, QMakeHandler::EvalIncludeFile, LoadProOnly | flags); } else { ProValueMap symbols; - if ((ok = evaluateFileInto(fn, &symbols, LoadAll | flags))) { + if ((ok = evaluateFileInto(fn, &symbols, LoadAll | flags)) == ReturnTrue) { ProValueMap newMap; for (ProValueMap::ConstIterator it = m_valuemapStack.top().constBegin(), @@ -1334,7 +1335,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( m_valuemapStack.top() = newMap; } } - return returnBool(ok || (flags & LoadSilent)); + if (ok == ReturnFalse && (flags & LoadSilent)) + ok = ReturnTrue; + return ok; } case T_LOAD: { bool ignore_error = false; @@ -1344,8 +1347,11 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( evalError(fL1S("load(feature) requires one or two arguments.")); return ReturnFalse; } - return returnBool(evaluateFeatureFile(m_option->expandEnvVars(args.at(0).toQString()), - ignore_error) || ignore_error); + VisitReturn ok = evaluateFeatureFile(m_option->expandEnvVars(args.at(0).toQString()), + ignore_error); + if (ok == ReturnFalse && ignore_error) + ok = ReturnTrue; + return ok; } case T_DEBUG: { #ifdef PROEVALUATOR_DEBUG diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index 51d42e415..33befc0f8 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -1130,10 +1130,10 @@ bool QMakeEvaluator::prepareProject(const QString &inDir) bool QMakeEvaluator::loadSpecInternal() { - if (!evaluateFeatureFile(QLatin1String("spec_pre.prf"))) + if (evaluateFeatureFile(QLatin1String("spec_pre.prf")) != ReturnTrue) return false; QString spec = m_qmakespec + QLatin1String("/qmake.conf"); - if (!evaluateFile(spec, QMakeHandler::EvalConfigFile, LoadProOnly)) { + if (evaluateFile(spec, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) { evalError(fL1S("Could not read qmake configuration file %1.").arg(spec)); return false; } @@ -1157,7 +1157,7 @@ bool QMakeEvaluator::loadSpecInternal() #endif valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespec); m_qmakespecName = IoUtils::fileName(m_qmakespec).toString(); - if (!evaluateFeatureFile(QLatin1String("spec_post.prf"))) + if (evaluateFeatureFile(QLatin1String("spec_post.prf")) != ReturnTrue) return false; // The MinGW and x-build specs may change the separator; $$shell_{path,quote}() need it m_dirSep = first(ProKey("QMAKE_DIR_SEP")); @@ -1173,17 +1173,20 @@ bool QMakeEvaluator::loadSpec() QMakeEvaluator evaluator(m_option, m_parser, m_handler); if (!m_superfile.isEmpty()) { valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile); - if (!evaluator.evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly)) + if (evaluator.evaluateFile( + m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) return false; } if (!m_conffile.isEmpty()) { valuesRef(ProKey("_QMAKE_CONF_")) << ProString(m_conffile); - if (!evaluator.evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly)) + if (evaluator.evaluateFile( + m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) return false; } if (!m_cachefile.isEmpty()) { valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile); - if (!evaluator.evaluateFile(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly)) + if (evaluator.evaluateFile( + m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) return false; } if (qmakespec.isEmpty()) { @@ -1219,17 +1222,17 @@ bool QMakeEvaluator::loadSpec() m_qmakespec = QDir::cleanPath(qmakespec); if (!m_superfile.isEmpty() - && !evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly)) { + && evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) { return false; } if (!loadSpecInternal()) return false; if (!m_conffile.isEmpty() - && !evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly)) { + && evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) { return false; } if (!m_cachefile.isEmpty() - && !evaluateFile(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly)) { + && evaluateFile(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) { return false; } return true; @@ -1260,7 +1263,7 @@ void QMakeEvaluator::evaluateCommand(const QString &cmds, const QString &where) } } -void QMakeEvaluator::evaluateConfigFeatures() +QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConfigFeatures() { QSet processed; forever { @@ -1271,7 +1274,10 @@ void QMakeEvaluator::evaluateConfigFeatures() if (!processed.contains(config)) { config.detach(); processed.insert(config); - if (evaluateFeatureFile(config, true)) { + VisitReturn vr = evaluateFeatureFile(config, true); + if (vr == ReturnError) + return vr; + if (vr == ReturnTrue) { finished = false; break; } @@ -1280,6 +1286,7 @@ void QMakeEvaluator::evaluateConfigFeatures() if (finished) break; } + return ReturnTrue; } QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( @@ -1354,13 +1361,16 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( it != m_extraVars.constEnd(); ++it) m_valuemapStack.first().insert(it.key(), it.value()); + VisitReturn vr; + m_handler->aboutToEval(currentProFile(), pro, type); m_profileStack.push(pro); valuesRef(ProKey("PWD")) = ProStringList(ProString(currentDirectory())); if (flags & LoadPreFiles) { setupProject(); - evaluateFeatureFile(QLatin1String("default_pre.prf")); + if ((vr = evaluateFeatureFile(QLatin1String("default_pre.prf"))) == ReturnError) + goto failed; evaluateCommand(m_option->precmds, fL1S("(command line)")); @@ -1370,7 +1380,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( } debugMsg(1, "visiting file %s", qPrintable(pro->fileName())); - visitProBlock(pro, pro->tokPtr()); + if ((vr = visitProBlock(pro, pro->tokPtr())) == ReturnError) + goto failed; debugMsg(1, "done visiting file %s", qPrintable(pro->fileName())); if (flags & LoadPostFiles) { @@ -1382,15 +1393,19 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( if (!m_extraConfigs.isEmpty()) evaluateCommand(fL1S("CONFIG += ") + m_extraConfigs.join(QLatin1Char(' ')), fL1S("(extra configs)")); - evaluateFeatureFile(QLatin1String("default_post.prf")); + if ((vr = evaluateFeatureFile(QLatin1String("default_post.prf"))) == ReturnError) + goto failed; - evaluateConfigFeatures(); + if ((vr = evaluateConfigFeatures()) == ReturnError) + goto failed; } + vr = ReturnTrue; + failed: m_profileStack.pop(); valuesRef(ProKey("PWD")) = ProStringList(ProString(currentDirectory())); m_handler->doneWithEval(currentProFile()); - return ReturnTrue; + return vr; } @@ -1597,14 +1612,14 @@ QList QMakeEvaluator::prepareFunctionArgs(const ushort *&tokPtr) } ProStringList QMakeEvaluator::evaluateFunction( - const ProFunctionDef &func, const QList &argumentsList, bool *ok) + const ProFunctionDef &func, const QList &argumentsList, VisitReturn *ok) { - bool oki; + VisitReturn vr; ProStringList ret; if (m_valuemapStack.count() >= 100) { evalError(fL1S("Ran into infinite recursion (depth > 100).")); - oki = false; + vr = ReturnFalse; } else { m_valuemapStack.push(ProValueMap()); m_locationStack.push(m_current); @@ -1615,8 +1630,9 @@ ProStringList QMakeEvaluator::evaluateFunction( m_valuemapStack.top()[ProKey(QString::number(i+1))] = argumentsList[i]; } m_valuemapStack.top()[statics.strARGS] = args; - VisitReturn vr = visitProBlock(func.pro(), func.tokPtr()); - oki = (vr != ReturnFalse && vr != ReturnError); // True || Return + vr = visitProBlock(func.pro(), func.tokPtr()); + if (vr == ReturnReturn) + vr = ReturnTrue; ret = m_returnValue; m_returnValue.clear(); @@ -1624,8 +1640,8 @@ ProStringList QMakeEvaluator::evaluateFunction( m_valuemapStack.pop(); } if (ok) - *ok = oki; - if (oki) + *ok = vr; + if (vr == ReturnTrue) return ret; return ProStringList(); } @@ -1634,14 +1650,15 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBoolFunction( const ProFunctionDef &func, const QList &argumentsList, const ProString &function) { - bool ok; - ProStringList ret = evaluateFunction(func, argumentsList, &ok); - if (ok) { + VisitReturn vr; + ProStringList ret = evaluateFunction(func, argumentsList, &vr); + if (vr == ReturnTrue) { if (ret.isEmpty()) return ReturnTrue; if (ret.at(0) != statics.strfalse) { if (ret.at(0) == statics.strtrue) return ReturnTrue; + bool ok; int val = ret.at(0).toQString(m_tmp1).toInt(&ok); if (ok) { if (val) @@ -1652,8 +1669,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBoolFunction( .arg(ret.join(QLatin1String(" :: ")))); } } + return ReturnFalse; } - return ReturnFalse; + return vr; } QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction( @@ -1786,16 +1804,16 @@ ProString QMakeEvaluator::first(const ProKey &variableName) const return ProString(); } -bool QMakeEvaluator::evaluateFile( +QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile( const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags) { if (ProFile *pro = m_parser->parsedProFile(fileName, true)) { m_locationStack.push(m_current); - bool ok = (visitProFile(pro, type, flags) == ReturnTrue); + VisitReturn ok = visitProFile(pro, type, flags); m_current = m_locationStack.pop(); pro->deref(); #ifdef PROEVALUATOR_FULL - if (ok) { + if (ok == ReturnTrue) { ProStringList &iif = m_valuemapStack.first()[ProKey("QMAKE_INTERNAL_INCLUDED_FILES")]; ProString ifn(fileName); if (!iif.contains(ifn)) @@ -1806,27 +1824,28 @@ bool QMakeEvaluator::evaluateFile( } else { if (!(flags & LoadSilent) && !IoUtils::exists(fileName)) evalError(fL1S("WARNING: Include file %1 not found").arg(fileName)); - return false; + return ReturnFalse; } } -bool QMakeEvaluator::evaluateFileChecked( +QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileChecked( const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags) { if (fileName.isEmpty()) - return false; + return ReturnFalse; QMakeEvaluator *ref = this; do { foreach (const ProFile *pf, ref->m_profileStack) if (pf->fileName() == fileName) { evalError(fL1S("Circular inclusion of %1.").arg(fileName)); - return false; + return ReturnFalse; } } while ((ref = ref->m_caller)); return evaluateFile(fileName, type, flags); } -bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent) +QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( + const QString &fileName, bool silent) { QString fn = fileName; if (!fn.endsWith(QLatin1String(".prf"))) @@ -1857,7 +1876,7 @@ bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent) #endif if (!silent) evalError(fL1S("Cannot find feature %1").arg(fileName)); - return false; + return ReturnFalse; cool: ProStringList &already = valuesRef(ProKey("QMAKE_INTERNAL_INCLUDED_FEATURES")); @@ -1865,7 +1884,7 @@ bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent) if (already.contains(afn)) { if (!silent) languageWarning(fL1S("Feature %1 already included").arg(fileName)); - return true; + return ReturnTrue; } already.append(afn); @@ -1875,7 +1894,7 @@ bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent) #endif // The path is fully normalized already. - bool ok = evaluateFile(fn, QMakeHandler::EvalFeatureFile, LoadProOnly); + VisitReturn ok = evaluateFile(fn, QMakeHandler::EvalFeatureFile, LoadProOnly); #ifdef PROEVALUATOR_CUMULATIVE m_cumulative = cumulative; @@ -1883,14 +1902,16 @@ bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent) return ok; } -bool QMakeEvaluator::evaluateFileInto(const QString &fileName, ProValueMap *values, LoadFlags flags) +QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileInto( + const QString &fileName, ProValueMap *values, LoadFlags flags) { QMakeEvaluator visitor(m_option, m_parser, m_handler); visitor.m_caller = this; visitor.m_outputDir = m_outputDir; visitor.m_featureRoots = m_featureRoots; - if (!visitor.evaluateFileChecked(fileName, QMakeHandler::EvalAuxFile, flags)) - return false; + VisitReturn ret = visitor.evaluateFileChecked(fileName, QMakeHandler::EvalAuxFile, flags); + if (ret != ReturnTrue) + return ret; *values = visitor.m_valuemapStack.top(); #ifdef PROEVALUATOR_FULL ProKey qiif("QMAKE_INTERNAL_INCLUDED_FILES"); @@ -1899,7 +1920,7 @@ bool QMakeEvaluator::evaluateFileInto(const QString &fileName, ProValueMap *valu if (!iif.contains(ifn)) iif << ifn; #endif - return true; + return ReturnTrue; } void QMakeEvaluator::message(int type, const QString &msg) const diff --git a/src/linguist/shared/qmakeevaluator.h b/src/linguist/shared/qmakeevaluator.h index dee73d104..21f487a3b 100644 --- a/src/linguist/shared/qmakeevaluator.h +++ b/src/linguist/shared/qmakeevaluator.h @@ -176,15 +176,15 @@ public: QString resolvePath(const QString &fileName) const { return QMakeInternal::IoUtils::resolvePath(currentDirectory(), fileName); } - bool evaluateFile(const QString &fileName, QMakeHandler::EvalFileType type, - LoadFlags flags); - bool evaluateFileChecked(const QString &fileName, QMakeHandler::EvalFileType type, + VisitReturn evaluateFile(const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags); - bool evaluateFeatureFile(const QString &fileName, bool silent = false); - bool evaluateFileInto(const QString &fileName, - ProValueMap *values, // output-only - LoadFlags flags); - void evaluateConfigFeatures(); + VisitReturn evaluateFileChecked(const QString &fileName, QMakeHandler::EvalFileType type, + LoadFlags flags); + VisitReturn evaluateFeatureFile(const QString &fileName, bool silent = false); + VisitReturn evaluateFileInto(const QString &fileName, + ProValueMap *values, // output-only + LoadFlags flags); + VisitReturn evaluateConfigFeatures(); void message(int type, const QString &msg) const; void evalError(const QString &msg) const { message(QMakeHandler::EvalError, msg); } @@ -195,7 +195,7 @@ public: QList prepareFunctionArgs(const ushort *&tokPtr); ProStringList evaluateFunction(const ProFunctionDef &func, - const QList &argumentsList, bool *ok); + const QList &argumentsList, VisitReturn *ok); VisitReturn evaluateBoolFunction(const ProFunctionDef &func, const QList &argumentsList, const ProString &function); -- cgit v1.2.1 From 92092740ab545b2cd718ef2990687a92c428f44d Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 30 May 2013 09:58:03 +0200 Subject: Doc: Rename Qt Designer license information page Rename the license information page to a more generic one, and list licenses for individual contributions under it. Task-number: QTBUG-28536 Change-Id: Ia88d99640ab23837f4db2a820fc95c9318d3b365 Reviewed-by: Leena Miettinen --- src/designer/src/designer/doc/src/designer-manual.qdoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/designer/src/designer/doc/src/designer-manual.qdoc b/src/designer/src/designer/doc/src/designer-manual.qdoc index 6c852df29..6faee9a4d 100644 --- a/src/designer/src/designer/doc/src/designer-manual.qdoc +++ b/src/designer/src/designer/doc/src/designer-manual.qdoc @@ -94,7 +94,7 @@ appendix to the documentation. \list - \li \l{Implementation of the Recursive Shadow Casting Algorithm in Qt Designer} + \li \l{Qt Designer License Information} \endlist */ @@ -2798,14 +2798,16 @@ pixmap property in the property editor. /*! - \page designer-recursive-shadow-casting.html - \title Implementation of the Recursive Shadow Casting Algorithm in Qt Designer + \page designer-license-information.html + \title Qt Designer License Information \contentspage {Qt Designer Manual}{Contents} \ingroup licensing \brief License information for contributions to specific parts of the Qt Designer source code. + \section1 Implementation of the Recursive Shadow Casting Algorithm in Qt Designer + \legalese Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). \BR Copyright (C) 2005 Bjoern Bergstroem -- cgit v1.2.1 From 8da32f8b6470b7d7d03ed18821e600bd2fe1f6e2 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 12 Jun 2013 15:30:23 +0200 Subject: Assistant: Adding 'qtquickcontrolsstyles' to the list of qch loaded. Task-number: QTBUG-31692 Change-Id: Ie8e4befc75e0a2df9149c1bf028b88b2572e3148 Reviewed-by: Friedemann Kleint Reviewed-by: Caroline Chao --- src/assistant/assistant/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp index e57c7663e..b4679ba11 100644 --- a/src/assistant/assistant/mainwindow.cpp +++ b/src/assistant/assistant/mainwindow.cpp @@ -411,6 +411,8 @@ void MainWindow::lookForNewQtDocumentation() << QLatin1String("qtscripttools") << QLatin1String("qtquickcontrols") << QLatin1String("qtquicklayouts") + << QLatin1String("qtquickcontrolsstyles") + << QLatin1String("qtquickdialogs") << QLatin1String("qtmultimediawidgets"); QList qtDocInfos; -- cgit v1.2.1 From 9631fd4eec392fbf4d6a0c5da18db2165b15abcb Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 13 Jun 2013 17:44:06 +0200 Subject: Find the cmake version template in the install location. Task-number: QTBUG-31153 Change-Id: Ibd90f9959306b34c2228e44d86cb03c97f47bb68 Reviewed-by: Oswald Buddenhagen --- src/linguist/linguist.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro index f5d9d9b7a..df3c0c7a1 100644 --- a/src/linguist/linguist.pro +++ b/src/linguist/linguist.pro @@ -33,7 +33,7 @@ contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") { load(qt_build_paths) cmake_linguist_config_file.input = $$PWD/Qt5LinguistToolsConfig.cmake.in -cmake_linguist_config_version_file.input = $$[QT_HOST_DATA]/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in +cmake_linguist_config_version_file.input = $$[QT_HOST_DATA/get]/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in cmake_linguist_macros_file.input = $$PWD/Qt5LinguistToolsMacros.cmake CMAKE_PACKAGE_VERSION = $$MODULE_VERSION cmake_linguist_config_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake -- cgit v1.2.1 From d403785d9bc5ce27d1aa28ab68200a97a8bffcf5 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Mon, 13 May 2013 20:33:20 +0200 Subject: Add changes-5.1.0 file Change-Id: I3ade90a360ccece54ac07b1c0c7f71d5bdffc3a4 Reviewed-by: Oswald Buddenhagen Reviewed-by: Iikka Eklund --- dist/changes-5.1.0 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 dist/changes-5.1.0 diff --git a/dist/changes-5.1.0 b/dist/changes-5.1.0 new file mode 100644 index 000000000..74f9fa745 --- /dev/null +++ b/dist/changes-5.1.0 @@ -0,0 +1,48 @@ +Qt 5.1 introduces many new features and improvements as well as bugfixes +over the 5.0.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + + http://qt-project.org/doc/qt-5.1 + +The Qt version 5.1 series is binary compatible with the 5.0.x series. +Applications compiled for 5.0 will continue to run with 5.1. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt-project.org/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* General * +**************************************************************************** + +Qt Assistant +------------ + + - [QTBUG-30110] List supported file formats in search indexing. + +Qt Designer +----------- + + - [QTBUG-9502] Rich text editor: Add support for Right-to-Left blocks. + - [QTBUG-25872] Fix moving widgets in horizontal layouts in RTL mode. + - [QTBUG-26394] Use multiline validation for dynamic string properties. + - [QTBUG-29234] ActiveQt plugin: Load control string correctly. + - [QTBUG-29234] ActiveQt plugin: Fix setting a control by task menu. + - [QTBUG-29904] Aero-Style-QWizard: Remove special handling in Qt Designer. + +Qt Linguist +----------- + + - make linguist tools suitable for cross-building + - purge TS 1.1 support from linguist tools + - purge CODECFORTR & -codecfortr support from linguist tools + - [QTBUG-27238] Make linguist's source viewer read all files as UTF-8. + + - lupdate + + * purge ui3 support from lupdate + -- cgit v1.2.1