summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-05 11:04:24 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-05 11:04:24 (GMT)
commit4d33c51bf00be826b8036f58cd9aea0c1f44f8ce (patch)
tree99339183e160058b996580157d8ed89bd6809562 /tools
parentbadcaa75b4a5e5dfbb85f5abf856abcfcfa20533 (diff)
parentb0e6c5ca48c76fb17dca986e9e07adebde390e29 (diff)
downloadQt-4d33c51bf00be826b8036f58cd9aea0c1f44f8ce.zip
Qt-4d33c51bf00be826b8036f58cd9aea0c1f44f8ce.tar.gz
Qt-4d33c51bf00be826b8036f58cd9aea0c1f44f8ce.tar.bz2
Merge branch '4.6'
Conflicts: src/corelib/io/qdatastream.h tools/assistant/translations/translations_adp.pro tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-inc.qdocconf tools/qdoc3/test/qt.qdocconf translations/assistant_adp_de.ts
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/translations/qt_help.pro18
-rw-r--r--tools/assistant/translations/translations.pro17
-rw-r--r--tools/designer/translations/translations.pro17
-rw-r--r--tools/linguist/lconvert/main.cpp8
-rw-r--r--tools/linguist/linguist/linguist.pro17
-rw-r--r--tools/linguist/lupdate/main.cpp9
-rw-r--r--tools/qdoc3/doc.cpp83
-rw-r--r--tools/qdoc3/generator.cpp15
-rw-r--r--tools/qdoc3/htmlgenerator.cpp3
-rw-r--r--tools/qdoc3/test/classic.css14
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf2
-rw-r--r--tools/qdoc3/test/qt-inc.qdocconf2
-rw-r--r--tools/qdoc3/test/qt.qdocconf3
-rw-r--r--tools/qtconfig/translations/translations.pro11
-rw-r--r--tools/qvfb/qvfb.cpp7
-rw-r--r--tools/qvfb/qvfbprotocol.cpp6
-rw-r--r--tools/qvfb/qvfbshmem.cpp12
-rw-r--r--tools/qvfb/translations/translations.pro11
18 files changed, 132 insertions, 123 deletions
diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro
index 9f4d7d8..69570d3 100644
--- a/tools/assistant/translations/qt_help.pro
+++ b/tools/assistant/translations/qt_help.pro
@@ -39,12 +39,14 @@ HEADERS += ../lib/qhelpcollectionhandler_p.h \
../lib/qhelp_global.h
-TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qt_help_de.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qt_help_ja.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qt_help_pl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qt_help_ru.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qt_help_untranslated.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_CN.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qt_help_zh_TW.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qt_help_da.ts
+TR_DIR = $$PWD/../../../translations
+TRANSLATIONS = \
+ $$TR_DIR/qt_help_da.ts \
+ $$TR_DIR/qt_help_de.ts
+ $$TR_DIR/qt_help_ja.ts \
+ $$TR_DIR/qt_help_pl.ts \
+ $$TR_DIR/qt_help_ru.ts \
+ $$TR_DIR/qt_help_zh_CN.ts \
+ $$TR_DIR/qt_help_zh_TW.ts
+
error("This is a dummy profile to be used for translations ONLY.")
diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro
index 4b836e6..6ff1fc9 100644
--- a/tools/assistant/translations/translations.pro
+++ b/tools/assistant/translations/translations.pro
@@ -40,11 +40,12 @@ HEADERS += ../tools/assistant/aboutdialog.h \
../tools/assistant/searchwidget.h \
../tools/assistant/topicchooser.h \
-TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/assistant_de.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_ja.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_pl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_ru.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_untranslated.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_CN.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_zh_TW.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_da.ts
+TR_DIR = $$PWD/../../../translations
+TRANSLATIONS = \
+ $$TR_DIR/assistant_da.ts \
+ $$TR_DIR/assistant_de.ts \
+ $$TR_DIR/assistant_ja.ts \
+ $$TR_DIR/assistant_pl.ts \
+ $$TR_DIR/assistant_ru.ts \
+ $$TR_DIR/assistant_zh_CN.ts \
+ $$TR_DIR/assistant_zh_TW.ts
diff --git a/tools/designer/translations/translations.pro b/tools/designer/translations/translations.pro
index fd782b0..a37918c 100644
--- a/tools/designer/translations/translations.pro
+++ b/tools/designer/translations/translations.pro
@@ -130,11 +130,12 @@ HEADERS += ../../shared/findwidget/abstractfindwidget.h \
../../shared/findwidget/itemviewfindwidget.h \
../../shared/findwidget/texteditfindwidget.h
-TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/designer_de.ts \
- $$[QT_INSTALL_TRANSLATIONS]/designer_ja.ts \
- $$[QT_INSTALL_TRANSLATIONS]/designer_pl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/designer_ru.ts \
- $$[QT_INSTALL_TRANSLATIONS]/designer_sl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/designer_zh_CN.ts \
- $$[QT_INSTALL_TRANSLATIONS]/designer_zh_TW.ts \
- $$[QT_INSTALL_TRANSLATIONS]/designer_untranslated.ts
+TR_DIR = $$PWD/../../../translations
+TRANSLATIONS = \
+ $$TR_DIR/designer_de.ts \
+ $$TR_DIR/designer_ja.ts \
+ $$TR_DIR/designer_pl.ts \
+ $$TR_DIR/designer_ru.ts \
+ $$TR_DIR/designer_sl.ts \
+ $$TR_DIR/designer_zh_CN.ts \
+ $$TR_DIR/designer_zh_TW.ts
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index 67553a0..6f5f86a 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -234,10 +234,6 @@ int main(int argc, char *argv[])
return usage(args);
tr.setLanguageCode(Translator::guessLanguageCodeFromFileName(inFiles[0].name));
- if (!targetLanguage.isEmpty())
- tr.setLanguageCode(targetLanguage);
- if (!sourceLanguage.isEmpty())
- tr.setSourceLanguageCode(sourceLanguage);
if (!tr.load(inFiles[0].name, cd, inFiles[0].format)) {
qWarning() << qPrintable(cd.error());
@@ -256,6 +252,10 @@ int main(int argc, char *argv[])
tr.replaceSorted(tr2.message(j));
}
+ if (!targetLanguage.isEmpty())
+ tr.setLanguageCode(targetLanguage);
+ if (!sourceLanguage.isEmpty())
+ tr.setSourceLanguageCode(sourceLanguage);
if (noObsolete)
tr.stripObsoleteMessages();
if (noFinished)
diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro
index 00ebec1..c902aeb 100644
--- a/tools/linguist/linguist/linguist.pro
+++ b/tools/linguist/linguist/linguist.pro
@@ -95,11 +95,12 @@ FORMS += statistics.ui \
finddialog.ui
RESOURCES += linguist.qrc
-TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/linguist_ja.ts \
- $$[QT_INSTALL_TRANSLATIONS]/linguist_pl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/linguist_ru.ts \
- $$[QT_INSTALL_TRANSLATIONS]/linguist_untranslated.ts \
- $$[QT_INSTALL_TRANSLATIONS]/linguist_zh_CN.ts \
- $$[QT_INSTALL_TRANSLATIONS]/linguist_zh_TW.ts \
- $$[QT_INSTALL_TRANSLATIONS]/linguist_de.ts \
- $$[QT_INSTALL_TRANSLATIONS]/linguist_fr.ts
+TR_DIR = $$PWD/../../../translations
+TRANSLATIONS = \
+ $$TR_DIR/linguist_de.ts \
+ $$TR_DIR/linguist_fr.ts \
+ $$TR_DIR/linguist_ja.ts \
+ $$TR_DIR/linguist_pl.ts \
+ $$TR_DIR/linguist_ru.ts \
+ $$TR_DIR/linguist_zh_CN.ts \
+ $$TR_DIR/linguist_zh_TW.ts
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index e8cf121..6b554e0 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -114,12 +114,11 @@ static void printUsage()
" Name of a .pro file. Useful for files with .pro\n"
" file syntax but different file suffix\n"
" -source-language <language>[_<region>]\n"
- " Specify/override the language of the source strings. Defaults to\n"
- " POSIX if not specified and the file does not name it yet.\n"
+ " Specify the language of the source strings for new files.\n"
+ " Defaults to POSIX if not specified.\n"
" -target-language <language>[_<region>]\n"
- " Specify/override the language of the translation.\n"
- " The target language is guessed from the file name if this option\n"
- " is not specified and the file contents name no language yet.\n"
+ " Specify the language of the translations for new files.\n"
+ " Guessed from the file name if not specified.\n"
" -version\n"
" Display the version of lupdate and exit.\n"
).arg(m_defaultExtensions));
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index c202d71..748390f 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -2641,56 +2641,63 @@ Text Doc::trimmedBriefText(const QString &className) const
bool standardWording = true;
/*
- This code is really ugly. The entire \brief business
- should be rethought.
+ This code is really ugly. The entire \brief business
+ should be rethought.
*/
- while (atom && (atom->type() == Atom::AutoLink || atom->type() == Atom::String)) {
- briefStr += atom->string();
+ while (atom) {
+ if (atom->type() == Atom::AutoLink || atom->type() == Atom::String) {
+ briefStr += atom->string();
+ }
atom = atom->next();
}
QStringList w = briefStr.split(" ");
- if (!w.isEmpty() && w.first() == "The")
- w.removeFirst();
- else {
- location().warning(
- tr("Nonstandard wording in '\\%1' text for '%2' (expected 'The')")
- .arg(COMMAND_BRIEF).arg(className));
- standardWording = false;
+ if (!w.isEmpty() && w.first() == "Returns") {
}
-
- if (!w.isEmpty() && (w.first() == className || w.first() == classNameOnly))
- w.removeFirst();
else {
- location().warning(
- tr("Nonstandard wording in '\\%1' text for '%2' (expected '%3')")
- .arg(COMMAND_BRIEF).arg(className).arg(className));
- standardWording = false;
- }
+ if (!w.isEmpty() && w.first() == "The")
+ w.removeFirst();
+ else {
+ location().warning(
+ tr("Nonstandard wording in '\\%1' text for '%2' (expected 'The')")
+ .arg(COMMAND_BRIEF).arg(className));
+ standardWording = false;
+ }
- if (!w.isEmpty() && ((w.first() == "class") ||
- (w.first() == "function") ||
- (w.first() == "macro") ||
- (w.first() == "widget") ||
- (w.first() == "namespace") ||
- (w.first() == "header")))
- w.removeFirst();
- else {
- location().warning(
- tr("Nonstandard wording in '\\%1' text for '%2' ("
- "expected 'class', 'function', 'macro', 'widget', "
- "'namespace' or 'header')")
- .arg(COMMAND_BRIEF).arg(className));
- standardWording = false;
- }
+ if (!w.isEmpty() && (w.first() == className || w.first() == classNameOnly))
+ w.removeFirst();
+ else {
+ location().warning(
+ tr("Nonstandard wording in '\\%1' text for '%2' (expected '%3')")
+ .arg(COMMAND_BRIEF).arg(className).arg(className));
+ standardWording = false;
+ }
- if (!w.isEmpty() && (w.first() == "is" || w.first() == "provides"))
- w.removeFirst();
+ if (!w.isEmpty() && ((w.first() == "class") ||
+ (w.first() == "function") ||
+ (w.first() == "macro") ||
+ (w.first() == "widget") ||
+ (w.first() == "namespace") ||
+ (w.first() == "header")))
+ w.removeFirst();
+ else {
+ location().warning(
+ tr("Nonstandard wording in '\\%1' text for '%2' ("
+ "expected 'class', 'function', 'macro', 'widget', "
+ "'namespace' or 'header')")
+ .arg(COMMAND_BRIEF).arg(className));
+ standardWording = false;
+ }
- if (!w.isEmpty() && (w.first() == "a" || w.first() == "an"))
- w.removeFirst();
+ if (!w.isEmpty() && (w.first() == "is" || w.first() == "provides"))
+ w.removeFirst();
+
+ if (!w.isEmpty() && (w.first() == "a" || w.first() == "an"))
+ w.removeFirst();
+ }
whats = w.join(" ");
+
if (whats.endsWith("."))
whats.truncate(whats.length() - 1);
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 47fe4b5..f7569ce 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -562,27 +562,20 @@ void Generator::generateModuleWarning(const ClassNode *classe,
QString module = classe->moduleName();
if (!module.isEmpty()) {
Text text;
- if (!editionModuleMap["Console"].contains(module)) {
+ if (!editionModuleMap["DesktopLight"].contains(module)) {
text << Atom::ParaLeft
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "This class is not part of the Qt Console Edition."
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << Atom::ParaRight;
- }
- else if (!editionModuleMap["DesktopLight"].contains(module)) {
- text << Atom::ParaLeft
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "This class is not part of the Qt Desktop Light Edition."
+ << "This class is not part of the Qt GUI Framework Edition."
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
<< Atom::ParaRight;
}
else if (module == "Qt3Support") {
text << Atom::ParaLeft
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "Note to Qt Desktop Light Edition users:"
+ << "Note to Qt GUI Framework Edition users:"
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
<< " This class is only available in the "
- << Atom(Atom::AutoLink, "Qt Desktop Edition")
+ << Atom(Atom::AutoLink, "Qt Full Framework Edition")
<< "." << Atom::ParaRight;
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 2757cd8..291f60b 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -732,13 +732,12 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< Node::typeName(i)
<< " new in Qt "
<< atom->string()
- << "<h2>";
+ << "</h2>";
generateAnnotatedList(relative, marker, nodeMap);
nodeMap.clear();
}
}
}
-
}
break;
case Atom::Image:
diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css
index c0bc3d47..320da66 100644
--- a/tools/qdoc3/test/classic.css
+++ b/tools/qdoc3/test/classic.css
@@ -43,10 +43,11 @@ table.valuelist {
table.indextable {
border-width: 1px 1px 1px 1px;
+ border-style: solid;
border-collapse: collapse;
background-color: #f0f0f0;
border-color:#555;
- font-size: 110%;
+ font-size: 100%;
}
table td.largeindex {
@@ -68,14 +69,17 @@ table.valuelist th {
th.titleheader {
border-width: 1px 0px 1px 0px;
- padding: 4px;
+ padding: 2px;
border-style: solid;
- border-color: #444;
+ border-color: #666;
color:white;
- background-color:#555555;
- font-size: 110%;
+ background-color:#555;
+ background-image:url('images/gradient.png')};
+ background-repeat: repeat-x;
+ font-size: 100%;
}
+
th.largeheader {
border-width: 1px 0px 1px 0px;
padding: 4px;
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index f3cf00c..b517206 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -8,8 +8,6 @@ project = Qt
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.7
-edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
- QtXmlPatterns QtTest
edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtSql \
QtSvg QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
QtDesigner QAxContainer Phonon QAxServer QtUiTools \
diff --git a/tools/qdoc3/test/qt-inc.qdocconf b/tools/qdoc3/test/qt-inc.qdocconf
index 635e033..097db3f 100644
--- a/tools/qdoc3/test/qt-inc.qdocconf
+++ b/tools/qdoc3/test/qt-inc.qdocconf
@@ -5,7 +5,6 @@ project = Qt
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.7
-edition.Console = QtCore QtNetwork QtSql QtXml QtScript QtTest
edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtSvg QtXml \
QtScript QtDesigner Qt3Support QAxContainer QAxServer \
QtUiTools QtTest QtDBus
@@ -116,6 +115,7 @@ Cpp.ignoredirectives = Q_DECLARE_HANDLE \
Q_ENUMS \
Q_FLAGS \
Q_INTERFACES \
+ Q_OS_SYMBIAN \
__attribute__
HTML.stylesheets = $QTDIR/util/qdoc3/test/classic.css
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index d1dc28d..a1c6b6b 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -10,8 +10,6 @@ version = %VERSION%
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.7
-edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
- QtXmlPatterns QtTest
edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \
QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \
Qt3Support QtHelp QtDesigner QAxContainer Phonon \
@@ -97,6 +95,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \
$QTDIR/src/3rdparty/phonon/gstreamer \
$QTDIR/src/3rdparty/phonon/ds9 \
$QTDIR/src/3rdparty/phonon/qt7 \
+ $QTDIR/src/3rdparty/phonon/mmf \
$QTDIR/src/3rdparty/phonon/waveout
sources.fileextensions = "*.cpp *.qdoc *.mm"
diff --git a/tools/qtconfig/translations/translations.pro b/tools/qtconfig/translations/translations.pro
index 1f9f572..bf8a1da 100644
--- a/tools/qtconfig/translations/translations.pro
+++ b/tools/qtconfig/translations/translations.pro
@@ -7,8 +7,9 @@ HEADERS += ../colorbutton.h ../previewframe.h ../previewwidget.h ../mainw
FORMS = ../mainwindowbase.ui ../paletteeditoradvancedbase.ui ../previewwidgetbase.ui
-TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qtconfig_pl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qtconfig_ru.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qtconfig_untranslated.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qtconfig_zh_CN.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qtconfig_zh_TW.ts
+TR_DIR = $$PWD/../../../translations
+TRANSLATIONS = \
+ $$TR_DIR/qtconfig_pl.ts \
+ $$TR_DIR/qtconfig_ru.ts \
+ $$TR_DIR/qtconfig_zh_CN.ts \
+ $$TR_DIR/qtconfig_zh_TW.ts
diff --git a/tools/qvfb/qvfb.cpp b/tools/qvfb/qvfb.cpp
index 879fb6b..59e8dae 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).append("/");
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) {
diff --git a/tools/qvfb/qvfbprotocol.cpp b/tools/qvfb/qvfbprotocol.cpp
index b09ed0e..df6c110 100644
--- a/tools/qvfb/qvfbprotocol.cpp
+++ b/tools/qvfb/qvfbprotocol.cpp
@@ -56,6 +56,8 @@
#include <unistd.h>
#endif
+#include "qvfbshmem.h"
+
QT_BEGIN_NAMESPACE
QVFbViewProtocol::QVFbViewProtocol(int display_id, QObject *parent) :
@@ -90,7 +92,7 @@ static int openPipe(const char *fileName)
QVFbKeyPipeProtocol::QVFbKeyPipeProtocol(int display_id)
: QVFbKeyProtocol(display_id)
{
- fileName = QString(QT_VFB_KEYBOARD_PIPE).arg(display_id);
+ fileName = QT_VFB_KEYBOARD_PIPE(display_id);
fd = openPipe(fileName.toLocal8Bit().constData());
if (fd == -1)
@@ -119,7 +121,7 @@ void QVFbKeyPipeProtocol::sendKeyboardData(QString unicode, int keycode,
QVFbMousePipe::QVFbMousePipe(int display_id)
: QVFbMouseProtocol(display_id)
{
- fileName = QString(QT_VFB_MOUSE_PIPE).arg(display_id);
+ fileName = QT_VFB_MOUSE_PIPE(display_id);
fd = openPipe(fileName.toLocal8Bit().constData());
if (fd == -1)
diff --git a/tools/qvfb/qvfbshmem.cpp b/tools/qvfb/qvfbshmem.cpp
index 0d2b3ca..5a2da0d 100644
--- a/tools/qvfb/qvfbshmem.cpp
+++ b/tools/qvfb/qvfbshmem.cpp
@@ -44,8 +44,6 @@
#include "qvfbshmem.h"
#include "qvfbhdr.h"
-#define QTE_PIPE "QtEmbedded-%1"
-
#include <QFile>
#include <QTimer>
@@ -71,7 +69,7 @@ QT_BEGIN_NAMESPACE
// live.
static QString qws_dataDir(int qws_display_id)
{
- QByteArray dataDir = QString("/tmp/qtembedded-%1").arg(qws_display_id).toLocal8Bit();
+ QByteArray dataDir = QT_VFB_DATADIR(qws_display_id).toLocal8Bit();
if (mkdir(dataDir, 0700)) {
if (errno != EEXIST) {
qFatal("Cannot create Qt for Embedded Linux data directory: %s", dataDir.constData());
@@ -130,7 +128,9 @@ QShMemViewProtocol::QShMemViewProtocol(int displayid, const QSize &s,
if ( logname )
username = logname;
- QString oldPipe = "/tmp/qtembedded-" + username + "/" + QString(QTE_PIPE).arg(displayid);
+ qws_dataDir(displayid);
+
+ QString oldPipe = "/tmp/qtembedded-" + username + "/" + QString("QtEmbedded-%1").arg(displayid);
int oldPipeSemkey = ftok(oldPipe.toLatin1().constData(), 'd');
if (oldPipeSemkey != -1) {
int oldPipeLockId = semget(oldPipeSemkey, 0, 0);
@@ -151,6 +151,8 @@ QShMemViewProtocol::QShMemViewProtocol(int displayid, const QSize &s,
}
}
+ displayPipe = QTE_PIPE_QVFB(displayid);
+
kh = new QVFbKeyPipeProtocol(displayid);
/* should really depend on receiving qt version, but how can
one tell? */
@@ -209,8 +211,6 @@ QShMemViewProtocol::QShMemViewProtocol(int displayid, const QSize &s,
hdr->brightness = 255;
hdr->windowId = 0;
- displayPipe = qws_dataDir(displayid) + QString(QTE_PIPE).arg(displayid);
-
displayPiped = displayPipe + 'd';
diff --git a/tools/qvfb/translations/translations.pro b/tools/qvfb/translations/translations.pro
index 17579f7..ef42063 100644
--- a/tools/qvfb/translations/translations.pro
+++ b/tools/qvfb/translations/translations.pro
@@ -26,8 +26,9 @@ SOURCES = ../qvfb.cpp \
../../../src/gui/embedded/qwssignalhandler.cpp \
../../shared/deviceskin/deviceskin.cpp
-TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/qvfb_pl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qvfb_ru.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qvfb_untranslated.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qvfb_zh_CN.ts \
- $$[QT_INSTALL_TRANSLATIONS]/qvfb_zh_TW.ts
+TR_DIR = $$PWD/../../../translations
+TRANSLATIONS = \
+ $$TR_DIR/qvfb_pl.ts \
+ $$TR_DIR/qvfb_ru.ts \
+ $$TR_DIR/qvfb_zh_CN.ts \
+ $$TR_DIR/qvfb_zh_TW.ts