diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-20 09:43:37 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-20 09:43:37 (GMT) |
commit | 30ffe43f826baae366b6e745d077ade316512d3b (patch) | |
tree | 3e8c020ec99a5d69b9787a8d164a2f326936eebc /tools | |
parent | e7989aeb09f7c597edf3498183bd97bd0122382b (diff) | |
parent | 99f6250a4ac031b70757442715b226bc339ab699 (diff) | |
download | Qt-30ffe43f826baae366b6e745d077ade316512d3b.zip Qt-30ffe43f826baae366b6e745d077ade316512d3b.tar.gz Qt-30ffe43f826baae366b6e745d077ade316512d3b.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Diffstat (limited to 'tools')
45 files changed, 112 insertions, 1042 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 8ce2cce..2ec5b98 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -195,10 +195,37 @@ Configure::Configure( int& argc, char** argv ) } } + // make patch_capabilities and createpackage scripts for Symbian that can be used from the shadow build + QFile patch_capabilities(buildPath + "/bin/patch_capabilities"); + if(patch_capabilities.open(QFile::WriteOnly)) { + QTextStream stream(&patch_capabilities); + stream << "#!/usr/bin/perl -w" << endl + << "require \"" << sourcePath + "/bin/patch_capabilities\";" << endl; + } + QFile patch_capabilities_bat(buildPath + "/bin/patch_capabilities.bat"); + if(patch_capabilities_bat.open(QFile::WriteOnly)) { + QTextStream stream(&patch_capabilities_bat); + stream << "@echo off" << endl + << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/patch_capabilities.bat %*") << endl; + patch_capabilities_bat.close(); + } + QFile createpackage(buildPath + "/bin/createpackage"); + if(createpackage.open(QFile::WriteOnly)) { + QTextStream stream(&createpackage); + stream << "#!/usr/bin/perl -w" << endl + << "require \"" << sourcePath + "/bin/createpackage\";" << endl; + } + QFile createpackage_bat(buildPath + "/bin/createpackage.bat"); + if(createpackage_bat.open(QFile::WriteOnly)) { + QTextStream stream(&createpackage_bat); + stream << "@echo off" << endl + << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/createpackage.bat %*") << endl; + createpackage_bat.close(); + } + // For Windows CE and shadow builds we need to copy these to the // build directory. QFile::copy(sourcePath + "/bin/setcepaths.bat" , buildPath + "/bin/setcepaths.bat"); - //copy the mkspecs buildDir.mkpath("mkspecs"); if(!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){ @@ -247,9 +274,7 @@ Configure::Configure( int& argc, char** argv ) dictionary[ "PHONON" ] = "auto"; dictionary[ "PHONON_BACKEND" ] = "yes"; dictionary[ "MULTIMEDIA" ] = "yes"; - dictionary[ "MEDIASERVICES" ] = "yes"; dictionary[ "AUDIO_BACKEND" ] = "auto"; - dictionary[ "MEDIA_BACKEND"] = "auto"; dictionary[ "WMSDK" ] = "auto"; dictionary[ "DIRECTSHOW" ] = "no"; dictionary[ "WEBKIT" ] = "auto"; @@ -906,18 +931,10 @@ void Configure::parseCmdLine() dictionary[ "MULTIMEDIA" ] = "no"; } else if( configCmdLine.at(i) == "-multimedia" ) { dictionary[ "MULTIMEDIA" ] = "yes"; - } else if( configCmdLine.at(i) == "-no-mediaservices" ) { - dictionary[ "MEDIASERVICES" ] = "no"; - } else if( configCmdLine.at(i) == "-mediaservices" ) { - dictionary[ "MEDIASERVICES" ] = "yes"; } else if( configCmdLine.at(i) == "-audio-backend" ) { dictionary[ "AUDIO_BACKEND" ] = "yes"; } else if( configCmdLine.at(i) == "-no-audio-backend" ) { dictionary[ "AUDIO_BACKEND" ] = "no"; - } else if( configCmdLine.at(i) == "-media-backend") { - dictionary[ "MEDIA_BACKEND" ] = "yes"; - } else if (configCmdLine.at(i) == "-no-media-backend") { - dictionary[ "MEDIA_BACKEND" ] = "no"; } else if( configCmdLine.at(i) == "-no-phonon" ) { dictionary[ "PHONON" ] = "no"; } else if( configCmdLine.at(i) == "-phonon" ) { @@ -1603,7 +1620,6 @@ bool Configure::displayHelp() "[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n" "[-phonon] [-no-phonon-backend] [-phonon-backend]\n" "[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n" - "[-no-mediaservices] [-mediaservices] [-no-media-backend] [-media-backend]\n" "[-no-script] [-script] [-no-scripttools] [-scripttools]\n" "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7); @@ -1788,10 +1804,6 @@ bool Configure::displayHelp() desc("MULTIMEDIA", "yes","-multimedia", "Compile in multimedia module"); desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into QtMultimedia"); desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia"); - desc("MEDIASERVICES", "no", "-no-mediaservices","Do not compile the QtMediaServices module"); - desc("MEDIASERVICES", "yes","-mediaservices", "Compile in QtMediaServices module"); - desc("MEDIA_BACKEND", "no","-no-media-backend", "Do not compile in the platform-specific QtMediaServices media service."); - desc("MEDIA_BACKEND", "yes","-media-backend", "Compile in the platform-specific QtMediaServices media service."); desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module"); desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)"); desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module."); @@ -2093,7 +2105,7 @@ bool Configure::checkAvailability(const QString &part) && dictionary.value("QMAKESPEC") != "win32-msvc.net" // Leave for now, since we can't be sure if they are using 2002 or 2003 with this spec && dictionary.value("QMAKESPEC") != "win32-msvc2002" && dictionary.value("EXCEPTIONS") == "yes"; - } else if (part == "PHONON" || part == "MEDIA_BACKEND") { + } else if (part == "PHONON") { if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { available = true; } else { @@ -2257,8 +2269,6 @@ void Configure::autoDetection() dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; if (dictionary["AUDIO_BACKEND"] == "auto") dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; - if (dictionary["MEDIA_BACKEND"] == "auto") - dictionary["MEDIA_BACKEND"] = checkAvailability("MEDIA_BACKEND") ? "yes" : "no"; if (dictionary["WMSDK"] == "auto") dictionary["WMSDK"] = checkAvailability("WMSDK") ? "yes" : "no"; @@ -2659,14 +2669,6 @@ void Configure::generateOutputVars() qtConfig += "multimedia"; if (dictionary["AUDIO_BACKEND"] == "yes") qtConfig += "audio-backend"; - if (dictionary["MEDIASERVICES"] == "yes") { - qtConfig += "mediaservices"; - if (dictionary["MEDIA_BACKEND"] == "yes") { - qtConfig += "media-backend"; - if (dictionary["WMSDK"] == "yes") - qtConfig += "wmsdk"; - } - } } if (dictionary["WEBKIT"] == "yes") @@ -3068,7 +3070,6 @@ void Configure::generateConfigfiles() if(dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; if(dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON"; if(dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; - if(dictionary["MEDIASERVICES"] == "no") qconfigList += "QT_NO_MEDIASERVICES"; if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; if(dictionary["SCRIPT"] == "no") qconfigList += "QT_NO_SCRIPT"; if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS"; @@ -3371,7 +3372,6 @@ void Configure::displayConfig() cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl; cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl; cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl; - cout << "QtMediaServices support....." << dictionary[ "MEDIASERVICES" ] << endl; cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl; cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; diff --git a/tools/designer/src/lib/sdk/abstractformeditor.cpp b/tools/designer/src/lib/sdk/abstractformeditor.cpp index 5353cab..c301f46 100644 --- a/tools/designer/src/lib/sdk/abstractformeditor.cpp +++ b/tools/designer/src/lib/sdk/abstractformeditor.cpp @@ -71,7 +71,6 @@ static void initResources() { Q_INIT_RESOURCE(shared); Q_INIT_RESOURCE(ClamshellPhone); - Q_INIT_RESOURCE(PDAPhone); Q_INIT_RESOURCE(PortableMedia); Q_INIT_RESOURCE(S60_nHD_Touchscreen); Q_INIT_RESOURCE(S60_QVGA_Candybar); @@ -79,8 +78,6 @@ static void initResources() Q_INIT_RESOURCE(SmartPhone); Q_INIT_RESOURCE(SmartPhoneWithButtons); Q_INIT_RESOURCE(TouchscreenPhone); - Q_INIT_RESOURCE(Trolltech_Keypad); - Q_INIT_RESOURCE(Trolltech_Touchscreen); } QT_BEGIN_NAMESPACE diff --git a/tools/designer/src/lib/shared/filterwidget.cpp b/tools/designer/src/lib/shared/filterwidget.cpp index 9363b7c..a501c02 100644 --- a/tools/designer/src/lib/shared/filterwidget.cpp +++ b/tools/designer/src/lib/shared/filterwidget.cpp @@ -163,7 +163,7 @@ FilterWidget::FilterWidget(QWidget *parent, LayoutMode lm) : m_editor->setPlaceholderText(tr("Filter")); // Let the style determine minimum height for our widget - QSize size(ICONBUTTON_SIZE + 2, ICONBUTTON_SIZE + 2); + QSize size(ICONBUTTON_SIZE + 6, ICONBUTTON_SIZE + 2); // Note KDE does not reserve space for the highlight color if (style()->inherits("OxygenStyle")) { diff --git a/tools/designer/src/lib/shared/previewconfigurationwidget.cpp b/tools/designer/src/lib/shared/previewconfigurationwidget.cpp index e07d155..d116d58 100644 --- a/tools/designer/src/lib/shared/previewconfigurationwidget.cpp +++ b/tools/designer/src/lib/shared/previewconfigurationwidget.cpp @@ -41,7 +41,7 @@ /* It is possible to link the skins as resources into Designer by specifying: * QVFB_ROOT=$$QT_SOURCE_TREE/tools/qvfb - * RESOURCES += $$QVFB_ROOT/ClamshellPhone.qrc $$QVFB_ROOT/PDAPhone.qrc ... + * RESOURCES += $$QVFB_ROOT/ClamshellPhone.qrc $$QVFB_ROOT/TouchScreenPhone.qrc ... * in lib/shared/shared.pri. However, this exceeds a limit of Visual Studio 6. */ #include "previewconfigurationwidget_p.h" diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 5495e34..dda2cf3 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1801,6 +1801,21 @@ void HtmlGenerator::generateHeader(const QString& title, out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n"; + out() << " <!--[if IE]>"; + out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">"; + out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">"; + out() << "<![endif]-->"; + out() << "<!--[if lt IE 7]>"; + out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">"; + out() << "<![endif]-->"; + out() << "<!--[if IE 7]>"; + out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">"; + out() << "<![endif]-->"; + out() << "<!--[if IE 8]>"; + out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">"; + out() << "<![endif]-->"; + + //out() << " <title>Qt Reference Documentation</title>"; out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n"; out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n"; @@ -2317,7 +2332,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, QString commonPrefix) { const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_' - const int NumColumns = 2; // number of columns in the result + const int NumColumns = 3; // number of columns in the result if (classMap.isEmpty()) return; diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 15e6d70..9f32e52 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -36,6 +36,9 @@ qhp.Assistant.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css qhp.Assistant.filterAttributes = qt 4.8.0 tools assistant diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 026ae47..9c80f74 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -36,6 +36,9 @@ qhp.Designer.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css qhp.Designer.filterAttributes = qt 4.8.0 tools designer diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index aab06e2..05eeb88 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -36,6 +36,9 @@ qhp.Linguist.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css qhp.Linguist.filterAttributes = qt 4.8.0 tools linguist diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf index e7a1dbc..510a8b3 100644 --- a/tools/qdoc3/test/macros.qdocconf +++ b/tools/qdoc3/test/macros.qdocconf @@ -18,7 +18,7 @@ macro.ouml.HTML = "ö" macro.QA = "\\e{Qt Assistant}" macro.QD = "\\e{Qt Designer}" macro.QL = "\\e{Qt Linguist}" -macro.QQL = "\\e{Qt QML Launcher}" +macro.QQV = "\\e{Qt QML Viewer}" macro.param = "\\e" macro.raisedaster.HTML = "<sup>*</sup>" macro.rarrow.HTML = "→" diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 8015f57..f744879 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -47,6 +47,9 @@ qhp.Qml.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css qhp.Qml.filterAttributes = qt 4.6.0 qtrefdoc diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index 14d5d19..490faf57 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -36,6 +36,9 @@ qhp.qmake.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css qhp.qmake.filterAttributes = qt 4.8.0 tools qmake diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index c8331f2..1401fd3 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -42,6 +42,9 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 88aeab1..13afcd9 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -50,7 +50,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - style/style.css + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css language = Cpp diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 34ddf18..f34b262 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -1,4 +1,8 @@ -HTML.stylesheets = style/style.css +HTML.stylesheets = style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css + HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <div id=\"nav-logo\">\n" \ " <a href=\"index.html\">Home</a></div>\n" \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index c5cc401..0c2e2f3 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -46,6 +46,9 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ style/style.css qhp.Qt.filterAttributes = qt 4.8.0 qtrefdoc diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml index c3a2cc0..7238203 100644 --- a/tools/qml/content/Browser.qml +++ b/tools/qml/content/Browser.qml @@ -1,4 +1,5 @@ import Qt 4.7 +import Qt.labs.folderlistmodel 1.0 Rectangle { id: root @@ -12,12 +13,12 @@ Rectangle { FolderListModel { id: folders1 nameFilters: [ "*.qml" ] - folder: qmlLauncherFolder + folder: qmlViewerFolder } FolderListModel { id: folders2 nameFilters: [ "*.qml" ] - folder: qmlLauncherFolder + folder: qmlViewerFolder } SystemPalette { id: palette } @@ -62,7 +63,7 @@ Rectangle { if (folders.isFolder(index)) { down(filePath); } else { - qmlLauncher.launch(filePath); + qmlViewer.launch(filePath); } } width: root.width diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 380f5cc..0cce1cc 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -50,7 +50,6 @@ #include <QDebug> #include <QMessageBox> #include "qdeclarativetester.h" -#include "qdeclarativefolderlistmodel.h" QT_USE_NAMESPACE @@ -86,7 +85,7 @@ QString warnings; void showWarnings() { if (!warnings.isEmpty()) { - QMessageBox::warning(0, QApplication::tr("Qt QML Launcher"), warnings); + QMessageBox::warning(0, QApplication::tr("Qt QML Viewer"), warnings); } } @@ -111,14 +110,14 @@ void myMessageOutput(QtMsgType type, const char *msg) void usage() { - qWarning("Usage: qml [options] <filename>"); + qWarning("Usage: qmlviewer [options] <filename>"); qWarning(" "); qWarning(" options:"); qWarning(" -v, -version ............................. display version"); qWarning(" -frameless ............................... run with no window frame"); qWarning(" -maximized................................ run maximized"); qWarning(" -fullscreen............................... run fullscreen"); - qWarning(" -stayontop................................ keep launcher window on top"); + qWarning(" -stayontop................................ keep viewer window on top"); qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content"); qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view"); qWarning(" -qmlbrowser .............................. use a QML-based file browser"); @@ -149,7 +148,7 @@ void usage() void scriptOptsUsage() { - qWarning("Usage: qml -scriptopts <option>[,<option>...] ..."); + qWarning("Usage: qmlviewer -scriptopts <option>[,<option>...] ..."); qWarning(" options:"); qWarning(" record ................................... record a new script"); qWarning(" play ..................................... playback an existing script"); @@ -157,9 +156,9 @@ void scriptOptsUsage() qWarning(" testerror ................................ test 'error' property of root item on playback"); qWarning(" snapshot ................................. file being recorded is static,"); qWarning(" only one frame will be recorded or tested"); - qWarning(" exitoncomplete ........................... cleanly exit the launcher on script completion"); - qWarning(" exitonfailure ............................ immediately exit the launcher on script failure"); - qWarning(" saveonexit ............................... save recording on launcher exit"); + qWarning(" exitoncomplete ........................... cleanly exit the viewer on script completion"); + qWarning(" exitonfailure ............................ immediately exit the viewer on script failure"); + qWarning(" saveonexit ............................... save recording on viewer exit"); qWarning(" "); qWarning(" One of record, play or both must be specified."); exit(1); @@ -181,7 +180,7 @@ int main(int argc, char ** argv) atexit(showWarnings); #endif -#if defined (Q_WS_X11) +#if defined (Q_WS_X11) || defined (Q_WS_MAC) //### default to using raster graphics backend for now bool gsSpecified = false; for (int i = 0; i < argc; ++i) { @@ -197,13 +196,12 @@ int main(int argc, char ** argv) #endif QApplication app(argc, argv); - app.setApplicationName("QtQmlLauncher"); + app.setApplicationName("QtQmlViewer"); app.setOrganizationName("Nokia"); app.setOrganizationDomain("nokia.com"); QDeclarativeViewer::registerTypes(); QDeclarativeTester::registerTypes(); - QDeclarativeFolderListModel::registerTypes(); bool frameless = false; QString fileName; @@ -236,6 +234,10 @@ int main(int argc, char ** argv) useNativeFileBrowser = false; #endif +#if defined(Q_WS_MAC) + useGL = true; +#endif + for (int i = 1; i < argc; ++i) { bool lastArg = (i == argc - 1); QString arg = argv[i]; @@ -275,7 +277,7 @@ int main(int argc, char ** argv) if (lastArg) usage(); app.setStartDragDistance(QString(argv[++i]).toInt()); } else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) { - qWarning("Qt QML Launcher version %s", QT_VERSION_STR); + qWarning("Qt QML Viewer version %s", QT_VERSION_STR); exit(0); } else if (arg == "-translation") { if (lastArg) usage(); diff --git a/tools/qml/qdeclarativefolderlistmodel.cpp b/tools/qml/qdeclarativefolderlistmodel.cpp deleted file mode 100644 index 7ac25d6..0000000 --- a/tools/qml/qdeclarativefolderlistmodel.cpp +++ /dev/null @@ -1,423 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativefolderlistmodel.h" -#include <QDirModel> -#include <QDebug> -#include <qdeclarativecontext.h> - -QT_BEGIN_NAMESPACE - -class QDeclarativeFolderListModelPrivate -{ -public: - QDeclarativeFolderListModelPrivate() - : sortField(QDeclarativeFolderListModel::Name), sortReversed(false), count(0) { - nameFilters << QLatin1String("*"); - } - - void updateSorting() { - QDir::SortFlags flags = 0; - switch(sortField) { - case QDeclarativeFolderListModel::Unsorted: - flags |= QDir::Unsorted; - break; - case QDeclarativeFolderListModel::Name: - flags |= QDir::Name; - break; - case QDeclarativeFolderListModel::Time: - flags |= QDir::Time; - break; - case QDeclarativeFolderListModel::Size: - flags |= QDir::Size; - break; - case QDeclarativeFolderListModel::Type: - flags |= QDir::Type; - break; - } - - if (sortReversed) - flags |= QDir::Reversed; - - model.setSorting(flags); - } - - QDirModel model; - QUrl folder; - QStringList nameFilters; - QModelIndex folderIndex; - QDeclarativeFolderListModel::SortField sortField; - bool sortReversed; - int count; -}; - -/*! - \qmlclass FolderListModel - \brief The FolderListModel provides a model of the contents of a folder in a filesystem. - - FolderListModel provides access to the local filesystem. The \e folder property - specifies the folder to list. - - Qt uses "/" as a universal directory separator in the same way that "/" is - used as a path separator in URLs. If you always use "/" as a directory - separator, Qt will translate your paths to conform to the underlying - operating system. - - The roles available are: - \list - \o fileName - \o filePath - \endlist - - Additionally a file entry can be differentiated from a folder entry - via the \l isFolder() method. -*/ - -QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent) - : QListModelInterface(parent) -{ - d = new QDeclarativeFolderListModelPrivate; - d->model.setFilter(QDir::AllDirs | QDir::Files | QDir::Drives | QDir::NoDotAndDotDot); - connect(&d->model, SIGNAL(rowsInserted(const QModelIndex&,int,int)) - , this, SLOT(inserted(const QModelIndex&,int,int))); - connect(&d->model, SIGNAL(rowsRemoved(const QModelIndex&,int,int)) - , this, SLOT(removed(const QModelIndex&,int,int))); - connect(&d->model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&)) - , this, SLOT(dataChanged(const QModelIndex&,const QModelIndex&))); - connect(&d->model, SIGNAL(modelReset()), this, SLOT(refresh())); - connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh())); -} - -QDeclarativeFolderListModel::~QDeclarativeFolderListModel() -{ - delete d; -} - -QHash<int,QVariant> QDeclarativeFolderListModel::data(int index, const QList<int> &roles) const -{ - Q_UNUSED(roles); - QHash<int,QVariant> folderData; - QModelIndex modelIndex = d->model.index(index, 0, d->folderIndex); - if (modelIndex.isValid()) { - folderData[QDirModel::FileNameRole] = d->model.data(modelIndex, QDirModel::FileNameRole); - folderData[QDirModel::FilePathRole] = QUrl::fromLocalFile(d->model.data(modelIndex, QDirModel::FilePathRole).toString()); - } - - return folderData; -} - -QVariant QDeclarativeFolderListModel::data(int index, int role) const -{ - QVariant rv; - QModelIndex modelIndex = d->model.index(index, 0, d->folderIndex); - if (modelIndex.isValid()) { - if (role == QDirModel::FileNameRole) - rv = d->model.data(modelIndex, QDirModel::FileNameRole); - else if (role == QDirModel::FilePathRole) - rv = QUrl::fromLocalFile(d->model.data(modelIndex, QDirModel::FilePathRole).toString()); - } - - return rv; -} - -int QDeclarativeFolderListModel::count() const -{ - return d->count; -} - -QList<int> QDeclarativeFolderListModel::roles() const -{ - QList<int> r; - r << QDirModel::FileNameRole; - r << QDirModel::FilePathRole; - return r; -} - -QString QDeclarativeFolderListModel::toString(int role) const -{ - switch (role) { - case QDirModel::FileNameRole: - return QLatin1String("fileName"); - case QDirModel::FilePathRole: - return QLatin1String("filePath"); - } - - return QString(); -} - -/*! - \qmlproperty string FolderListModel::folder - - The \a folder property holds the folder the model is currently providing. - - It is a URL, but must be a file: or qrc: URL (or relative to such a URL). -*/ -QUrl QDeclarativeFolderListModel::folder() const -{ - return d->folder; -} - -void QDeclarativeFolderListModel::setFolder(const QUrl &folder) -{ - if (folder == d->folder) - return; - QModelIndex index = d->model.index(folder.toLocalFile()); - if (index.isValid() && d->model.isDir(index)) { - d->folder = folder; - QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection); - emit folderChanged(); - } -} - -QUrl QDeclarativeFolderListModel::parentFolder() const -{ - QUrl r; - QString localFile = d->folder.toLocalFile(); - if (!localFile.isEmpty()) { - QDir dir(localFile); -#if defined(Q_OS_SYMBIAN) - if (dir.isRoot()) - dir.setPath(""); - else -#endif - dir.cdUp(); - r = d->folder; - r.setPath(dir.path()); - } else { - int pos = d->folder.path().lastIndexOf(QLatin1Char('/')); - if (pos == -1) - return QUrl(); - r = d->folder; - r.setPath(d->folder.path().left(pos)); - } - return r; -} - -/*! - \qmlproperty list<string> FolderListModel::nameFilters - - The \a nameFilters property contains a list of filename filters. - The filters may include the ? and * wildcards. - - The example below filters on PNG and JPEG files: - - \code - FolderListModel { - nameFilters: [ "*.png", "*.jpg" ] - } - \endcode -*/ -QStringList QDeclarativeFolderListModel::nameFilters() const -{ - return d->nameFilters; -} - -void QDeclarativeFolderListModel::setNameFilters(const QStringList &filters) -{ - d->nameFilters = filters; - d->model.setNameFilters(d->nameFilters); -} - -void QDeclarativeFolderListModel::classBegin() -{ -} - -void QDeclarativeFolderListModel::componentComplete() -{ - if (!d->folder.isValid() || !QDir().exists(d->folder.toLocalFile())) - setFolder(QUrl(QLatin1String("file://")+QDir::currentPath())); - - if (!d->folderIndex.isValid()) - QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection); -} - -QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const -{ - return d->sortField; -} - -void QDeclarativeFolderListModel::setSortField(SortField field) -{ - if (field != d->sortField) { - d->sortField = field; - d->updateSorting(); - } -} - -bool QDeclarativeFolderListModel::sortReversed() const -{ - return d->sortReversed; -} - -void QDeclarativeFolderListModel::setSortReversed(bool rev) -{ - if (rev != d->sortReversed) { - d->sortReversed = rev; - d->updateSorting(); - } -} - -/*! - \qmlmethod bool FolderListModel::isFolder(int index) - - Returns true if the entry \a index is a folder; otherwise - returns false. -*/ -bool QDeclarativeFolderListModel::isFolder(int index) const -{ - if (index != -1) { - QModelIndex idx = d->model.index(index, 0, d->folderIndex); - if (idx.isValid()) - return d->model.isDir(idx); - } - return false; -} - -void QDeclarativeFolderListModel::refresh() -{ - d->folderIndex = QModelIndex(); - if (d->count) { - int tmpCount = d->count; - d->count = 0; - emit itemsRemoved(0, tmpCount); - } - d->folderIndex = d->model.index(d->folder.toLocalFile()); - d->count = d->model.rowCount(d->folderIndex); - if (d->count) { - emit itemsInserted(0, d->count); - } -} - -void QDeclarativeFolderListModel::inserted(const QModelIndex &index, int start, int end) -{ - if (index == d->folderIndex) { - d->count = d->model.rowCount(d->folderIndex); - emit itemsInserted(start, end - start + 1); - } -} - -void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, int end) -{ - if (index == d->folderIndex) { - d->count = d->model.rowCount(d->folderIndex); - emit itemsRemoved(start, end - start + 1); - } -} - -void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end) -{ - if (start.parent() == d->folderIndex) - emit itemsChanged(start.row(), end.row() - start.row() + 1, roles()); -} - -/*! - \qmlproperty bool FolderListModel::showDirs - - If true (the default), directories are included in the model. - - Note that the nameFilters are ignored for directories. -*/ -bool QDeclarativeFolderListModel::showDirs() const -{ - return d->model.filter() & QDir::AllDirs; -} - -void QDeclarativeFolderListModel::setShowDirs(bool on) -{ - if (!(d->model.filter() & QDir::AllDirs) == !on) - return; - if (on) - d->model.setFilter(d->model.filter() | QDir::AllDirs | QDir::Drives); - else - d->model.setFilter(d->model.filter() & ~(QDir::AllDirs | QDir::Drives)); -} - -/*! - \qmlproperty bool FolderListModel::showDotAndDotDot - - If true, the "." and ".." directories are included in the model. - - The default is false. -*/ -bool QDeclarativeFolderListModel::showDotAndDotDot() const -{ - return !(d->model.filter() & QDir::NoDotAndDotDot); -} - -void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on) -{ - if (!(d->model.filter() & QDir::NoDotAndDotDot) == on) - return; - if (on) - d->model.setFilter(d->model.filter() & ~QDir::NoDotAndDotDot); - else - d->model.setFilter(d->model.filter() | QDir::NoDotAndDotDot); -} - -/*! - \qmlproperty bool FolderListModel::showOnlyReadable - - If true, only readable files and directories are shown. - - The default is false. -*/ -bool QDeclarativeFolderListModel::showOnlyReadable() const -{ - return d->model.filter() & QDir::Readable; -} - -void QDeclarativeFolderListModel::setShowOnlyReadable(bool on) -{ - if (!(d->model.filter() & QDir::Readable) == !on) - return; - if (on) - d->model.setFilter(d->model.filter() | QDir::Readable); - else - d->model.setFilter(d->model.filter() & ~QDir::Readable); -} - -void QDeclarativeFolderListModel::registerTypes() -{ - qmlRegisterType<QDeclarativeFolderListModel>("Qt",4,7,"FolderListModel"); -} - -QT_END_NAMESPACE - diff --git a/tools/qml/qdeclarativefolderlistmodel.h b/tools/qml/qdeclarativefolderlistmodel.h deleted file mode 100644 index 1ecc784..0000000 --- a/tools/qml/qdeclarativefolderlistmodel.h +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEFOLDERLISTMODEL_H -#define QDECLARATIVEFOLDERLISTMODEL_H - -#include <qdeclarative.h> -#include <QStringList> -#include <QUrl> -#include "../../src/declarative/3rdparty/qlistmodelinterface_p.h" - -QT_BEGIN_NAMESPACE - -class QDeclarativeContext; -class QModelIndex; - -class QDeclarativeFolderListModelPrivate; -class QDeclarativeFolderListModel : public QListModelInterface, public QDeclarativeParserStatus -{ - Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) - - Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged) - Q_PROPERTY(QUrl parentFolder READ parentFolder NOTIFY folderChanged) - Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters) - Q_PROPERTY(SortField sortField READ sortField WRITE setSortField) - Q_PROPERTY(bool sortReversed READ sortReversed WRITE setSortReversed) - Q_PROPERTY(bool showDirs READ showDirs WRITE setShowDirs) - Q_PROPERTY(bool showDotAndDotDot READ showDotAndDotDot WRITE setShowDotAndDotDot) - Q_PROPERTY(bool showOnlyReadable READ showOnlyReadable WRITE setShowOnlyReadable) - -public: - QDeclarativeFolderListModel(QObject *parent = 0); - ~QDeclarativeFolderListModel(); - - static void registerTypes(); - - virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const; - virtual QVariant data(int index, int role) const; - virtual int count() const; - virtual QList<int> roles() const; - virtual QString toString(int role) const; - - QUrl folder() const; - void setFolder(const QUrl &folder); - - QUrl parentFolder() const; - - QStringList nameFilters() const; - void setNameFilters(const QStringList &filters); - - virtual void classBegin(); - virtual void componentComplete(); - - Q_INVOKABLE bool isFolder(int index) const; - - enum SortField { Unsorted, Name, Time, Size, Type }; - SortField sortField() const; - void setSortField(SortField field); - Q_ENUMS(SortField) - - bool sortReversed() const; - void setSortReversed(bool rev); - - bool showDirs() const; - void setShowDirs(bool); - bool showDotAndDotDot() const; - void setShowDotAndDotDot(bool); - bool showOnlyReadable() const; - void setShowOnlyReadable(bool); - -Q_SIGNALS: - void folderChanged(); - -private Q_SLOTS: - void refresh(); - void inserted(const QModelIndex &index, int start, int end); - void removed(const QModelIndex &index, int start, int end); - void dataChanged(const QModelIndex &start, const QModelIndex &end); - -private: - Q_DISABLE_COPY(QDeclarativeFolderListModel) - QDeclarativeFolderListModelPrivate *d; -}; - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QDeclarativeFolderListModel) - -#endif // QDECLARATIVEFOLDERLISTMODEL_H diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index a2058c7..5e3e74b 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -10,12 +10,10 @@ HEADERS += $$PWD/qmlruntime.h \ $$PWD/proxysettings.h \ $$PWD/qdeclarativetester.h \ $$PWD/deviceorientation.h \ - $$PWD/qdeclarativefolderlistmodel.h \ $$PWD/loggerwidget.h SOURCES += $$PWD/qmlruntime.cpp \ $$PWD/proxysettings.cpp \ $$PWD/qdeclarativetester.cpp \ - $$PWD/qdeclarativefolderlistmodel.cpp \ $$PWD/loggerwidget.cpp RESOURCES = $$PWD/qmlruntime.qrc diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 6129639..9cdec77 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -37,6 +37,8 @@ symbian { } mac { QMAKE_INFO_PLIST=Info_mac.plist - TARGET="QML Launcher" + TARGET=QMLViewer ICON=qml.icns +} else { + TARGET=qmlviewer } diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 9700090..8df250f 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -350,7 +350,7 @@ QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) setupProxy(manager); if (cacheSize > 0) { QNetworkDiskCache *cache = new QNetworkDiskCache; - cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-launcher-network-cache")); + cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-viewer-network-cache")); cache->setMaximumCacheSize(cacheSize); manager->setCache(cache); } else { @@ -388,7 +388,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) , translator(0) { QDeclarativeViewer::registerTypes(); - setWindowTitle(tr("Qt QML Launcher")); + setWindowTitle(tr("Qt QML Viewer")); devicemode = false; canvas = 0; @@ -887,7 +887,7 @@ bool QDeclarativeViewer::open(const QString& file_or_url) url = QUrl::fromLocalFile(fi.absoluteFilePath()); else url = QUrl(file_or_url); - setWindowTitle(tr("%1 - Qt QML Launcher").arg(file_or_url)); + setWindowTitle(tr("%1 - Qt QML Viewer").arg(file_or_url)); if (!m_script.isEmpty()) tester = new QDeclarativeTester(m_script, m_scriptOptions, canvas); @@ -895,17 +895,18 @@ bool QDeclarativeViewer::open(const QString& file_or_url) delete canvas->rootObject(); canvas->engine()->clearComponentCache(); QDeclarativeContext *ctxt = canvas->rootContext(); - ctxt->setContextProperty("qmlLauncher", this); + ctxt->setContextProperty("qmlViewer", this); #ifdef Q_OS_SYMBIAN - ctxt->setContextProperty("qmlLauncherFolder", "E:\\"); // Documents on your S60 phone + ctxt->setContextProperty("qmlViewerFolder", "E:\\"); // Documents on your S60 phone #else - ctxt->setContextProperty("qmlLauncherFolder", QDir::currentPath()); + ctxt->setContextProperty("qmlViewerFolder", QDir::currentPath()); #endif ctxt->setContextProperty("runtime", Runtime::instance()); QString fileName = url.toLocalFile(); if (!fileName.isEmpty()) { + fi.setFile(fileName); if (fi.exists()) { if (fi.suffix().toLower() != QLatin1String("qml")) { qWarning() << "qml cannot open non-QML file" << fileName; diff --git a/tools/shared/deviceskin/deviceskin.pri b/tools/shared/deviceskin/deviceskin.pri index 2552c92..3e9935a 100644 --- a/tools/shared/deviceskin/deviceskin.pri +++ b/tools/shared/deviceskin/deviceskin.pri @@ -2,13 +2,10 @@ INCLUDEPATH += $$PWD HEADERS += $$PWD/deviceskin.h SOURCES += $$PWD/deviceskin.cpp RESOURCES += $$PWD/skins/ClamshellPhone.qrc \ - $$PWD/skins/PDAPhone.qrc \ $$PWD/skins/SmartPhone2.qrc \ $$PWD/skins/SmartPhone.qrc \ $$PWD/skins/SmartPhoneWithButtons.qrc \ $$PWD/skins/TouchscreenPhone.qrc \ - $$PWD/skins/Trolltech-Keypad.qrc \ - $$PWD/skins/Trolltech-Touchscreen.qrc \ $$PWD/skins/PortableMedia.qrc \ $$PWD/skins/S60-QVGA-Candybar.qrc \ $$PWD/skins/S60-nHD-Touchscreen.qrc diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen-pressed.png b/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen-pressed.png Binary files differdeleted file mode 100644 index d62ef4a..0000000 --- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen-pressed.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen.png b/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen.png Binary files differdeleted file mode 100644 index cb3d1a7..0000000 --- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreenPhone.skin b/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreenPhone.skin deleted file mode 100644 index a82ef23..0000000 --- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreenPhone.skin +++ /dev/null @@ -1,29 +0,0 @@ -[SkinFile] -Up=DualScreen.png -Down=DualScreen-pressed.png -Screen=128 155 176 208 -BackScreen=18 44 98 119 -Areas=21 -HasMouseHover=false - -"Context1" 0x1100000 144 368 189 368 168 396 176 427 150 398 -"Back" 0x1000061 245 365 291 366 283 398 258 424 265 394 -"Select" 0x1010000 202 401 210 389 224 388 233 402 224 415 208 415 -"Up" 0x1000013 202 381 196 374 218 363 239 373 229 382 -"Left" 0x1000012 199 385 189 375 176 403 185 426 197 415 194 401 -"Right" 0x1000014 235 390 248 379 253 402 246 421 238 413 -"Down" 0x1000015 204 421 233 422 241 432 214 443 191 430 -"Call" 0x1100004 163 452 137 450 125 465 136 484 159 485 169 467 -"Hangup" 0x1100005 266 475 279 448 295 447 309 460 301 480 289 487 -"1" 0x31 175 514 147 504 133 518 161 532 180 534 -"2" 0x32 199 515 229 519 238 533 222 540 195 538 -"2" 0x32 260 512 286 506 299 513 284 527 264 535 248 525 -"4" 0x34 164 541 177 546 182 560 164 565 146 560 135 545 154 539 -"5" 0x35 204 546 225 546 243 560 231 574 205 573 191 558 -"6" 0x36 257 547 281 537 294 540 287 555 274 566 254 561 -"7" 0x37 145 569 176 578 177 595 156 597 138 584 -"8" 0x38 197 582 229 584 241 593 226 604 201 603 189 594 -"9" 0x39 253 577 288 564 301 578 283 593 259 597 251 586 -"*" 0x2a 145 598 181 611 182 623 163 632 144 623 138 607 -"0" 0x30 196 611 233 613 240 630 220 642 193 637 191 622 -"#" 0x23 255 610 286 600 302 615 279 625 258 629 247 616 diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/DualScreenPhone.skin/defaultbuttons.conf deleted file mode 100644 index 1103350..0000000 --- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/defaultbuttons.conf +++ /dev/null @@ -1,78 +0,0 @@ -[Translation] -File=QtopiaDefaults -Context=Buttons -[Menu] -Rows=4 -Columns=3 -Map=123456789*0# -Default=5 -1=Applications/camera.desktop -2=Applications/datebook.desktop -3=Applications -4=Applications/qtmail.desktop -5=Applications/addressbook.desktop -6=Games -7=Settings/Beaming.desktop -8=Applications/simapp.desktop,Applications/calculator.desktop -9=Settings -*=Applications/mediarecorder.desktop -0=Applications/todolist.desktop -#=Documents -Animator=Bounce -AnimatorBackground=Radial -[SoftKeys] -Count=3 -Key0=Context1 -Key1=Select -Key2=Back -[SystemButtons] -Count=5 -Key0=Context1 -Key1=Select -Key2=Back -Key3=Call -Key4=Hangup -[TextButtons] -Buttons=0123456789*# -Hold0='0 -Hold1='1 -Hold2='2 -Hold3='3 -Hold4='4 -Hold5='5 -Hold6='6 -Hold7='7 -Hold8='8 -Hold9='9 -Hold*=symbol -Hold#=mode -Tap0=space -Tap1="\".,'?!-@:1" -Tap2="\"a\xe4\xe5\xe6\xe0\xe1\xe2\x62\x63\xe7\x32" -Tap3="\"de\xe8\xe9\xea\x66\x33" -Tap4="\"ghi\xec\xed\xee\x34" -Tap5="\"jkl5" -Tap6="\"mn\xf1o\xf6\xf8\xf2\xf3\x36" -Tap7="\"pqrs\xdf\x37" -Tap8="\"tu\xfc\xf9\xfav8" -Tap9="\"wxyz9" -Tap*=modify -Tap#=shift -[LocaleTextButtons] -Buttons=23456789 -Tap2[]='abc -Tap3[]='def -Tap4[]='ghi -Tap5[]='jkl -Tap6[]='mno -Tap7[]='pqrs -Tap8[]='tuv -Tap9[]='wxyz -[PhoneTextButtons] -Buttons=*# -Tap*='*+pw -Hold*=+ -Tap#='# -Hold#=mode -[Device] -PrimaryInput=Keypad diff --git a/tools/shared/deviceskin/skins/PDAPhone.qrc b/tools/shared/deviceskin/skins/PDAPhone.qrc deleted file mode 100644 index 1a1c35a..0000000 --- a/tools/shared/deviceskin/skins/PDAPhone.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource prefix="/skins"> - <file>PDAPhone.skin</file> -</qresource> -</RCC> diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/PDAPhone.skin b/tools/shared/deviceskin/skins/PDAPhone.skin/PDAPhone.skin deleted file mode 100644 index d6a1966..0000000 --- a/tools/shared/deviceskin/skins/PDAPhone.skin/PDAPhone.skin +++ /dev/null @@ -1,18 +0,0 @@ -[SkinFile] -Up=pda_up.png -Down=pda_down.png -Screen=42 59 176 220 -Cursor=finger.png 20 20 -Areas=10 -HasMouseHover=false - -"Power" 0x0100000a 117 21 141 42 -"Context1" 0x01100000 43 284 74 315 -"Call" 0x01100004 74 284 104 315 -"Hangup" 0x01100005 154 284 184 315 -"Back" 0x01000061 184 284 214 315 -"Left" 0x1000012 123 315 110 326 106 307 113 288 123 300 120 307 -"Down" 0x1000015 123 315 130 318 138 315 150 326 129 335 111 325 -"Right" 0x1000014 137 301 149 290 155 308 150 324 138 315 140 308 -"Up" 0x1000013 123 300 112 289 130 282 149 290 137 300 130 298 -"Select" 0x01010000 131 298 137 300 140 307 138 315 130 318 123 316 120 307 123 300 diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/PDAPhone.skin/defaultbuttons.conf deleted file mode 100644 index e3ae813..0000000 --- a/tools/shared/deviceskin/skins/PDAPhone.skin/defaultbuttons.conf +++ /dev/null @@ -1,36 +0,0 @@ -[Translation] -File=QtopiaDefaults -Context=Buttons -[Menu] -Rows=4 -Columns=3 -Map=123456789*0# -Default=5 -1=Applications/camera.desktop -2=Applications/datebook.desktop -3=Applications -4=Applications/qtmail.desktop -5=Applications/addressbook.desktop -6=Games -7=Settings/Beaming.desktop -8=Applications/simapp.desktop,Applications/calculator.desktop -9=Settings -*=Applications/mediarecorder.desktop -0=Applications/todolist.desktop -#=Documents -Animator=Bounce -AnimatorBackground=Radial -[SoftKeys] -Count=3 -Key0=Context1 -Key1=Select -Key2=Back -[SystemButtons] -Count=5 -Key0=Context1 -Key1=Back -Key2=Select -Key3=Call -Key4=Hangup -[Device] -PrimaryInput=Touchscreen diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/finger.png b/tools/shared/deviceskin/skins/PDAPhone.skin/finger.png Binary files differdeleted file mode 100644 index 24cf0cb..0000000 --- a/tools/shared/deviceskin/skins/PDAPhone.skin/finger.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_down.png b/tools/shared/deviceskin/skins/PDAPhone.skin/pda_down.png Binary files differdeleted file mode 100644 index f65c059..0000000 --- a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_down.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_up.png b/tools/shared/deviceskin/skins/PDAPhone.skin/pda_up.png Binary files differdeleted file mode 100644 index 541e3c4..0000000 --- a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_up.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.qrc b/tools/shared/deviceskin/skins/Trolltech-Keypad.qrc deleted file mode 100644 index 4775068..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Keypad.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource prefix="/skins"> - <file>Trolltech-Keypad.skin</file> -</qresource> -</RCC> diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-closed.png b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-closed.png Binary files differdeleted file mode 100644 index 8dd5719..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-closed.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-down.png b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-down.png Binary files differdeleted file mode 100644 index 5e1e6be..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-down.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.png b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.png Binary files differdeleted file mode 100644 index fb3d549..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.skin b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.skin deleted file mode 100644 index 4d90321..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.skin +++ /dev/null @@ -1,35 +0,0 @@ -[SkinFile] -Up=Trolltech-Keypad.png -Down=Trolltech-Keypad-down.png -Closed=Trolltech-Keypad-closed.png -ClosedAreas=F1 F2 F3 Flip -ClosedScreen=95 456 128 96 -Screen=75 85 176 220 -Areas=25 -HasMouseHover=false -"1" 0x0031 65 542 68 536 76 532 114 536 114 573 64 568 -"2" 0x0032 133 537 188 574 -"3" 0x0033 206 536 246 532 252 536 256 542 258 569 205 572 -"4" 0x0034 64 578 114 618 -"5" 0x0035 133 581 188 618 -"6" 0x0036 206 580 256 577 258 613 206 616 -"7" 0x0037 66 622 116 625 114 662 66 658 -"8" 0x0038 133 626 188 662 -"9" 0x0039 206 625 256 622 256 658 206 661 -"*" 0x002a 68 667 116 670 114 705 86 699 76 693 69 686 -"0" 0x0030 133 671 188 708 -"#" 0x0023 206 670 254 665 254 684 245 692 232 699 206 704 -"Context1" 0x01100000 69 420 75 410 85 404 101 404 102 458 69 458 -"Back" 0x01000061 218 404 234 404 240 408 248 418 248 456 218 457 -"Home" 0x1000010 140 494 180 514 -"Hangup" 0x01100005 218 457 248 456 248 496 243 507 230 514 194 514 194 494 206 492 213 486 218 478 -"Call" 0x01100004 68 458 102 460 102 479 108 487 118 492 126 494 126 514 86 514 77 507 72 496 -"Select" 0x01010000 138 426 182 458 -"Up" 0x1000013 118 406 201 402 184 423 134 422 -"Right" 0x1000014 184 424 201 402 202 476 184 460 -"Down" 0x1000015 135 462 184 461 199 477 118 477 -"Left" 0x1000012 118 406 134 424 134 461 117 476 -"F1" 0x1000030 0 408 45 456 -"F2" 0x1000031 0 456 45 509 -"F3" 0x1000032 0 545 45 582 -"Flip" 0x1100006 32 353 293 386 diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/defaultbuttons.conf deleted file mode 100644 index 6a78e67..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/defaultbuttons.conf +++ /dev/null @@ -1,142 +0,0 @@ -[Translation] -File=QtopiaDefaults -Context=Buttons -[Button] -Count=8 -[Button7] -Name[]=Home Down Button -Key=Down -Context=HomeScreen -PressedActionMappable=0 -HeldActionService=Messaging -HeldActionMessage=raise() -[Button6] -Name[]=Home Up Button -Key=Up -Context=HomeScreen -PressedActionMappable=0 -HeldActionService=Contacts -HeldActionMessage=raise() -[Button5] -Name[]=Home Right Button -Key=Right -Context=HomeScreen -PressedActionMappable=0 -HeldActionService=mediaplayer -HeldActionMessage=raise() -[Button4] -Name[]=Calender Button -Key=Left -Context=HomeScreen -PressedActionMappable=0 -HeldActionService=Calendar -HeldActionMessage=raiseToday() -[Button3] -Name[]=Left Soft Key -Key=Context1 -HeldActionService=TaskManager -HeldActionMessage=showRunningTasks() -HeldActionMappable=0 -PressActionMappable=0 -[Button2] -Name[]=VoiceNotes Button -Key=F1 -PressedActionService=mediarecorder -PressedActionMessage=raise() -HeldActionService=mediarecorder -HeldActionMessage=newEvent() -[Button1] -Name[]=Camera Button -Key=F2 -PressedActionService=Camera -PressedActionMessage=raise() -HeldActionService=Tasks -HeldActionMessage=newTask() -[Button0] -Name[]=Home Button -Key=Home -PressedActionMappable=0 -PressedActionService=TaskManager -PressedActionMessage=multitask() -HeldActionMappable=0 -HeldActionService=TaskManager -HeldActionMessage=showRunningTasks() -[Menu] -Rows=4 -Columns=3 -Map=123456789*0# -Default=5 -1=Applications/camera.desktop -2=Applications/mediaplayer.desktop -3=Applications/simapp.desktop,Applications/calculator.desktop -4=Applications/qtmail.desktop -5=Applications/addressbook.desktop -6=Applications/datebook.desktop -7=Games -8=Settings/Beaming.desktop -9=Applications/todolist.desktop -*=Settings -0=Applications -#=Documents -Animator=Bounce -AnimatorBackground=Radial -[SoftKeys] -Count=3 -Key0=Context1 -Key1=Select -Key2=Back -[SystemButtons] -Count=6 -Key0=Context1 -Key1=Select -Key2=Back -Key3=Call -Key4=Hangup -Key5=Flip -[TextButtons] -Buttons=0123456789*# -Hold0='0 -Hold1='1 -Hold2='2 -Hold3='3 -Hold4='4 -Hold5='5 -Hold6='6 -Hold7='7 -Hold8='8 -Hold9='9 -Hold*=symbol -Hold#=mode -Tap0=space -Tap0=space -Tap1="\".,'?!-@:1" -Tap2="\"a\xe4\xe5\xe6\xe0\xe1\xe2\x62\x63\xe7\x32" -Tap3="\"de\xe8\xe9\xea\x66\x33" -Tap4="\"ghi\xec\xed\xee\x34" -Tap5="\"jkl5" -Tap6="\"mn\xf1o\xf6\xf8\xf2\xf3\x36" -Tap7="\"pqrs\xdf\x37" -Tap8="\"tu\xfc\xf9\xfav8" -Tap9="\"wxyz9" -Tap*=modify -Tap#=shift -[LocaleTextButtons] -Buttons=23456789 -Tap2[]='abc -Tap3[]='def -Tap4[]='ghi -Tap5[]='jkl -Tap6[]='mno -Tap7[]='pqrs -Tap8[]='tuv -Tap9[]='wxyz -[PhoneTextButtons] -Buttons=*# -Tap*='*+pw -Hold*=+ -Tap#='# -Hold#=mode -[Device] -PrimaryInput=Keypad -[Environment] -QWS_DISPLAY=Multi: LinuxFb:mmHeight57:0 LinuxFb:offset=0,320:1 :0 diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.qrc b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.qrc deleted file mode 100644 index 40fafeb..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource prefix="/skins"> - <file>Trolltech-Touchscreen.skin</file> -</qresource> -</RCC> diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.png b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.png Binary files differdeleted file mode 100644 index c1a422f..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.png b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.png Binary files differdeleted file mode 100644 index 544a425..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.png +++ /dev/null diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin deleted file mode 100644 index 5de882e..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin +++ /dev/null @@ -1,17 +0,0 @@ -[SkinFile] -Up=Trolltech-Touchscreen.png -Down=Trolltech-Touchscreen-down.png -Screen=40 109 176 220 -Areas=10 -HasMouseHover=false - -"Context1" 0x01100000 38 420 44 408 52 404 68 403 68 458 40 458 -"Back" 0x01000061 185 42 202 398 211 410 216 418 219 456 186 456 -"Call" 0x01100004 38 458 70 458 71 478 75 486 83 492 94 494 94 516 56 516 45 507 38 498 -"Hangup" 0x01100005 186 458 220 458 220 496 214 508 200 516 162 516 161 494 172 492 180 486 185 478 -"Left" 0x1000012 86 405 106 426 106 461 85 478 -"Down" 0x1000015 106 460 151 460 170 480 85 480 -"Right" 0x1000014 151 424 170 404 170 480 151 460 -"Up" 0x1000013 85 403 168 403 150 424 106 424 -"Select" 0x01010000 106 426 150 456 -"Home" 0x1000010 105 493 145 512 diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/defaultbuttons.conf deleted file mode 100644 index 6665125..0000000 --- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/defaultbuttons.conf +++ /dev/null @@ -1,53 +0,0 @@ -[Translation] -File=QtopiaDefaults -Context=Buttons -[Menu] -Rows=4 -Columns=3 -Map=123456789*0# -Default=5 -1=Applications/camera.desktop -2=Applications/mediaplayer.desktop -3=Applications/simapp.desktop,Applications/calculator.desktop -4=Applications/qtmail.desktop -5=Applications/addressbook.desktop -6=Applications/datebook.desktop -7=Games -8=Settings/beaming.desktop -9=Applications/todolist.desktop -*=Settings -0=Applications -#=Documents -Animator=Bounce -AnimatorBackground=Radial -[SoftKeys] -Count=3 -Key0=Context1 -Key1=Select -Key2=Back -[SystemButtons] -Count=5 -Key0=Context1 -Key1=Back -Key2=Select -Key3=Call -Key4=Hangup -[Device] -PrimaryInput=Touchscreen -[Button] -Count=2 -[Button0] -Name[]=Home Button -Key=Home -PressedActionMappable=0 -PressedActionService=TaskManager -PressedActionMessage=multitask() -HeldActionMappable=0 -HeldActionService=TaskManager -HeldActionMessage=showRunningTasks() -[Button1] -Name=Power Button -Key=Hangup -HeldActionService=Launcher -HeldActionMessage=execute(QString) -HeldActionArgs=@ByteArray(\0\0\0\x1\0\0\0\n\0\0\0\0\x10\0s\0h\0u\0t\0\x64\0o\0w\0n) diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp index 071477d..064e056 100644 --- a/tools/shared/symbian/epocroot.cpp +++ b/tools/shared/symbian/epocroot.cpp @@ -153,10 +153,13 @@ QString epocRoot() while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) { xml.readNext(); if (xml.isStartElement() && xml.name() == "device") { - const bool isDefault = xml.attributes().value("default") == "yes"; + const bool isDefault = xml.attributes().value("default") == "yes"; const QString id = xml.attributes().value("id").toString(); - const QString name = xml.attributes().value("name").toString(); - const bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue; + const QString name = xml.attributes().value("name").toString(); + const QString alias = xml.attributes().value("alias").toString(); + bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue; + if (!alias.isEmpty()) + epocDeviceMatch |= alias == epocDeviceValue; epocDeviceFound |= epocDeviceMatch; if((epocDeviceValue.isEmpty() && isDefault) || epocDeviceMatch) { |