diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-12-15 14:34:35 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-12-15 14:34:35 (GMT) |
commit | c50ef702872ee7adf8860bf164be6d092d8bde0f (patch) | |
tree | 0359d427ef4d67323bae485f5d3118e5b4564469 /tools | |
parent | 4d86bacafad3b12ca01c20988bf578cde7bf3dae (diff) | |
parent | 567bcd38dd7a749ac0bc3cdd2432798ab1af74fe (diff) | |
download | Qt-c50ef702872ee7adf8860bf164be6d092d8bde0f.zip Qt-c50ef702872ee7adf8860bf164be6d092d8bde0f.tar.gz Qt-c50ef702872ee7adf8860bf164be6d092d8bde0f.tar.bz2 |
Merge remote branch 'qt/master' into symbian-socket-engine
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configure.pro | 12 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 37 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 2 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/qtresourcemodel.cpp | 50 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/widgetdatabase.cpp | 10 | ||||
-rw-r--r-- | tools/linguist/linguist/messagemodel.cpp | 7 | ||||
-rw-r--r-- | tools/macdeployqt/shared/shared.cpp | 8 | ||||
-rw-r--r-- | tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h | 3 | ||||
-rw-r--r-- | tools/qml/browser/Browser.qml | 6 | ||||
-rw-r--r-- | tools/qml/deviceorientation.h | 4 | ||||
-rw-r--r-- | tools/qml/main.cpp | 56 | ||||
-rw-r--r-- | tools/qml/qdeclarativetester.cpp | 25 | ||||
-rw-r--r-- | tools/qml/qdeclarativetester.h | 4 | ||||
-rw-r--r-- | tools/qml/qml.pro | 4 | ||||
-rw-r--r-- | tools/qml/qmlruntime.cpp | 6 | ||||
-rw-r--r-- | tools/qml/startup/startup.qml | 6 | ||||
-rw-r--r-- | tools/qml/texteditautoresizer_maemo5.h | 12 | ||||
-rw-r--r-- | tools/qtestlib/wince/cetest/bootstrapped.pri | 5 | ||||
-rw-r--r-- | tools/shared/windows/registry.cpp | 3 |
19 files changed, 156 insertions, 104 deletions
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index 0a49fbe..608d876 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -48,6 +48,10 @@ HEADERS = configureapp.h environment.h tools.h\ $$QT_SOURCE_TREE/src/corelib/io/qdiriterator.h \ $$QT_SOURCE_TREE/src/corelib/io/qfile.h \ $$QT_SOURCE_TREE/src/corelib/io/qfileinfo.h \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystementry_p.h \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine_p.h \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemmetadata_p.h \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemiterator_p.h \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine.h \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator_p.h \ $$QT_SOURCE_TREE/src/corelib/io/qiodevice.h \ @@ -86,9 +90,13 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfile.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfileinfo.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qabstractfileengine.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystementry.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine_win.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemiterator_win.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator.cpp \ - $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator_win.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qiodevice.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qtextstream.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qtemporaryfile.cpp \ @@ -115,8 +123,6 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.cpp \ $$QT_SOURCE_TREE/tools/shared/windows/registry.cpp -win32:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp - DEFINES += COMMERCIAL_VERSION INCLUDEPATH += $$QT_SOURCE_TREE/src/corelib/arch/generic \ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 62e7859..bb1007e 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -739,6 +739,23 @@ void Configure::parseCmdLine() } else if (configCmdLine.at(i) == "-opengl-es-2") { dictionary[ "OPENGL" ] = "yes"; dictionary[ "OPENGL_ES_2" ] = "yes"; + } else if (configCmdLine.at(i) == "-opengl") { + dictionary[ "OPENGL" ] = "yes"; + i++; + if (i == argCount) + break; + + if (configCmdLine.at(i) == "es1") { + dictionary[ "OPENGL_ES_CM" ] = "yes"; + } else if ( configCmdLine.at(i) == "es2" ) { + dictionary[ "OPENGL_ES_2" ] = "yes"; + } else if ( configCmdLine.at(i) == "desktop" ) { + dictionary[ "OPENGL_ES_2" ] = "yes"; + } else { + cout << "Argument passed to -opengl option is not valid." << endl; + dictionary[ "DONE" ] = "error"; + break; + } } // OpenVG Support ------------------------------------------- @@ -1010,6 +1027,8 @@ void Configure::parseCmdLine() if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { dictionary[ "QT_INSTALL_PLUGINS" ] = QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]); + dictionary[ "QT_INSTALL_IMPORTS" ] = + QString("\\resource\\qt%1\\imports").arg(dictionary[ "QT_LIBINFIX" ]); } } else if (configCmdLine.at(i) == "-D") { ++i; @@ -1731,6 +1750,11 @@ bool Configure::displayHelp() desc("QT3SUPPORT", "no","-no-qt3support", "Disables the Qt 3 support functionality.\n"); desc("OPENGL", "no","-no-opengl", "Disables OpenGL functionality\n"); + desc("OPENGL", "no","-opengl <api>", "Enable OpenGL support with specified API version.\n" + "Available values for <api>:"); + desc("", "", "", " desktop - Enable support for Desktop OpenGL", ' '); + desc("OPENGL_ES_CM", "no", "", " es1 - Enable support for OpenGL ES Common Profile", ' '); + desc("OPENGL_ES_2", "no", "", " es2 - Enable support for OpenGL ES 2.0", ' '); desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality\n"); desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality"); @@ -1890,8 +1914,7 @@ bool Configure::displayHelp() desc("CETEST", "no", "-no-cetest", "Do not compile Windows CE remote test application"); desc("CETEST", "yes", "-cetest", "Compile Windows CE remote test application"); desc( "-signature <file>", "Use file for signing the target project"); - desc("OPENGL_ES_CM", "no", "-opengl-es-cm", "Enable support for OpenGL ES Common"); - desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0"); + desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE"); // Qt\Symbian only options go below here ----------------------------------------------------------------------------- @@ -2481,15 +2504,11 @@ void Configure::generateOutputVars() qtConfig += "no-gif"; else if (dictionary[ "GIF" ] == "yes") qtConfig += "gif"; - else if (dictionary[ "GIF" ] == "plugin") - qmakeFormatPlugins += "gif"; if (dictionary[ "TIFF" ] == "no") qtConfig += "no-tiff"; else if (dictionary[ "TIFF" ] == "yes") qtConfig += "tiff"; - else if (dictionary[ "TIFF" ] == "plugin") - qmakeFormatPlugins += "tiff"; if (dictionary[ "LIBTIFF" ] == "system") qtConfig += "system-tiff"; @@ -2497,8 +2516,6 @@ void Configure::generateOutputVars() qtConfig += "no-jpeg"; else if (dictionary[ "JPEG" ] == "yes") qtConfig += "jpeg"; - else if (dictionary[ "JPEG" ] == "plugin") - qmakeFormatPlugins += "jpeg"; if (dictionary[ "LIBJPEG" ] == "system") qtConfig += "system-jpeg"; @@ -2817,8 +2834,6 @@ void Configure::generateOutputVars() qmakeVars += QString("styles += ") + qmakeStyles.join(" "); if (!qmakeStylePlugins.isEmpty()) qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(" "); - if (!qmakeFormatPlugins.isEmpty()) - qmakeVars += QString("imageformat-plugins += ") + qmakeFormatPlugins.join(" "); if (dictionary["QMAKESPEC"].endsWith("-g++")) { QString includepath = qgetenv("INCLUDE"); @@ -3424,7 +3439,7 @@ void Configure::displayConfig() QString webkit = dictionary[ "WEBKIT" ]; if (webkit == "debug") webkit = "yes (debug)"; - cout << "WebKit support.............." << webkit; + cout << "WebKit support.............." << webkit << endl; } cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl; diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index b3c07f7..32d1860 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -122,8 +122,6 @@ private: QStringList qmakeStyles; QStringList qmakeStylePlugins; - QStringList qmakeFormatPlugins; - QStringList qmakeVars; QStringList qmakeDefines; // makeList[0] for qt and qtmain diff --git a/tools/designer/src/lib/shared/qtresourcemodel.cpp b/tools/designer/src/lib/shared/qtresourcemodel.cpp index e3fc805..d04a5fc 100644 --- a/tools/designer/src/lib/shared/qtresourcemodel.cpp +++ b/tools/designer/src/lib/shared/qtresourcemodel.cpp @@ -184,15 +184,15 @@ const QByteArray *QtResourceModelPrivate::createResource(const QString &path, QS break; // return code cannot be fully trusted, might still be empty const ResourceDataFileMap resMap = library.resourceDataFileMap(); - if (resMap.empty()) - break; - if (!library.output(buffer, errorDevice)) break; *errorCount = library.failedResources().size(); *contents = resMap.keys(); + if (resMap.empty()) + break; + buffer.close(); rc = new QByteArray(buffer.data()); } while (false); @@ -225,15 +225,18 @@ void QtResourceModelPrivate::registerResourceSet(QtResourceSet *resourceSet) qDebug() << "registerResourceSet " << path; const PathDataMap::const_iterator itRcc = m_pathToData.constFind(path); if (itRcc != m_pathToData.constEnd()) { // otherwise data was not created yet - if (!QResource::registerResource(reinterpret_cast<const uchar *>(itRcc.value()->constData()))) { - qDebug() << "** WARNING: Failed to register " << path << " (QResource failure)."; - } else { - QStringList contents = m_pathToContents.value(path); - QStringListIterator itContents(contents); - while (itContents.hasNext()) { - const QString filePath = itContents.next(); - if (!m_fileToQrc.contains(filePath)) // the first loaded resource has higher priority in qt resource system - m_fileToQrc.insert(filePath, path); + const QByteArray *data = itRcc.value(); + if (data) { + if (!QResource::registerResource(reinterpret_cast<const uchar *>(data->constData()))) { + qWarning() << "** WARNING: Failed to register " << path << " (QResource failure)."; + } else { + QStringList contents = m_pathToContents.value(path); + QStringListIterator itContents(contents); + while (itContents.hasNext()) { + const QString filePath = itContents.next(); + if (!m_fileToQrc.contains(filePath)) // the first loaded resource has higher priority in qt resource system + m_fileToQrc.insert(filePath, path); + } } } } @@ -254,8 +257,11 @@ void QtResourceModelPrivate::unregisterResourceSet(QtResourceSet *resourceSet) qDebug() << "unregisterResourceSet " << path; const PathDataMap::const_iterator itRcc = m_pathToData.constFind(path); if (itRcc != m_pathToData.constEnd()) { // otherwise data was not created yet - if (!QResource::unregisterResource(reinterpret_cast<const uchar *>(itRcc.value()->constData()))) - qDebug() << "** WARNING: Failed to unregister " << path << " (QResource failure)."; + const QByteArray *data = itRcc.value(); + if (data) { + if (!QResource::unregisterResource(reinterpret_cast<const uchar *>(itRcc.value()->constData()))) + qWarning() << "** WARNING: Failed to unregister " << path << " (QResource failure)."; + } } } m_fileToQrc.clear(); @@ -292,15 +298,13 @@ void QtResourceModelPrivate::activate(QtResourceSet *resourceSet, const QStringL QStringList contents; int qrcErrorCount; generatedCount++; - if (const QByteArray *data = createResource(path, &contents, &qrcErrorCount, errorStream)) { - newPathToData.insert(path, data); - if (qrcErrorCount) // Count single failed files as sort of 1/2 error - errorCount++; - addWatcher(path); - } else { - newPathToData.remove(path); + const QByteArray *data = createResource(path, &contents, &qrcErrorCount, errorStream); + + newPathToData.insert(path, data); + if (qrcErrorCount) // Count single failed files as sort of 1/2 error errorCount++; - } + addWatcher(path); + m_pathToModified.insert(path, false); m_pathToContents.insert(path, contents); newResourceSetChanged = true; @@ -326,7 +330,7 @@ void QtResourceModelPrivate::activate(QtResourceSet *resourceSet, const QStringL QListIterator<const QByteArray *> itOld(oldData); if (itOld.hasNext()) { const QByteArray *array = itOld.next(); - if (!newData.contains(array)) + if (array && !newData.contains(array)) toDelete.append(array); } diff --git a/tools/designer/src/lib/shared/widgetdatabase.cpp b/tools/designer/src/lib/shared/widgetdatabase.cpp index 0c3e949..7ab450d 100644 --- a/tools/designer/src/lib/shared/widgetdatabase.cpp +++ b/tools/designer/src/lib/shared/widgetdatabase.cpp @@ -54,7 +54,8 @@ #include <QtDesigner/QDesignerFormEditorInterface> #include <QtXml/QXmlStreamWriter> -#include <QtCore/QtAlgorithms> + +#include <QtCore/QScopedPointer> #include <QtCore/qdebug.h> #include <QtCore/QMetaProperty> #include <QtCore/QTextStream> @@ -565,10 +566,10 @@ static QString xmlFromWidgetBox(const QDesignerFormEditorInterface *core, const const bool found = QDesignerWidgetBox::findWidget(core->widgetBox(), className, QString(), &widget); if (!found) return QString(); - DomUI *domUI = QDesignerWidgetBox::xmlToUi(className, widget.domXml(), false); - domUI->setAttributeVersion(QLatin1String("4.0")); - if (!domUI) + QScopedPointer<DomUI> domUI(QDesignerWidgetBox::xmlToUi(className, widget.domXml(), false)); + if (domUI.isNull()) return QString(); + domUI->setAttributeVersion(QLatin1String("4.0")); DomWidget *domWidget = domUI->elementWidget(); if (!domWidget) return QString(); @@ -615,7 +616,6 @@ static QString xmlFromWidgetBox(const QDesignerFormEditorInterface *core, const domUI->write(writer); writer.writeEndDocument(); } - delete domUI; return rc; } diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp index 36202ab..17608d9 100644 --- a/tools/linguist/linguist/messagemodel.cpp +++ b/tools/linguist/linguist/messagemodel.cpp @@ -209,6 +209,13 @@ bool DataModel::load(const QString &fileName, bool *langGuessed, QWidget *parent return false; } + if (!tor.messageCount()) { + QMessageBox::warning(parent, QObject::tr("Qt Linguist"), + tr("The translation file '%1' will not be loaded because it is empty.") + .arg(Qt::escape(fileName))); + return false; + } + Translator::Duplicates dupes = tor.resolveDuplicates(); if (!dupes.byId.isEmpty() || !dupes.byContents.isEmpty()) { QString err = tr("<qt>Duplicate messages found in '%1':").arg(Qt::escape(fileName)); diff --git a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp index c7d23c0..d974f5d 100644 --- a/tools/macdeployqt/shared/shared.cpp +++ b/tools/macdeployqt/shared/shared.cpp @@ -574,9 +574,13 @@ void createDiskImage(const QString &appBundlePath) } // More dmg options can be found in the hdiutil man page. - QString options = QString("create %1.dmg -srcfolder %1.app -format UDZO -volname %1").arg(appBaseName); + QStringList options = QStringList() + << "create" << dmgName + << "-srcfolder" << appBundlePath + << "-format" << "UDZO" + << "-volname" << appBaseName; QProcess hdutil; - hdutil.start("hdiutil", options.split(' ')); + hdutil.start("hdiutil", options); hdutil.waitForFinished(-1); } diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h index d47c829..6df3c22 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h @@ -181,6 +181,9 @@ public: This function needs to be called *before* any widget/content is created. When called with true, the base window surface will be translucent and initialized with QGLFormat.alpha == true. + + This function is *deprecated*. Set Qt::WA_TranslucentBackground attribute + on the top-level widget *before* you show it instead. */ static void setTranslucent(bool translucent); }; diff --git a/tools/qml/browser/Browser.qml b/tools/qml/browser/Browser.qml index ebed72f..968d077 100644 --- a/tools/qml/browser/Browser.qml +++ b/tools/qml/browser/Browser.qml @@ -173,14 +173,14 @@ Rectangle { width: parent.width model: folders1 delegate: folderDelegate - highlight: Rectangle { + highlight: Rectangle { color: palette.highlight visible: root.showFocusHighlight && view1.count != 0 gradient: Gradient { GradientStop { id: t1; position: 0.0; color: palette.highlight } GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } } - width: view1.currentItem.width + width: view1.currentItem == null ? 0 : view1.currentItem.width } highlightMoveSpeed: 1000 pressDelay: 100 @@ -230,7 +230,7 @@ Rectangle { GradientStop { id: t1; position: 0.0; color: palette.highlight } GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } } - width: view1.currentItem.width + width: view1.currentItem == null ? 0 : view1.currentItem.width } highlightMoveSpeed: 1000 pressDelay: 100 diff --git a/tools/qml/deviceorientation.h b/tools/qml/deviceorientation.h index 487ebd4..88ceb1b 100644 --- a/tools/qml/deviceorientation.h +++ b/tools/qml/deviceorientation.h @@ -52,8 +52,8 @@ class DeviceOrientation : public QObject Q_OBJECT Q_ENUMS(Orientation) public: - enum Orientation { - UnknownOrientation, + enum Orientation { + UnknownOrientation, Portrait, Landscape, PortraitInverted, diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 209c72f..b9513b9 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -59,6 +59,19 @@ QtMsgHandler systemMsgOutput = 0; static QDeclarativeViewer *openFile(const QString &fileName); static void showViewer(QDeclarativeViewer *viewer); +QString warnings; +void exitApp(int i) +{ +#ifdef Q_OS_WIN + // Debugging output is not visible by default on Windows - + // therefore show modal dialog with errors instead. + if (!warnings.isEmpty()) { + QMessageBox::warning(0, QApplication::tr("Qt QML Viewer"), warnings); + } +#endif + exit(i); +} + #if defined (Q_OS_SYMBIAN) #include <unistd.h> #include <sys/types.h> @@ -85,31 +98,22 @@ void myMessageOutput(QtMsgType type, const char *msg) QWeakPointer<LoggerWidget> logger; -QString warnings; -void showWarnings() -{ - if (!warnings.isEmpty()) { - int argc = 0; char **argv = 0; - QApplication application(argc, argv); // QApplication() in main has been destroyed already. - Q_UNUSED(application) - QMessageBox::warning(0, QApplication::tr("Qt QML Viewer"), warnings); - } -} - static QAtomicInt recursiveLock(0); void myMessageOutput(QtMsgType type, const char *msg) { QString strMsg = QString::fromLatin1(msg); - if (!logger.isNull() && !QCoreApplication::closingDown()) { - if (recursiveLock.testAndSetOrdered(0, 1)) { - QMetaObject::invokeMethod(logger.data(), "append", Q_ARG(QString, strMsg)); - recursiveLock = 0; + if (!QCoreApplication::closingDown()) { + if (!logger.isNull()) { + if (recursiveLock.testAndSetOrdered(0, 1)) { + QMetaObject::invokeMethod(logger.data(), "append", Q_ARG(QString, strMsg)); + recursiveLock = 0; + } + } else { + warnings += strMsg; + warnings += QLatin1Char('\n'); } - } else { - warnings += strMsg; - warnings += QLatin1Char('\n'); } if (systemMsgOutput) { // Windows systemMsgOutput(type, msg); @@ -165,7 +169,8 @@ void usage() qWarning(" "); qWarning(" Press F1 for interactive help"); - exit(1); + + exitApp(1); } void scriptOptsUsage() @@ -184,7 +189,8 @@ void scriptOptsUsage() qWarning(" saveonexit ............................... save recording on viewer exit"); qWarning(" "); qWarning(" One of record, play or both must be specified."); - exit(1); + + exitApp(1); } enum WarningsConfig { ShowWarnings, HideWarnings, DefaultWarnings }; @@ -370,7 +376,7 @@ static void parseCommandLineOptions(const QStringList &arguments) qApp->setStartDragDistance(arguments.at(++i).toInt()); } else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) { qWarning("Qt QML Viewer version %s", QT_VERSION_STR); - exit(0); + exitApp(0); } else if (arg == "-translation") { if (lastArg) usage(); opts.translationFile = arguments.at(++i); @@ -400,7 +406,7 @@ static void parseCommandLineOptions(const QStringList &arguments) QDeclarativeEngine tmpEngine; QString paths = tmpEngine.importPathList().join(QLatin1String(":")); qWarning("Current search path: %s", paths.toLocal8Bit().constData()); - exit(0); + exitApp(0); } opts.imports << arguments.at(++i); } else if (arg == "-P") { @@ -529,12 +535,6 @@ int main(int argc, char ** argv) systemMsgOutput = qInstallMsgHandler(myMessageOutput); #endif -#if defined (Q_OS_WIN) - // Debugging output is not visible by default on Windows - - // therefore show modal dialog with errors instead. - atexit(showWarnings); -#endif - #if defined (Q_WS_X11) || defined (Q_WS_MAC) //### default to using raster graphics backend for now bool gsSpecified = false; diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp index a516fd7..1bcdb04 100644 --- a/tools/qml/qdeclarativetester.cpp +++ b/tools/qml/qdeclarativetester.cpp @@ -54,9 +54,9 @@ QT_BEGIN_NAMESPACE extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled; -QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions opts, +QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions opts, QDeclarativeView *parent) -: QAbstractAnimation(parent), m_script(script), m_view(parent), filterEvents(true), options(opts), +: QAbstractAnimation(parent), m_script(script), m_view(parent), filterEvents(true), options(opts), testscript(0), hasCompleted(false), hasFailed(false) { parent->viewport()->installEventFilter(this); @@ -75,8 +75,8 @@ QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer QDeclarativeTester::~QDeclarativeTester() { - if (!hasFailed && - options & QDeclarativeViewer::Record && + if (!hasFailed && + options & QDeclarativeViewer::Record && options & QDeclarativeViewer::SaveOnExit) save(); } @@ -228,7 +228,7 @@ void QDeclarativeTester::save() } ts << " }\n"; - while (!mouseevents.isEmpty() && + while (!mouseevents.isEmpty() && mouseevents.first().msec == fe.msec) { MouseEvent me = mouseevents.takeFirst(); @@ -274,7 +274,16 @@ void QDeclarativeTester::updateCurrentTime(int msec) if (options & QDeclarativeViewer::TestImages) { img.fill(qRgb(255,255,255)); + +#ifdef Q_WS_MAC + bool oldSmooth = qt_applefontsmoothing_enabled; + qt_applefontsmoothing_enabled = false; +#endif QPainter p(&img); +#ifdef Q_WS_MAC + qt_applefontsmoothing_enabled = oldSmooth; +#endif + m_view->render(&p); } @@ -336,7 +345,7 @@ void QDeclarativeTester::updateCurrentTime(int msec) if (QDeclarativeVisualTestFrame *frame = qobject_cast<QDeclarativeVisualTestFrame *>(event)) { if (frame->msec() < msec) { if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) { - qWarning() << "QDeclarativeTester(" << m_script << "): Extra frame. Seen:" + qWarning() << "QDeclarativeTester(" << m_script << "): Extra frame. Seen:" << msec << "Expected:" << frame->msec(); imagefailure(); } @@ -362,7 +371,7 @@ void QDeclarativeTester::updateCurrentTime(int msec) } if (goodImage != img) { QString reject(frame->image().toLocalFile() + ".reject.png"); - qWarning() << "QDeclarativeTester(" << m_script << "): Image mismatch. Reject saved to:" + qWarning() << "QDeclarativeTester(" << m_script << "): Image mismatch. Reject saved to:" << reject; img.save(reject); bool doDiff = (goodImage.size() == img.size()); @@ -415,7 +424,7 @@ void QDeclarativeTester::updateCurrentTime(int msec) ke.destination = ViewPort; } m_savedKeyEvents.append(ke); - } + } testscriptidx++; } diff --git a/tools/qml/qdeclarativetester.h b/tools/qml/qdeclarativetester.h index 0cf508a..6fdf495 100644 --- a/tools/qml/qdeclarativetester.h +++ b/tools/qml/qdeclarativetester.h @@ -122,7 +122,7 @@ public: int type() const { return m_type; } void setType(int t) { m_type = t; } - + int button() const { return m_button; } void setButton(int b) { m_button = b; } @@ -237,7 +237,7 @@ private: struct MouseEvent { MouseEvent(QMouseEvent *e) - : type(e->type()), button(e->button()), buttons(e->buttons()), + : type(e->type()), button(e->button()), buttons(e->buttons()), pos(e->pos()), modifiers(e->modifiers()), destination(View) {} QEvent::Type type; diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 3927dd6..bdac6e3 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -4,7 +4,7 @@ DESTDIR = ../../bin include(qml.pri) -SOURCES += main.cpp +SOURCES += main.cpp INCLUDEPATH += ../../include/QtDeclarative INCLUDEPATH += ../../src/declarative/util @@ -26,7 +26,7 @@ wince* { QT += xmlpatterns } contains(QT_CONFIG, webkit) { - QT += webkit + QT += webkit } } maemo5 { diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 7ea77d1..142e4c5 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -820,7 +820,7 @@ void QDeclarativeViewer::createMenu() fileMenu->addAction(reloadAction); fileMenu->addSeparator(); fileMenu->addAction(closeAction); -#if !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_SYMBIAN) fileMenu->addAction(quitAction); QMenu *recordMenu = menu->addMenu(tr("&Recording")); @@ -836,7 +836,7 @@ void QDeclarativeViewer::createMenu() settingsMenu->addAction(proxyAction); #if defined(Q_OS_SYMBIAN) settingsMenu->addAction(fullscreenAction); -#else +#else settingsMenu->addAction(recordOptions); settingsMenu->addMenu(loggerWindow->preferencesMenu()); #endif // !Q_OS_SYMBIAN @@ -1520,7 +1520,7 @@ void QDeclarativeViewer::updateSizeHints(bool initial) //qWarning() << "USH: R2V: setting free size "; layout()->setSizeConstraint(QLayout::SetNoConstraint); layout()->activate(); - setMinimumSize(QSize(1,1)); + setMinimumSize(minimumSizeHint()); setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); canvas->setMinimumSize(QSize(0,0)); canvas->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); diff --git a/tools/qml/startup/startup.qml b/tools/qml/startup/startup.qml index 9ca50a3..35c44c2 100644 --- a/tools/qml/startup/startup.qml +++ b/tools/qml/startup/startup.qml @@ -92,8 +92,8 @@ Rectangle { to: 360 loops: NumberAnimation.Infinite running: true - duration: 2000 - } + duration: 2000 + } } } } @@ -168,6 +168,6 @@ Rectangle { } } } - ] + ] } // treatsApp diff --git a/tools/qml/texteditautoresizer_maemo5.h b/tools/qml/texteditautoresizer_maemo5.h index bb5567a..fd35ca5 100644 --- a/tools/qml/texteditautoresizer_maemo5.h +++ b/tools/qml/texteditautoresizer_maemo5.h @@ -41,7 +41,7 @@ #include <QtGui/qplaintextedit.h> #include <QtGui/qtextedit.h> -#include <QtGui/qabstractkineticscroller.h> +#include <QtGui/qscroller.h> #include <QtGui/qscrollarea.h> #include <QtDebug> @@ -102,11 +102,11 @@ void TextEditAutoResizer::textEditChanged() QPoint scrollto = area->widget()->mapFrom(edit, cursor.center()); QPoint margin(10 + cursor.width(), 2 * cursor.height()); - if (QAbstractKineticScroller *scroller = area->property("kineticScroller").value<QAbstractKineticScroller *>()) { - scroller->ensureVisible(scrollto, margin.x(), margin.y()); - } else { - area->ensureVisible(scrollto.x(), scrollto.y(), margin.x(), margin.y()); - } +#ifdef Q_WS_MAEMO_5 + QScroller::scroller(area)->ensureVisible(scrollto, margin.x(), margin.y()); +#else + area->ensureVisible(scrollto.x(), scrollto.y(), margin.x(), margin.y()); +#endif } } diff --git a/tools/qtestlib/wince/cetest/bootstrapped.pri b/tools/qtestlib/wince/cetest/bootstrapped.pri index b9c4b2b..56c8ab7 100644 --- a/tools/qtestlib/wince/cetest/bootstrapped.pri +++ b/tools/qtestlib/wince/cetest/bootstrapped.pri @@ -4,11 +4,14 @@ SOURCES += \ $$QT_SOURCE_TREE/src/corelib/tools/qstringlist.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfile.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qdir.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystementry.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine_win.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfilesystemiterator_win.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qabstractfileengine.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator.cpp \ - $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator_win.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfileinfo.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qtemporaryfile.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qdiriterator.cpp \ diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp index 48e9ae6..f520910 100644 --- a/tools/shared/windows/registry.cpp +++ b/tools/shared/windows/registry.cpp @@ -157,6 +157,9 @@ QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey) } RegCloseKey(handle); +#else + Q_UNUSED(parentHandle); + Q_UNUSED(rSubkey) #endif return result; |