diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-08 10:40:47 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-08 10:40:47 (GMT) |
commit | ab01d0f9ad79cb80fce2ee6c889c98bc7e35e5f2 (patch) | |
tree | 58eaa299c0d87d6d678fe635fddaab42177328cf /util/s60theme/s60themeconvert.cpp | |
parent | dfd7c876263310c03d8b64033749efe2b6b1e081 (diff) | |
parent | 03dc74984749adf5b11482bf871a47086217845c (diff) | |
download | Qt-ab01d0f9ad79cb80fce2ee6c889c98bc7e35e5f2.zip Qt-ab01d0f9ad79cb80fce2ee6c889c98bc7e35e5f2.tar.gz Qt-ab01d0f9ad79cb80fce2ee6c889c98bc7e35e5f2.tar.bz2 |
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (44 commits)
fix translations from some header files being omitted
Revert changes to syncqt.
Fix style sheet error with slider handle
deprecate header files in $$QT_BUILD_TREE/include/Qt
syncqt: tabs changes to spaces
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( d6d6c3821ed111b214a753f1ce8fa969c1a94dc3 )
fix misleading hint
support TARGETs with spaces
propagate code change back to .g source
double-quote string which contains a single-quote
Fix the bindTexture() filters on X11 to not rely on mipmap generation.
Fix QWS build failure
Removed compiler warnings
qmake: don't warn about unknown MSVC compiler option /MP
Window visibility changes update TLW backing store reference count
Enable visibility change events on all Symbian native windows
Added reference counting to QWidgetBackingStore
Added tst_QWidget::destroyBackingStoreWhenHidden
Windows CE: missing null check added in qapplication_win.cpp
Clipping with rounded rectangles and QVG_SCISSOR_CLIP
...
Diffstat (limited to 'util/s60theme/s60themeconvert.cpp')
-rw-r--r-- | util/s60theme/s60themeconvert.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/util/s60theme/s60themeconvert.cpp b/util/s60theme/s60themeconvert.cpp index 7908055..b1e8022 100644 --- a/util/s60theme/s60themeconvert.cpp +++ b/util/s60theme/s60themeconvert.cpp @@ -45,6 +45,8 @@ #include <QtWebKit> static const int pictureSize = 256; +static const char* const msgPartNotInTdf = " Warning: The .tdf file does not have a part for "; +static const char* const msgSvgNotFound = " Fatal: Could not find part .svg "; void dumpPartPictures(const QHash<QString, QPicture> &partPictures) { foreach (const QString &partKey, partPictures.keys()) { @@ -84,6 +86,7 @@ private: WebKitSVGRenderer::WebKitSVGRenderer(QWidget *parent) : QWebView(parent) { + connect(this, SIGNAL(loadFinished(bool)), SLOT(loadFinishedSlot(bool))); setFixedSize(pictureSize, pictureSize); QPalette pal = palette(); @@ -202,11 +205,19 @@ bool loadThemeFromTdf(const QString &tdfFile, return false; const QString tdfBasePath = QFileInfo(tdfFile).absolutePath(); WebKitSVGRenderer renderer; - foreach(const QString& partKey, parsedPartSvgs.keys()) { - const QString tdfFullName = - tdfBasePath + QDir::separator() + parsedPartSvgs.value(partKey); - if (!QFile(tdfFullName).exists()) - qWarning() << "Could not find part:" << parsedPartSvgs.value(partKey); + foreach (const QString &partKey, QS60Style::partKeys()) { + qDebug() << partKey; + QString tdfFullName; + if (parsedPartSvgs.contains(partKey)) { + tdfFullName = tdfBasePath + QDir::separator() + parsedPartSvgs.value(partKey); + } else { + qWarning() << msgPartNotInTdf << partKey; + tdfFullName = tdfBasePath + QDir::separator() + partKey + QLatin1String(".svg"); + } + if (!QFile(tdfFullName).exists()) { + qWarning() << msgSvgNotFound << QDir::toNativeSeparators(tdfFullName); + return false; + } const QPicture partPicture = renderer.svgToQPicture(tdfFullName); parsedPartPictures.insert(partKey, partPicture); } @@ -276,8 +287,8 @@ bool loadDefaultTheme(const QString &themePath, const QString partFileName = partKey + QLatin1String(".svg"); const QString partFile(dir.absolutePath() + QDir::separator() + partFileName); if (!QFile::exists(partFile)) { - qWarning() << "Could not find part:" << partFileName; - continue; + qWarning() << msgSvgNotFound << partFileName; + return false; } const QPicture partPicture = renderer.svgToQPicture(partFile); partPictures.insert(partKey, partPicture); |