From 124da59cb40df5e47e7183dfef90bcd5957ed71f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 8 Mar 2013 11:24:36 +0100 Subject: Fix static builds with ICU Make sure we actually link against the static version of the ICU libs for static builds. Task-number: QTBUG-29478 Change-Id: Ida7b439f11c5393bee43bfe804f9ec84bf272b34 Reviewed-by: Friedemann Kleint Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- src/corelib/tools/tools.pri | 15 +++++++++++++-- tools/configure/configureapp.cpp | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 564aff9ab9..72a873235a 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -122,8 +122,19 @@ contains(QT_CONFIG, zlib) { contains(QT_CONFIG,icu) { SOURCES += tools/qlocale_icu.cpp DEFINES += QT_USE_ICU - win32:LIBS_PRIVATE += -licuin -licuuc - else:LIBS_PRIVATE += -licui18n -licuuc + win32 { + CONFIG(static, static|shared) { + CONFIG(debug, debug|release) { + LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd + } else { + LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt + } + } else { + LIBS_PRIVATE += -licuin -licuuc + } + } else { + LIBS_PRIVATE += -licui18n -licuuc + } } pcre { diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index af470939e9..d19d34e54e 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2017,7 +2017,8 @@ bool Configure::checkAvailability(const QString &part) else if (part == "ICU") available = findFile("unicode/utypes.h") && findFile("unicode/ucol.h") && findFile("unicode/ustring.h") - && (findFile("icuin.lib") || findFile("libicuin.lib")); // libicun.lib if compiled with mingw + && (findFile("icuin.lib") || findFile("sicuin.lib") + || findFile("libicuin.lib") || findFile("libsicuin.lib")); // "lib" prefix for mingw, 's' prefix for static else if (part == "ANGLE") { available = checkAngleAvailability(); -- cgit v1.2.3 From 6bc691dde53a3056d708d94d8bb1317d622835b0 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 6 Mar 2013 10:00:09 +0100 Subject: Revert 6497649730daeab5d3dfac7e806105e99a237656 and clarify docs. It introduced a regression by requiring that a p/P was also present: QTime time = QTime::currentTime(); qDebug() << time.toString("h:mm:ss a"); // Outputs "10:05:42 am" in Qt 4.8. // Outputs "10:05:42 a" with 6497649730daeab5d3dfac7e806105e99a237656. This patch also clarifies the QTime::toString(QString) documentation. Change-Id: I4d73a959c2ca76304f03a4ce9717b540ad4e8811 Reviewed-by: Andy Shaw --- src/corelib/tools/qdatetime.cpp | 7 +++---- tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp | 6 ------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 4b6e739759..bf3cc68c06 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -1560,9 +1560,9 @@ QString QTime::toString(Qt::DateFormat format) const \row \li z \li the milliseconds without leading zeroes (0 to 999) \row \li zzz \li the milliseconds with leading zeroes (000 to 999) \row \li AP or A - \li use AM/PM display. \e AP will be replaced by either "AM" or "PM". + \li use AM/PM display. \e A/AP will be replaced by either "AM" or "PM". \row \li ap or a - \li use am/pm display. \e ap will be replaced by either "am" or "pm". + \li use am/pm display. \e a/ap will be replaced by either "am" or "pm". \row \li t \li the timezone (for example "CEST") \endtable @@ -3759,8 +3759,7 @@ static bool hasUnquotedAP(const QString &f) for (int i=0; i 12 AM" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) << QString("hAP") << QString("12AM"); QTest::newRow( "double, 0 => 12 AM" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) << QString("hhAP") << QString("12AM"); - QTest::newRow( "double, garbage" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) - << QString("hhAX") << QString("00AX"); QTest::newRow( "dddd" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) << QString("dddd") << QString("Friday"); QTest::newRow( "ddd" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) -- cgit v1.2.3 From c1771a78ed0ceab26891b3fdf801dc5557173fac Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 11 Mar 2013 13:58:35 +0100 Subject: Correct QString's warnings involving QRegularExpression. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces "QRegularExpresssion" with "QRegularExpression" and adds some auto tests for the warning itself. Task-number: QTBUG-30054 Change-Id: Iba333a4388795eccca809fb430c295f503794263 Reviewed-by: Jędrzej Nowacki --- src/corelib/tools/qstring.cpp | 10 +++++----- tests/auto/corelib/tools/qstring/tst_qstring.cpp | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 61d5073a1f..6c64ea9f6d 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -2948,7 +2948,7 @@ QString& QString::replace(const QRegExp &rx, const QString &after) QString &QString::replace(const QRegularExpression &re, const QString &after) { if (!re.isValid()) { - qWarning("QString::replace: invalid QRegularExpresssion object"); + qWarning("QString::replace: invalid QRegularExpression object"); return *this; } @@ -3273,7 +3273,7 @@ int QString::count(const QRegExp& rx) const int QString::indexOf(const QRegularExpression& re, int from) const { if (!re.isValid()) { - qWarning("QString::indexOf: invalid QRegularExpresssion object"); + qWarning("QString::indexOf: invalid QRegularExpression object"); return -1; } @@ -3299,7 +3299,7 @@ int QString::indexOf(const QRegularExpression& re, int from) const int QString::lastIndexOf(const QRegularExpression &re, int from) const { if (!re.isValid()) { - qWarning("QString::lastIndexOf: invalid QRegularExpresssion object"); + qWarning("QString::lastIndexOf: invalid QRegularExpression object"); return -1; } @@ -3328,7 +3328,7 @@ int QString::lastIndexOf(const QRegularExpression &re, int from) const bool QString::contains(const QRegularExpression &re) const { if (!re.isValid()) { - qWarning("QString::contains: invalid QRegularExpresssion object"); + qWarning("QString::contains: invalid QRegularExpression object"); return false; } QRegularExpressionMatch match = re.match(*this); @@ -3350,7 +3350,7 @@ bool QString::contains(const QRegularExpression &re) const int QString::count(const QRegularExpression &re) const { if (!re.isValid()) { - qWarning("QString::count: invalid QRegularExpresssion object"); + qWarning("QString::count: invalid QRegularExpression object"); return 0; } int count = 0; diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 8e30a66d6f..7b7869d033 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -156,6 +156,7 @@ private slots: void count(); void lastIndexOf_data(); void lastIndexOf(); + void lastIndexOfInvalidRegex(); void indexOf_data(); void indexOf(); void indexOf2_data(); @@ -633,6 +634,7 @@ void tst_QString::replace_regexp_data() << QString("a9a8a7a6a5nmlkjii0hh0gg0ff0ee0dd0cc0bb0a"); QTest::newRow("backref10") << QString("abc") << QString("((((((((((((((abc))))))))))))))") << QString("\\0\\01\\011") << QString("\\0\\01\\011"); + QTest::newRow("invalid") << QString("") << QString("invalid regex\\") << QString("") << QString(""); } void tst_QString::utf8_data() @@ -1379,6 +1381,12 @@ void tst_QString::lastIndexOf() } } +void tst_QString::lastIndexOfInvalidRegex() +{ + QTest::ignoreMessage(QtWarningMsg, "QString::lastIndexOf: invalid QRegularExpression object"); + QCOMPARE(QString("").lastIndexOf(QRegularExpression("invalid regex\\"), 0), -1); +} + void tst_QString::count() { QString a; @@ -1396,7 +1404,8 @@ void tst_QString::count() QCOMPARE(a.count(QRegExp("[G][HE]")),2); QCOMPARE(a.count(QRegularExpression("[FG][HI]")), 1); QCOMPARE(a.count(QRegularExpression("[G][HE]")), 2); - + QTest::ignoreMessage(QtWarningMsg, "QString::count: invalid QRegularExpression object"); + QCOMPARE(a.count(QRegularExpression("invalid regex\\")), 0); CREATE_REF(QLatin1String("FG")); QCOMPARE(a.count(ref),2); @@ -1432,6 +1441,8 @@ void tst_QString::contains() QStringRef emptyRef(&a, 0, 0); QVERIFY(a.contains(emptyRef, Qt::CaseInsensitive)); + QTest::ignoreMessage(QtWarningMsg, "QString::contains: invalid QRegularExpression object"); + QVERIFY(!a.contains(QRegularExpression("invalid regex\\"))); } @@ -2342,7 +2353,10 @@ void tst_QString::replace_regexp() s2.replace( QRegExp(regexp), after ); QTEST( s2, "result" ); s2 = string; - s2.replace( QRegularExpression(regexp), after ); + QRegularExpression regularExpression(regexp); + if (!regularExpression.isValid()) + QTest::ignoreMessage(QtWarningMsg, "QString::replace: invalid QRegularExpression object"); + s2.replace( regularExpression, after ); QTEST( s2, "result" ); } -- cgit v1.2.3 From 64d03e1c3400baf15a2e281142297aa8fe940d48 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Feb 2013 15:11:45 +0100 Subject: do not append a trailing slash to output directory it's entirely counterproductive and confuses the subsequent code. Change-Id: Iadcfd2af80acd2d7ed50807b3e001e26d83075a5 Reviewed-by: Joerg Bornemann --- qmake/generators/metamakefile.cpp | 2 -- qmake/main.cpp | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index e3fa39c7e4..b0c3b0681d 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -387,8 +387,6 @@ SubdirsMetaMakefileGenerator::write() const Subdir *sub = subs.at(i); qmake_setpwd(subs.at(i)->input_dir); Option::output_dir = QFileInfo(subs.at(i)->output_dir).absoluteFilePath(); - if(Option::output_dir.at(Option::output_dir.length()-1) != QLatin1Char('/')) - Option::output_dir += QLatin1Char('/'); Option::output.setFileName(subs.at(i)->output_file); if(i != subs.count()-1) { for (int ind = 0; ind < sub->indent; ++ind) diff --git a/qmake/main.cpp b/qmake/main.cpp index e339239289..7ea076be17 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -97,15 +97,8 @@ int runQMake(int argc, char **argv) } QString oldpwd = qmake_getpwd(); -#ifdef Q_OS_WIN - if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/"))) -#endif - { - if(!oldpwd.endsWith(QLatin1Char('/'))) - oldpwd += QLatin1Char('/'); - } - Option::output_dir = oldpwd; //for now this is the output dir + Option::output_dir = oldpwd; //for now this is the output dir if(Option::output.fileName() != "-") { QFileInfo fi(Option::output); QString dir; @@ -119,7 +112,7 @@ int runQMake(int argc, char **argv) if(!dir.isNull() && dir != ".") Option::output_dir = dir; if(QDir::isRelativePath(Option::output_dir)) - Option::output_dir.prepend(oldpwd); + Option::output_dir.prepend(oldpwd + QLatin1Char('/')); Option::output_dir = QDir::cleanPath(Option::output_dir); } -- cgit v1.2.3 From dd06f991af83a7897d1a085b3aa2e2e649dfe2f4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Feb 2013 15:13:51 +0100 Subject: actually use the temp variable we just assigned ... Change-Id: I535a4bfc268a07d6b1813e47cdae862e5e459efc Reviewed-by: Joerg Bornemann --- qmake/generators/metamakefile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index b0c3b0681d..a037a966f6 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -385,16 +385,16 @@ SubdirsMetaMakefileGenerator::write() const QString &output_name = Option::output.fileName(); for(int i = 0; ret && i < subs.count(); i++) { const Subdir *sub = subs.at(i); - qmake_setpwd(subs.at(i)->input_dir); - Option::output_dir = QFileInfo(subs.at(i)->output_dir).absoluteFilePath(); - Option::output.setFileName(subs.at(i)->output_file); + qmake_setpwd(sub->input_dir); + Option::output_dir = QFileInfo(sub->output_dir).absoluteFilePath(); + Option::output.setFileName(sub->output_file); if(i != subs.count()-1) { for (int ind = 0; ind < sub->indent; ++ind) printf(" "); printf("Writing %s\n", QDir::cleanPath(Option::output_dir+"/"+ Option::output.fileName()).toLatin1().constData()); } - if (!(ret = subs.at(i)->makefile->write())) + if (!(ret = sub->makefile->write())) break; //restore because I'm paranoid qmake_setpwd(pwd); -- cgit v1.2.3 From 97be79012cd39d1d0e7748d5c500d86c3becc258 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Feb 2013 20:08:23 +0100 Subject: clean paths of found files in prepareProject() any of the directories may be the root, which would lead to double slashes in the constructed filenames. Change-Id: I053e167a19b795b40e780fc29db356c7f24d286a Reviewed-by: Joerg Bornemann --- qmake/library/qmakeevaluator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 8b6a0f8598..25a70d2fea 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1052,7 +1052,7 @@ bool QMakeEvaluator::prepareProject(const QString &inDir) forever { QString superfile = superdir + QLatin1String("/.qmake.super"); if (IoUtils::exists(superfile)) { - m_superfile = superfile; + m_superfile = QDir::cleanPath(superfile); break; } QFileInfo qdfi(superdir); @@ -1089,8 +1089,8 @@ bool QMakeEvaluator::prepareProject(const QString &inDir) } else { m_buildRoot = QFileInfo(cachefile).path(); } - m_conffile = conffile; - m_cachefile = cachefile; + m_conffile = QDir::cleanPath(conffile); + m_cachefile = QDir::cleanPath(cachefile); } no_cache: -- cgit v1.2.3 From c7191d3e214b9cdb17ec383b61f7e21e784f80d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Mar 2013 08:51:07 +0100 Subject: Fixed artifacts when drawing same line with different clips. Expanding on the change fixing QTBUG-24762 with the realization that any line needs to be drawn in a consistent way regardless of system or painter clip, not just dashed lines. Task-number: QTBUG-25036 Change-Id: Ief7ef19cc92c52e7d792500a581a072ba032767e Reviewed-by: Gunnar Sletta --- src/gui/painting/qcosmeticstroker.cpp | 12 ++--- tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 58 ++++++++++++++++++----- 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 1de955bc13..3659c56ac7 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -290,14 +290,14 @@ void QCosmeticStroker::setup() ppl = buffer->bytesPerLine()>>2; } - // dashes are sensitive to clips, so we need to clip consistently when painting to the same device - QRect clipRect = strokeSelection & Dashed ? deviceRect : clip; + // line drawing produces different results with different clips, so + // we need to clip consistently when painting to the same device // setup FP clip bounds - xmin = clipRect.left() - 1; - xmax = clipRect.right() + 2; - ymin = clipRect.top() - 1; - ymax = clipRect.bottom() + 2; + xmin = deviceRect.left() - 1; + xmax = deviceRect.right() + 2; + ymin = deviceRect.top() - 1; + ymax = deviceRect.bottom() + 2; lastPixel.x = -1; } diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 774ade5fb0..57ffcaf30d 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -280,7 +280,9 @@ private slots: void drawTextWithComplexBrush(); void QTBUG26013_squareCapStroke(); void QTBUG25153_drawLine(); - void dashing_systemClip(); + + void cosmeticStrokerClipping_data(); + void cosmeticStrokerClipping(); private: void fillData(); @@ -4462,22 +4464,54 @@ void tst_QPainter::QTBUG25153_drawLine() } } -static void dashing_systemClip_paint(QPainter *p) +enum CosmeticStrokerPaint +{ + Antialiasing, + Dashing +}; + +static void paint_func(QPainter *p, CosmeticStrokerPaint type) +{ + p->save(); + switch (type) { + case Antialiasing: + p->setPen(Qt::black); + p->setRenderHint(QPainter::Antialiasing); + p->drawLine(4, 8, 42, 42); + break; + case Dashing: + p->setPen(QPen(Qt::black, 1, Qt::DashLine, Qt::RoundCap, Qt::MiterJoin)); + p->drawLine(8, 8, 42, 8); + p->drawLine(42, 8, 42, 42); + p->drawLine(42, 42, 8, 42); + p->drawLine(8, 42, 8, 8); + break; + default: + Q_ASSERT(false); + break; + } + p->restore(); +} + +Q_DECLARE_METATYPE(CosmeticStrokerPaint) + +void tst_QPainter::cosmeticStrokerClipping_data() { - p->setPen(QPen(Qt::black, 1, Qt::DashLine, Qt::RoundCap, Qt::MiterJoin)); - p->drawLine(8, 8, 42, 8); - p->drawLine(42, 8, 42, 42); - p->drawLine(42, 42, 8, 42); - p->drawLine(8, 42, 8, 8); + QTest::addColumn("paint"); + + QTest::newRow("antialiasing_paint") << Antialiasing; + QTest::newRow("dashing_paint") << Dashing; } -void tst_QPainter::dashing_systemClip() +void tst_QPainter::cosmeticStrokerClipping() { + QFETCH(CosmeticStrokerPaint, paint); + QImage image(50, 50, QImage::Format_RGB32); image.fill(Qt::white); QPainter p(&image); - dashing_systemClip_paint(&p); + paint_func(&p, paint); p.end(); QImage old = image.copy(); @@ -4485,7 +4519,8 @@ void tst_QPainter::dashing_systemClip() image.paintEngine()->setSystemClip(QRect(10, 0, image.width() - 10, image.height())); p.begin(&image); - dashing_systemClip_paint(&p); + p.fillRect(image.rect(), Qt::white); + paint_func(&p, paint); // doing same paint operation again with different system clip should not change the image QCOMPARE(old, image); @@ -4493,7 +4528,8 @@ void tst_QPainter::dashing_systemClip() old = image; p.setClipRect(QRect(20, 20, 30, 30)); - dashing_systemClip_paint(&p); + p.fillRect(image.rect(), Qt::white); + paint_func(&p, paint); // ditto for regular clips QCOMPARE(old, image); -- cgit v1.2.3 From 958b621ba2f13535cd6873ceeaee096c13737549 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 8 Mar 2013 15:52:27 +0100 Subject: Correct QDate and QTime documentation. Task-number: QTBUG-30055 Change-Id: I94c8e023f5e3d23ff2f1c74d0763b1c825deb3d1 Reviewed-by: Jerome Pasion --- src/corelib/tools/qdatetime.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index bf3cc68c06..86a6a020cd 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -265,8 +265,7 @@ static QString fmtDateTime(const QString& f, const QTime* dt = 0, const QDate* d If the specified date is invalid, the date is not set and isValid() returns false. - \warning Years 0 to 99 are interpreted as is, i.e., years - 0-99. + \warning Years 1 to 99 are interpreted as is. Year 0 is invalid. \sa isValid() */ @@ -1488,10 +1487,7 @@ int QTime::msec() const If \a format is Qt::ISODate, the string format corresponds to the ISO 8601 extended specification for representations of dates, - which is also HH:MM:SS. (However, contrary to ISO 8601, dates - before 15 October 1582 are handled as Julian dates, not Gregorian - dates. See \l{QDate G and J} {Use of Gregorian and Julian - Calendars}. This might change in a future version of Qt.) + which is also HH:MM:SS. If the \a format is Qt::SystemLocaleShortDate or Qt::SystemLocaleLongDate, the string format depends on the locale -- cgit v1.2.3 From 40236c35a62e0838cf150a6e0876e7d4f88e5a35 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 14 Mar 2013 12:48:35 +0100 Subject: Fixed crash when VNCing and trying to use non-present XFixes extension. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-29978 Change-Id: I1a6759bafaac7a1d2b598412f0d32077a42192a4 Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qxcbcursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index e29b21c9c8..b40fdb0e92 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -482,7 +482,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0); } - if (cursor && cshape >= 0 && cshape < Qt::LastCursor) { + if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) { const char *name = cursorNames[cshape]; xcb_xfixes_set_cursor_name(conn, cursor, strlen(name), name); } -- cgit v1.2.3 From 457afb3749f4f1d7db86c89cbf251e18fbd0dfbf Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Feb 2013 12:40:16 +0100 Subject: fix parallelized "jom install" unlike unix' mkdir -p, windows' md complains if the directory already exists. the workaround is a quite complex command, so the so far used concept for assembling the command line from pieces was replaced with a single template. for symmetry, adapt the makefile existence check to the new concept as well. QMAKE_CHK_EXISTS and QMAKE_MKDIR_CMD were added, with hard-coded fallbacks (ugly). QMAKE_CHK_FILE_EXISTS and QMAKE_CHK_EXISTS_GLUE (introduced in 5.0.0) are simply deleted again. QMAKE_CHK_DIR_EXISTS and QMAKE_MKDIR remain for legacy reasons, as qmake emits them into the Makefiles, and custom commands may rely on their presence. Task-number: QTBUG-28132 Change-Id: I3d049cb5d26947e5c3d102d0c2da33afb2a95140 Reviewed-by: Joerg Bornemann Reviewed-by: Janne Anttila Reviewed-by: Kai Koehne --- mkspecs/common/shell-unix.conf | 8 ++++---- mkspecs/common/shell-win32.conf | 8 ++++---- qmake/generators/makefile.cpp | 36 +++++++++++++++--------------------- qmake/generators/makefile.h | 2 +- 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/mkspecs/common/shell-unix.conf b/mkspecs/common/shell-unix.conf index 17c3612fdc..63c435d037 100644 --- a/mkspecs/common/shell-unix.conf +++ b/mkspecs/common/shell-unix.conf @@ -7,8 +7,8 @@ QMAKE_COPY_DIR = $$QMAKE_COPY -R QMAKE_MOVE = mv -f QMAKE_DEL_FILE = rm -f QMAKE_DEL_DIR = rmdir -QMAKE_CHK_DIR_EXISTS = test -d -QMAKE_CHK_FILE_EXISTS = test -f -QMAKE_CHK_EXISTS_GLUE = "|| " -QMAKE_MKDIR = mkdir -p +QMAKE_CHK_EXISTS = test -e %1 || +QMAKE_CHK_DIR_EXISTS = test -d # legacy +QMAKE_MKDIR = mkdir -p # legacy +QMAKE_MKDIR_CMD = test -d %1 || mkdir -p %1 QMAKE_STREAM_EDITOR = sed diff --git a/mkspecs/common/shell-win32.conf b/mkspecs/common/shell-win32.conf index 826e87e34f..77c9698388 100644 --- a/mkspecs/common/shell-win32.conf +++ b/mkspecs/common/shell-win32.conf @@ -5,10 +5,10 @@ QMAKE_COPY_DIR = xcopy /s /q /y /i QMAKE_MOVE = move QMAKE_DEL_FILE = del QMAKE_DEL_DIR = rmdir -QMAKE_CHK_DIR_EXISTS = if not exist -QMAKE_CHK_FILE_EXISTS = if not exist -QMAKE_CHK_EXISTS_GLUE = -QMAKE_MKDIR = mkdir +QMAKE_CHK_EXISTS = if not exist %1 +QMAKE_CHK_DIR_EXISTS = if not exist # legacy +QMAKE_MKDIR = mkdir # legacy +QMAKE_MKDIR_CMD = if not exist %1 mkdir %1 & if not exist %1 exit 1 # xcopy copies the contained files if source is a directory. Deal with it. CONFIG += copy_dir_files diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 55c819657a..3ea67fe6a5 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -92,18 +92,8 @@ bool MakefileGenerator::canExecute(const QStringList &cmdline, int *a) const QString MakefileGenerator::mkdir_p_asstring(const QString &dir, bool escape) const { - QString ret = "@" + chkdir + " "; - if(escape) - ret += escapeFilePath(dir); - else - ret += dir; - ret += " " + chkglue + "$(MKDIR) "; - if(escape) - ret += escapeFilePath(dir); - else - ret += dir; - ret += " "; - return ret; + QString edir = escape ? escapeFilePath(dir) : dir; + return "@" + makedir.arg(edir); } bool MakefileGenerator::mkdir(const QString &in_path) const @@ -440,13 +430,17 @@ MakefileGenerator::init() if (v["TARGET"].isEmpty()) warn_msg(WarnLogic, "TARGET is empty"); - chkdir = v["QMAKE_CHK_DIR_EXISTS"].join(' '); - chkfile = v["QMAKE_CHK_FILE_EXISTS"].join(' '); - if (chkfile.isEmpty()) // Backwards compat with Qt4 specs - chkfile = isWindowsShell() ? "if not exist" : "test -f"; - chkglue = v["QMAKE_CHK_EXISTS_GLUE"].join(' '); - if (chkglue.isEmpty()) // Backwards compat with Qt4 specs - chkglue = isWindowsShell() ? "" : "|| "; + makedir = v["QMAKE_MKDIR_CMD"].join(' '); + chkexists = v["QMAKE_CHK_EXISTS"].join(' '); + if (makedir.isEmpty()) { // Backwards compat with Qt < 5.0.2 specs + if (isWindowsShell()) { + makedir = "if not exist %1 mkdir %1 & if not exist %1 exit 1"; + chkexists = "if not exist %1"; + } else { + makedir = "test -d %1 || mkdir -p %1"; + chkexists = "test -e %1 ||"; + } + } ProStringList &quc = v["QMAKE_EXTRA_COMPILERS"]; @@ -2398,8 +2392,8 @@ MakefileGenerator::writeSubTargetCall(QTextStream &t, if (!in.isEmpty()) { if (!in_directory.isEmpty()) t << "\n\t" << mkdir_p_asstring(out_directory); - pfx = "( " + chkfile + " " + out + " " + chkglue - + "$(QMAKE) " + in + buildArgs() + " -o " + out + pfx = "( " + chkexists.arg(out) + + + " $(QMAKE) " + in + buildArgs() + " -o " + out + " ) && "; } writeSubMakeCall(t, out_directory_cdin + pfx, makefilein); diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 2f3e73ff6b..a0186d3d99 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -81,7 +81,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo QString spec; bool init_opath_already, init_already, no_io; QHash init_compiler_already; - QString chkdir, chkfile, chkglue; + QString makedir, chkexists; QString build_args(const QString &outdir=QString()); //internal caches -- cgit v1.2.3 From bb793f8b501f24cfd2837017a4d1db5ad45a7533 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Feb 2013 14:27:57 +0100 Subject: broaden the effect of CONFIG+=force_independent somewhat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit modules which demand it (i.e., qtwebkit) need forwarding pris, etc., even when not making a -prefix build. Change-Id: Id405be8763e94cc074854f799bd785e9cdf62e8e Reviewed-by: Tor Arne Vestbø Reviewed-by: Andras Becsi Reviewed-by: Joerg Bornemann Reviewed-by: Simon Hausmann --- mkspecs/features/qml_module.prf | 2 +- mkspecs/features/qt_build_config.prf | 5 +++-- mkspecs/features/qt_module_pris.prf | 4 ++-- mkspecs/features/qt_tool.prf | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index db5f6787b3..d6ff25eed5 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -25,7 +25,7 @@ qml1_target: \ else: \ instbase = $$[QT_INSTALL_QML] -!prefix_build { +!force_independent { # These bizarre rules copy the files to the qtbase build directory defineReplace(qmlModStripSrcDir) { diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 4f5b62e1e5..88c1f3f3f2 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -20,10 +20,11 @@ debug(1, "Not loading qmodule.pri twice") } +# force_independent can be set externally. prefix_build not. !exists($$[QT_HOST_DATA]/.qmake.cache): \ - CONFIG += prefix_build + CONFIG += prefix_build force_independent -!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):prefix_build { +!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):force_independent { # When doing a -prefix build of top-level qt5/qt.pro, we need to announce # this repo's module pris' location to the other repos. isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$shadowed($$dirname(_QMAKE_CONF_)) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index b74e5dd73f..2cb30a8b92 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -11,7 +11,7 @@ load(qt_build_paths) MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri -prefix_build: \ +force_independent: \ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri else: \ MODULE_PRI = $$MODULE_FWD_PRI @@ -75,7 +75,7 @@ else: \ write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") MODULE_PRI_FILES = $$MODULE_PRI - prefix_build { + force_independent { # Create a forwarding module .pri file MODULE_FWD_PRI_CONT = \ diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index b449e4074d..9d50856900 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -31,7 +31,7 @@ load(qt_targets) # If we are doing a prefix build, create a "module" pri which enables # qtPrepareTool() to work with the non-installed build. -!build_pass:prefix_build { +!build_pass:force_independent { isEmpty(MODULE):MODULE = $$TARGET -- cgit v1.2.3 From a5d09b9036f70519ecf21137fac6d8d9a1adbf8d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 1 Mar 2013 13:11:06 +0100 Subject: enumerate modules in QT_MODULES, not QT_CONFIG QT_CONFIG is supposed to contain configure output, not a list of modules. for example, enumerating modules is not cleanly possible if modules are mixed with other flags. the conflation was merely historical, due to webkit and phonon doing it this way in the preliminary qt4 modularization. we now have a much cleaner way to query modules (qtHaveModule(), or less recently, !isEmpty(QT..name)), which is already used throughout Qt. the old way was supposed to be removed for 5.0 already, but it slipped. better do it now, before people actually start using it. Change-Id: Iabdf0cdfaab9cd674f634f4c6ece105b2039c850 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module_pris.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 2cb30a8b92..03863e0648 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -71,7 +71,7 @@ else: \ $$module_config \ "QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting "" \ - "QT_CONFIG += $$MODULE" # this is obsolete, but some code still depends on it + "QT_MODULES += $$MODULE" write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") MODULE_PRI_FILES = $$MODULE_PRI @@ -113,7 +113,7 @@ else: \ includes private_includes bins libs libexecs plugins imports qml \ rpath_link rpath_link_private \ )):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient) - cache(QT_CONFIG, transient) + cache(QT_MODULES, transient) } # !build_pass -- cgit v1.2.3 From 1b00363b2f9b4d5033f5ad057dabd2d2b56a8da7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 1 Mar 2013 18:19:28 +0100 Subject: fix replacement base path this affects only webkit when doing module-by-module installation, so it went unnoticed. Change-Id: Iab87f4a76fcb0fa9a1b1d6bcab9a73756e416120 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module.prf | 2 +- mkspecs/features/qt_plugin.prf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index d015b213d7..1132943d97 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -127,7 +127,7 @@ unix|win32-g++* { !isEmpty(_QMAKE_SUPER_CACHE_): \ rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* else: \ - rplbase = $$MODULE_QMAKE_OUTDIR + rplbase = $$MODULE_BASE_OUTDIR include_replace.match = $$rplbase/include include_replace.replace = $$[QT_INSTALL_HEADERS/raw] lib_replace.match = $$rplbase/lib diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index 54a995daae..158de39753 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -60,7 +60,7 @@ unix|win32-g++* { !isEmpty(_QMAKE_SUPER_CACHE_): \ rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* else: \ - rplbase = $$MODULE_QMAKE_OUTDIR + rplbase = $$MODULE_BASE_OUTDIR lib_replace.match = $$rplbase/lib lib_replace.replace = $$[QT_INSTALL_LIBS/raw] QMAKE_PRL_INSTALL_REPLACE += lib_replace -- cgit v1.2.3 From b6f8557af805132ecac16e33fcda1f750988af10 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 7 Mar 2013 17:17:12 +0100 Subject: fix LD_LIBRARY_PATH setup of check targets amends 4c34b418 Change-Id: Id9d214fe936d947aaea4a56fd724ad50381032e1 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 478c255836..8cd2473224 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -236,13 +236,10 @@ defineTest(qtAddToolEnv) { defineTest(qtAddTargetEnv) { deps = $$replace(QT, -private$, ) - deps = $$resolve_depends(deps, "QT.") + deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends") !isEmpty(deps) { - for(dep, deps) { + for(dep, deps): \ deppath += $$shell_path($$eval(QT.$${dep}.libs)) - for(rpath, QT.$${dep}.rpath_link): \ - deppath += $$shell_path($$rpath) - } equals(QMAKE_HOST.os, Windows) { deppath.name = PATH } else:contains(QMAKE_HOST.os, Linux|FreeBSD) { -- cgit v1.2.3 From 79a144d74643c7d124d42edc94475f4f16539c21 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 8 Mar 2013 11:53:10 +0100 Subject: allow passing values with spaces to -device-option note that the value is written verbatim to the qmake file, so additional quoting may be required on the command line. Task-number: QTBUG-30102 Change-Id: I02ca9a44fae82b6932982e6385508b8a304cc1e7 Reviewed-by: Joerg Bornemann --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 6d6b816c30..2d6dd73c4e 100755 --- a/configure +++ b/configure @@ -1419,7 +1419,7 @@ while [ "$#" -gt 0 ]; do device-option) DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"` DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"` - DeviceVar set $DEV_VAR $DEV_VAL + DeviceVar set $DEV_VAR "$DEV_VAL" ;; qpa) QT_QPA_DEFAULT_PLATFORM="$VAL" -- cgit v1.2.3 From ec145129c324a4c6a3e7cc2b70cfc811f439a9b0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 27 Feb 2013 19:12:02 +0100 Subject: fix setup of output directory for subprojects in IDE generator backends unlike before, the output dir is now important already during the project evaluation phase, as finding .qmake.conf depends on it if .qmake.cache is also present. ChangeLog: fixed qmake -tp vc (and configure without -no-vcproj) Change-Id: Ifdb95f3b38a70c0d08e71238059292e761dcfa53 Reviewed-by: Joerg Bornemann Reviewed-by: Andy Shaw --- qmake/generators/mac/pbuilder_pbx.cpp | 7 +++++-- qmake/generators/win32/msvc_vcproj.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index c5b2c56f8f..c9623e6f98 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -136,6 +136,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) QList pb_subdirs; pb_subdirs.append(new ProjectBuilderSubDirs(project, QString(), false)); QString oldpwd = qmake_getpwd(); + QString oldoutpwd = Option::output_dir; QMap groups; for(int pb_subdir = 0; pb_subdir < pb_subdirs.size(); ++pb_subdir) { ProjectBuilderSubDirs *pb = pb_subdirs[pb_subdir]; @@ -172,6 +173,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) if(!qmake_setpwd(dir)) fprintf(stderr, "Cannot find directory: %s\n", dir.toLatin1().constData()); } + Option::output_dir = Option::globals->shadowedPath(QDir::cleanPath(fi.absoluteFilePath())); if(tmp_proj.read(fn)) { if(tmp_proj.first("TEMPLATE") == "subdirs") { QMakeProject *pp = new QMakeProject(&tmp_proj); @@ -189,13 +191,13 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) bool in_root = true; QString name = qmake_getpwd(); if(project->isActiveConfig("flat")) { - QString flat_file = fileFixify(name, oldpwd, Option::output_dir, FileFixifyRelative); + QString flat_file = fileFixify(name, oldpwd, oldoutpwd, FileFixifyRelative); if(flat_file.indexOf(Option::dir_sep) != -1) { QStringList dirs = flat_file.split(Option::dir_sep); name = dirs.back(); } } else { - QString flat_file = fileFixify(name, oldpwd, Option::output_dir, FileFixifyRelative); + QString flat_file = fileFixify(name, oldpwd, oldoutpwd, FileFixifyRelative); if(QDir::isRelativePath(flat_file) && flat_file.indexOf(Option::dir_sep) != -1) { QString last_grp("QMAKE_SUBDIR_PBX_HEIR_GROUP"); QStringList dirs = flat_file.split(Option::dir_sep); @@ -280,6 +282,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) } nextfile: qmake_setpwd(oldpwd); + Option::output_dir = oldoutpwd; } } } diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index b082fcb307..c7dfc13a71 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -434,18 +434,21 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHashshadowedPath(QDir::cleanPath(fi.absoluteFilePath())); if (tmp_proj.read(fn)) { // Check if all requirements are fulfilled if (!tmp_proj.isEmpty("QMAKE_FAILED_REQUIREMENTS")) { fprintf(stderr, "Project file(%s) not added to Solution because all requirements not met:\n\t%s\n", fn.toLatin1().constData(), tmp_proj.values("QMAKE_FAILED_REQUIREMENTS").join(" ").toLatin1().constData()); qmake_setpwd(oldpwd); + Option::output_dir = oldoutpwd; continue; } if (tmp_proj.first("TEMPLATE") == "vcsubdirs") { @@ -460,13 +463,10 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHashfirst("QMAKE_PROJECT_NAME") + project->first("VCPROJ_EXTENSION")); @@ -578,6 +578,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash Date: Tue, 12 Feb 2013 12:25:47 +0100 Subject: fix all "qt style yes options" which start with -l 7de9d3709 broke them, because suddenly every -l* switch was parsed as a library. fix this by re-arranging how the options are parsed. this obsoletes d7ab351cdd as well, by being more generic. fwiw, this syntax is stupid to start with, because all unknown -l* options are implicitly libraries and create confusing configure failures. emulating the compiler/linker command lines isn't such a great idea ... Task-number: QTBUG-29174 Change-Id: I11bac7a6f458664dff8cbe57ed9cd33a08d5e9ec Reviewed-by: Thiago Macieira Reviewed-by: Joerg Bornemann --- configure | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 2d6dd73c4e..5575ecb6a0 100755 --- a/configure +++ b/configure @@ -1110,18 +1110,10 @@ while [ "$#" -gt 0 ]; do VAL=`echo $1 | sed 's,-R,,'` fi ;; - -largefile) - VAR="largefile" - VAL="yes" - ;; - -l?*|-l) + -l) # -lfoo is handled differently VAR="add_link" - if [ "$1" = "-l" ]; then - shift - VAL="$1" - else - VAL=`echo $1 | sed 's,-l,,'` - fi + shift + VAL="$1" ;; -F?*|-F) VAR="add_fpath" @@ -1132,14 +1124,10 @@ while [ "$#" -gt 0 ]; do VAL=`echo $1 | sed 's,-F,,'` fi ;; - -fw?*|-fw) + -fw) # -fwfoo is handled differently VAR="add_framework" - if [ "$1" = "-fw" ]; then - shift - VAL="$1" - else - VAL=`echo $1 | sed 's,-fw,,'` - fi + shift + VAL="$1" ;; -W*) VAR="add_warn" @@ -2130,6 +2118,16 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + l*) # -lfoo + L_FLAGS="$L_FLAGS -l\"${VAR#l}\"" + ;; + fw*) # -fwfoo + if [ "$BUILD_ON_MAC" = "yes" ]; then + L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\"" + else + UNKNOWN_OPT=yes + fi + ;; *) UNKNOWN_OPT=yes ;; -- cgit v1.2.3 From 0189cd123dde5bf93adb1b26e68ece5674551724 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Mar 2013 20:00:37 +0100 Subject: add/unify progress messages to/from the configures it's weird that the output from the two variants is differing, and that after building qmake it appears to hang. Change-Id: I2ac3ace11e958effe787b13e1300eb1d2839ae98 Reviewed-by: Joerg Bornemann --- configure | 4 +++- tools/configure/configureapp.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 5575ecb6a0..7bb32db7ba 100755 --- a/configure +++ b/configure @@ -3615,7 +3615,7 @@ setBootstrapVariable() # build qmake if true; then ###[ '!' -f "$outpath/bin/qmake" ]; - echo "Creating qmake. Please wait..." + echo "Creating qmake..." mkdir -p "$outpath/qmake" || exit # fix makefiles @@ -3726,6 +3726,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; (cd "$outpath/qmake"; "$MAKE") || exit 2 fi # Build qmake +echo "Running configuration tests..." + #------------------------------------------------------------------------------- # create a qt.conf for the Qt build tree itself #------------------------------------------------------------------------------- diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index d19d34e54e..58ec3bf001 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2127,6 +2127,8 @@ bool Configure::checkAvailability(const QString &part) */ void Configure::autoDetection() { + cout << "Running configuration tests..." << endl; + if (dictionary["C++11"] == "auto") { if (!dictionary["QMAKESPEC"].contains("msvc")) dictionary["C++11"] = tryCompileProject("common/c++11") ? "yes" : "no"; -- cgit v1.2.3 From d76b0d9c6f55982192be17a8164a0cfed45d063d Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Thu, 14 Mar 2013 12:26:06 +0100 Subject: Don't call updateAccessibility from graphicsview Graphics items are not accessible anyway, so it doesn't make much sense. Task-number: QTBUG-30169 Change-Id: Id10b0897bce88d9b91db84609a09495aac41b0b4 Reviewed-by: Frederik Gladhorn --- src/widgets/graphicsview/qgraphicsitem.cpp | 9 --------- src/widgets/graphicsview/qgraphicsscene.cpp | 11 ----------- 2 files changed, 20 deletions(-) diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 5c9651f1c9..fd13ee83cd 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -745,9 +745,6 @@ #include #include #include -#ifndef QT_NO_ACCESSIBILITY -# include "qaccessible.h" -#endif #include #include @@ -7322,12 +7319,6 @@ void QGraphicsItem::updateMicroFocus() if (scene()->views().at(i) == fw) { if (qApp) qApp->inputMethod()->update(Qt::ImQueryAll); - -#ifndef QT_NO_ACCESSIBILITY - // ##### is this correct - if (toGraphicsObject()) - QAccessible::updateAccessibility(toGraphicsObject(), 0, QAccessible::StateChanged); -#endif break; } } diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index a9c045ea80..cea376fea8 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -245,9 +245,6 @@ #include #include #include -#ifndef QT_NO_ACCESSIBILITY -# include -#endif #include #include #include @@ -836,14 +833,6 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, focusItem = item; updateInputMethodSensitivityInViews(); -#ifndef QT_NO_ACCESSIBILITY - if (focusItem) { - if (QGraphicsObject *focusObj = focusItem->toGraphicsObject()) { - QAccessibleEvent event(focusObj, QAccessible::Focus); - QAccessible::updateAccessibility(&event); - } - } -#endif if (item) { QFocusEvent event(QEvent::FocusIn, focusReason); sendEvent(item, &event); -- cgit v1.2.3 From f523883c2f6974d9ac261aa40e349c42aefa45f3 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 14 Mar 2013 15:35:59 +0100 Subject: Make QVariant docs refer to QMetaType::Type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-30014 Change-Id: Ie4c0df92345bcb79ef44fb6f345cba9fc934d32f Reviewed-by: Jędrzej Nowacki --- src/corelib/kernel/qvariant.cpp | 280 +++++++++++++++++++++++----------------- 1 file changed, 165 insertions(+), 115 deletions(-) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index d70d8d9a68..ad7ce708ad 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1938,9 +1938,10 @@ inline T qVariantToHelper(const QVariant::Private &d, const HandlersManager &han /*! \fn QStringList QVariant::toStringList() const - Returns the variant as a QStringList if the variant has type() - StringList, \l String, or \l List of a type that can be converted - to QString; otherwise returns an empty list. + Returns the variant as a QStringList if the variant has userType() + \l QMetaType::QStringList, \l QMetaType::QString, or + \l QMetaType::QVariantList of a type that can be converted to QString; + otherwise returns an empty list. \sa canConvert(), convert() */ @@ -1950,10 +1951,12 @@ QStringList QVariant::toStringList() const } /*! - Returns the variant as a QString if the variant has type() \l - String, \l Bool, \l ByteArray, \l Char, \l Date, \l DateTime, \l - Double, \l Int, \l LongLong, \l StringList, \l Time, \l UInt, or - \l ULongLong; otherwise returns an empty string. + Returns the variant as a QString if the variant has userType() \l + QMetaType::QString, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::QDate, \l QMetaType::QDateTime, + \l QMetaType::Double, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QStringList, \l QMetaType::QTime, \l QMetaType::UInt, or + \l QMetaType::ULongLong; otherwise returns an empty string. \sa canConvert(), convert() */ @@ -1964,7 +1967,7 @@ QString QVariant::toString() const /*! Returns the variant as a QMap if the variant - has type() \l Map; otherwise returns an empty map. + has type() \l QMetaType::QVariantMap; otherwise returns an empty map. \sa canConvert(), convert() */ @@ -1975,7 +1978,7 @@ QVariantMap QVariant::toMap() const /*! Returns the variant as a QHash if the variant - has type() \l Hash; otherwise returns an empty map. + has type() \l QMetaType::QVariantHash; otherwise returns an empty map. \sa canConvert(), convert() */ @@ -1987,11 +1990,12 @@ QVariantHash QVariant::toHash() const /*! \fn QDate QVariant::toDate() const - Returns the variant as a QDate if the variant has type() \l Date, - \l DateTime, or \l String; otherwise returns an invalid date. + Returns the variant as a QDate if the variant has userType() + \l QMetaType::QDate, \l QMetaType::QDateTime, or \l QMetaType::QString; + otherwise returns an invalid date. - If the type() is \l String, an invalid date will be returned if the - string cannot be parsed as a Qt::ISODate format date. + If the type() is \l QMetaType::QString, an invalid date will be returned if + the string cannot be parsed as a Qt::ISODate format date. \sa canConvert(), convert() */ @@ -2003,10 +2007,11 @@ QDate QVariant::toDate() const /*! \fn QTime QVariant::toTime() const - Returns the variant as a QTime if the variant has type() \l Time, - \l DateTime, or \l String; otherwise returns an invalid time. + Returns the variant as a QTime if the variant has userType() + \l QMetaType::QTime, \l QMetaType::QDateTime, or \l QMetaType::QString; + otherwise returns an invalid time. - If the type() is \l String, an invalid time will be returned if + If the type() is \l QMetaType::QString, an invalid time will be returned if the string cannot be parsed as a Qt::ISODate format time. \sa canConvert(), convert() @@ -2019,12 +2024,12 @@ QTime QVariant::toTime() const /*! \fn QDateTime QVariant::toDateTime() const - Returns the variant as a QDateTime if the variant has type() \l - DateTime, \l Date, or \l String; otherwise returns an invalid - date/time. + Returns the variant as a QDateTime if the variant has userType() + \l QMetaType::QDateTime, \l QMetaType::QDate, or \l QMetaType::QString; + otherwise returns an invalid date/time. - If the type() is \l String, an invalid date/time will be returned - if the string cannot be parsed as a Qt::ISODate format date/time. + If the type() is \l QMetaType::QString, an invalid date/time will be + returned if the string cannot be parsed as a Qt::ISODate format date/time. \sa canConvert(), convert() */ @@ -2037,8 +2042,8 @@ QDateTime QVariant::toDateTime() const \since 4.7 \fn QEasingCurve QVariant::toEasingCurve() const - Returns the variant as a QEasingCurve if the variant has type() \l - EasingCurve; otherwise returns a default easing curve. + Returns the variant as a QEasingCurve if the variant has userType() + \l QMetaType::QEasingCurve; otherwise returns a default easing curve. \sa canConvert(), convert() */ @@ -2052,9 +2057,9 @@ QEasingCurve QVariant::toEasingCurve() const /*! \fn QByteArray QVariant::toByteArray() const - Returns the variant as a QByteArray if the variant has type() \l - ByteArray or \l String (converted using QString::fromUtf8()); - otherwise returns an empty byte array. + Returns the variant as a QByteArray if the variant has userType() + \l QMetaType::QByteArray or \l QMetaType::QString (converted using + QString::fromUtf8()); otherwise returns an empty byte array. \sa canConvert(), convert() */ @@ -2067,8 +2072,9 @@ QByteArray QVariant::toByteArray() const /*! \fn QPoint QVariant::toPoint() const - Returns the variant as a QPoint if the variant has type() - \l Point or \l PointF; otherwise returns a null QPoint. + Returns the variant as a QPoint if the variant has userType() + \l QMetaType::QPointF or \l QMetaType::QPointF; otherwise returns a null + QPoint. \sa canConvert(), convert() */ @@ -2080,8 +2086,8 @@ QPoint QVariant::toPoint() const /*! \fn QRect QVariant::toRect() const - Returns the variant as a QRect if the variant has type() \l Rect; - otherwise returns an invalid QRect. + Returns the variant as a QRect if the variant has userType() + \l QMetaType::QRect; otherwise returns an invalid QRect. \sa canConvert(), convert() */ @@ -2093,8 +2099,8 @@ QRect QVariant::toRect() const /*! \fn QSize QVariant::toSize() const - Returns the variant as a QSize if the variant has type() \l Size; - otherwise returns an invalid QSize. + Returns the variant as a QSize if the variant has userType() + \l QMetaType::QSize; otherwise returns an invalid QSize. \sa canConvert(), convert() */ @@ -2106,8 +2112,8 @@ QSize QVariant::toSize() const /*! \fn QSizeF QVariant::toSizeF() const - Returns the variant as a QSizeF if the variant has type() \l - SizeF; otherwise returns an invalid QSizeF. + Returns the variant as a QSizeF if the variant has userType() \l + QMetaType::QSizeF; otherwise returns an invalid QSizeF. \sa canConvert(), convert() */ @@ -2119,8 +2125,9 @@ QSizeF QVariant::toSizeF() const /*! \fn QRectF QVariant::toRectF() const - Returns the variant as a QRectF if the variant has type() \l Rect - or \l RectF; otherwise returns an invalid QRectF. + Returns the variant as a QRectF if the variant has userType() + \l QMetaType::QRect or \l QMetaType::QRectF; otherwise returns an invalid + QRectF. \sa canConvert(), convert() */ @@ -2132,8 +2139,8 @@ QRectF QVariant::toRectF() const /*! \fn QLineF QVariant::toLineF() const - Returns the variant as a QLineF if the variant has type() \l - LineF; otherwise returns an invalid QLineF. + Returns the variant as a QLineF if the variant has userType() + \l QMetaType::QLineF; otherwise returns an invalid QLineF. \sa canConvert(), convert() */ @@ -2145,8 +2152,8 @@ QLineF QVariant::toLineF() const /*! \fn QLine QVariant::toLine() const - Returns the variant as a QLine if the variant has type() \l Line; - otherwise returns an invalid QLine. + Returns the variant as a QLine if the variant has userType() + \l QMetaType::QLine; otherwise returns an invalid QLine. \sa canConvert(), convert() */ @@ -2158,8 +2165,9 @@ QLine QVariant::toLine() const /*! \fn QPointF QVariant::toPointF() const - Returns the variant as a QPointF if the variant has type() \l - Point or \l PointF; otherwise returns a null QPointF. + Returns the variant as a QPointF if the variant has userType() \l + QMetaType::QPoint or \l QMetaType::QPointF; otherwise returns a null + QPointF. \sa canConvert(), convert() */ @@ -2174,8 +2182,8 @@ QPointF QVariant::toPointF() const /*! \fn QUrl QVariant::toUrl() const - Returns the variant as a QUrl if the variant has type() - \l Url; otherwise returns an invalid QUrl. + Returns the variant as a QUrl if the variant has userType() + \l QMetaType::QUrl; otherwise returns an invalid QUrl. \sa canConvert(), convert() */ @@ -2188,8 +2196,8 @@ QUrl QVariant::toUrl() const /*! \fn QLocale QVariant::toLocale() const - Returns the variant as a QLocale if the variant has type() - \l Locale; otherwise returns an invalid QLocale. + Returns the variant as a QLocale if the variant has userType() + \l QMetaType::QLocale; otherwise returns an invalid QLocale. \sa canConvert(), convert() */ @@ -2202,8 +2210,8 @@ QLocale QVariant::toLocale() const \fn QRegExp QVariant::toRegExp() const \since 4.1 - Returns the variant as a QRegExp if the variant has type() \l - RegExp; otherwise returns an empty QRegExp. + Returns the variant as a QRegExp if the variant has userType() + \l QMetaType::QRegExp; otherwise returns an empty QRegExp. \sa canConvert(), convert() */ @@ -2218,7 +2226,7 @@ QRegExp QVariant::toRegExp() const \fn QRegularExpression QVariant::toRegularExpression() const \since 5.0 - Returns the variant as a QRegularExpression if the variant has type() \l + Returns the variant as a QRegularExpression if the variant has userType() \l QRegularExpression; otherwise returns an empty QRegularExpression. \sa canConvert(), convert() @@ -2234,7 +2242,7 @@ QRegularExpression QVariant::toRegularExpression() const /*! \since 5.0 - Returns the variant as a QUuid if the variant has type() \l + Returns the variant as a QUuid if the variant has userType() \l QUuid; otherwise returns a default constructed QUuid. \sa canConvert(), convert() @@ -2247,7 +2255,7 @@ QUuid QVariant::toUuid() const /*! \since 5.0 - Returns the variant as a QModelIndex if the variant has type() \l + Returns the variant as a QModelIndex if the variant has userType() \l QModelIndex; otherwise returns a default constructed QModelIndex. \sa canConvert(), convert() @@ -2260,7 +2268,7 @@ QModelIndex QVariant::toModelIndex() const /*! \since 5.0 - Returns the variant as a QJsonValue if the variant has type() \l + Returns the variant as a QJsonValue if the variant has userType() \l QJsonValue; otherwise returns a default constructed QJsonValue. \sa canConvert(), convert() @@ -2273,7 +2281,7 @@ QJsonValue QVariant::toJsonValue() const /*! \since 5.0 - Returns the variant as a QJsonObject if the variant has type() \l + Returns the variant as a QJsonObject if the variant has userType() \l QJsonObject; otherwise returns a default constructed QJsonObject. \sa canConvert(), convert() @@ -2286,7 +2294,7 @@ QJsonObject QVariant::toJsonObject() const /*! \since 5.0 - Returns the variant as a QJsonArray if the variant has type() \l + Returns the variant as a QJsonArray if the variant has userType() \l QJsonArray; otherwise returns a default constructed QJsonArray. \sa canConvert(), convert() @@ -2299,7 +2307,7 @@ QJsonArray QVariant::toJsonArray() const /*! \since 5.0 - Returns the variant as a QJsonDocument if the variant has type() \l + Returns the variant as a QJsonDocument if the variant has userType() \l QJsonDocument; otherwise returns a default constructed QJsonDocument. \sa canConvert(), convert() @@ -2313,8 +2321,9 @@ QJsonDocument QVariant::toJsonDocument() const /*! \fn QChar QVariant::toChar() const - Returns the variant as a QChar if the variant has type() \l Char, - \l Int, or \l UInt; otherwise returns an invalid QChar. + Returns the variant as a QChar if the variant has userType() + \l QMetaType::QChar, \l QMetaType::Int, or \l QMetaType::UInt; otherwise + returns an invalid QChar. \sa canConvert(), convert() */ @@ -2324,8 +2333,8 @@ QChar QVariant::toChar() const } /*! - Returns the variant as a QBitArray if the variant has type() - \l BitArray; otherwise returns an empty bit array. + Returns the variant as a QBitArray if the variant has userType() + \l QMetaType::QBitArray; otherwise returns an empty bit array. \sa canConvert(), convert() */ @@ -2351,16 +2360,19 @@ inline T qNumVariantToHelper(const QVariant::Private &d, } /*! - Returns the variant as an int if the variant has type() \l Int, - \l Bool, \l ByteArray, \l Char, \l Double, \l LongLong, \l - String, \l UInt, or \l ULongLong; otherwise returns 0. + Returns the variant as an int if the variant has userType() + \l QMetaType::Int, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to an int; otherwise \c{*}\a{ok} is set to false. - \b{Warning:} If the value is convertible to a \l LongLong but is too - large to be represented in an int, the resulting arithmetic overflow will - not be reflected in \a ok. A simple workaround is to use QString::toInt(). + \b{Warning:} If the value is convertible to a \l QMetaType::LongLong but is + too large to be represented in an int, the resulting arithmetic overflow + will not be reflected in \a ok. A simple workaround is to use + QString::toInt(). \sa canConvert(), convert() */ @@ -2370,16 +2382,19 @@ int QVariant::toInt(bool *ok) const } /*! - Returns the variant as an unsigned int if the variant has type() - \l UInt, \l Bool, \l ByteArray, \l Char, \l Double, \l Int, \l - LongLong, \l String, or \l ULongLong; otherwise returns 0. + Returns the variant as an unsigned int if the variant has userType() + \l QMetaType::UInt, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::QString, or \l QMetaType::ULongLong; + otherwise returns 0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to an unsigned int; otherwise \c{*}\a{ok} is set to false. - \b{Warning:} If the value is convertible to a \l ULongLong but is too - large to be represented in an unsigned int, the resulting arithmetic overflow will - not be reflected in \a ok. A simple workaround is to use QString::toUInt(). + \b{Warning:} If the value is convertible to a \l QMetaType::ULongLong but is + too large to be represented in an unsigned int, the resulting arithmetic + overflow will not be reflected in \a ok. A simple workaround is to use + QString::toUInt(). \sa canConvert(), convert() */ @@ -2389,9 +2404,11 @@ uint QVariant::toUInt(bool *ok) const } /*! - Returns the variant as a long long int if the variant has type() - \l LongLong, \l Bool, \l ByteArray, \l Char, \l Double, \l Int, - \l String, \l UInt, or \l ULongLong; otherwise returns 0. + Returns the variant as a long long int if the variant has userType() + \l QMetaType::LongLong, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0. If \a ok is non-null: \c{*}\c{ok} is set to true if the value could be converted to an int; otherwise \c{*}\c{ok} is set to false. @@ -2405,9 +2422,10 @@ qlonglong QVariant::toLongLong(bool *ok) const /*! Returns the variant as as an unsigned long long int if the - variant has type() \l ULongLong, \l Bool, \l ByteArray, \l Char, - \l Double, \l Int, \l LongLong, \l String, or \l UInt; otherwise - returns 0. + variant has type() \l QMetaType::ULongLong, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::QChar, \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, or + \l QMetaType::UInt; otherwise returns 0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to an int; otherwise \c{*}\a{ok} is set to false. @@ -2420,13 +2438,14 @@ qulonglong QVariant::toULongLong(bool *ok) const } /*! - Returns the variant as a bool if the variant has type() Bool. + Returns the variant as a bool if the variant has userType() Bool. - Returns true if the variant has type() \l Bool, \l Char, \l Double, - \l Int, \l LongLong, \l UInt, or \l ULongLong and the value is - non-zero, or if the variant has type \l String or \l ByteArray and - its lower-case content is not one of the following: empty, "0" - or "false"; otherwise returns false. + Returns true if the variant has userType() \l QMetaType::Bool, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::UInt, or \l QMetaType::ULongLong and + the value is non-zero, or if the variant has type \l QMetaType::QString or + \l QMetaType::QByteArray and its lower-case content is not one of the + following: empty, "0" or "false"; otherwise returns false. \sa canConvert(), convert() */ @@ -2442,9 +2461,11 @@ bool QVariant::toBool() const } /*! - Returns the variant as a double if the variant has type() \l - Double, \l QMetaType::Float, \l Bool, \l ByteArray, \l Int, \l LongLong, \l String, \l - UInt, or \l ULongLong; otherwise returns 0.0. + Returns the variant as a double if the variant has userType() + \l QMetaType::Double, \l QMetaType::Float, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0.0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to a double; otherwise \c{*}\a{ok} is set to false. @@ -2457,9 +2478,11 @@ double QVariant::toDouble(bool *ok) const } /*! - Returns the variant as a float if the variant has type() \l - Double, \l QMetaType::Float, \l Bool, \l ByteArray, \l Int, \l LongLong, \l String, \l - UInt, or \l ULongLong; otherwise returns 0.0. + Returns the variant as a float if the variant has userType() + \l QMetaType::Double, \l QMetaType::Float, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0.0. \since 4.6 @@ -2474,9 +2497,11 @@ float QVariant::toFloat(bool *ok) const } /*! - Returns the variant as a qreal if the variant has type() \l - Double, \l QMetaType::Float, \l Bool, \l ByteArray, \l Int, \l LongLong, \l String, \l - UInt, or \l ULongLong; otherwise returns 0.0. + Returns the variant as a qreal if the variant has userType() + \l QMetaType::Double, \l QMetaType::Float, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0.0. \since 4.6 @@ -2491,8 +2516,9 @@ qreal QVariant::toReal(bool *ok) const } /*! - Returns the variant as a QVariantList if the variant has type() - \l List or \l StringList; otherwise returns an empty list. + Returns the variant as a QVariantList if the variant has userType() + \l QMetaType::QVariantList or \l QMetaType::QStringList; otherwise returns + an empty list. \sa canConvert(), convert() */ @@ -2631,27 +2657,51 @@ static bool canConvertMetaObject(int fromId, int toId, QObject *fromObject) \table \header \li Type \li Automatically Cast To - \row \li \l Bool \li \l Char, \l Double, \l Int, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l ByteArray \li \l Double, \l Int, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l Char \li \l Bool, \l Int, \l UInt, \l LongLong, \l ULongLong - \row \li \l Color \li \l String - \row \li \l Date \li \l DateTime, \l String - \row \li \l DateTime \li \l Date, \l String, \l Time - \row \li \l Double \li \l Bool, \l Int, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l Font \li \l String - \row \li \l Int \li \l Bool, \l Char, \l Double, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l KeySequence \li \l Int, \l String - \row \li \l List \li \l StringList (if the list's items can be converted to strings) - \row \li \l LongLong \li \l Bool, \l ByteArray, \l Char, \l Double, \l Int, \l String, \l UInt, \l ULongLong - \row \li \l Point \li PointF - \row \li \l Rect \li RectF - \row \li \l String \li \l Bool, \l ByteArray, \l Char, \l Color, \l Date, \l DateTime, \l Double, - \l Font, \l Int, \l KeySequence, \l LongLong, \l StringList, \l Time, \l UInt, - \l ULongLong - \row \li \l StringList \li \l List, \l String (if the list contains exactly one item) - \row \li \l Time \li \l String - \row \li \l UInt \li \l Bool, \l Char, \l Double, \l Int, \l LongLong, \l String, \l ULongLong - \row \li \l ULongLong \li \l Bool, \l Char, \l Double, \l Int, \l LongLong, \l String, \l UInt + \row \li \l QMetaType::Bool \li \l QMetaType::QChar, \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QByteArray \li \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QChar \li \l QMetaType::Bool, \l QMetaType::Int, + \l QMetaType::UInt, \l QMetaType::LongLong, \l QMetaType::ULongLong + \row \li \l QMetaType::QColor \li \l QMetaType::QString + \row \li \l QMetaType::QDate \li \l QMetaType::QDateTime, + \l QMetaType::QString + \row \li \l QMetaType::QDateTime \li \l QMetaType::QDate, + \l QMetaType::QString, \l QMetaType::QTime + \row \li \l QMetaType::Double \li \l QMetaType::Bool, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::QString, \l QMetaType::UInt, + \l QMetaType::ULongLong + \row \li \l QMetaType::QFont \li \l QMetaType::QString + \row \li \l QMetaType::Int \li \l QMetaType::Bool, \l QMetaType::QChar, + \l QMetaType::Double, \l QMetaType::LongLong, \l QMetaType::QString, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QKeySequence \li \l QMetaType::Int, + \l QMetaType::QString + \row \li \l QMetaType::QVariantList \li \l QMetaType::QStringList (if the + list's items can be converted to QStrings) + \row \li \l QMetaType::LongLong \li \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::QChar, \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::QString, \l QMetaType::UInt, + \l QMetaType::ULongLong + \row \li \l QMetaType::QPoint \li QMetaType::QPointF + \row \li \l QMetaType::QRect \li QMetaType::QRectF + \row \li \l QMetaType::QString \li \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::QChar, \l QMetaType::QColor, + \l QMetaType::QDate, \l QMetaType::QDateTime, \l QMetaType::Double, + \l QMetaType::QFont, \l QMetaType::Int, \l QMetaType::QKeySequence, + \l QMetaType::LongLong, \l QMetaType::QStringList, \l QMetaType::QTime, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QStringList \li \l QMetaType::QVariantList, + \l QMetaType::QString (if the list contains exactly one item) + \row \li \l QMetaType::QTime \li \l QMetaType::QString + \row \li \l QMetaType::UInt \li \l QMetaType::Bool, \l QMetaType::QChar, + \l QMetaType::Double, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::ULongLong + \row \li \l QMetaType::ULongLong \li \l QMetaType::Bool, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::QString, \l QMetaType::UInt \endtable A QVariant containing a pointer to a type derived from QObject will also return true for this -- cgit v1.2.3 From 677313fc0b013644ad558e3410266ecbbcbc6d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 19 Mar 2013 13:19:19 +0100 Subject: Attempt to prevent tst_QWidget::scroll() from failing in CI. Skip the test on X11 where it's consistently failing in CI but not when trying to reproduce locally. Also attempt to make test slightly more robust on other platforms (it's already #ifndef'd for Q_OS_MAC). Task-number: QTBUG-30271 Change-Id: I6743eb99549abbd945e380a3a54ce8620000298a Reviewed-by: Gunnar Sletta --- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index c1927c9d1f..ba60dd0c01 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -4239,9 +4239,13 @@ void tst_QWidget::isOpaque() */ void tst_QWidget::scroll() { + if (m_platform == QStringLiteral("xcb")) + QSKIP("X11: Skip unstable test"); + UpdateWidget updateWidget; updateWidget.resize(500, 500); updateWidget.reset(); + updateWidget.move(QGuiApplication::primaryScreen()->geometry().center() - QPoint(250, 250)); updateWidget.show(); qApp->setActiveWindow(&updateWidget); QVERIFY(QTest::qWaitForWindowActive(&updateWidget)); @@ -4253,7 +4257,7 @@ void tst_QWidget::scroll() qApp->processEvents(); QRegion dirty(QRect(0, 0, 500, 10)); dirty += QRegion(QRect(0, 10, 10, 490)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } { @@ -4263,7 +4267,7 @@ void tst_QWidget::scroll() qApp->processEvents(); QRegion dirty(QRect(0, 0, 500, 10)); dirty += QRegion(QRect(0, 10, 10, 10)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } { @@ -4276,7 +4280,7 @@ void tst_QWidget::scroll() dirty += QRegion(QRect(0, 60, 110, 40)); dirty += QRegion(QRect(50, 100, 60, 10)); dirty += QRegion(QRect(50, 110, 10, 40)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } { @@ -4287,7 +4291,7 @@ void tst_QWidget::scroll() QRegion dirty(QRect(0, 0, 100, 100)); dirty += QRegion(QRect(100, 100, 100, 10)); dirty += QRegion(QRect(100, 110, 10, 90)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } } #endif -- cgit v1.2.3 From 5fd509c4d7b4bd9be9cc6f3a5f419ee496fe9142 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 18 Mar 2013 16:33:06 +0100 Subject: Tests: stabilize tst_QDockWidget on small screens The test has been recently failing in CI. The problem was easy to reproduce in a virtual machine by resizing the window of the virtual machine small enough. This change makes sure that the requested size hint is significantly smaller than the desktop size, to avoid the window manager stepping in and limiting the window size. Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c Reviewed-by: Caroline Chao (cherry picked from commit 36e6632fa363152e1a0d42e53a0e5ada09092324) Reviewed-by: J-P Nurmi --- tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp index 92b16ac155..6ab7cb4491 100644 --- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp +++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp @@ -735,7 +735,7 @@ void tst_QDockWidget::task169808_setFloating() QSize sizeHint() const { const QRect& deskRect = qApp->desktop()->availableGeometry(); - return QSize(qMin(300, deskRect.width()), 300); + return QSize(qMin(300, deskRect.width() / 2), qMin(300, deskRect.height() / 2)); } QSize minimumSizeHint() const -- cgit v1.2.3 From 426f2ccafc8fc8336193dbdd67a949e790d7fa7e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 19 Mar 2013 09:52:31 +0100 Subject: Windows native file dialogs: Split suffix list correctly. Task-number: QTBUG-30185 Change-Id: I9a3d16eafb5417d6720a702af662fb219487549d Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 74193c47a3..daa4369d88 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1071,7 +1071,9 @@ static inline QString appendSuffix(const QString &fileName, const QString &filte if (suffixPos < 0) return fileName; suffixPos += 3; - int endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1); + int endPos = filter.indexOf(QLatin1Char(' '), suffixPos + 1); + if (endPos < 0) + endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1); if (endPos < 0) endPos = filter.indexOf(QLatin1Char(')'), suffixPos + 1); if (endPos < 0) -- cgit v1.2.3 From 613cef516c5e3b87a88ceb2c364787409a25dfb7 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 5 Mar 2013 16:52:08 +0100 Subject: qtbase: Fix duplicate symbol errors in static build on Mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is some code duplication between QMacStyle anf the Cocoa QPA plugin regarding painting and bridging with Cocoa. Task-number: QTBUG-29725 Change-Id: I347407a9bca47b6fccd77fb924688bd35135d96b Reviewed-by: Friedemann Kleint Reviewed-by: Oswald Buddenhagen Reviewed-by: Morten Johan Sørvig (cherry picked from commit 5f948eb62ddb9f429f46ade08f32072212cda493) Reviewed-by: Gabriel de Dietrich Reviewed-by: Andy Shaw --- src/plugins/platforms/cocoa/qcocoahelpers.mm | 7 ++-- src/plugins/platforms/cocoa/qpaintengine_mac.mm | 2 +- src/widgets/styles/qmacstyle_mac.mm | 54 ++++++++++++++----------- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index 91a6f5a4c7..20702c6837 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -466,10 +466,9 @@ QString qt_mac_removeMnemonics(const QString &original) return returnText; } - -CGColorSpaceRef m_genericColorSpace = 0; -QHash m_displayColorSpaceHash; -bool m_postRoutineRegistered = false; +static CGColorSpaceRef m_genericColorSpace = 0; +static QHash m_displayColorSpaceHash; +static bool m_postRoutineRegistered = false; CGColorSpaceRef qt_mac_genericColorSpace() { diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm index 0b6392fb65..101be611ad 100644 --- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE QCoreGraphicsPaintEngine utility functions *****************************************************************************/ -void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform) +static void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform) { CGAffineTransform old_xform = CGAffineTransformIdentity; if (orig_xform) { //setup xforms diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 5d83804d51..dab8e3fe74 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -458,6 +458,9 @@ static QString qt_mac_removeMnemonics(const QString &original) return returnText; } +static CGContextRef qt_mac_cg_context(const QPaintDevice *pdev); + +namespace { class QMacCGContext { CGContextRef context; @@ -465,7 +468,6 @@ public: QMacCGContext(QPainter *p); inline QMacCGContext() { context = 0; } inline QMacCGContext(const QPaintDevice *pdev) { - extern CGContextRef qt_mac_cg_context(const QPaintDevice *); context = qt_mac_cg_context(pdev); } inline QMacCGContext(CGContextRef cg, bool takeOwnership=false) { @@ -495,6 +497,7 @@ public: return *this; } }; +} // anonymous namespace static QColor qcolorFromCGColor(CGColorRef cgcolor) { @@ -578,11 +581,11 @@ QRegion qt_mac_fromHIShapeRef(HIShapeRef shape) } CGColorSpaceRef m_genericColorSpace = 0; -QHash m_displayColorSpaceHash; +static QHash m_displayColorSpaceHash; bool m_postRoutineRegistered = false; -CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget); -CGColorSpaceRef qt_mac_genericColorSpace() +static CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget); +static CGColorSpaceRef qt_mac_genericColorSpace() { #if 0 if (!m_genericColorSpace) { @@ -606,11 +609,26 @@ CGColorSpaceRef qt_mac_genericColorSpace() #endif } +static void qt_mac_cleanUpMacColorSpaces() +{ + if (m_genericColorSpace) { + CFRelease(m_genericColorSpace); + m_genericColorSpace = 0; + } + QHash::const_iterator it = m_displayColorSpaceHash.constBegin(); + while (it != m_displayColorSpaceHash.constEnd()) { + if (it.value()) + CFRelease(it.value()); + ++it; + } + m_displayColorSpaceHash.clear(); +} + /* Ideally, we should pass the widget in here, and use CGGetDisplaysWithRect() etc. to support multiple displays correctly. */ -CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget) +static CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget) { CGColorSpaceRef colorSpace; @@ -639,27 +657,11 @@ CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget) m_displayColorSpaceHash.insert(displayID, colorSpace); if (!m_postRoutineRegistered) { m_postRoutineRegistered = true; - void qt_mac_cleanUpMacColorSpaces(); qAddPostRoutine(qt_mac_cleanUpMacColorSpaces); } return colorSpace; } -void qt_mac_cleanUpMacColorSpaces() -{ - if (m_genericColorSpace) { - CFRelease(m_genericColorSpace); - m_genericColorSpace = 0; - } - QHash::const_iterator it = m_displayColorSpaceHash.constBegin(); - while (it != m_displayColorSpaceHash.constEnd()) { - if (it.value()) - CFRelease(it.value()); - ++it; - } - m_displayColorSpaceHash.clear(); -} - bool qt_macWindowIsTextured(const QWidget *window) { NSWindow *nswindow = static_cast( @@ -6489,7 +6491,7 @@ int QMacStyle::layoutSpacing(QSizePolicy::ControlType control1, return_SIZE(10, 8, 6); // guess } -void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform) +static void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform) { CGAffineTransform old_xform = CGAffineTransformIdentity; if (orig_xform) { //setup xforms @@ -6530,6 +6532,9 @@ void qt_mac_scale_region(QRegion *region, qreal scaleFactor) region->setRects(&scaledRects[0], scaledRects.count()); } +static CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice); + +namespace { QMacCGContext::QMacCGContext(QPainter *p) { QPaintEngine *pe = p->paintEngine(); @@ -6542,7 +6547,6 @@ QMacCGContext::QMacCGContext(QPainter *p) devType == QInternal::Pixmap || devType == QInternal::Image)) { - extern CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice); CGColorSpaceRef colorspace = qt_mac_colorSpaceForDeviceType(pe->paintDevice()); uint flags = kCGImageAlphaPremultipliedFirst; flags |= kCGBitmapByteOrder32Host; @@ -6584,7 +6588,9 @@ QMacCGContext::QMacCGContext(QPainter *p) } } -CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice) +} // anonymous namespace + +static CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice) { bool isWidget = (paintDevice->devType() == QInternal::Widget); return qt_mac_displayColorSpace(isWidget ? static_cast(paintDevice) : 0); -- cgit v1.2.3 From 678320788ee781e36d2586a0d7586106034bcfdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 20 Mar 2013 11:43:31 +0100 Subject: Skip unstable tst_QSslSocket test case. The connection to qt-project.org seems to be the one that causes this particular test case to fail. Task-number: QTBUG-29941 Change-Id: Ie5e430646997e86e3acb04132cd90a1773a091da Reviewed-by: Richard J. Moore Reviewed-by: Peter Hartmann --- tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index a2bb1ec705..e950ae1d28 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -706,6 +706,8 @@ void tst_QSslSocket::peerCertificateChain() if (!QSslSocket::supportsSsl()) return; + QSKIP("QTBUG-29941 - Unstable auto-test due to intermittently unreachable host"); + QSslSocketPtr socket = newSocket(); this->socket = socket.data(); -- cgit v1.2.3 From e79e1c1a166b8841724b6cd33b27b37a5ef6f4a0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 20 Mar 2013 16:51:32 +0100 Subject: pass module version to syncqt this is cleaner than having it parse qmake project files. the only remaining built-in version extraction is the fallback to qglobal.h needed for bootstrapping. as a "side effect", this fixes the build of modules with mismatched versions centralized in .qmake.conf, as this was simply not handled so far. the -mkspecsdir syncqt option goes away, as there is no use case for it any more. Task-number: QTBUG-29838 Change-Id: I6912a38f0e93a26bc267a9e3d738506fd3ad431b Reviewed-by: Thiago Macieira Reviewed-by: Jocelyn Turcotte Reviewed-by: Joerg Bornemann --- bin/syncqt | 39 ++++++++++++---------------------- configure | 2 +- mkspecs/features/qt_module_headers.prf | 2 +- src/angle/angle.pro | 2 +- src/tools/bootstrap/bootstrap.pro | 2 +- tools/configure/configureapp.cpp | 2 +- 6 files changed, 18 insertions(+), 31 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index 3e7aea96a5..acfc6c4d57 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -83,9 +83,6 @@ our $quoted_basedir; # Make sure we use Windows line endings for chomp and friends on Windows. $INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys"); -my $mkspecsdir = dirname(dirname($0)); -normalizePath(\$mkspecsdir) if (defined $mkspecsdir); - # will be defined based on the modules sync.profile our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %explicitheaders, %deprecatedheaders); our @qpa_headers = (); @@ -103,6 +100,7 @@ my $copy_headers = 0; my $create_uic_class_map = 0; my $create_private_headers = 1; my $minimal = 0; +my $module_version = 0; my @modules_to_sync ; $force_relative = 1 if ( -d "/System/Library/Frameworks" ); @@ -128,7 +126,7 @@ sub showUsage print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n"; print " -minimal Do not create CamelCase headers (default: " . ($minimal ? "yes" : "no") . ")\n"; print " -outdir Specify output directory for sync (default: $out_basedir)\n"; - print " -mkspecsdir Set the path to the mkspecs (detected: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . ")\n"; + print " -version Specify the module's version (default: detect from qglobal.h)\n"; print " -quiet Only report problems, not activity (same as -verbose 0)\n"; print " -v, -verbose Sets the verbosity level (max. 4) (default: $verbose_level)\n"; print " The short form increases the level by +1\n"; @@ -662,8 +660,8 @@ while ( @ARGV ) { } elsif($arg eq "-private") { $var = "create_private_headers"; $val = "yes"; - } elsif($arg eq "-mkspecsdir") { - $var = "mkspecsdir"; + } elsif($arg eq "-version") { + $var = "version"; $val = shift @ARGV; } elsif($arg =~/^-/) { print "Unknown option: $arg\n\n" if(!$var); @@ -739,12 +737,11 @@ while ( @ARGV ) { push @modules_to_sync, $module; $moduleheaders{$module} = $headerdir; $create_uic_class_map = 0; - } elsif ($var eq "mkspecsdir") { + } elsif ($var eq "version") { if($val) { - $mkspecsdir = $val; - normalizePath(\$mkspecsdir); + $module_version = $val; } else { - die "The -mkspecsdir option requires an argument"; + die "The -version option requires an argument"; } } elsif ($var eq "output") { my $outdir = $val; @@ -759,11 +756,6 @@ while ( @ARGV ) { } } -die "Cannot automatically detect/use provided path to QtBase's build directory!\n" . - "QTDIR detected/provided: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . "\n" . - "Please use the -mkspecsdir option to provide the correct path.\nsyncqt failed" - if (!$mkspecsdir || !-d $mkspecsdir); - # if we have no $basedir we cannot be sure which sources you want, so die die "Could not find any sync.profile for your module!\nPass to syncqt to sync your header files.\nsyncqt failed" if (!$basedir); @@ -785,12 +777,12 @@ my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate; $isunix = checkUnix; #cache checkUnix -my $qt_version = fileContents($mkspecsdir."/qconfig.pri"); -if (length($qt_version)) { - $qt_version =~ s,.*^QT_VERSION[ \t]*=[ \t]*(\S+).*,$1,sm; -} else { - $qt_version = fileContents($basedir."/src/corelib/global/qglobal.h"); - $qt_version =~ s,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,$1,sm; +if (!$module_version) { + my $filco = fileContents($basedir."/src/corelib/global/qglobal.h"); + if ($filco !~ m,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,sm) { + die "Cannot determine Qt/Module version. Use -version.\n"; + } + $module_version = $1; } foreach my $lib (@modules_to_sync) { die "No such module: $lib" unless(defined $modules{$lib}); @@ -799,11 +791,6 @@ foreach my $lib (@modules_to_sync) { my @dirs = split(/;/, $modules{$lib}); my $dir = $dirs[0]; - my $project = $dir; - $project =~ s,/([^/]+)$,/$1/$1.pro,; - my $module_version = fileContents($project); - $module_version = $qt_version unless ($module_version =~ s,.*^VERSION[ \t]*=[ \t]*(\S+).*,$1,sm); - my $pathtoheaders = ""; $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib}); diff --git a/configure b/configure index 7bb32db7ba..1d5c406e67 100755 --- a/configure +++ b/configure @@ -2239,7 +2239,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then if [ -x "$relpath/bin/syncqt" ]; then mkdir -p "$outpath/bin" echo "#!/bin/sh" >"$outpath/bin/syncqt" - echo "perl \"$relpath/bin/syncqt\" -mkspecsdir \"$outpath/mkspecs\" \"\$@\"" >>"$outpath/bin/syncqt" + echo "perl \"$relpath/bin/syncqt\" \"\$@\"" >>"$outpath/bin/syncqt" chmod 755 "$outpath/bin/syncqt" fi diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index 10d3fe3c0b..40d6bb0d40 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -15,7 +15,7 @@ load(qt_build_paths) qtPrepareTool(QMAKE_SYNCQT, syncqt) contains(QT_CONFIG, private_tests): \ # -developer-build QMAKE_SYNCQT += -check-includes - QMAKE_SYNCQT += -module $$MODULE_INCNAME -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR + QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION -outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR !silent: message($$QMAKE_SYNCQT) system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT") } diff --git a/src/angle/angle.pro b/src/angle/angle.pro index 00e0501d60..b4dbf8cf21 100644 --- a/src/angle/angle.pro +++ b/src/angle/angle.pro @@ -13,7 +13,7 @@ SUBDIRS += src else: \ mod_component_base = $$dirname(_QMAKE_CACHE_) QMAKE_SYNCQT += -minimal -module KHR -module EGL -module GLES2 \ - -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$mod_component_base $$dirname(_QMAKE_CONF_) + -version none -outdir $$mod_component_base $$dirname(_QMAKE_CONF_) !silent:message($$QMAKE_SYNCQT) system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT") } diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 0d4b62fd16..1ec54deeb5 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -139,7 +139,7 @@ INSTALLS += lib else: \ mod_component_base = $$dirname(_QMAKE_CACHE_) QMAKE_SYNCQT += -minimal -module QtCore -module QtDBus -module QtXml \ - -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$mod_component_base $$dirname(_QMAKE_CONF_) + -version $$VERSION -outdir $$mod_component_base $$dirname(_QMAKE_CONF_) contains(QT_CONFIG, zlib):QMAKE_SYNCQT += -module QtZlib !silent:message($$QMAKE_SYNCQT) system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT") diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 58ec3bf001..d27a633c72 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -171,7 +171,7 @@ Configure::Configure(int& argc, char** argv) QTextStream stream(&syncqt_bat); stream << "@echo off" << endl << "call " << QDir::toNativeSeparators(sourcePath + "/bin/syncqt.bat") - << " -mkspecsdir \"" << QDir::toNativeSeparators(buildPath) << "/mkspecs\" %*" << endl; + << " %*" << endl; syncqt_bat.close(); } } -- cgit v1.2.3 From 8bfbaa41783dad66976fc83d4ca8c7e2673f5629 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 19 Mar 2013 17:38:30 +0100 Subject: activate example (non-)build magic only in configured trees otherwise we assume that the user is trying to build a random example which just happens to live inside a qt module's repository. Task-number: QTBUG-29756 Change-Id: I17f217b4235fbe04f2c49d1d92ce08b86bb259b9 Reviewed-by: Andy Shaw Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_example_installs.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 04d7a17ab9..479a16a90b 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -26,7 +26,7 @@ defineTest(addInstallFiles) { } probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) -!isEmpty(probase):!contains(probase, ^\\..*) { +!isEmpty(probase):!contains(probase, ^\\..*):!isEmpty(_QMAKE_CACHE_) { for(ex, EXAMPLE_FILES): \ sourcefiles += $$files($$absolute_path($$ex, $$_PRO_FILE_PWD_)) for(res, RESOURCES) { -- cgit v1.2.3 From 0127adbe2c38ab50f87376ce05cbbb1ed92c2901 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 19 Mar 2013 17:35:35 +0100 Subject: ensure that each module has a .qmake.cache when properly qmake'd this makes properly configured modules (whose top-level project file was evaluated) uniformly recognizable. Change-Id: Ib127df2becb2ff7f51ee8cc5a194ff168b41c227 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_parts.prf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf index 12ba312bcd..37dc849f83 100644 --- a/mkspecs/features/qt_parts.prf +++ b/mkspecs/features/qt_parts.prf @@ -9,6 +9,9 @@ # We mean it. # +# Ensure that each module has a .qmake.cache when properly qmake'd. +cache() + load(qt_build_config) TEMPLATE = subdirs -- cgit v1.2.3 From 6786000790f18f7fe56fe64dd7969e4a8fe9513b Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 22 Mar 2013 14:28:32 +0100 Subject: Doc: Changed title of Qt Print Support's C++ Classes page. -old title created broken links in Assistant. -conforms to Qt 5 naming scheme. Change-Id: Iaf619c1264edc1f9d2fd24f7031fe6c07efd2c1d Reviewed-by: Friedemann Kleint --- src/printsupport/doc/src/qtprintsupport-module.qdoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/printsupport/doc/src/qtprintsupport-module.qdoc b/src/printsupport/doc/src/qtprintsupport-module.qdoc index 47420368e5..477b9a7097 100644 --- a/src/printsupport/doc/src/qtprintsupport-module.qdoc +++ b/src/printsupport/doc/src/qtprintsupport-module.qdoc @@ -27,7 +27,7 @@ /*! \module QtPrintSupport - \title Qt Print Support Module + \title Qt Print Support C++ Classes \brief The Qt PrintSupport module provides classes to make printing easier and portable. \ingroup modules @@ -43,4 +43,3 @@ \snippet code/doc_src_qtprintsupport.pro 0 */ - -- cgit v1.2.3 From 3eafd2e7d841c2c4dac1055a3eb38f871a307cca Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 25 Mar 2013 10:28:38 +0100 Subject: Doc: Fix typo in the property system documentation priorty -> priority Task-number: QTBUG-28756 Change-Id: I79138f49db78ee6d1b96e44585ae4c1565920b18 Reviewed-by: Sergio Ahumada --- src/corelib/doc/src/objectmodel/properties.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc index 66325ca6c0..39f5e80eaa 100644 --- a/src/corelib/doc/src/objectmodel/properties.qdoc +++ b/src/corelib/doc/src/objectmodel/properties.qdoc @@ -178,7 +178,7 @@ Suppose we have a class MyClass, which is derived from QObject and which uses the Q_OBJECT macro in its private section. We want to - declare a property in MyClass to keep track of a priorty + declare a property in MyClass to keep track of a priority value. The name of the property will be \e priority, and its type will be an enumeration type named \e Priority, which is defined in MyClass. -- cgit v1.2.3 From d8406d0e09c5bfa549f2787db7f7f01a56fee443 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Mar 2013 14:51:04 +0100 Subject: make the libexec default on windows bin/ after all the dlls being in lib/ is kind of an accident (a side effect of how qmake builds them). in fact, the libdir should be entirely irrelevant for windows deployments (and indeed, the SDK is delivered with dlls only in bin/). Change-Id: If47e72b24774721a61ba63847f6132f88ff110be Reviewed-by: Friedemann Kleint Reviewed-by: Jocelyn Turcotte --- configure | 2 +- tools/configure/configureapp.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 1d5c406e67..2ea1ea435a 100755 --- a/configure +++ b/configure @@ -2824,7 +2824,7 @@ fi QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"` if [ "$XPLATFORM_MINGW" = "yes" ]; then - QT_INSTALL_LIBEXECS_DIRNAME="lib" + QT_INSTALL_LIBEXECS_DIRNAME="bin" else QT_INSTALL_LIBEXECS_DIRNAME="libexec" fi diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index d27a633c72..22ee456038 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1616,7 +1616,7 @@ bool Configure::displayHelp() desc( "-libdir ", "Libraries will be installed to \n(default PREFIX/lib)"); desc( "-headerdir ", "Headers will be installed to \n(default PREFIX/include)"); desc( "-archdatadir ", "Architecture-dependent data used by Qt will be installed to \n(default PREFIX)"); - desc( "-libexecdir ", "Program executables will be installed to \n(default ARCHDATADIR/lib)"); + desc( "-libexecdir ", "Program executables will be installed to \n(default ARCHDATADIR/bin)"); desc( "-plugindir ", "Plugins will be installed to \n(default ARCHDATADIR/plugins)"); desc( "-importdir ", "Imports for QML1 will be installed to \n(default ARCHDATADIR/imports)"); desc( "-qmldir ", "Imports for QML2 will be installed to \n(default ARCHDATADIR/qml)"); @@ -3586,7 +3586,7 @@ void Configure::generateQConfigCpp() dictionary["QT_INSTALL_ARCHDATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"]; if (!dictionary["QT_INSTALL_LIBEXECS"].size()) { if (dictionary["QT_INSTALL_ARCHDATA"] == dictionary["QT_INSTALL_PREFIX"]) - dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/lib"; + dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/bin"; else dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec"; } -- cgit v1.2.3 From 11e9f1368be986d0e128e8f7b2423d9cc7dd5436 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 22 Mar 2013 11:17:15 +0100 Subject: Windows: Fix reported screen metrics. A call to SetProcessDPIAware() is required in some cases. Task-number: QTBUG-30063 Change-Id: Iba0203d76c8e7068bf9fd4581770c1aca76a4708 Reviewed-by: Joerg Bornemann Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowscontext.cpp | 12 ++++++++---- src/plugins/platforms/windows/qwindowscontext.h | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 99ef3aacf3..88c9bf448d 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -172,7 +172,7 @@ QWindowsUser32DLL::QWindowsUser32DLL() : updateLayeredWindowIndirect(0), isHungAppWindow(0), registerTouchWindow(0), unregisterTouchWindow(0), - getTouchInputInfo(0), closeTouchInputHandle(0) + getTouchInputInfo(0), closeTouchInputHandle(0), setProcessDPIAware(0) { } @@ -187,6 +187,7 @@ void QWindowsUser32DLL::init() updateLayeredWindowIndirect = (UpdateLayeredWindowIndirect)(library.resolve("UpdateLayeredWindowIndirect")); isHungAppWindow = (IsHungAppWindow)library.resolve("IsHungAppWindow"); + setProcessDPIAware = (SetProcessDPIAware)library.resolve("SetProcessDPIAware"); } bool QWindowsUser32DLL::initTouch() @@ -252,7 +253,7 @@ struct QWindowsContextPrivate { QSet m_registeredWindowClassNames; HandleBaseWindowHash m_windows; HDC m_displayContext; - const int m_defaultDPI; + int m_defaultDPI; QWindowsKeyMapper m_keyMapper; QWindowsMouseHandler m_mouseHandler; QWindowsMimeConverter m_mimeConverter; @@ -266,8 +267,6 @@ struct QWindowsContextPrivate { QWindowsContextPrivate::QWindowsContextPrivate() : m_systemInfo(0), - m_displayContext(GetDC(0)), - m_defaultDPI(GetDeviceCaps(m_displayContext,LOGPIXELSY)), m_oleInitializeResult(OleInitialize(NULL)), m_eventType(QByteArrayLiteral("windows_generic_MSG")), m_lastActiveWindow(0), m_asyncExpose(0) @@ -276,6 +275,11 @@ QWindowsContextPrivate::QWindowsContextPrivate() : QWindowsContext::user32dll.init(); QWindowsContext::shell32dll.init(); #endif + // Ensure metrics functions report correct data, QTBUG-30063. + if (QWindowsContext::user32dll.setProcessDPIAware) + QWindowsContext::user32dll.setProcessDPIAware(); + m_displayContext = GetDC(0); + m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY); const QSysInfo::WinVersion ver = QSysInfo::windowsVersion(); #ifndef Q_OS_WINCE diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h index 1fe71e3aff..d60b632beb 100644 --- a/src/plugins/platforms/windows/qwindowscontext.h +++ b/src/plugins/platforms/windows/qwindowscontext.h @@ -80,6 +80,7 @@ struct QWindowsUser32DLL const BLENDFUNCTION *, DWORD); typedef BOOL (WINAPI *UpdateLayeredWindowIndirect)(HWND, const UPDATELAYEREDWINDOWINFO *); typedef BOOL (WINAPI *IsHungAppWindow)(HWND); + typedef BOOL (WINAPI *SetProcessDPIAware)(); // Functions missing in Q_CC_GNU stub libraries. SetLayeredWindowAttributes setLayeredWindowAttributes; @@ -94,6 +95,9 @@ struct QWindowsUser32DLL UnregisterTouchWindow unregisterTouchWindow; GetTouchInputInfo getTouchInputInfo; CloseTouchInputHandle closeTouchInputHandle; + + // Windows Vista onwards + SetProcessDPIAware setProcessDPIAware; }; struct QWindowsShell32DLL -- cgit v1.2.3 From b51c9d689d5f1d01f97e4ba151fafccc48e6766c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Mar 2013 15:12:09 +0100 Subject: qt.conf: default LibraryExecutables to bin/ on windows this matches the platform-specific configure default. as a "side effect", this fixes the in-builddir execution of webkit examples, as the non-installed qmake now agrees with QLibraryInfo about the location of QWebProcess.exe. Task-number: QTBUG-30322 Change-Id: Id28f2c246e4bfda6d5f4d719a66a16f24bb7cdb7 Reviewed-by: Friedemann Kleint Reviewed-by: Jocelyn Turcotte --- src/corelib/global/qlibraryinfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 747fd87207..5fb9640b19 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -273,7 +273,11 @@ static const struct { { "Documentation", "doc" }, // should be ${Data}/doc { "Headers", "include" }, { "Libraries", "lib" }, +#ifdef Q_OS_WIN + { "LibraryExecutables", "bin" }, +#else { "LibraryExecutables", "libexec" }, // should be ${ArchData}/libexec +#endif { "Binaries", "bin" }, { "Plugins", "plugins" }, // should be ${ArchData}/plugins { "Imports", "imports" }, // should be ${ArchData}/imports -- cgit v1.2.3 From 787aa7a2a8a261f120199ef73e20c03bf212097f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 26 Mar 2013 08:30:12 +0100 Subject: Revert "qclass_lib_map.h: Fix include of the QDeclarativeView widget." This reverts commit 7b655eef489038a96c5c5ba2e80d6129eca3cf41. QDeclarativeView is back in QDeclarative. Task-number: QTBUG-25196 Change-Id: Ibe40e790c98b5129bbd844924f71cf3ca0202b5f Reviewed-by: Kai Koehne --- src/tools/uic/qclass_lib_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h index c4d4d840a6..1b13850817 100644 --- a/src/tools/uic/qclass_lib_map.h +++ b/src/tools/uic/qclass_lib_map.h @@ -313,7 +313,7 @@ QT_CLASS_LIB(QDeclarativePropertyValueInterceptor, QtDeclarative, qdeclarativepr QT_CLASS_LIB(QDeclarativePropertyValueSource, QtDeclarative, qdeclarativepropertyvaluesource.h) QT_CLASS_LIB(QDeclarativeScriptString, QtDeclarative, qdeclarativescriptstring.h) QT_CLASS_LIB(QDeclarativePropertyMap, QtDeclarative, qdeclarativepropertymap.h) -QT_CLASS_LIB(QDeclarativeView, QtQuick1, qdeclarativeview.h) +QT_CLASS_LIB(QDeclarativeView, QtDeclarative, qdeclarativeview.h) QT_CLASS_LIB(QMacGLCompatTypes, QtOpenGL, qgl.h) QT_CLASS_LIB(QMacGLCompatTypes, QtOpenGL, qgl.h) QT_CLASS_LIB(QMacCompatGLint, QtOpenGL, qgl.h) -- cgit v1.2.3 From 5d2a0eedb0a7f23ab9ef998c2da35b6be273764e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 26 Mar 2013 16:24:58 +0100 Subject: Changelog 5.0.2: Add Windows-specific changes. Change-Id: I6578b13d27373931107572f82458fc6d006cd86b Reviewed-by: Sergio Ahumada --- dist/changes-5.0.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-5.0.2 b/dist/changes-5.0.2 index 108512a98a..3830fa7ba9 100644 --- a/dist/changes-5.0.2 +++ b/dist/changes-5.0.2 @@ -50,6 +50,8 @@ QtGui QtWidgets --------- +- [QTBUG-28817] Fixed QColorDialog::setOption(), QFontDialog::setOption(). + QtNetwork --------- @@ -88,6 +90,10 @@ Qt for Linux/X11 Qt for Windows -------------- + - [QTBUG-30185] Fixed adding of suffixes in Window native file save dialog. + - [QTBUG-29010, QTBUG-28531] Fixed handling of layered windows required for + translucent or non-opaque windows. + Qt for Mac OS X --------------- -- cgit v1.2.3 From 7322fe27e160d21f4ef568e9b7f0e2eda5a682f5 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Wed, 27 Mar 2013 08:39:52 +0100 Subject: qdoc: Use 'org.qt-project.' prefix in namespace Standarize the qdoc namespace to match all the others configurations. Change-Id: I364d41f20084b77ab3805e72c870147c05da1d42 Reviewed-by: Jerome Pasion --- src/tools/qdoc/doc/config/qdoc.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/qdoc/doc/config/qdoc.qdocconf b/src/tools/qdoc/doc/config/qdoc.qdocconf index 6bbe934749..84e9689f50 100644 --- a/src/tools/qdoc/doc/config/qdoc.qdocconf +++ b/src/tools/qdoc/doc/config/qdoc.qdocconf @@ -20,7 +20,7 @@ tagfile = ../html/qdoc.tags qhp.projects = QDoc qhp.QDoc.file = qdoc.qhp -qhp.QDoc.namespace = qdoc.$QT_VERSION_TAG +qhp.QDoc.namespace = org.qt-project.qdoc.$QT_VERSION_TAG qhp.QDoc.virtualFolder = qdoc qhp.QDoc.indexTitle = QDoc Manual qhp.QDoc.indexRoot = -- cgit v1.2.3 From c9f697a1d0a21afef68b5bba451d0ce2dbdfe03e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Mar 2013 17:28:24 +0100 Subject: write qmake/configure/buildsystem 5.0.2 changelog Change-Id: I4d43cb1e833a4c3bc0d9f22e96f4053632ef744b Reviewed-by: Sergio Ahumada --- dist/changes-5.0.2 | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/dist/changes-5.0.2 b/dist/changes-5.0.2 index 3830fa7ba9..c46e09d143 100644 --- a/dist/changes-5.0.2 +++ b/dist/changes-5.0.2 @@ -22,9 +22,6 @@ information about a particular change. General Improvements -------------------- - - [QTBUG-26697] The -skip option was added to configure, which enables not - building particular modules. Typical use case: -skip webkit. - Third party components ---------------------- @@ -116,12 +113,46 @@ Qt for Windows CE * Tools * **************************************************************************** +Build System & configure +------------------------ + + - [QTBUG-26697] The -skip option was added to configure, which enables not + building particular modules. Typical use case: -skip webkit. + - [QTBUG-28769, ...] Assorted build fixes + - [QTBUG-28902] Fixed contents of installed .prl files + - [QTBUG-29110, QTBUG-29186, ...] Assorted fixes to CMake config files + - [QTBUG-29174] Fixed numerous configure options which start with -l + - [QTBUG-29400] Fixed configure -fully-process not creating .vcproj files + - [QTBUG-29453, ...] Fixed generation of pkg-config .pc files + - [QTBUG-29478] Fixed static builds with ICU + - [QTBUG-29661] Fixed QtWebProcess.exe not finding Qt DLLs. -libexec + now defaults to bin/ on Windows. + - [QTBUG-29838] Fixed module versioning when mixing releases + - [QTBUG-30102] Fixed passing of values with spaces to -device-option + - Production builds do not build examples any more. 'make install' will + copy only the example sources. + - pkg-config: qt_config is now contained only in Qt5Core.pc, and it reflects + QT_CONFIG, not the module build's CONFIG. + qmake ----- + - [QTBUG-28132] Fixed parallelized 'jom install' + - [QTBUG-29143] MSVC: Fixed parsing of /openmp + - [QTBUG-29286] MSVC: Fixed use of VERSION breaking MSVC2010 projects + - [QTBUG-29329] MSVC: Fixed misparsing of /Gs as /GS + - [QTBUG-29329] MSVC: Stopped disabling buffer security check by default + - [QTBUG-29371] Fixed generation of XCode projects for XCode 4.6 + - [QTBUG-29698] MSVC: Fixed incremental linking with non-standard shells + - [QTBUG-29700] Fixed pkg-config file generation when cross-compiling + - Qt modules are now enumerated in QT_MODULES, not QT_CONFIG. For portability, + use qtHaveModule() (since 5.0.1) or !isEmpty(QT..name) instead. - $$(VAR) style environment variable expansions will not split on whitespace any more. Use $$split() if necessary. - + - Fixed qmake -tp vc (and configure without -no-vcproj) + - MSVC: Fixed an empty VERSION causing a garbled version in .rc files + - Windows: Added support for specifying application icon (via RC_ICONS) + - Added spec for BlackBerry Playbook **************************************************************************** * Plugins * -- cgit v1.2.3 From be90d26fc60e02c0f8525740b1256ebed37086a0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 22 Mar 2013 16:42:49 +0100 Subject: Fix gcc OOM error when compiling in release mode O3 leads to gcc bailing out with OOM on e.g. MinGW with gcc 4.7.3 onwards. Task-number: QTBUG-29099 Change-Id: I3ce49794fa4857e756d2994454d4144cfb44ce58 Reviewed-by: Jonathan Liu Reviewed-by: Thiago Macieira --- src/gui/painting/qdrawhelper.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 0f77ae6d86..61a6f2a5f9 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -40,12 +40,17 @@ ****************************************************************************/ #if defined(__OPTIMIZE__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) \ - && (__GNUC__ * 100 + __GNUC_MINOR__ >= 404) + && (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ >= 440) // GCC 4.4 supports #pragma GCC optimize and #pragma GCC target -# pragma GCC optimize "O3" -# if defined(__i386__) && defined(__SSE2__) && !defined(__SSE2_MATH__) -# pragma GCC target "fpmath=sse" -# endif + +# if (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ < 473) +// From GCC 4.7.3 onwards, GCC optimize can result in gcc bailing out with OOM +# pragma GCC optimize "O3" +# endif + +# if defined(__i386__) && defined(__SSE2__) && !defined(__SSE2_MATH__) +# pragma GCC target "fpmath=sse" +# endif #endif #include -- cgit v1.2.3 From 278cee7387eb0cf2d5f554ae9514ac52047feba3 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 27 Mar 2013 11:30:57 +0100 Subject: Changelog: add entry for QTBUG-29759 Conflicts: dist/changes-5.0.2 Change-Id: Ibdb85dd908368f15530db31b47c901d952bb6d93 Reviewed-by: Sergio Ahumada --- dist/changes-5.0.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-5.0.2 b/dist/changes-5.0.2 index c46e09d143..a9d715d1e6 100644 --- a/dist/changes-5.0.2 +++ b/dist/changes-5.0.2 @@ -154,6 +154,12 @@ qmake - Windows: Added support for specifying application icon (via RC_ICONS) - Added spec for BlackBerry Playbook +moc +--- + + - [QTBUG-29759] Fixed infinite recursion in macro substitution which + prevented some headers to compile. + **************************************************************************** * Plugins * **************************************************************************** -- cgit v1.2.3 From e777e3f1ecc72d0958386ac6975c45c8d36081f1 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 27 Mar 2013 16:53:42 +0100 Subject: Boxes: Check for opengl version in .pro file Make sure that people get an understandable error message when trying to compile the boxes demo with e.g. ANGLE. Task-number: QTBUG-30406 Change-Id: I0ba0e26e424d768f95d7977862d9f2c4e85b41fb Reviewed-by: Jonathan Liu Reviewed-by: Gunnar Sletta Reviewed-by: Thomas Hartmann --- examples/widgets/graphicsview/boxes/boxes.pro | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/widgets/graphicsview/boxes/boxes.pro b/examples/widgets/graphicsview/boxes/boxes.pro index a4b253c580..93621878f1 100644 --- a/examples/widgets/graphicsview/boxes/boxes.pro +++ b/examples/widgets/graphicsview/boxes/boxes.pro @@ -1,5 +1,11 @@ QT += opengl widgets +contains(QT_CONFIG, opengles.) { + contains(QT_CONFIG, angle): \ + warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c") + error("This example requires Qt to be configured with -opengl desktop") +} + HEADERS += 3rdparty/fbm.h \ glbuffers.h \ glextensions.h \ -- cgit v1.2.3 From 9bf93f3e7307447ed9eb46f275bd9f92c8e0baaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 8 Apr 2013 12:26:05 +0200 Subject: Clear the WA_QuitOnClose flag from EvalMessageBox. The evaluation message box caused the QtWebProcess to quit due to the fact that the process has no other windows and EvalMessageBox was both set to be closed on quit and ended up being the last window in the process. Change-Id: Iad6461d014258fdc5fade7dafe48da33903377bb Reviewed-by: Simon Hausmann Reviewed-by: Andy Shaw Reviewed-by: Jocelyn Turcotte --- src/corelib/kernel/qtcore_eval.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp index ab575371c8..e9ff786074 100644 --- a/src/corelib/kernel/qtcore_eval.cpp +++ b/src/corelib/kernel/qtcore_eval.cpp @@ -496,6 +496,7 @@ public: setParent(parentWidget(), Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); QTimer::singleShot(7000, this, SLOT(close())); setAttribute(Qt::WA_DeleteOnClose); + setAttribute(Qt::WA_QuitOnClose, false); } setFixedSize(sizeHint()); -- cgit v1.2.3 From faa390dc4f37127f343a377c03ab3673b77e9e49 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 20 Feb 2013 17:24:22 +0100 Subject: Fix compilation with QT_NO_ACCESSIBILITY. Task-number: QTBUG-27860 Change-Id: I561b0b0b1a098556f9de909241b448307a271985 Reviewed-by: Konstantin Ritt (cherry picked from commit 8b29c7539d87a387854cf06782a7b078dce63612) Reviewed-by: Kai Koehne Reviewed-by: Friedemann Kleint --- src/widgets/styles/qwindowsvistastyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index 48d2027834..a621cab04d 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -520,7 +520,11 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt } break; case PE_Frame: { +#ifndef QT_NO_ACCESSIBILITY if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText)) { +#else + if (false) { +#endif painter->save(); int stateId = ETS_NORMAL; if (!(state & State_Enabled)) -- cgit v1.2.3 From 967c18d29694fdeab858691a80cb8400fd02ec33 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Mon, 8 Apr 2013 10:57:22 +0200 Subject: Update changes log for 5.0.2 Change-Id: I01321d4d2074a04e48e90580a4ec38f0af2f23c6 Reviewed-by: Akseli Salovaara Reviewed-by: Iikka Eklund --- dist/changes-5.0.2 | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/dist/changes-5.0.2 b/dist/changes-5.0.2 index a9d715d1e6..209f963c65 100644 --- a/dist/changes-5.0.2 +++ b/dist/changes-5.0.2 @@ -22,18 +22,12 @@ information about a particular change. General Improvements -------------------- -Third party components ----------------------- - -Legal ------ - + - Lots of fixes to enable static builds on Windows, Linux and Mac. **************************************************************************** * Library * **************************************************************************** - QtCore ----- @@ -44,29 +38,35 @@ QtCore QtGui ----- + - [QTBUG-14766] Fixed potential access violation in QPixmap::copy() for <32 bit pixmaps. + - [QTBUG-24762] Fixed dashes being rendered differently depending on system clip. + - [QTBUG-25036] Fixed artifacts when drawing same line with different clips. + - [QTBUG-29643] Fixed crashes when using QImage in combination with QCoreApplication. + QtWidgets --------- -- [QTBUG-28817] Fixed QColorDialog::setOption(), QFontDialog::setOption(). + - [QTBUG-28817] Fixed QColorDialog::setOption(), QFontDialog::setOption(). + - [QTBUG-29680] Fix mouse double click events not bubbling up to parent widgets. QtNetwork --------- -QtDBus ------- + - [QTBUG-29103] Toggle on demand loading of root certs properly. QtConcurrent ------------ -QtOpenGL --------- - -QtTest ------- + - [QTBUG-28984] Fix compilation of Qt Concurrent with gcc 4.3. QtSql ----- + - Fix QSqlTableModel:revert() for OnFieldChange. + - [QTBUG-29102] Support refreshing inserted rows with auto columns. + - [QTBUG-29108] Fix QSqlTableModel::headerData() for empty query with inserted row. + - [QTBUG-29217] Fix QSqlTableModel::setData() for non-change detection. + **************************************************************************** * Database Drivers * **************************************************************************** @@ -84,16 +84,23 @@ postgres Qt for Linux/X11 ---------------- + - Fix focus handling of native child widgets in xcb. + - Fixed crash when VNCing and trying to use non-present XFixes extension. + Qt for Windows -------------- - - [QTBUG-30185] Fixed adding of suffixes in Window native file save dialog. + - [QTBUG-28439] Implement QPlatformWindow::isExposed() on Windows. - [QTBUG-29010, QTBUG-28531] Fixed handling of layered windows required for translucent or non-opaque windows. + - [QTBUG-30185] Fixed adding of suffixes in Window native file save dialog. Qt for Mac OS X --------------- + - [QTBUG-29389] Fix transient scroll bar appearance before the proper one. + - [QTBUG-25297, QTBUG-29434] Add QMdiSubWindow size grip back. + Qt for BlackBerry ----------------- @@ -103,11 +110,14 @@ Qt for Embedded Linux Qt for Windows CE ----------------- + - Removed User32.dll usage. + - Fix compilation with QT_NO_CURSOR. **************************************************************************** * Compiler Specific Changes * **************************************************************************** + - [QTBUG-29099] Fix gcc OOM error when compiling in release mode. **************************************************************************** * Tools * -- cgit v1.2.3