summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRomain Pokrzywka <romain.pokrzywka@kdab.com>2012-01-16 05:55:43 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-04-10 14:34:54 (GMT)
commit57a642a7ce98a56fbd7ee983b251e7ed1e220366 (patch)
tree8e8e437df19242af9582f28b4182c43d16ff0c0a /tools
parente13e73bfd9aa36b78df0c47e262ce50a48eb2404 (diff)
downloadQt-57a642a7ce98a56fbd7ee983b251e7ed1e220366.zip
Qt-57a642a7ce98a56fbd7ee983b251e7ed1e220366.tar.gz
Qt-57a642a7ce98a56fbd7ee983b251e7ed1e220366.tar.bz2
Fix compilation when QT_NO_CURSOR is defined
Although the QtDesigner module isn't built by default on embedded platforms, it's sometimes needed, mainly for dynamic form loading. The library contains a couple of setCursor calls which should then be #ifdef'd, as it's often a disabled feature for embedded UIs. Change-Id: I92d91249905848e73ee933e6f057a30b9cacb03c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/lib/shared/filterwidget.cpp2
-rw-r--r--tools/designer/src/lib/shared/previewmanager.cpp8
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/designer/src/lib/shared/filterwidget.cpp b/tools/designer/src/lib/shared/filterwidget.cpp
index dcd8561..e74720b 100644
--- a/tools/designer/src/lib/shared/filterwidget.cpp
+++ b/tools/designer/src/lib/shared/filterwidget.cpp
@@ -72,7 +72,9 @@ HintLineEdit::HintLineEdit(QWidget *parent) :
IconButton::IconButton(QWidget *parent)
: QToolButton(parent)
{
+#ifndef QT_NO_CURSOR
setCursor(Qt::ArrowCursor);
+#endif
}
void IconButton::paintEvent(QPaintEvent *)
diff --git a/tools/designer/src/lib/shared/previewmanager.cpp b/tools/designer/src/lib/shared/previewmanager.cpp
index e5e22cb..1cec036 100644
--- a/tools/designer/src/lib/shared/previewmanager.cpp
+++ b/tools/designer/src/lib/shared/previewmanager.cpp
@@ -281,7 +281,9 @@ void PreviewDeviceSkin::slotDirection(QAction *a)
const Qt::Orientation newOrientation = newDirection == DirectionUp ? Qt::Vertical : Qt::Horizontal;
const Qt::Orientation oldOrientation = m_direction == DirectionUp ? Qt::Vertical : Qt::Horizontal;
m_direction = newDirection;
+#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
if (oldOrientation != newOrientation) {
QSize size = screenSize();
if (newOrientation == Qt::Horizontal)
@@ -289,7 +291,9 @@ void PreviewDeviceSkin::slotDirection(QAction *a)
fitWidget(size);
}
setTransform(skinTransform());
+#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
+#endif
}
void PreviewDeviceSkin::fitWidget(const QSize &size)
@@ -408,10 +412,14 @@ void ZoomablePreviewDeviceSkin::setZoomPercent(int zp)
if (m_zoomMenu->zoom() != zp)
m_zoomMenu->setZoom(zp);
+#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
m_zoomWidget->setZoom(zp);
setTransform(skinTransform());
+#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
+#endif
}
void ZoomablePreviewDeviceSkin::populateContextMenu(QMenu *menu)