summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-20 21:20:08 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-20 21:20:08 (GMT)
commitb0c95377cadcaa3aa784ca909e13033c85233912 (patch)
treed4242025c55c7bffd4e259a420bc6c39c48efa58 /tools
parentc220a549d185989fc2b0f429ceb75dd6a84332f6 (diff)
parente17a5bc80b2662b71d1bc0c37a46d8602c6e707d (diff)
downloadQt-b0c95377cadcaa3aa784ca909e13033c85233912.zip
Qt-b0c95377cadcaa3aa784ca909e13033c85233912.tar.gz
Qt-b0c95377cadcaa3aa784ca909e13033c85233912.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: qmake vcxproj generator: fix usage of /Fd in QMAKE_CXXFLAGS qmake: fix vcxproj generator when using /Fd in QMAKE_CXXFLAGS Revised fix for pixmap loading Assistant: Clean-up - fix spelling mistakes. Assistant: Clean-up: Use const references in foreach loops. Assistant: Clean-up: Mark constructors as explicit. Assistant: Clean-up - add newlines to end of files. Doc: Changes to the index page and second level pages linking to the index page. Use Ctrl rather than Alt for switching tabs in the demo browser Doc: fixing creator bugs, removing menus and textbox in the header Update Japanese translations Ukrainian translation updated qtconfig and qvfb internationalization fixes add full width characters to ending() in linguist QFileDialog::HideNameFilterDetails breaks Cocoa QFileDIalog filter qdoc: Changed id attribute to be a UUID. just build connman and networkmanager plugins on linux
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/fulltextsearch/qsort_p.h8
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler_p.h3
-rw-r--r--tools/assistant/lib/qhelpengine.h2
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp2
-rw-r--r--tools/assistant/lib/qhelpenginecore.h2
-rw-r--r--tools/assistant/lib/qhelpsearchengine.h3
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp4
-rw-r--r--tools/assistant/tools/assistant/bookmarkfiltermodel.cpp2
-rw-r--r--tools/assistant/tools/assistant/bookmarkitem.h2
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanagerwidget.h5
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp2
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qtb.h2
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.h2
-rw-r--r--tools/assistant/tools/assistant/installdialog.h2
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h2
-rw-r--r--tools/assistant/tools/assistant/searchwidget.h2
-rw-r--r--tools/assistant/tools/qhelpconverter/inputpage.h2
-rw-r--r--tools/linguist/linguist/mainwindow.cpp3
-rw-r--r--tools/qdoc3/htmlgenerator.cpp22
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf2
-rw-r--r--tools/qtconfig/main.cpp14
-rw-r--r--tools/qvfb/main.cpp13
-rw-r--r--tools/qvfb/qvfb.cpp54
-rw-r--r--tools/qvfb/qvfbratedlg.cpp10
24 files changed, 99 insertions, 66 deletions
diff --git a/tools/assistant/lib/fulltextsearch/qsort_p.h b/tools/assistant/lib/fulltextsearch/qsort_p.h
index e6f024b..5c75c58 100644
--- a/tools/assistant/lib/fulltextsearch/qsort_p.h
+++ b/tools/assistant/lib/fulltextsearch/qsort_p.h
@@ -64,15 +64,15 @@ private:
class QHELP_EXPORT QCLuceneSort
{
public:
- QCLuceneSort();
- QCLuceneSort(const QStringList &fieldNames);
- QCLuceneSort(const QString &field, bool reverse = false);
+ QCLuceneSort();
+ explicit QCLuceneSort(const QStringList &fieldNames);
+ explicit QCLuceneSort(const QString &field, bool reverse = false);
virtual ~QCLuceneSort();
QString toString() const;
void setSort(const QStringList &fieldNames);
- void setSort(const QString &field, bool reverse = false);
+ void setSort(const QString &field, bool reverse = false);
protected:
friend class QCLuceneHits;
diff --git a/tools/assistant/lib/qhelpcollectionhandler_p.h b/tools/assistant/lib/qhelpcollectionhandler_p.h
index 8efe507..8901b06 100644
--- a/tools/assistant/lib/qhelpcollectionhandler_p.h
+++ b/tools/assistant/lib/qhelpcollectionhandler_p.h
@@ -76,7 +76,8 @@ public:
};
typedef QList<DocInfo> DocInfoList;
- QHelpCollectionHandler(const QString &collectionFile, QObject *parent = 0);
+ explicit QHelpCollectionHandler(const QString &collectionFile,
+ QObject *parent = 0);
~QHelpCollectionHandler();
QString collectionFile() const;
diff --git a/tools/assistant/lib/qhelpengine.h b/tools/assistant/lib/qhelpengine.h
index 2bdb983..3577f4b 100644
--- a/tools/assistant/lib/qhelpengine.h
+++ b/tools/assistant/lib/qhelpengine.h
@@ -62,7 +62,7 @@ class QHELP_EXPORT QHelpEngine : public QHelpEngineCore
Q_OBJECT
public:
- QHelpEngine(const QString &collectionFile, QObject *parent = 0);
+ explicit QHelpEngine(const QString &collectionFile, QObject *parent = 0);
~QHelpEngine();
QHelpContentModel *contentModel() const;
diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp
index 71306af..d72dfe4 100644
--- a/tools/assistant/lib/qhelpenginecore.cpp
+++ b/tools/assistant/lib/qhelpenginecore.cpp
@@ -706,7 +706,7 @@ QVariant QHelpEngineCore::metaData(const QString &documentationFileName,
}
/*!
- Returns a description of the last error that occured.
+ Returns a description of the last error that occurred.
*/
QString QHelpEngineCore::error() const
{
diff --git a/tools/assistant/lib/qhelpenginecore.h b/tools/assistant/lib/qhelpenginecore.h
index 118c310..db25c0b 100644
--- a/tools/assistant/lib/qhelpenginecore.h
+++ b/tools/assistant/lib/qhelpenginecore.h
@@ -65,7 +65,7 @@ class QHELP_EXPORT QHelpEngineCore : public QObject
Q_PROPERTY(QString currentFilter READ currentFilter WRITE setCurrentFilter)
public:
- QHelpEngineCore(const QString &collectionFile, QObject *parent = 0);
+ explicit QHelpEngineCore(const QString &collectionFile, QObject *parent = 0);
virtual ~QHelpEngineCore();
bool setupData();
diff --git a/tools/assistant/lib/qhelpsearchengine.h b/tools/assistant/lib/qhelpsearchengine.h
index 545360c..0b07920 100644
--- a/tools/assistant/lib/qhelpsearchengine.h
+++ b/tools/assistant/lib/qhelpsearchengine.h
@@ -80,7 +80,8 @@ class QHELP_EXPORT QHelpSearchEngine : public QObject
Q_OBJECT
public:
- QHelpSearchEngine(QHelpEngineCore *helpEngine, QObject *parent = 0);
+ explicit QHelpSearchEngine(QHelpEngineCore *helpEngine,
+ QObject *parent = 0);
~QHelpSearchEngine();
QHelpSearchQueryWidget* queryWidget();
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
index c2274c4..75cc2b9 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
@@ -173,7 +173,7 @@ void QHelpSearchIndexReaderClucene::run()
QCLuceneDocument document;
const QStringList namespaceList = engine.registeredDocumentations();
- foreach (QSharedPointer<QCLuceneHits> hits, cluceneHitsList) {
+ foreach (const QSharedPointer<QCLuceneHits> &hits, cluceneHitsList) {
for (qint32 i = 0; i < hits->length(); i++) {
document = hits->document(i);
const QString path = document.get(PathField);
@@ -415,7 +415,7 @@ bool QHelpSearchIndexReaderClucene::addAttributesQuery(
void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engine,
QList<QHelpSearchEngine::SearchHit> &hitList, const QList<QHelpSearchQuery> &queryList)
{
- foreach (const QHelpSearchQuery query, queryList) {
+ foreach (const QHelpSearchQuery &query, queryList) {
if (query.fieldName != QHelpSearchQuery::DEFAULT)
continue;
diff --git a/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
index 5874493..7a7c2e3 100644
--- a/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
+++ b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
@@ -319,4 +319,4 @@ BookmarkTreeModel::filterAcceptsRow(int row, const QModelIndex &parent) const
&& model->data(model->index(row, 0, parent), UserRoleFolder).toBool())
return true;
return false;
-} \ No newline at end of file
+}
diff --git a/tools/assistant/tools/assistant/bookmarkitem.h b/tools/assistant/tools/assistant/bookmarkitem.h
index 924a762..7c5b8d0 100644
--- a/tools/assistant/tools/assistant/bookmarkitem.h
+++ b/tools/assistant/tools/assistant/bookmarkitem.h
@@ -58,7 +58,7 @@ typedef QVector<QVariant> DataVector;
class BookmarkItem
{
public:
- BookmarkItem(const DataVector &data, BookmarkItem *parent = 0);
+ explicit BookmarkItem(const DataVector &data, BookmarkItem *parent = 0);
~BookmarkItem();
BookmarkItem *parent() const;
diff --git a/tools/assistant/tools/assistant/bookmarkmanagerwidget.h b/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
index 94384a6..56433cb 100644
--- a/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
+++ b/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
@@ -57,7 +57,8 @@ class BookmarkManagerWidget : public QWidget
{
Q_OBJECT
public:
- BookmarkManagerWidget(BookmarkModel *bookmarkModel, QWidget *parent = 0);
+ explicit BookmarkManagerWidget(BookmarkModel *bookmarkModel,
+ QWidget *parent = 0);
~BookmarkManagerWidget();
protected:
@@ -99,4 +100,4 @@ private:
QT_END_NAMESPACE
-#endif // BOOKMARKMANAGERWIDGET_H \ No newline at end of file
+#endif // BOOKMARKMANAGERWIDGET_H
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 131fb85..f42dfdf 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -1011,7 +1011,7 @@ CentralWidget::highlightSearchTerms()
case QHelpSearchQuery::DEFAULT:
case QHelpSearchQuery::ATLEAST:
foreach (QString term, query.wordList)
- terms.append(term.remove(QLatin1String("\"")));
+ terms.append(term.remove(QLatin1Char('"')));
}
}
}
diff --git a/tools/assistant/tools/assistant/helpviewer_qtb.h b/tools/assistant/tools/assistant/helpviewer_qtb.h
index acb734b..58aacd7 100644
--- a/tools/assistant/tools/assistant/helpviewer_qtb.h
+++ b/tools/assistant/tools/assistant/helpviewer_qtb.h
@@ -61,7 +61,7 @@ class HelpViewer : public QTextBrowser, public AbstractHelpViewer
Q_OBJECT
public:
- HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
+ explicit HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
~HelpViewer();
QFont viewerFont() const;
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.h b/tools/assistant/tools/assistant/helpviewer_qwv.h
index 1897e3e..d4a27a2 100644
--- a/tools/assistant/tools/assistant/helpviewer_qwv.h
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.h
@@ -58,7 +58,7 @@ class HelpViewer : public QWebView, public AbstractHelpViewer
Q_OBJECT
public:
- HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
+ explicit HelpViewer(CentralWidget *parent, qreal zoom = 0.0);
~HelpViewer();
QFont viewerFont() const;
diff --git a/tools/assistant/tools/assistant/installdialog.h b/tools/assistant/tools/assistant/installdialog.h
index 2f19519..afafc63 100644
--- a/tools/assistant/tools/assistant/installdialog.h
+++ b/tools/assistant/tools/assistant/installdialog.h
@@ -61,7 +61,7 @@ class InstallDialog : public QDialog
Q_OBJECT
public:
- InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent = 0,
+ explicit InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent = 0,
const QString &host = QString(), int port = -1);
~InstallDialog();
diff --git a/tools/assistant/tools/assistant/mainwindow.h b/tools/assistant/tools/assistant/mainwindow.h
index 8e4276d..8219140 100644
--- a/tools/assistant/tools/assistant/mainwindow.h
+++ b/tools/assistant/tools/assistant/mainwindow.h
@@ -66,7 +66,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow(CmdLineParser *cmdLine, QWidget *parent = 0);
+ explicit MainWindow(CmdLineParser *cmdLine, QWidget *parent = 0);
~MainWindow();
static void activateCurrentBrowser();
diff --git a/tools/assistant/tools/assistant/searchwidget.h b/tools/assistant/tools/assistant/searchwidget.h
index 465e8f6..750497b 100644
--- a/tools/assistant/tools/assistant/searchwidget.h
+++ b/tools/assistant/tools/assistant/searchwidget.h
@@ -58,7 +58,7 @@ class SearchWidget : public QWidget
Q_OBJECT
public:
- SearchWidget(QHelpSearchEngine *engine, QWidget *parent = 0);
+ explicit SearchWidget(QHelpSearchEngine *engine, QWidget *parent = 0);
~SearchWidget();
void zoomIn();
diff --git a/tools/assistant/tools/qhelpconverter/inputpage.h b/tools/assistant/tools/qhelpconverter/inputpage.h
index e9276c6..28a7075 100644
--- a/tools/assistant/tools/qhelpconverter/inputpage.h
+++ b/tools/assistant/tools/qhelpconverter/inputpage.h
@@ -54,7 +54,7 @@ class InputPage : public QWizardPage
Q_OBJECT
public:
- InputPage(AdpReader *reader, QWidget *parent = 0);
+ explicit InputPage(AdpReader *reader, QWidget *parent = 0);
private slots:
void getFileName();
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index 163ef54..7d11823 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -142,10 +142,13 @@ static Ending ending(QString str, QLocale::Language lang)
case 0x2048: // question exclamation mark
case 0x2049: // exclamation question mark
case 0x2762: // heavy exclamation mark ornament
+ case 0xff01: // full width exclamation mark
+ case 0xff1f: // full width question mark
return End_Interrobang;
case 0x003b: // greek 'compatibility' questionmark
return lang == QLocale::Greek ? End_Interrobang : End_None;
case 0x003a: // colon
+ case 0xff1a: // full width colon
return End_Colon;
case 0x2026: // horizontal ellipsis
return End_Ellipsis;
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 3e79a9f..698b516 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1810,18 +1810,19 @@ void HtmlGenerator::generateHeader(const QString& title,
// Adding jquery and functions - providing online tools and search features
out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- // Adding style and js for small windows
- out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />";
- out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n";
+
// Adding syntax highlighter // future release
- // Setting some additional style sheet related details depending on configuration (e.g. online/offline)
+ // Setting some additional style sheet related details depending on configuration (e.g. Online/Creator)
switch (application) {
case Online:
+ // Adding style and js for small windows
+ out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n";
+ out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />";
+ out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n";
+ out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n";
// Browser spec styles
out() << " <!--[if IE]>\n";
out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
@@ -4423,7 +4424,7 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
if (node->access() == Node::Private)
return false;
- QString t;
+ QString guid = QUuid::createUuid().toString();
QString url = PageGenerator::fileName(node);
QString title;
QString rawTitle;
@@ -4432,7 +4433,6 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
QXmlStreamAttributes attributes;
writer.writeStartElement("page");
- t.setNum(id++);
if (node->isInnerNode()) {
const InnerNode* inner = static_cast<const InnerNode*>(node);
@@ -4510,7 +4510,7 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
}
}
- writer.writeAttribute("id",t);
+ writer.writeAttribute("id",guid);
writer.writeStartElement("pageWords");
writer.writeCharacters(pageWords.join(" "));
@@ -4545,9 +4545,9 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
Text headingText = Text::sectionHeading(toc.at(i));
QString s = headingText.toString();
writer.writeStartElement("page");
- t.setNum(id++);
+ guid = QUuid::createUuid().toString();
QString internalUrl = url + "#" + Doc::canonicalTitle(s);
- writer.writeAttribute("id",t);
+ writer.writeAttribute("id",guid);
writer.writeStartElement("pageWords");
writer.writeCharacters(pageWords.join(" "));
writer.writeCharacters(" ");
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 71b13ff..a14e696 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -86,7 +86,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
" </ul> \n" \
" </div>\n" \
diff --git a/tools/qtconfig/main.cpp b/tools/qtconfig/main.cpp
index 24d044f..928cf01 100644
--- a/tools/qtconfig/main.cpp
+++ b/tools/qtconfig/main.cpp
@@ -42,6 +42,9 @@
#include "ui_previewwidgetbase.h"
#include "mainwindow.h"
#include <QApplication>
+#include <QLibraryInfo>
+#include <QLocale>
+#include <QTranslator>
QT_USE_NAMESPACE
@@ -50,6 +53,17 @@ int main(int argc, char **argv)
Q_INIT_RESOURCE(qtconfig);
QApplication app(argc, argv);
+
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("qtconfig_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
+
MainWindow mw;
mw.show();
return app.exec();
diff --git a/tools/qvfb/main.cpp b/tools/qvfb/main.cpp
index d96b255..28aa7d4 100644
--- a/tools/qvfb/main.cpp
+++ b/tools/qvfb/main.cpp
@@ -43,6 +43,9 @@
#include <QApplication>
#include <QRegExp>
+#include <QLibraryInfo>
+#include <QLocale>
+#include <QTranslator>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
@@ -73,6 +76,16 @@ int runQVfb( int argc, char *argv[] )
QApplication app( argc, argv );
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("qvfb_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
+
int width = 0;
int height = 0;
int depth = -32; // default, but overridable by skin
diff --git a/tools/qvfb/qvfb.cpp b/tools/qvfb/qvfb.cpp
index bc9e529..b4ccebc 100644
--- a/tools/qvfb/qvfb.cpp
+++ b/tools/qvfb/qvfb.cpp
@@ -398,47 +398,47 @@ void QVFb::createMenu(T *menu)
QMenu* QVFb::createFileMenu()
{
- QMenu *file = new QMenu( "File", this );
- file->addAction( "Configure...", this, SLOT(configure()), 0 );
+ QMenu *file = new QMenu( tr("&File"), this );
+ file->addAction( tr("&Configure..."), this, SLOT(configure()), QKeySequence::Preferences );
file->addSeparator();
- file->addAction( "&Save image...", this, SLOT(saveImage()), 0 );
- file->addAction( "&Animation...", this, SLOT(toggleAnimation()), 0 );
+ file->addAction( tr("&Save image..."), this, SLOT(saveImage()), QKeySequence::Save );
+ file->addAction( tr("&Animation..."), this, SLOT(toggleAnimation()), 0 );
file->addSeparator();
- file->addAction( "&Quit", qApp, SLOT(quit()) );
+ file->addAction( tr("&Quit"), qApp, SLOT(quit()), QKeySequence::Quit );
return file;
}
QMenu* QVFb::createViewMenu()
{
- viewMenu = new QMenu( "View", this );
- cursorAction = viewMenu->addAction( "Show &Cursor", this,
+ viewMenu = new QMenu( tr("&View"), this );
+ cursorAction = viewMenu->addAction( tr("Show &Cursor"), this,
SLOT(toggleCursor()) );
cursorAction->setCheckable(true);
if ( view )
enableCursor(true);
- viewMenu->addAction( "&Refresh Rate...", this, SLOT(changeRate()) );
+ viewMenu->addAction( tr("&Refresh Rate..."), this, SLOT(changeRate()) );
viewMenu->addSeparator();
- viewMenu->addAction( "No rotation", this, SLOT(setRot0()) );
- viewMenu->addAction( "90\260 rotation", this, SLOT(setRot90()) );
- viewMenu->addAction( "180\260 rotation", this, SLOT(setRot180()) );
- viewMenu->addAction( "270\260 rotation", this, SLOT(setRot270()) );
+ viewMenu->addAction( tr("&No rotation"), this, SLOT(setRot0()) );
+ viewMenu->addAction( tr("&90\260 rotation"), this, SLOT(setRot90()) );
+ viewMenu->addAction( tr("1&80\260 rotation"), this, SLOT(setRot180()) );
+ viewMenu->addAction( tr("2&70\260 rotation"), this, SLOT(setRot270()) );
viewMenu->addSeparator();
- viewMenu->addAction( "Zoom scale &0.5", this, SLOT(setZoomHalf()) );
- viewMenu->addAction( "Zoom scale 0.75", this, SLOT(setZoom075()) );
- viewMenu->addAction( "Zoom scale &1", this, SLOT(setZoom1()) );
- viewMenu->addAction( "Zoom scale &2", this, SLOT(setZoom2()) );
- viewMenu->addAction( "Zoom scale &3", this, SLOT(setZoom3()) );
- viewMenu->addAction( "Zoom scale &4", this, SLOT(setZoom4()) );
+ viewMenu->addAction( tr("Zoom scale &0.5"), this, SLOT(setZoomHalf()) );
+ viewMenu->addAction( tr("Zoom scale 0.7&5"), this, SLOT(setZoom075()) );
+ viewMenu->addAction( tr("Zoom scale &1"), this, SLOT(setZoom1()) );
+ viewMenu->addAction( tr("Zoom scale &2"), this, SLOT(setZoom2()) );
+ viewMenu->addAction( tr("Zoom scale &3"), this, SLOT(setZoom3()) );
+ viewMenu->addAction( tr("Zoom scale &4"), this, SLOT(setZoom4()) );
viewMenu->addSeparator();
- viewMenu->addAction( "Zoom scale...", this, SLOT(setZoom()) );
+ viewMenu->addAction( tr("Zoom &scale..."), this, SLOT(setZoom()) );
return viewMenu;
}
QMenu* QVFb::createHelpMenu()
{
- QMenu *help = new QMenu( "Help", this );
- help->addAction("About...", this, SLOT(about()));
+ QMenu *help = new QMenu( tr("&Help"), this );
+ help->addAction(tr("&About..."), this, SLOT(about()));
return help;
}
@@ -525,17 +525,17 @@ void QVFb::setZoom4()
void QVFb::saveImage()
{
QImage img = view->image();
- QString filename = QFileDialog::getSaveFileName(this, "Save Main Screen image", "snapshot.png", "Portable Network Graphics (*.png)");
+ QString filename = QFileDialog::getSaveFileName(this, tr("Save Main Screen image"), tr("snapshot.png"), tr("Portable Network Graphics (*.png)"));
if (!filename.isEmpty()){
if(!img.save(filename,"PNG"))
- QMessageBox::critical(this, "Save Main Screen Image", "Save failed. Check that you have permission to write to the target directory.");
+ QMessageBox::critical(this, tr("Save Main Screen Image"), tr("Save failed. Check that you have permission to write to the target directory."));
}
if (secondaryView) {
QImage img = view->image();
- QString filename = QFileDialog::getSaveFileName(this, "Save Second Screen image", "snapshot.png", "Portable Network Graphics (*.png)");
+ QString filename = QFileDialog::getSaveFileName(this, tr("Save Second Screen image"), tr("snapshot.png"), tr("Portable Network Graphics (*.png)"));
if (!filename.isEmpty()) {
if(!img.save(filename,"PNG"))
- QMessageBox::critical(this, "Save Second Screen Image", "Save failed. Check that you have permission to write to the target directory.");
+ QMessageBox::critical(this, tr("Save Second Screen Image"), tr("Save failed. Check that you have permission to write to the target directory."));
}
}
}
@@ -577,7 +577,7 @@ void QVFb::setRate(int i)
void QVFb::about()
{
- QMessageBox::about(this, "About QVFB",
+ QMessageBox::about(this, tr("About QVFB"), tr(
"<h2>The Qt for Embedded Linux Virtual X11 Framebuffer</h2>"
"<p>This application runs under Qt for X11, emulating a simple framebuffer, "
"which the Qt for Embedded Linux server and clients can attach to just as if "
@@ -586,7 +586,7 @@ void QVFb::about()
"Linux applications under X11 without having to switch to a virtual console. "
"This means you can comfortably use your other development tools such "
"as GUI profilers and debuggers."
- );
+ ));
}
void QVFb::findSkins(const QString &currentSkin)
diff --git a/tools/qvfb/qvfbratedlg.cpp b/tools/qvfb/qvfbratedlg.cpp
index e491bdf..a0cbb2f 100644
--- a/tools/qvfb/qvfbratedlg.cpp
+++ b/tools/qvfb/qvfbratedlg.cpp
@@ -55,7 +55,7 @@ QVFbRateDialog::QVFbRateDialog(int rate, QWidget *parent)
QVBoxLayout *tl = new QVBoxLayout(this);
tl->setMargin(5);
- QLabel *label = new QLabel("Target frame rate:", this);
+ QLabel *label = new QLabel(tr("Target frame rate:"), this);
tl->addWidget(label);
QHBoxLayout *hl = new QHBoxLayout();
@@ -67,15 +67,15 @@ QVFbRateDialog::QVFbRateDialog(int rate, QWidget *parent)
rateSlider->setValue(rate);
hl->addWidget(rateSlider);
connect(rateSlider, SIGNAL(valueChanged(int)), this, SLOT(rateChanged(int)));
- rateLabel = new QLabel(QString("%1fps").arg(rate), this);
+ rateLabel = new QLabel(tr("%1fps").arg(rate), this);
hl->addWidget(rateLabel);
hl = new QHBoxLayout();
tl->addItem(hl);
- QPushButton *pb = new QPushButton("OK", this);
+ QPushButton *pb = new QPushButton(tr("OK"), this);
connect(pb, SIGNAL(clicked()), this, SLOT(ok()));
hl->addWidget(pb);
- pb = new QPushButton("Cancel", this);
+ pb = new QPushButton(tr("Cancel"), this);
connect(pb, SIGNAL(clicked()), this, SLOT(cancel()));
hl->addWidget(pb);
}
@@ -84,7 +84,7 @@ void QVFbRateDialog::rateChanged(int r)
{
if (rateSlider->value() != r)
rateSlider->setValue(r);
- rateLabel->setText(QString("%1fps").arg(r));
+ rateLabel->setText(tr("%1fps").arg(r));
emit updateRate(r);
}