diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2011-03-31 11:39:21 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2011-03-31 11:39:21 (GMT) |
commit | 97f030d8e314010b141604b71821f4c83a66f6a8 (patch) | |
tree | 4000178fc53e8144dd1fa5f28ab73814332a607c /src/gui/embedded | |
parent | cacfe6183ff7fc3211c92561b7424c0d898e0c4e (diff) | |
download | Qt-97f030d8e314010b141604b71821f4c83a66f6a8.zip Qt-97f030d8e314010b141604b71821f4c83a66f6a8.tar.gz Qt-97f030d8e314010b141604b71821f4c83a66f6a8.tar.bz2 |
suppress warnings about ASCII to QString conversion
and optimize macroses to use string literal concatenation instead of .arg()
Merge-request: 1038
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/gui/embedded')
-rw-r--r-- | src/gui/embedded/qvfbhdr.h | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/src/gui/embedded/qvfbhdr.h b/src/gui/embedded/qvfbhdr.h index 1258f14..edbea53 100644 --- a/src/gui/embedded/qvfbhdr.h +++ b/src/gui/embedded/qvfbhdr.h @@ -53,40 +53,26 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) #ifndef QT_QWS_TEMP_DIR -#define QT_QWS_TEMP_DIR "/tmp" +# define QT_QWS_TEMP_DIR QLatin1String("/tmp") #endif #ifdef QT_PRIVATE_QWS -#define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2-%3") \ - .arg(QT_QWS_TEMP_DIR).arg(getuid()).arg(DISPLAY) - -#define QT_VFB_MOUSE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ - .append("/qtvfb_mouse") -#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ - .append("/qtvfb_keyboard") -#define QT_VFB_MAP(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ - .append("/qtvfb_map") -#define QT_VFB_SOUND_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ - .append("/qt_soundserver") -#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ - .append("/QtEmbedded") +#define QT_VFB_DATADIR(DISPLAY) QT_QWS_TEMP_DIR + QLatin1String("/qtembedded-") \ + + QString::number(getuid()) + QLatin1Char('-') + QString::number(DISPLAY) +#define QT_VFB_MOUSE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) + QLatin1String("/qtvfb_mouse") +#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) + QLatin1String("/qtvfb_keyboard") +#define QT_VFB_MAP(DISPLAY) QT_VFB_DATADIR(DISPLAY) + QLatin1String("/qtvfb_map") +#define QT_VFB_SOUND_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) + QLatin1String("/qt_soundserver") +#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) + QLatin1String("/QtEmbedded") #define QTE_PIPE_QVFB(DISPLAY) QTE_PIPE(DISPLAY) #else -#define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2") \ - .arg(QT_QWS_TEMP_DIR).arg(DISPLAY) -#define QT_VFB_MOUSE_PIPE(DISPLAY) QString("%1/.qtvfb_mouse-%2") \ - .arg(QT_QWS_TEMP_DIR).arg(DISPLAY) -#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QString("%1/.qtvfb_keyboard-%2") \ - .arg(QT_QWS_TEMP_DIR).arg(DISPLAY) -#define QT_VFB_MAP(DISPLAY) QString("%1/.qtvfb_map-%2") \ - .arg(QT_QWS_TEMP_DIR).arg(DISPLAY) -#define QT_VFB_SOUND_PIPE(DISPLAY) QString("%1/.qt_soundserver-%2") \ - .arg(QT_QWS_TEMP_DIR).arg(DISPLAY) -#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \ - .append("/QtEmbedded-%1") \ - .arg(DISPLAY) -#define QTE_PIPE_QVFB(DISPLAY) QString("%1/qtembedded-%2/QtEmbedded-%2") \ - .arg(QT_QWS_TEMP_DIR).arg(DISPLAY) +#define QT_VFB_DATADIR(DISPLAY) QT_QWS_TEMP_DIR + QLatin1String("/qtembedded-") + QString::number(DISPLAY) +#define QT_VFB_MOUSE_PIPE(DISPLAY) QT_QWS_TEMP_DIR + QLatin1String("/.qtvfb_mouse-") + QString::number(DISPLAY) +#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QT_QWS_TEMP_DIR + QLatin1String("/.qtvfb_keyboard-") + QString::number(DISPLAY) +#define QT_VFB_MAP(DISPLAY) QT_QWS_TEMP_DIR + QLatin1String("/.qtvfb_map-") + QString::number(DISPLAY) +#define QT_VFB_SOUND_PIPE(DISPLAY) QT_QWS_TEMP_DIR + QLatin1String("/.qt_soundserver-") + QString::number(DISPLAY) +#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) + QLatin1String("/QtEmbedded-") + QString::number(DISPLAY) +#define QTE_PIPE_QVFB(DISPLAY) QTE_PIPE(DISPLAY) #endif struct QVFbHeader |