diff options
author | Jeremy Katz <jeremy.katz@nokia.com> | 2009-10-01 12:08:11 (GMT) |
---|---|---|
committer | Jeremy Katz <jeremy.katz@nokia.com> | 2009-10-01 12:12:28 (GMT) |
commit | 072e748adbdab1d51b240b9983ce82b213b66f18 (patch) | |
tree | 67d170ab4e0bba06adc3479ea6af3214e24636e4 /tools/qvfb/qvfb.cpp | |
parent | 938ba08e7bf90063127b298da25a124441659e89 (diff) | |
download | Qt-072e748adbdab1d51b240b9983ce82b213b66f18.zip Qt-072e748adbdab1d51b240b9983ce82b213b66f18.tar.gz Qt-072e748adbdab1d51b240b9983ce82b213b66f18.tar.bz2 |
Enable qws/qvfb use for multiple users on one machine
Task-number: QTBUG-1711
Reviewed-by: Paul
Diffstat (limited to 'tools/qvfb/qvfb.cpp')
-rw-r--r-- | tools/qvfb/qvfb.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/qvfb/qvfb.cpp b/tools/qvfb/qvfb.cpp index 879fb6b..6119419 100644 --- a/tools/qvfb/qvfb.cpp +++ b/tools/qvfb/qvfb.cpp @@ -41,6 +41,7 @@ #include "qvfb.h" #include "qvfbview.h" +#include "qvfbhdr.h" #ifdef Q_WS_X11 #include "qvfbx11view.h" #endif @@ -134,7 +135,7 @@ static const char *red_off_led_xpm[] = { static bool copyButtonConfiguration(const QString &prefix, int displayId) { - const QString destDir = QString(QLatin1String("/tmp/qtembedded-%1/")).arg(displayId); + const QString destDir = QT_VFB_DATADIR(displayId); const QFileInfo src(prefix + QLatin1String("defaultbuttons.conf")); const QFileInfo dst(destDir + QLatin1String("defaultbuttons.conf")); unlink(dst.absoluteFilePath().toLatin1().constData()); @@ -351,9 +352,9 @@ void QVFb::init( int display_id, int pw, int ph, int d, int r, const QString& sk ph += 2; // avoid scrollbar scroller->show(); // delete defaultbuttons.conf if it was left behind... - unlink(QFileInfo(QString("/tmp/qtembedded-%1/defaultbuttons.conf").arg(view->displayId())).absoluteFilePath().toLatin1().constData()); + unlink(QFileInfo(QT_VFB_DATADIR(view->displayId()).append("/defaultbuttons.conf")).absoluteFilePath().toLatin1().constData()); if (secondaryView) - unlink(QFileInfo(QString("/tmp/qtembedded-%1/defaultbuttons.conf").arg(view->displayId()+1)).absoluteFilePath().toLatin1().constData()); + unlink(QFileInfo(QT_VFB_DATADIR(view->displayId() + 1).append("/defaultbuttons.conf")).absoluteFilePath().toLatin1().constData()); } view->setRate(refreshRate); if (secondaryView) { |