summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-04-21 12:22:24 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-04-21 12:22:24 (GMT)
commit51dca5f8afc3aa619a3bb62858db78a85cc3ecef (patch)
treedfc1fb65b6a8e5e429f1701992548f8a0425decb /src/gui/kernel/qapplication.cpp
parent6f5ad5dcab8e6f702894c4fa5c016d9837375626 (diff)
parentc74dac2a0ef5d1b428c4da4e48fab05f9886233a (diff)
downloadQt-51dca5f8afc3aa619a3bb62858db78a85cc3ecef.zip
Qt-51dca5f8afc3aa619a3bb62858db78a85cc3ecef.tar.gz
Qt-51dca5f8afc3aa619a3bb62858db78a85cc3ecef.tar.bz2
Merge remote branch 'origin/4.7' into lighthouse
Conflicts: configure src/gui/kernel/qapplication.cpp src/gui/painting/qbackingstore.cpp src/opengl/qgl.cpp src/opengl/qgl_p.h src/plugins/plugins.pro tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir tools/tools.pro
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index a188276..5b294cc 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -142,7 +142,7 @@ static void initResources()
QT_BEGIN_NAMESPACE
-extern void qt_call_post_routines();
+Q_DECL_IMPORT extern void qt_call_post_routines();
int QApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly, but it's at least 4.0.0
@@ -907,6 +907,16 @@ void QApplicationPrivate::initialize()
{
QWidgetPrivate::mapper = new QWidgetMapper;
QWidgetPrivate::allWidgets = new QWidgetSet;
+
+#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_LITE)
+ // initialize the graphics system - on X11 this is initialized inside
+ // qt_init() in qapplication_x11.cpp because of several reasons.
+ // On QWS, the graphics system is set by the QScreen plugin.
+ // For lighthouse it will be initialized to QLiteGraphicsSystem
+ // when the platformIntegration plugin is instansiated in qt_init(
+ graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
+#endif
+
if (qt_appType != QApplication::Tty)
(void) QApplication::style(); // trigger creation of application style
// trigger registering of QVariant's GUI types
@@ -940,15 +950,7 @@ void QApplicationPrivate::initialize()
// Set up which span functions should be used in raster engine...
qInitDrawhelperAsm();
-
-#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_LITE)
- // initialize the graphics system - on X11 this is initialized inside
- // qt_init() in qapplication_x11.cpp because of several reasons.
- // On QWS, the graphics system is set by the QScreen plugin.
- // For lighthouse it will be initialized to QLiteGraphicsSystem
- // when the platformIntegration plugin is instansiated in qt_init(
- graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
-#endif
+
#ifndef QT_NO_WHEELEVENT
QApplicationPrivate::wheel_scroll_lines = 3;
#endif
@@ -2319,12 +2321,15 @@ static bool qt_detectRTLLanguage()
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
}
-#if defined(QT_MAC_USE_COCOA)
+#if defined(Q_WS_MAC)
static const char *application_menu_strings[] = {
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"),
- QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All")
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Quit %1"),
+ QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1")
};
QString qt_mac_applicationmenu_string(int type)
{
@@ -5307,9 +5312,9 @@ QInputContext *QApplication::inputContext() const
QApplication *that = const_cast<QApplication *>(this);
const QStringList keys = QInputContextFactory::keys();
// Try hbim and coefep first, then try others.
- if (keys.contains("hbim")) {
+ if (keys.contains(QLatin1String("hbim"))) {
that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
- } else if (keys.contains("coefep")) {
+ } else if (keys.contains(QLatin1String("coefep"))) {
that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
} else {
for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
@@ -5951,6 +5956,7 @@ static const char * const link_xpm[] = {
QPixmap QApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
{
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
if (!move_cursor) {
move_cursor = new QPixmap((const char **)move_xpm);
copy_cursor = new QPixmap((const char **)copy_xpm);
@@ -5974,6 +5980,7 @@ QPixmap QApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
default:
break;
}
+#endif
return QPixmap();
}