diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2009-10-21 13:26:06 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2009-10-29 16:00:11 (GMT) |
commit | fccbc9b94d843f4c55834ee75127cd6219b4839a (patch) | |
tree | 9c02c9429e8ad2140cf1567b74a4908834158199 /src | |
parent | f73e3063649220f80b2d0ada3a7f087c32c0bfc8 (diff) | |
download | Qt-fccbc9b94d843f4c55834ee75127cd6219b4839a.zip Qt-fccbc9b94d843f4c55834ee75127cd6219b4839a.tar.gz Qt-fccbc9b94d843f4c55834ee75127cd6219b4839a.tar.bz2 |
Fix LIBRARY and ICON
However, compiling with QT_NO_ICON will still not work :(
Reviewed-by: tom
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qicon.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qicon_p.h | 3 | ||||
-rw-r--r-- | src/gui/image/qiconloader.cpp | 9 | ||||
-rw-r--r-- | src/gui/image/qiconloader_p.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 12 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_qws.cpp | 3 | ||||
-rw-r--r-- | src/gui/painting/qprinterinfo_unix.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qcombobox.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 3 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessdebugpipebackend.cpp | 4 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/qvfb/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/transformed/main.cpp | 3 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/vnc/main.cpp | 3 |
17 files changed, 51 insertions, 10 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 2685b86..f7cea17 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -9670,12 +9670,14 @@ bool QGraphicsTextItem::sceneEvent(QEvent *event) // Reset the focus widget's input context, regardless // of how this item gained or lost focus. if (QWidget *fw = qApp->focusWidget()) { +#ifndef QT_NO_IM if (QInputContext *qic = fw->inputContext()) { if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) qic->reset(); else qic->update(); } +#endif //QT_NO_IM } break; default: diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index c459d21..1e4fe6f 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -691,6 +691,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, focusItem = 0; sendEvent(lastFocusItem, &event); +#ifndef QT_NO_IM if (lastFocusItem && (lastFocusItem->flags() & QGraphicsItem::ItemAcceptsInputMethod)) { // Reset any visible preedit text @@ -706,6 +707,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, views.at(i)->inputContext()->reset(); } } +#endif //QT_NO_IM } if (item) { diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index e0779a0..cff9cd2 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -66,6 +66,7 @@ #include "private/qkde_p.h" #endif +#ifndef QT_NO_ICON QT_BEGIN_NAMESPACE /*! @@ -1217,3 +1218,4 @@ QSize QIcon::pixmapSize(Size which) */ QT_END_NAMESPACE +#endif //QT_NO_ICON diff --git a/src/gui/image/qicon_p.h b/src/gui/image/qicon_p.h index fc96a65..43a59a6 100644 --- a/src/gui/image/qicon_p.h +++ b/src/gui/image/qicon_p.h @@ -60,6 +60,7 @@ #include <QtGui/qicon.h> #include <QtGui/qiconengine.h> +#ifndef QT_NO_ICON QT_BEGIN_NAMESPACE class QIconPrivate @@ -134,5 +135,5 @@ private: }; QT_END_NAMESPACE - +#endif //QT_NO_ICON #endif // QICON_P_H diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 46c5431..234f271 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -38,7 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - +#ifndef QT_NO_ICON #include <private/qiconloader_p.h> #include <private/qapplication_p.h> @@ -92,11 +92,13 @@ QIconLoader::QIconLoader() : if (m_systemTheme.isEmpty()) m_systemTheme = fallbackTheme(); +#ifndef QT_NO_LIBRARY QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterfaceV2_iid, QLatin1String("/iconengines"), Qt::CaseInsensitive); if (iconFactoryLoader.keys().contains(QLatin1String("svg"))) m_supportsSvg = true; +#endif //QT_NO_LIBRARY } QIconLoader *QIconLoader::instance() @@ -160,7 +162,7 @@ QIconTheme::QIconTheme(const QString &themeName) break; } } - +#ifndef QT_NO_SETTINGS if (themeIndex.exists()) { const QSettings indexReader(themeIndex.fileName(), QSettings::IniFormat); QStringListIterator keyIterator(indexReader.allKeys()); @@ -213,6 +215,7 @@ QIconTheme::QIconTheme(const QString &themeName) if (!m_parents.contains(QLatin1String("hicolor"))) m_parents.append(QLatin1String("hicolor")); } +#endif //QT_NO_SETTINGS } QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName, @@ -546,3 +549,5 @@ void QIconLoaderEngine::virtual_hook(int id, void *data) } QT_END_NAMESPACE + +#endif //QT_NO_ICON diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h index b152d46..2a330d3 100644 --- a/src/gui/image/qiconloader_p.h +++ b/src/gui/image/qiconloader_p.h @@ -42,6 +42,7 @@ #ifndef QDESKTOPICON_P_H #define QDESKTOPICON_P_H +#ifndef QT_NO_ICON // // W A R N I N G // ------------- @@ -185,3 +186,5 @@ private: QT_END_NAMESPACE #endif // QDESKTOPICON_P_H + +#endif //QT_NO_ICON diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 85b055e..30d3c7f 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2081,7 +2081,7 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason) } QWidget *prev = focus_widget; focus_widget = focus; - +#ifndef QT_NO_IM if (prev && ((reason != Qt::PopupFocusReason && reason != Qt::MenuBarFocusReason && prev->testAttribute(Qt::WA_InputMethodEnabled)) // Do reset the input context, in case the new focus widget won't accept keyboard input @@ -2094,6 +2094,7 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason) qic->setFocusWidget(0); } } +#endif //QT_NO_IM if(focus_widget) focus_widget->d_func()->setFocus_sys(); @@ -2125,12 +2126,14 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason) QApplication::sendEvent(that->style(), &out); } if(focus && QApplicationPrivate::focus_widget == focus) { +#ifndef QT_NO_IM if (focus->testAttribute(Qt::WA_InputMethodEnabled)) { QInputContext *qic = focus->inputContext(); if (qic && focus->testAttribute(Qt::WA_WState_Created) && focus->isEnabled()) qic->setFocusWidget(focus); } +#endif //QT_NO_IM QFocusEvent in(QEvent::FocusIn, reason); QPointer<QWidget> that = focus; QApplication::sendEvent(focus, &in); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 5fa9a92..916ae8b 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -3072,6 +3072,7 @@ void QWidgetPrivate::setEnabled_helper(bool enable) #if defined(Q_WS_MAC) setEnabled_helper_sys(enable); #endif +#ifndef QT_NO_IM if (q->testAttribute(Qt::WA_InputMethodEnabled) && q->hasFocus()) { QInputContext *qic = inputContext(); if (enable) { @@ -3081,6 +3082,7 @@ void QWidgetPrivate::setEnabled_helper(bool enable) qic->setFocusWidget(0); } } +#endif //QT_NO_IM QEvent e(QEvent::EnabledChange); QApplication::sendEvent(q, &e); #ifdef QT3_SUPPORT @@ -8950,11 +8952,16 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const Qt::InputMethodHints QWidget::inputMethodHints() const { Q_D(const QWidget); +#ifndef QT_NO_IM return d->imHints; +#else //QT_NO_IM + return 0; +#endif //QT_NO_IM } void QWidget::setInputMethodHints(Qt::InputMethodHints hints) { +#ifndef QT_NO_IM Q_D(QWidget); d->imHints = hints; // Optimisation to update input context only it has already been created. @@ -8963,6 +8970,7 @@ void QWidget::setInputMethodHints(Qt::InputMethodHints hints) if (ic) ic->update(); } +#endif //QT_NO_IM } @@ -10294,6 +10302,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) QApplication::sendEvent(this, &e); break; } case Qt::WA_NativeWindow: { +#ifndef QT_NO_IM QInputContext *ic = 0; if (on && !internalWinId() && testAttribute(Qt::WA_InputMethodEnabled) && hasFocus()) { ic = d->inputContext(); @@ -10306,6 +10315,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) d->createWinId(); if (ic && isEnabled()) ic->setFocusWidget(this); +#endif //QT_NO_IM break; } case Qt::WA_PaintOnScreen: @@ -10335,6 +10345,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) #endif break; case Qt::WA_InputMethodEnabled: { +#ifndef QT_NO_IM QInputContext *ic = d->ic; if (!ic && (!on || hasFocus())) ic = d->inputContext(); @@ -10346,6 +10357,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) ic->setFocusWidget(0); } } +#endif //QT_NO_IM break; } case Qt::WA_WindowPropagation: diff --git a/src/gui/kernel/qwidget_qws.cpp b/src/gui/kernel/qwidget_qws.cpp index 0f46016..e299c6e 100644 --- a/src/gui/kernel/qwidget_qws.cpp +++ b/src/gui/kernel/qwidget_qws.cpp @@ -280,7 +280,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) QApplicationPrivate::leaveModal(this); else if ((windowType() == Qt::Popup)) qApp->d_func()->closePopup(this); - +#ifndef QT_NO_IM if (d->ic) { delete d->ic; d->ic =0; @@ -291,6 +291,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (qic) qic->widgetDestroyed(this); } +#endif //QT_NO_IM if ((windowType() == Qt::Desktop)) { } else { diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp index 7e2946a..6684ff7 100644 --- a/src/gui/painting/qprinterinfo_unix.cpp +++ b/src/gui/painting/qprinterinfo_unix.cpp @@ -421,6 +421,7 @@ int qt_pd_foreach(int /*status */, char * /*key */, int /*keyLen */, int qt_retrieveNisPrinters(QList<QPrinterDescription> *printers) { +#ifndef QT_NO_LIBRARY typedef int (*WildCast)(int, char *, int, char *, int, char *); char printersConfByname[] = "printers.conf.byname"; char *domain; @@ -444,6 +445,7 @@ int qt_retrieveNisPrinters(QList<QPrinterDescription> *printers) if (!err) return Success; } +#endif //QT_NO_LIBRARY return Unavail; } diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index ee8b751..3f6545c 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1619,9 +1619,11 @@ void QTextControlPrivate::mouseMoveEvent(Qt::MouseButtons buttons, const QPointF if (cursor.position() != oldCursorPos) emit q->cursorPositionChanged(); _q_updateCurrentCharFormatAndSelection(); +#ifndef QT_NO_IM if (QInputContext *ic = inputContext()) { ic->update(); } +#endif //QT_NO_IM } else { //emit q->visibilityRequest(QRectF(mousePos, QSizeF(1, 1))); if (cursor.position() != oldCursorPos) diff --git a/src/gui/widgets/qcombobox.h b/src/gui/widgets/qcombobox.h index 6a85096..462636c 100644 --- a/src/gui/widgets/qcombobox.h +++ b/src/gui/widgets/qcombobox.h @@ -52,7 +52,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Gui) - #ifndef QT_NO_COMBOBOX class QAbstractItemView; diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 7f9ff82..8f17e98 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -447,8 +447,9 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) cursorPositionChanged = true; } } - +#ifndef QT_NO_IM setPreeditArea(m_cursor, event->preeditString()); +#endif //QT_NO_IM m_preeditCursor = event->preeditString().length(); m_hideCursor = false; QList<QTextLayout::FormatRange> formats; diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp index b4af5b6..4f7f15c 100644 --- a/src/network/access/qnetworkaccessdebugpipebackend.cpp +++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp @@ -229,7 +229,7 @@ void QNetworkAccessDebugPipeBackend::possiblyFinish() void QNetworkAccessDebugPipeBackend::closeDownstreamChannel() { - qWarning() << "QNetworkAccessDebugPipeBackend::closeDownstreamChannel()" << operation(); + qWarning("QNetworkAccessDebugPipeBackend::closeDownstreamChannel()",operation());; //if (operation() == QNetworkAccessManager::GetOperation) // socket.disconnectFromHost(); } @@ -237,7 +237,7 @@ void QNetworkAccessDebugPipeBackend::closeDownstreamChannel() void QNetworkAccessDebugPipeBackend::socketError() { - qWarning() << "QNetworkAccessDebugPipeBackend::socketError()" << socket.error(); + qWarning("QNetworkAccessDebugPipeBackend::socketError()", socket.error()); QNetworkReply::NetworkError code; switch (socket.error()) { case QAbstractSocket::RemoteHostClosedError: diff --git a/src/plugins/gfxdrivers/qvfb/main.cpp b/src/plugins/gfxdrivers/qvfb/main.cpp index bcaecab..beca37e 100644 --- a/src/plugins/gfxdrivers/qvfb/main.cpp +++ b/src/plugins/gfxdrivers/qvfb/main.cpp @@ -43,6 +43,7 @@ #include <qscreenvfb_qws.h> #include <qstringlist.h> +#ifndef QT_NO_LIBRARY QT_BEGIN_NAMESPACE class ScreenVfbDriver : public QScreenDriverPlugin @@ -78,3 +79,4 @@ Q_EXPORT_STATIC_PLUGIN(ScreenVfbDriver) Q_EXPORT_PLUGIN2(qscreenvfb, ScreenVfbDriver) QT_END_NAMESPACE +#endif //QT_NO_LIBRARY diff --git a/src/plugins/gfxdrivers/transformed/main.cpp b/src/plugins/gfxdrivers/transformed/main.cpp index 859fd49..a9ff97d 100644 --- a/src/plugins/gfxdrivers/transformed/main.cpp +++ b/src/plugins/gfxdrivers/transformed/main.cpp @@ -42,7 +42,7 @@ #include <qscreendriverplugin_qws.h> #include <qscreentransformed_qws.h> #include <qstringlist.h> - +#ifndef QT_NO_LIBRARY QT_BEGIN_NAMESPACE class GfxTransformedDriver : public QScreenDriverPlugin @@ -81,3 +81,4 @@ Q_EXPORT_STATIC_PLUGIN(GfxTransformedDriver) Q_EXPORT_PLUGIN2(qgfxtransformed, GfxTransformedDriver) QT_END_NAMESPACE +#endif //QT_NO_LIBRARY diff --git a/src/plugins/gfxdrivers/vnc/main.cpp b/src/plugins/gfxdrivers/vnc/main.cpp index 7d91ff5..58c8c25 100644 --- a/src/plugins/gfxdrivers/vnc/main.cpp +++ b/src/plugins/gfxdrivers/vnc/main.cpp @@ -43,6 +43,7 @@ #include <qscreenvnc_qws.h> #include <qstringlist.h> +#ifndef QT_NO_LIBRARY QT_BEGIN_NAMESPACE class GfxVncDriver : public QScreenDriverPlugin @@ -81,3 +82,5 @@ Q_EXPORT_STATIC_PLUGIN(GfxVncDriver) Q_EXPORT_PLUGIN2(qgfxvnc, GfxVncDriver) QT_END_NAMESPACE + +#endif //QT_NO_LIBRARY |