QmlObserver: Fix QPainter warnings

The specified images in the resources weren't part of the qmlobserver,
and therefore 'tinting' then resulted in QPainter errors.

Task-number: QTCREATORBUG-2562
Reviewed-by: Lasse Holmstedt
This commit is contained in:
Kai Koehne
2010-10-06 17:12:06 +02:00
parent 8049a0276d
commit 878f146ede
10 changed files with 24 additions and 8 deletions

View File

@@ -150,12 +150,12 @@ CrumblePathButton::CrumblePathButton(const QString &title, QWidget *parent)
m_textPos.setY(height()); m_textPos.setY(height());
m_baseColor = QColor(0x666666); m_baseColor = QColor(0x666666);
m_segment = QImage(":/utils/images/crumblepath-segment.png"); m_segment = QImage(":/crumblepath/images/crumblepath-segment.png");
m_segmentSelected = QImage(":/utils/images/crumblepath-segment-selected.png"); m_segmentSelected = QImage(":/crumblepath/images/crumblepath-segment-selected.png");
m_segmentHover = QImage(":/utils/images/crumblepath-segment-hover.png"); m_segmentHover = QImage(":/crumblepath/images/crumblepath-segment-hover.png");
m_segmentEnd = QImage(":/utils/images/crumblepath-segment-end.png"); m_segmentEnd = QImage(":/crumblepath/images/crumblepath-segment-end.png");
m_segmentSelectedEnd = QImage(":/utils/images/crumblepath-segment-selected-end.png"); m_segmentSelectedEnd = QImage(":/crumblepath/images/crumblepath-segment-selected-end.png");
m_segmentHoverEnd = QImage(":/utils/images/crumblepath-segment-hover-end.png"); m_segmentHoverEnd = QImage(":/crumblepath/images/crumblepath-segment-hover-end.png");
tintImages(); tintImages();
} }

View File

@@ -0,0 +1,10 @@
<RCC>
<qresource prefix="/crumblepath">
<file>images/crumblepath-segment-end.png</file>
<file>images/crumblepath-segment-hover-end.png</file>
<file>images/crumblepath-segment-hover.png</file>
<file>images/crumblepath-segment-selected-end.png</file>
<file>images/crumblepath-segment-selected.png</file>
<file>images/crumblepath-segment.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -25,7 +25,8 @@ SOURCES += $$PWD/qmlruntime.cpp \
$$PWD/loggerwidget.cpp \ $$PWD/loggerwidget.cpp \
$$PWD/crumblepath.cpp $$PWD/crumblepath.cpp
RESOURCES += $$PWD/qmlruntime.qrc RESOURCES += $$PWD/qmlruntime.qrc \
crumblepath.qrc
OTHER_FILES += toolbarstyle.css OTHER_FILES += toolbarstyle.css

View File

@@ -140,7 +140,11 @@ QString QmlObserverTool::copy(const QString &qtInstallData, QString *errorMessag
<< QLatin1String("content/Browser.qml") << QLatin1String("content/images/folder.png") << QLatin1String("content/Browser.qml") << QLatin1String("content/images/folder.png")
<< QLatin1String("content/images/titlebar.png") << QLatin1String("content/images/titlebar.sci") << QLatin1String("content/images/titlebar.png") << QLatin1String("content/images/titlebar.sci")
<< QLatin1String("content/images/up.png") << QLatin1String("content/images/up.png")
<< QLatin1String("LICENSE.LGPL") << QLatin1String("LGPL_EXCEPTION.TXT"); << QLatin1String("LICENSE.LGPL") << QLatin1String("LGPL_EXCEPTION.TXT")
<< QLatin1String("crumblepath.qrc") << QLatin1String("images/crumblepath-segment-end.png")
<< QLatin1String("images/crumblepath-segment-hover-end.png") << QLatin1String("images/crumblepath-segment-hover.png")
<< QLatin1String("images/crumblepath-segment-selected-end.png") << QLatin1String("images/crumblepath-segment-selected.png")
<< QLatin1String("images/crumblepath-segment.png");
QStringList debuggerLibFiles; QStringList debuggerLibFiles;
debuggerLibFiles << QLatin1String("jsdebuggeragent.cpp") debuggerLibFiles << QLatin1String("jsdebuggeragent.cpp")
@@ -188,6 +192,7 @@ QString QmlObserverTool::copy(const QString &qtInstallData, QString *errorMessag
// Try to find a writeable directory. // Try to find a writeable directory.
foreach(const QString &directory, directories) { foreach(const QString &directory, directories) {
if (!mkpath(directory + QLatin1String("/content/images"), errorMessage) if (!mkpath(directory + QLatin1String("/content/images"), errorMessage)
|| !mkpath(directory + QLatin1String("/images"), errorMessage)
|| !mkpath(directory + QLatin1String("/qmljsdebugger/editor/images"), errorMessage) || !mkpath(directory + QLatin1String("/qmljsdebugger/editor/images"), errorMessage)
|| !mkpath(directory + QLatin1String("/qmljsdebugger/include"), errorMessage) || !mkpath(directory + QLatin1String("/qmljsdebugger/include"), errorMessage)
|| !mkpath(directory + QLatin1String("/qmljsdebugger/include/qt_private"), errorMessage)) || !mkpath(directory + QLatin1String("/qmljsdebugger/include/qt_private"), errorMessage))