diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-19 02:06:21 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-19 02:06:21 (GMT) |
commit | fb6775d423f1ebe7e624951edf39d79ca0433d4a (patch) | |
tree | 4b5b93d3c2d835b268ce16f2fe9a91e4b89ecfde /tools/linguist | |
parent | 9c7c859647771d5d2fa466b0a3ff9d408edecd38 (diff) | |
parent | f9f08de9d41fd55d9c7d01578191ef5d4099c9e6 (diff) | |
download | Qt-fb6775d423f1ebe7e624951edf39d79ca0433d4a.zip Qt-fb6775d423f1ebe7e624951edf39d79ca0433d4a.tar.gz Qt-fb6775d423f1ebe7e624951edf39d79ca0433d4a.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts:
configure.exe
tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'tools/linguist')
82 files changed, 599 insertions, 397 deletions
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp index ce17b6f..8ecdbc2 100644 --- a/tools/linguist/lconvert/main.cpp +++ b/tools/linguist/lconvert/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -99,7 +99,7 @@ static int usage(const QStringList &args) " Drop finished messages.\n\n" " --locations {absolute|relative|none}\n" " Override how source code references are saved in ts files.\n" - " Default is absolute.\n}n" + " Default is absolute.\n\n" " --no-ui-lines\n" " Drop line numbers from references to .ui files.\n\n" " --verbose\n" diff --git a/tools/linguist/linguist/batchtranslation.ui b/tools/linguist/linguist/batchtranslation.ui index 4824dfb..88b55e2 100644 --- a/tools/linguist/linguist/batchtranslation.ui +++ b/tools/linguist/linguist/batchtranslation.ui @@ -3,7 +3,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -36,7 +36,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/tools/linguist/linguist/batchtranslationdialog.cpp b/tools/linguist/linguist/batchtranslationdialog.cpp index 101ad97..c8d1dde 100644 --- a/tools/linguist/linguist/batchtranslationdialog.cpp +++ b/tools/linguist/linguist/batchtranslationdialog.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/batchtranslationdialog.h b/tools/linguist/linguist/batchtranslationdialog.h index 1ceeb6e..58f9d3c 100644 --- a/tools/linguist/linguist/batchtranslationdialog.h +++ b/tools/linguist/linguist/batchtranslationdialog.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/errorsview.cpp b/tools/linguist/linguist/errorsview.cpp index 9ffebaa..fec1df9 100644 --- a/tools/linguist/linguist/errorsview.cpp +++ b/tools/linguist/linguist/errorsview.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/errorsview.h b/tools/linguist/linguist/errorsview.h index bc6097b..af3417c 100644 --- a/tools/linguist/linguist/errorsview.h +++ b/tools/linguist/linguist/errorsview.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/finddialog.cpp b/tools/linguist/linguist/finddialog.cpp index ae243ea..d78900f 100644 --- a/tools/linguist/linguist/finddialog.cpp +++ b/tools/linguist/linguist/finddialog.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/finddialog.h b/tools/linguist/linguist/finddialog.h index a9fc146..035fcd8 100644 --- a/tools/linguist/linguist/finddialog.h +++ b/tools/linguist/linguist/finddialog.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/finddialog.ui b/tools/linguist/linguist/finddialog.ui index fd1c4a1..2d7f8dc 100644 --- a/tools/linguist/linguist/finddialog.ui +++ b/tools/linguist/linguist/finddialog.ui @@ -3,7 +3,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -36,7 +36,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/tools/linguist/linguist/formpreviewview.cpp b/tools/linguist/linguist/formpreviewview.cpp index 184f01b..6f8df58 100644 --- a/tools/linguist/linguist/formpreviewview.cpp +++ b/tools/linguist/linguist/formpreviewview.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/formpreviewview.h b/tools/linguist/linguist/formpreviewview.h index 5923f24..4eb043f 100644 --- a/tools/linguist/linguist/formpreviewview.h +++ b/tools/linguist/linguist/formpreviewview.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/globals.cpp b/tools/linguist/linguist/globals.cpp new file mode 100644 index 0000000..03062ba --- /dev/null +++ b/tools/linguist/linguist/globals.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Linguist of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "globals.h" + +const QString &settingsPrefix() +{ + static QString prefix = QString(QLatin1String("%1.%2/")) + .arg((QT_VERSION >> 16) & 0xff) + .arg((QT_VERSION >> 8) & 0xff); + return prefix; +} + +QString settingPath(const char *path) +{ + return settingsPrefix() + QLatin1String(path); +} diff --git a/tools/linguist/linguist/globals.h b/tools/linguist/linguist/globals.h new file mode 100644 index 0000000..b4bfb9c --- /dev/null +++ b/tools/linguist/linguist/globals.h @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Linguist of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef GLOBALS_H +#define GLOBALS_H + +#include <QString> + +const QString &settingsPrefix(); +QString settingPath(const char *path); + +#endif // GLOBALS_H diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro index 968293a..890b252 100644 --- a/tools/linguist/linguist/linguist.pro +++ b/tools/linguist/linguist/linguist.pro @@ -26,6 +26,7 @@ SOURCES += \ errorsview.cpp \ finddialog.cpp \ formpreviewview.cpp \ + globals.cpp \ main.cpp \ mainwindow.cpp \ messageeditor.cpp \ @@ -49,6 +50,7 @@ HEADERS += \ errorsview.h \ finddialog.h \ formpreviewview.h \ + globals.h \ mainwindow.h \ messageeditor.h \ messageeditorwidgets.h \ @@ -99,6 +101,7 @@ 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 \ diff --git a/tools/linguist/linguist/main.cpp b/tools/linguist/linguist/main.cpp index a6a0d27..e276ff1 100644 --- a/tools/linguist/linguist/main.cpp +++ b/tools/linguist/linguist/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,12 +34,13 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "mainwindow.h" +#include "globals.h" #include <QtCore/QFile> #include <QtCore/QLibraryInfo> @@ -92,13 +93,11 @@ int main(int argc, char **argv) app.setOrganizationName(QLatin1String("Trolltech")); app.setApplicationName(QLatin1String("Linguist")); - QString keybase(QString::number( (QT_VERSION >> 16) & 0xff ) + - QLatin1Char('.') + QString::number( (QT_VERSION >> 8) & 0xff ) + QLatin1Char('/') ); QSettings config; QWidget tmp; - tmp.restoreGeometry(config.value(keybase + QLatin1String("Geometry/WindowGeometry")).toByteArray()); + tmp.restoreGeometry(config.value(settingPath("Geometry/WindowGeometry")).toByteArray()); QSplashScreen *splash = 0; int screenId = QApplication::desktop()->screenNumber(tmp.geometry().center()); diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index f91175d..18edc05 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -50,6 +50,7 @@ #include "errorsview.h" #include "finddialog.h" #include "formpreviewview.h" +#include "globals.h" #include "messageeditor.h" #include "messagemodel.h" #include "phrasebookbox.h" @@ -96,14 +97,6 @@ QT_BEGIN_NAMESPACE static const int MessageMS = 2500; -const QString &settingsPrefix() -{ - static QString prefix = QString(QLatin1String("%1.%2/")) - .arg((QT_VERSION >> 16) & 0xff) - .arg((QT_VERSION >> 8) & 0xff); - return prefix; -} - enum Ending { End_None, End_FullStop, @@ -121,11 +114,10 @@ static bool hasFormPreview(const QString &fileName) static Ending ending(QString str, QLocale::Language lang) { str = str.simplified(); - int ch = 0; - if (!str.isEmpty()) - ch = str.right(1)[0].unicode(); + if (str.isEmpty()) + return End_None; - switch (ch) { + switch (str.at(str.length() - 1).unicode()) { case 0x002e: // full stop if (str.endsWith(QLatin1String("..."))) return End_Ellipsis; @@ -2494,25 +2486,24 @@ void MainWindow::updateDanger(const MultiDataIndex &index, bool verbose) void MainWindow::readConfig() { - QString keybase = settingsPrefix(); QSettings config; QRect r(pos(), size()); - restoreGeometry(config.value(keybase + QLatin1String("Geometry/WindowGeometry")).toByteArray()); - restoreState(config.value(keybase + QLatin1String("MainWindowState")).toByteArray()); + restoreGeometry(config.value(settingPath("Geometry/WindowGeometry")).toByteArray()); + restoreState(config.value(settingPath("MainWindowState")).toByteArray()); m_ui.actionAccelerators->setChecked( - config.value(keybase + QLatin1String("Validators/Accelerator"), true).toBool()); + config.value(settingPath("Validators/Accelerator"), true).toBool()); m_ui.actionEndingPunctuation->setChecked( - config.value(keybase + QLatin1String("Validators/EndingPunctuation"), true).toBool()); + config.value(settingPath("Validators/EndingPunctuation"), true).toBool()); m_ui.actionPhraseMatches->setChecked( - config.value(keybase + QLatin1String("Validators/PhraseMatch"), true).toBool()); + config.value(settingPath("Validators/PhraseMatch"), true).toBool()); m_ui.actionPlaceMarkerMatches->setChecked( - config.value(keybase + QLatin1String("Validators/PlaceMarkers"), true).toBool()); + config.value(settingPath("Validators/PlaceMarkers"), true).toBool()); recentFiles().readConfig(); - int size = config.beginReadArray(keybase + QLatin1String("OpenedPhraseBooks")); + int size = config.beginReadArray(settingPath("OpenedPhraseBooks")); for (int i = 0; i < size; ++i) { config.setArrayIndex(i); openPhraseBook(config.value(QLatin1String("FileName")).toString()); @@ -2522,23 +2513,22 @@ void MainWindow::readConfig() void MainWindow::writeConfig() { - QString keybase = settingsPrefix(); QSettings config; - config.setValue(keybase + QLatin1String("Geometry/WindowGeometry"), + config.setValue(settingPath("Geometry/WindowGeometry"), saveGeometry()); - config.setValue(keybase + QLatin1String("Validators/Accelerator"), + config.setValue(settingPath("Validators/Accelerator"), m_ui.actionAccelerators->isChecked()); - config.setValue(keybase + QLatin1String("Validators/EndingPunctuation"), + config.setValue(settingPath("Validators/EndingPunctuation"), m_ui.actionEndingPunctuation->isChecked()); - config.setValue(keybase + QLatin1String("Validators/PhraseMatch"), + config.setValue(settingPath("Validators/PhraseMatch"), m_ui.actionPhraseMatches->isChecked()); - config.setValue(keybase + QLatin1String("Validators/PlaceMarkers"), + config.setValue(settingPath("Validators/PlaceMarkers"), m_ui.actionPlaceMarkerMatches->isChecked()); - config.setValue(keybase + QLatin1String("MainWindowState"), + config.setValue(settingPath("MainWindowState"), saveState()); recentFiles().writeConfig(); - config.beginWriteArray(keybase + QLatin1String("OpenedPhraseBooks"), + config.beginWriteArray(settingPath("OpenedPhraseBooks"), m_phraseBooks.size()); for (int i = 0; i < m_phraseBooks.size(); ++i) { config.setArrayIndex(i); diff --git a/tools/linguist/linguist/mainwindow.h b/tools/linguist/linguist/mainwindow.h index 9f6b4d9..167dfe4 100644 --- a/tools/linguist/linguist/mainwindow.h +++ b/tools/linguist/linguist/mainwindow.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -79,8 +79,6 @@ class Statistics; class TranslateDialog; class TranslationSettingsDialog; -const QString &settingsPrefix(); - class MainWindow : public QMainWindow { Q_OBJECT diff --git a/tools/linguist/linguist/mainwindow.ui b/tools/linguist/linguist/mainwindow.ui index 6cc74ac..6d42db0 100644 --- a/tools/linguist/linguist/mainwindow.ui +++ b/tools/linguist/linguist/mainwindow.ui @@ -3,7 +3,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -36,7 +36,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index fb2fb1d..be70d2b 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -91,9 +91,8 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent) m_redoAvail(false), m_cutAvail(false), m_copyAvail(false), - m_sourceSelected(false), - m_pluralSourceSelected(false), - m_currentSelected(false) + m_selectionHolder(0), + m_focusWidget(0) { setObjectName(QLatin1String("scroll area")); @@ -144,12 +143,14 @@ void MessageEditor::setupEditorPage() m_source = new FormWidget(tr("Source text"), false); m_source->setHideWhenEmpty(true); m_source->setWhatsThis(tr("This area shows the source text.")); - connect(m_source, SIGNAL(selectionChanged()), SLOT(selectionChanged())); + connect(m_source, SIGNAL(selectionChanged(QTextEdit *)), + SLOT(selectionChanged(QTextEdit *))); m_pluralSource = new FormWidget(tr("Source text (Plural)"), false); m_pluralSource->setHideWhenEmpty(true); m_pluralSource->setWhatsThis(tr("This area shows the plural form of the source text.")); - connect(m_pluralSource, SIGNAL(selectionChanged()), SLOT(selectionChanged())); + connect(m_pluralSource, SIGNAL(selectionChanged(QTextEdit *)), + SLOT(selectionChanged(QTextEdit *))); m_commentText = new FormWidget(tr("Developer comments"), false); m_commentText->setHideWhenEmpty(true); @@ -216,9 +217,11 @@ void MessageEditor::messageModelAppended() ed.transCommentText->setWhatsThis(tr("Here you can enter comments for your own use." " They have no effect on the translated applications.") ); ed.transCommentText->getEditor()->installEventFilter(this); - connect(ed.transCommentText, SIGNAL(selectionChanged()), SLOT(selectionChanged())); - connect(ed.transCommentText, SIGNAL(textChanged()), SLOT(emitTranslatorCommentChanged())); - connect(ed.transCommentText, SIGNAL(textChanged()), SLOT(resetHoverSelection())); + connect(ed.transCommentText, SIGNAL(selectionChanged(QTextEdit *)), + SLOT(selectionChanged(QTextEdit *))); + connect(ed.transCommentText, SIGNAL(textChanged(QTextEdit *)), + SLOT(emitTranslatorCommentChanged(QTextEdit *))); + connect(ed.transCommentText, SIGNAL(textChanged(QTextEdit *)), SLOT(resetHoverSelection())); connect(ed.transCommentText, SIGNAL(cursorPositionChanged()), SLOT(resetHoverSelection())); QBoxLayout *box = new QVBoxLayout(ed.container); box->setMargin(5); @@ -250,7 +253,7 @@ void MessageEditor::messageModelDeleted(int model) if (m_currentModel >= 0) { if (m_currentNumerus >= m_editors[m_currentModel].transTexts.size()) m_currentNumerus = m_editors[m_currentModel].transTexts.size() - 1; - activeEditor()->getEditor()->setFocus(); + activeEditor()->setFocus(); } else { m_currentNumerus = -1; } @@ -277,9 +280,11 @@ void MessageEditor::addPluralForm(int model, const QString &label, bool writable m_editors[model].transTexts.count(), transEditor); transEditor->getEditor()->installEventFilter(this); - connect(transEditor, SIGNAL(selectionChanged()), SLOT(selectionChanged())); - connect(transEditor, SIGNAL(textChanged()), SLOT(emitTranslationChanged())); - connect(transEditor, SIGNAL(textChanged()), SLOT(resetHoverSelection())); + connect(transEditor, SIGNAL(selectionChanged(QTextEdit *)), + SLOT(selectionChanged(QTextEdit *))); + connect(transEditor, SIGNAL(textChanged(QTextEdit *)), + SLOT(emitTranslationChanged(QTextEdit *))); + connect(transEditor, SIGNAL(textChanged(QTextEdit *)), SLOT(resetHoverSelection())); connect(transEditor, SIGNAL(cursorPositionChanged()), SLOT(resetHoverSelection())); m_editors[model].transTexts << transEditor; @@ -300,69 +305,52 @@ QStringList MessageEditor::translations(int model) const return translations; } -static bool clearFormSelection(FormWidget *fw, FormWidget *te) +static void clearSelection(QTextEdit *t) { - if (fw != te) { - QTextEdit *t = fw->getEditor(); - bool oldBlockState = t->blockSignals(true); - QTextCursor c = t->textCursor(); - c.clearSelection(); - t->setTextCursor(c); - t->blockSignals(oldBlockState); - return true; - } - return false; + bool oldBlockState = t->blockSignals(true); + QTextCursor c = t->textCursor(); + c.clearSelection(); + t->setTextCursor(c); + t->blockSignals(oldBlockState); } -// Clear the selection for all textedits except the sender -void MessageEditor::selectionChanged() +void MessageEditor::selectionChanged(QTextEdit *te) { - if (!resetSelection(qobject_cast<FormWidget *>(sender()))) + if (te != m_selectionHolder) { + if (m_selectionHolder) + clearSelection(m_selectionHolder); + m_selectionHolder = (te->textCursor().hasSelection() ? te : 0); updateCanCutCopy(); + } } -bool MessageEditor::resetHoverSelection(FormWidget *fw) +void MessageEditor::resetHoverSelection() { - if (m_sourceSelected) { - if (clearFormSelection(m_source, fw)) { - updateCanCutCopy(); - return true; - } - } else if (m_pluralSourceSelected) { - if (clearFormSelection(m_pluralSource, fw)) { - updateCanCutCopy(); - return true; - } - } - return false; + if (m_selectionHolder && + (m_selectionHolder == m_source->getEditor() + || m_selectionHolder == m_pluralSource->getEditor())) + resetSelection(); } -bool MessageEditor::resetSelection(FormWidget *fw) +void MessageEditor::resetSelection() { - if (resetHoverSelection(fw)) - return true; - if (m_currentSelected) { - MessageEditorData &ed = m_editors[m_currentModel]; - FormWidget *cfw = (m_currentNumerus < 0) ? ed.transCommentText - : ed.transTexts[m_currentNumerus]; - if (clearFormSelection(cfw, fw)) { - updateCanCutCopy(); - return true; - } + if (m_selectionHolder) { + clearSelection(m_selectionHolder); + m_selectionHolder = 0; + updateCanCutCopy(); } - return false; } void MessageEditor::activeModelAndNumerus(int *model, int *numerus) const { for (int j = 0; j < m_editors.count(); ++j) { for (int i = 0; i < m_editors[j].transTexts.count(); ++i) - if (m_editors[j].transTexts[i]->getEditor()->hasFocus()) { + if (m_focusWidget == m_editors[j].transTexts[i]->getEditor()) { *model = j; *numerus = i; return; } - if (m_editors[j].transCommentText->getEditor()->hasFocus()) { + if (m_focusWidget == m_editors[j].transCommentText->getEditor()) { *model = j; *numerus = -1; return; @@ -372,43 +360,43 @@ void MessageEditor::activeModelAndNumerus(int *model, int *numerus) const *numerus = -1; } -FormWidget *MessageEditor::activeTranslation() const +QTextEdit *MessageEditor::activeTranslation() const { if (m_currentNumerus < 0) return 0; - return m_editors[m_currentModel].transTexts[m_currentNumerus]; + return m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditor(); } -FormWidget *MessageEditor::activeOr1stTranslation() const +QTextEdit *MessageEditor::activeOr1stTranslation() const { if (m_currentNumerus < 0) { for (int i = 0; i < m_editors.size(); ++i) if (m_editors[i].container->isVisible() && !m_editors[i].transTexts[0]->getEditor()->isReadOnly()) - return m_editors[i].transTexts[0]; + return m_editors[i].transTexts[0]->getEditor(); return 0; } - return m_editors[m_currentModel].transTexts[m_currentNumerus]; + return m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditor(); } -FormWidget *MessageEditor::activeTransComment() const +QTextEdit *MessageEditor::activeTransComment() const { if (m_currentModel < 0 || m_currentNumerus >= 0) return 0; - return m_editors[m_currentModel].transCommentText; + return m_editors[m_currentModel].transCommentText->getEditor(); } -FormWidget *MessageEditor::activeEditor() const +QTextEdit *MessageEditor::activeEditor() const { - if (FormWidget *fw = activeTransComment()) - return fw; + if (QTextEdit *te = activeTransComment()) + return te; return activeTranslation(); } -FormWidget *MessageEditor::activeOr1stEditor() const +QTextEdit *MessageEditor::activeOr1stEditor() const { - if (FormWidget *fw = activeTransComment()) - return fw; + if (QTextEdit *te = activeTransComment()) + return te; return activeOr1stTranslation(); } @@ -502,6 +490,8 @@ bool MessageEditor::eventFilter(QObject *o, QEvent *e) m_pluralSource->getEditor()->copy(); return true; } + } else if (ke->key() == Qt::Key_A) { + return true; } } } else if (e->type() == QEvent::KeyPress) { @@ -526,22 +516,39 @@ bool MessageEditor::eventFilter(QObject *o, QEvent *e) return decFont(modelForWidget(o)); } } else if (e->type() == QEvent::FocusIn) { - int model, numerus; - activeModelAndNumerus(&model, &numerus); - if (model != m_currentModel || numerus != m_currentNumerus) { - resetSelection(); - m_currentModel = model; - m_currentNumerus = numerus; - emit activeModelChanged(activeModel()); - updateBeginFromSource(); - updateUndoRedo(); - updateCanPaste(); - } + QWidget *widget = static_cast<QWidget *>(o); + if (widget != m_focusWidget) + trackFocus(widget); } return QScrollArea::eventFilter(o, e); } +void MessageEditor::grabFocus(QWidget *widget) +{ + if (widget != m_focusWidget) { + widget->setFocus(); + trackFocus(widget); + } +} + +void MessageEditor::trackFocus(QWidget *widget) +{ + m_focusWidget = widget; + + int model, numerus; + activeModelAndNumerus(&model, &numerus); + if (model != m_currentModel || numerus != m_currentNumerus) { + resetSelection(); + m_currentModel = model; + m_currentNumerus = numerus; + emit activeModelChanged(activeModel()); + updateBeginFromSource(); + updateUndoRedo(); + updateCanPaste(); + } +} + void MessageEditor::showNothing() { m_source->clearTranslation(); @@ -670,20 +677,20 @@ void MessageEditor::setEditingEnabled(int model, bool enabled) void MessageEditor::undo() { - activeEditor()->getEditor()->document()->undo(); + activeEditor()->document()->undo(); } void MessageEditor::redo() { - activeEditor()->getEditor()->document()->redo(); + activeEditor()->document()->redo(); } void MessageEditor::updateUndoRedo() { bool newUndoAvail = false; bool newRedoAvail = false; - if (FormWidget *fw = activeEditor()) { - QTextDocument *doc = fw->getEditor()->document(); + if (QTextEdit *te = activeEditor()) { + QTextDocument *doc = te->document(); newUndoAvail = doc->isUndoAvailable(); newRedoAvail = doc->isRedoAvailable(); } @@ -701,18 +708,12 @@ void MessageEditor::updateUndoRedo() void MessageEditor::cut() { - QTextEdit *editor = activeEditor()->getEditor(); - if (editor->textCursor().hasSelection()) - editor->cut(); + m_selectionHolder->cut(); } void MessageEditor::copy() { - QTextEdit *te; - if ((te = m_source->getEditor())->textCursor().hasSelection() - || (te = m_pluralSource->getEditor())->textCursor().hasSelection() - || (te = activeEditor()->getEditor())->textCursor().hasSelection()) - te->copy(); + m_selectionHolder->copy(); } void MessageEditor::updateCanCutCopy() @@ -720,19 +721,9 @@ void MessageEditor::updateCanCutCopy() bool newCopyState = false; bool newCutState = false; - m_sourceSelected = m_source->getEditor()->textCursor().hasSelection(); - m_pluralSourceSelected = m_pluralSource->getEditor()->textCursor().hasSelection(); - m_currentSelected = false; - - if (m_sourceSelected || m_pluralSourceSelected) { + if (m_selectionHolder) { newCopyState = true; - } else if (FormWidget *fw = activeEditor()) { - QTextEdit *te = fw->getEditor(); - if (te->textCursor().hasSelection()) { - m_currentSelected = true; - newCopyState = true; - newCutState = !te->isReadOnly(); - } + newCutState = !m_selectionHolder->isReadOnly(); } if (newCopyState != m_copyAvail) { @@ -748,14 +739,14 @@ void MessageEditor::updateCanCutCopy() void MessageEditor::paste() { - activeEditor()->getEditor()->paste(); + activeEditor()->paste(); } void MessageEditor::updateCanPaste() { - FormWidget *fw; + QTextEdit *te; emit pasteAvailable(!m_clipboardEmpty - && (fw = activeEditor()) && !fw->getEditor()->isReadOnly()); + && (te = activeEditor()) && !te->isReadOnly()); } void MessageEditor::clipboardChanged() @@ -770,24 +761,23 @@ void MessageEditor::selectAll() // make sure we don't select the selection of a translator textedit, // if we really want the source text editor to be selected. QTextEdit *te; - FormWidget *fw; if ((te = m_source->getEditor())->underMouse() || (te = m_pluralSource->getEditor())->underMouse() - || ((fw = activeEditor()) && (te = fw->getEditor())->hasFocus())) + || ((te = activeEditor()) && te->hasFocus())) te->selectAll(); } -void MessageEditor::emitTranslationChanged() +void MessageEditor::emitTranslationChanged(QTextEdit *widget) { - static_cast<FormWidget *>(sender())->getEditor()->setFocus(); // DND proofness + grabFocus(widget); // DND proofness updateBeginFromSource(); updateUndoRedo(); emit translationChanged(translations(m_currentModel)); } -void MessageEditor::emitTranslatorCommentChanged() +void MessageEditor::emitTranslatorCommentChanged(QTextEdit *widget) { - static_cast<FormWidget *>(sender())->getEditor()->setFocus(); // DND proofness + grabFocus(widget); // DND proofness updateUndoRedo(); emit translatorCommentChanged(m_editors[m_currentModel].transCommentText->getTranslation()); } @@ -795,11 +785,9 @@ void MessageEditor::emitTranslatorCommentChanged() void MessageEditor::updateBeginFromSource() { bool overwrite = false; - if (FormWidget *transForm = activeTranslation()) { - QTextEdit *activeEditor = transForm->getEditor(); + if (QTextEdit *activeEditor = activeTranslation()) overwrite = !activeEditor->isReadOnly() && activeEditor->toPlainText().trimmed().isEmpty(); - } emit beginFromSourceAvailable(overwrite); } @@ -814,8 +802,8 @@ void MessageEditor::beginFromSource() void MessageEditor::setEditorFocus() { if (!widget()->hasFocus()) - if (FormWidget *transForm = activeOr1stEditor()) - transForm->getEditor()->setFocus(); + if (QTextEdit *activeEditor = activeOr1stEditor()) + activeEditor->setFocus(); } void MessageEditor::setEditorFocus(int model) diff --git a/tools/linguist/linguist/messageeditor.h b/tools/linguist/linguist/messageeditor.h index de563ec..95bcd86 100644 --- a/tools/linguist/linguist/messageeditor.h +++ b/tools/linguist/linguist/messageeditor.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -110,10 +110,10 @@ public slots: void setTranslation(int latestModel, const QString &translation); private slots: - void selectionChanged(); - bool resetHoverSelection(FormWidget *fw = 0); - void emitTranslationChanged(); - void emitTranslatorCommentChanged(); + void selectionChanged(QTextEdit *); + void resetHoverSelection(); + void emitTranslationChanged(QTextEdit *); + void emitTranslatorCommentChanged(QTextEdit *); void updateCanPaste(); void clipboardChanged(); void messageModelAppended(); @@ -125,13 +125,15 @@ private: void setupEditorPage(); void setEditingEnabled(int model, bool enabled); bool focusNextUnfinished(int start); - bool resetSelection(FormWidget *fw = 0); + void resetSelection(); + void grabFocus(QWidget *widget); + void trackFocus(QWidget *widget); void activeModelAndNumerus(int *model, int *numerus) const; - FormWidget *activeTranslation() const; - FormWidget *activeOr1stTranslation() const; - FormWidget *activeTransComment() const; - FormWidget *activeEditor() const; - FormWidget *activeOr1stEditor() const; + QTextEdit *activeTranslation() const; + QTextEdit *activeOr1stTranslation() const; + QTextEdit *activeTransComment() const; + QTextEdit *activeEditor() const; + QTextEdit *activeOr1stEditor() const; MessageEditorData *modelForWidget(const QObject *o); int activeTranslationNumerus() const; QStringList translations(int model) const; @@ -151,12 +153,11 @@ private: bool m_redoAvail; bool m_cutAvail; bool m_copyAvail; - bool m_sourceSelected; - bool m_pluralSourceSelected; - bool m_currentSelected; bool m_clipboardEmpty; + QTextEdit *m_selectionHolder; + QWidget *m_focusWidget; QBoxLayout *m_layout; FormWidget *m_source; FormWidget *m_pluralSource; diff --git a/tools/linguist/linguist/messageeditorwidgets.cpp b/tools/linguist/linguist/messageeditorwidgets.cpp index 7412571..2ac426d 100644 --- a/tools/linguist/linguist/messageeditorwidgets.cpp +++ b/tools/linguist/linguist/messageeditorwidgets.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -145,16 +145,15 @@ void FormatTextEdit::setEditable(bool editable) void FormatTextEdit::setPlainText(const QString &text, bool userAction) { - bool oldBlockState = false; if (!userAction) { // Prevent contentsChanged signal - oldBlockState = document()->blockSignals(true); + bool oldBlockState = blockSignals(true); document()->setUndoRedoEnabled(false); ExpandingTextEdit::setPlainText(text); // highlighter is out of sync because of blocked signals m_highlighter->rehighlight(); document()->setUndoRedoEnabled(true); - document()->blockSignals(oldBlockState); + blockSignals(oldBlockState); } else { ExpandingTextEdit::setPlainText(text); } @@ -178,11 +177,21 @@ FormWidget::FormWidget(const QString &label, bool isEditable, QWidget *parent) setLayout(layout); - connect(m_editor->document(), SIGNAL(contentsChanged()), SIGNAL(textChanged())); - connect(m_editor, SIGNAL(selectionChanged()), SIGNAL(selectionChanged())); + connect(m_editor, SIGNAL(textChanged()), SLOT(slotTextChanged())); + connect(m_editor, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged())); connect(m_editor, SIGNAL(cursorPositionChanged()), SIGNAL(cursorPositionChanged())); } +void FormWidget::slotSelectionChanged() +{ + emit selectionChanged(m_editor); +} + +void FormWidget::slotTextChanged() +{ + emit textChanged(m_editor); +} + void FormWidget::setTranslation(const QString &text, bool userAction) { m_editor->setPlainText(text, userAction); diff --git a/tools/linguist/linguist/messageeditorwidgets.h b/tools/linguist/linguist/messageeditorwidgets.h index b1609e5..bf3dcb0 100644 --- a/tools/linguist/linguist/messageeditorwidgets.h +++ b/tools/linguist/linguist/messageeditorwidgets.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -115,10 +115,14 @@ public: FormatTextEdit *getEditor() { return m_editor; } signals: - void textChanged(); - void selectionChanged(); + void textChanged(QTextEdit *); + void selectionChanged(QTextEdit *); void cursorPositionChanged(); +private slots: + void slotSelectionChanged(); + void slotTextChanged(); + private: QLabel *m_label; FormatTextEdit *m_editor; diff --git a/tools/linguist/linguist/messagehighlighter.cpp b/tools/linguist/linguist/messagehighlighter.cpp index 4965582..64e4ad8 100644 --- a/tools/linguist/linguist/messagehighlighter.cpp +++ b/tools/linguist/linguist/messagehighlighter.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/messagehighlighter.h b/tools/linguist/linguist/messagehighlighter.h index 0fd061b..3372c9d 100644 --- a/tools/linguist/linguist/messagehighlighter.h +++ b/tools/linguist/linguist/messagehighlighter.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp index 7a8063b..6bbf6f3 100644 --- a/tools/linguist/linguist/messagemodel.cpp +++ b/tools/linguist/linguist/messagemodel.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/messagemodel.h b/tools/linguist/linguist/messagemodel.h index 3b75f7a..b951b70 100644 --- a/tools/linguist/linguist/messagemodel.h +++ b/tools/linguist/linguist/messagemodel.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp index b1f9818..463e699 100644 --- a/tools/linguist/linguist/phrase.cpp +++ b/tools/linguist/linguist/phrase.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/phrase.h b/tools/linguist/linguist/phrase.h index 6747c80..f105b53 100644 --- a/tools/linguist/linguist/phrase.h +++ b/tools/linguist/linguist/phrase.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/phrasebookbox.cpp b/tools/linguist/linguist/phrasebookbox.cpp index d3bb937..9a6819b 100644 --- a/tools/linguist/linguist/phrasebookbox.cpp +++ b/tools/linguist/linguist/phrasebookbox.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/phrasebookbox.h b/tools/linguist/linguist/phrasebookbox.h index b34cae5..a2eb1fb 100644 --- a/tools/linguist/linguist/phrasebookbox.h +++ b/tools/linguist/linguist/phrasebookbox.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/phrasebookbox.ui b/tools/linguist/linguist/phrasebookbox.ui index 32c51f6..153a0c4 100644 --- a/tools/linguist/linguist/phrasebookbox.ui +++ b/tools/linguist/linguist/phrasebookbox.ui @@ -3,7 +3,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -36,7 +36,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/tools/linguist/linguist/phrasemodel.cpp b/tools/linguist/linguist/phrasemodel.cpp index 5368978..0c32682 100644 --- a/tools/linguist/linguist/phrasemodel.cpp +++ b/tools/linguist/linguist/phrasemodel.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/phrasemodel.h b/tools/linguist/linguist/phrasemodel.h index 4013a0b..2eecc38 100644 --- a/tools/linguist/linguist/phrasemodel.h +++ b/tools/linguist/linguist/phrasemodel.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/phraseview.cpp b/tools/linguist/linguist/phraseview.cpp index 72c27dc..a959b66 100644 --- a/tools/linguist/linguist/phraseview.cpp +++ b/tools/linguist/linguist/phraseview.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,11 +34,12 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ +#include "globals.h" #include "mainwindow.h" #include "messagemodel.h" #include "phrase.h" @@ -61,7 +62,7 @@ static const int MaxCandidates = 5; static QString phraseViewHeaderKey() { - return settingsPrefix() + QLatin1String("PhraseViewHeader"); + return settingPath("PhraseViewHeader"); } PhraseView::PhraseView(MultiDataModel *model, QList<QHash<QString, QList<Phrase *> > > *phraseDict, QWidget *parent) diff --git a/tools/linguist/linguist/phraseview.h b/tools/linguist/linguist/phraseview.h index 39a5355..3cacfa4 100644 --- a/tools/linguist/linguist/phraseview.h +++ b/tools/linguist/linguist/phraseview.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/printout.cpp b/tools/linguist/linguist/printout.cpp index 924180c..772f55d 100644 --- a/tools/linguist/linguist/printout.cpp +++ b/tools/linguist/linguist/printout.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/printout.h b/tools/linguist/linguist/printout.h index 11ffa63..5ac493d 100644 --- a/tools/linguist/linguist/printout.h +++ b/tools/linguist/linguist/printout.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/recentfiles.cpp b/tools/linguist/linguist/recentfiles.cpp index 6fc72f7..0dc14a4 100644 --- a/tools/linguist/linguist/recentfiles.cpp +++ b/tools/linguist/linguist/recentfiles.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,12 +34,13 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "recentfiles.h" +#include "globals.h" #include <QtCore/QDebug> #include <QtCore/QFileInfo> @@ -49,11 +50,9 @@ QT_BEGIN_NAMESPACE -const QString &settingsPrefix(); - static QString configKey() { - return settingsPrefix() + QLatin1String("RecentlyOpenedFiles"); + return settingPath("RecentlyOpenedFiles"); } diff --git a/tools/linguist/linguist/recentfiles.h b/tools/linguist/linguist/recentfiles.h index d0d25eb..e45c5d7 100644 --- a/tools/linguist/linguist/recentfiles.h +++ b/tools/linguist/linguist/recentfiles.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/sourcecodeview.cpp b/tools/linguist/linguist/sourcecodeview.cpp index c948d77..fbd1f2e 100644 --- a/tools/linguist/linguist/sourcecodeview.cpp +++ b/tools/linguist/linguist/sourcecodeview.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/sourcecodeview.h b/tools/linguist/linguist/sourcecodeview.h index 99a28c5..1e97b3b 100644 --- a/tools/linguist/linguist/sourcecodeview.h +++ b/tools/linguist/linguist/sourcecodeview.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/statistics.cpp b/tools/linguist/linguist/statistics.cpp index 2cd197f..e120337 100644 --- a/tools/linguist/linguist/statistics.cpp +++ b/tools/linguist/linguist/statistics.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/statistics.h b/tools/linguist/linguist/statistics.h index 175f2e1..c7f0c3c 100644 --- a/tools/linguist/linguist/statistics.h +++ b/tools/linguist/linguist/statistics.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/statistics.ui b/tools/linguist/linguist/statistics.ui index b7b2e04..72e5c98 100644 --- a/tools/linguist/linguist/statistics.ui +++ b/tools/linguist/linguist/statistics.ui @@ -3,7 +3,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -36,7 +36,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/tools/linguist/linguist/translatedialog.cpp b/tools/linguist/linguist/translatedialog.cpp index 537c364..edc22da 100644 --- a/tools/linguist/linguist/translatedialog.cpp +++ b/tools/linguist/linguist/translatedialog.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/translatedialog.h b/tools/linguist/linguist/translatedialog.h index fbed2df..8f33fa3 100644 --- a/tools/linguist/linguist/translatedialog.h +++ b/tools/linguist/linguist/translatedialog.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/translatedialog.ui b/tools/linguist/linguist/translatedialog.ui index 89f2138..cb5e751 100644 --- a/tools/linguist/linguist/translatedialog.ui +++ b/tools/linguist/linguist/translatedialog.ui @@ -3,7 +3,7 @@ <comment>********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -36,7 +36,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** *********************************************************************</comment> diff --git a/tools/linguist/linguist/translationsettingsdialog.cpp b/tools/linguist/linguist/translationsettingsdialog.cpp index 32f5c58..2344365 100644 --- a/tools/linguist/linguist/translationsettingsdialog.cpp +++ b/tools/linguist/linguist/translationsettingsdialog.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/linguist/translationsettingsdialog.h b/tools/linguist/linguist/translationsettingsdialog.h index a7ed1b4..18037c5 100644 --- a/tools/linguist/linguist/translationsettingsdialog.h +++ b/tools/linguist/linguist/translationsettingsdialog.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/lrelease/lrelease.1 b/tools/linguist/lrelease/lrelease.1 index 7e01d68..9e77504 100644 --- a/tools/linguist/lrelease/lrelease.1 +++ b/tools/linguist/lrelease/lrelease.1 @@ -1,21 +1,42 @@ .TH lrelease 1 "18 October 2001" "Nokia Corporation and/or its subsidiary(-ies)" \" -*- nroff -*- .\" .\" Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -\" Contact: Qt Software Information (qt-info@nokia.com) -.\" -.\" This file may be distributed and/or modified under the terms of the -.\" GNU General Public License version 2 as published by the Free Software +.\" Contact: Nokia Corporation (qt-info@nokia.com) +.\" +.\" This file is part of the QtGui module of the Qt Toolkit. +.\" +.\" $QT_BEGIN_LICENSE:LGPL$ +.\" No Commercial Usage +.\" This file contains pre-release code and may not be distributed. +.\" You may use this file in accordance with the terms and conditions +.\" contained in the either Technology Preview License Agreement or the +.\" Beta Release License Agreement. +.\" +.\" GNU Lesser General Public License Usage +.\" Alternatively, this file may be used under the terms of the GNU Lesser +.\" General Public License version 2.1 as published by the Free Software +.\" Foundation and appearing in the file LICENSE.LGPL included in the +.\" packaging of this file. Please review the following information to +.\" ensure the GNU Lesser General Public License version 2.1 requirements +.\" will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +.\" +.\" In addition, as a special exception, Nokia gives you certain +.\" additional rights. These rights are described in the Nokia Qt LGPL +.\" Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +.\" package. +.\" +.\" GNU General Public License Usage +.\" Alternatively, this file may be used under the terms of the GNU +.\" General Public License version 3.0 as published by the Free Software .\" Foundation and appearing in the file LICENSE.GPL included in the -.\" packaging of this file. -.\" -.\" This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -.\" WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" See http://qtsoftware.com/gpl/ for GPL licensing information. -.\" -.\" Contact qt-info@nokia.com if any conditions of this licensing are -.\" not clear to you. -.\" +.\" packaging of this file. Please review the following information to +.\" ensure the GNU General Public License version 3.0 requirements will be +.\" met: http://www.gnu.org/copyleft/gpl.html. +.\" +.\" If you are unsure which license is appropriate for your use, please +.\" contact the sales department at http://www.qtsoftware.com/contact. +.\" $QT_END_LICENSE$ +.\" .SH NAME lrelease \- generate Qt message files from Qt Linguist translation files .SH SYNOPSIS diff --git a/tools/linguist/lrelease/lrelease.pro b/tools/linguist/lrelease/lrelease.pro index 03ea0d0..01091b3 100644 --- a/tools/linguist/lrelease/lrelease.pro +++ b/tools/linguist/lrelease/lrelease.pro @@ -15,10 +15,8 @@ build_all:!build_pass { DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII SOURCES += main.cpp -include(../../../src/qt_professional.pri) include(../shared/formats.pri) include(../shared/proparser.pri) -include(../shared/translatortools.pri) target.path=$$[QT_INSTALL_BINS] INSTALLS += target diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp index 7d0452f..86b7866 100644 --- a/tools/linguist/lrelease/main.cpp +++ b/tools/linguist/lrelease/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index b9e8406..eb743c2 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -1153,7 +1153,9 @@ bool CppParser::matchString(QString *s) s->clear(); while (yyTok == Tok_String) { *s += yyString; - yyTok = getToken(); + do { + yyTok = getToken(); + } while (yyTok == Tok_Comment); } return matches; } diff --git a/tools/linguist/lupdate/java.cpp b/tools/linguist/lupdate/java.cpp index 658aebf..8a5d975 100644 --- a/tools/linguist/lupdate/java.cpp +++ b/tools/linguist/lupdate/java.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/lupdate/lupdate.1 b/tools/linguist/lupdate/lupdate.1 index e953273..68958b9 100644 --- a/tools/linguist/lupdate/lupdate.1 +++ b/tools/linguist/lupdate/lupdate.1 @@ -1,20 +1,41 @@ .TH lupdate 1 "18 October 2001" "Nokia Corporation and/or its subsidiary(-ies)" \" -*- nroff -*- .\" .\" Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -.\" Contact: Qt Software Information (qt-info@nokia.com) +.\" Contact: Nokia Corporation (qt-info@nokia.com) .\" -.\" This file may be distributed and/or modified under the terms of the -.\" GNU General Public License version 2 as published by the Free Software -.\" Foundation and appearing in the file LICENSE.GPL included in the -.\" packaging of this file. +.\" This file is part of the QtGui module of the Qt Toolkit. +.\" +.\" $QT_BEGIN_LICENSE:LGPL$ +.\" No Commercial Usage +.\" This file contains pre-release code and may not be distributed. +.\" You may use this file in accordance with the terms and conditions +.\" contained in the either Technology Preview License Agreement or the +.\" Beta Release License Agreement. .\" -.\" This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -.\" WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" GNU Lesser General Public License Usage +.\" Alternatively, this file may be used under the terms of the GNU Lesser +.\" General Public License version 2.1 as published by the Free Software +.\" Foundation and appearing in the file LICENSE.LGPL included in the +.\" packaging of this file. Please review the following information to +.\" ensure the GNU Lesser General Public License version 2.1 requirements +.\" will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. .\" -.\" See http://qtsoftware.com/gpl/ for GPL licensing information. +.\" In addition, as a special exception, Nokia gives you certain +.\" additional rights. These rights are described in the Nokia Qt LGPL +.\" Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +.\" package. +.\" +.\" GNU General Public License Usage +.\" Alternatively, this file may be used under the terms of the GNU +.\" General Public License version 3.0 as published by the Free Software +.\" Foundation and appearing in the file LICENSE.GPL included in the +.\" packaging of this file. Please review the following information to +.\" ensure the GNU General Public License version 3.0 requirements will be +.\" met: http://www.gnu.org/copyleft/gpl.html. .\" -.\" Contact qt-info@nokia.com if any conditions of this licensing are -.\" not clear to you. +.\" If you are unsure which license is appropriate for your use, please +.\" contact the sales department at http://www.qtsoftware.com/contact. +.\" $QT_END_LICENSE$ .\" .SH NAME lupdate \- update Qt Linguist translation files diff --git a/tools/linguist/lupdate/lupdate.h b/tools/linguist/lupdate/lupdate.h index 6db544f..4426caa 100644 --- a/tools/linguist/lupdate/lupdate.h +++ b/tools/linguist/lupdate/lupdate.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index f47844f..1f0112d 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/lupdate/merge.cpp b/tools/linguist/lupdate/merge.cpp index 4849d6e..7925fb2 100644 --- a/tools/linguist/lupdate/merge.cpp +++ b/tools/linguist/lupdate/merge.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/lupdate/qscript.cpp b/tools/linguist/lupdate/qscript.cpp index 64adde6..7a701ae 100644 --- a/tools/linguist/lupdate/qscript.cpp +++ b/tools/linguist/lupdate/qscript.cpp @@ -2,7 +2,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -35,7 +35,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/lupdate/qscript.g b/tools/linguist/lupdate/qscript.g index 563974a..4e36395 100644 --- a/tools/linguist/lupdate/qscript.g +++ b/tools/linguist/lupdate/qscript.g @@ -1,7 +1,7 @@ ---------------------------------------------------------------------------- -- -- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). --- Contact: Qt Software Information (qt-info@nokia.com) +-- Contact: Nokia Corporation (qt-info@nokia.com) -- -- This file is part of the Qt Linguist of the Qt Toolkit. -- @@ -34,7 +34,7 @@ -- met: http://www.gnu.org/copyleft/gpl.html. -- -- If you are unsure which license is appropriate for your use, please --- contact the sales department at qt-sales@nokia.com. +-- contact the sales department at http://www.qtsoftware.com/contact. -- $QT_END_LICENSE$ -- -- This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE diff --git a/tools/linguist/lupdate/ui.cpp b/tools/linguist/lupdate/ui.cpp index 935cac4..fb78b2a 100644 --- a/tools/linguist/lupdate/ui.cpp +++ b/tools/linguist/lupdate/ui.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/phrasebooks/russian.qph b/tools/linguist/phrasebooks/russian.qph index 0b06cea..629c60b 100644 --- a/tools/linguist/phrasebooks/russian.qph +++ b/tools/linguist/phrasebooks/russian.qph @@ -1,4 +1,5 @@ -<!DOCTYPE QPH><QPH language="ru"> +<!DOCTYPE QPH> +<QPH language="ru"> <phrase> <source>About</source> <target>О программе</target> @@ -68,10 +69,6 @@ <target>авто-прокрутка</target> </phrase> <phrase> - <source>Back</source> - <target>Назад</target> -</phrase> -<phrase> <source>boxed edit</source> <target>окно редактирования</target> </phrase> @@ -117,11 +114,11 @@ </phrase> <phrase> <source>Close button</source> - <target>кнопка закрытия</target> + <target>Кнопка закрытия</target> </phrase> <phrase> <source>collapse</source> - <target>крах</target> + <target>свернуть</target> </phrase> <phrase> <source>column heading</source> @@ -257,7 +254,7 @@ </phrase> <phrase> <source>expand</source> - <target>расширять</target> + <target>развернуть</target> </phrase> <phrase> <source>Explore</source> @@ -285,15 +282,15 @@ </phrase> <phrase> <source>Find Next</source> - <target>Продолжить поиск</target> + <target>Найти далее</target> </phrase> <phrase> <source>Find What</source> - <target>Поиск</target> + <target>Искать</target> </phrase> <phrase> <source>folder</source> - <target>каталог</target> + <target>папка</target> </phrase> <phrase> <source>font</source> @@ -385,7 +382,7 @@ </phrase> <phrase> <source>landscape</source> - <target>альбом</target> + <target>альбомная</target> </phrase> <phrase> <source>link</source> @@ -513,7 +510,7 @@ </phrase> <phrase> <source>OK</source> - <target>OK</target> + <target>Готово</target> </phrase> <phrase> <source>OLE</source> @@ -525,7 +522,7 @@ </phrase> <phrase> <source>OLE embedded object</source> - <target>внедренный OLE-объект</target> + <target>внедрённый OLE-объект</target> </phrase> <phrase> <source>OLE linked object</source> @@ -533,7 +530,7 @@ </phrase> <phrase> <source>OLE nondefault drag and drop</source> - <target>предопределенный OLE-механизм</target> + <target>предопределённый OLE-механизм</target> </phrase> <phrase> <source>Open</source> @@ -557,7 +554,7 @@ </phrase> <phrase> <source>Page Setup</source> - <target>шаг установки</target> + <target>Параметры страницы</target> </phrase> <phrase> <source>palette window</source> @@ -625,11 +622,11 @@ </phrase> <phrase> <source>portrait</source> - <target>портрет</target> + <target>книжная</target> </phrase> <phrase> <source>press</source> - <target>нажимать</target> + <target>нажать</target> </phrase> <phrase> <source>primary container</source> @@ -757,7 +754,7 @@ </phrase> <phrase> <source>secondary window</source> - <target>подчиненное окно</target> + <target>подчинённое окно</target> </phrase> <phrase> <source>select</source> @@ -765,7 +762,7 @@ </phrase> <phrase> <source>Select All</source> - <target>Выделить все</target> + <target>Выделить всё</target> </phrase> <phrase> <source>selection</source> @@ -861,11 +858,11 @@ </phrase> <phrase> <source>status bar</source> - <target>статусная строка</target> + <target>строка состояния</target> </phrase> <phrase> <source>Stop</source> - <target>Стоп</target> + <target>Остановить</target> </phrase> <phrase> <source>tab control</source> @@ -897,7 +894,7 @@ </phrase> <phrase> <source>toggle key</source> - <target>кнопка-выключатель</target> + <target>кнопка-переключатель</target> </phrase> <phrase> <source>toolbar</source> @@ -979,4 +976,88 @@ <source>Yes</source> <target>Да</target> </phrase> +<phrase> + <source>No</source> + <target>Нет</target> +</phrase> +<phrase> + <source>Options</source> + <target>Параметры</target> +</phrase> +<phrase> + <source>directory</source> + <target>каталог</target> +</phrase> +<phrase> + <source>Finish</source> + <target>Завершить</target> +</phrase> +<phrase> + <source>Continue</source> + <target>Продолжить</target> +</phrase> +<phrase> + <source>advanced</source> + <target>расширенный</target> +</phrase> +<phrase> + <source>layout</source> + <target>компоновка</target> +</phrase> +<phrase> + <source>layout</source> + <target>компоновщик</target> +</phrase> +<phrase> + <source>plugin</source> + <target>модуль</target> +</phrase> +<phrase> + <source>script</source> + <target>сценарий</target> +</phrase> +<phrase> + <source>spacer</source> + <target>разделитель</target> +</phrase> +<phrase> + <source>tabbar</source> + <target>панель вкладок</target> +</phrase> +<phrase> + <source>whitespace</source> + <target>символ пробела</target> +</phrase> +<phrase> + <source>Forward</source> + <target>Вперёд</target> +</phrase> +<phrase> + <source>Back</source> + <target>Назад</target> +</phrase> +<phrase> + <source>Search wrapped</source> + <target>Поиск с начала</target> +</phrase> +<phrase> + <source>OK</source> + <target>Выбрать</target> +</phrase> +<phrase> + <source>OK</source> + <target>Закрыть</target> +</phrase> +<phrase> + <source>Match case</source> + <target>С учётом регистра</target> +</phrase> +<phrase> + <source>Case Sensitive</source> + <target>Регистрозависимо</target> +</phrase> +<phrase> + <source>Whole words</source> + <target>Слова полностью</target> +</phrase> </QPH> diff --git a/tools/linguist/shared/abstractproitemvisitor.h b/tools/linguist/shared/abstractproitemvisitor.h index b108e7e..0691fdc 100644 --- a/tools/linguist/shared/abstractproitemvisitor.h +++ b/tools/linguist/shared/abstractproitemvisitor.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/numerus.cpp b/tools/linguist/shared/numerus.cpp index 50e85cb..e39cd4d 100644 --- a/tools/linguist/shared/numerus.cpp +++ b/tools/linguist/shared/numerus.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,14 +34,13 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "translator.h" -#include <QtCore/QCoreApplication> #include <QtCore/QByteArray> #include <QtCore/QDebug> #include <QtCore/QDir> @@ -101,7 +100,7 @@ static const uchar arabicRules[] = Q_EQ, 1, Q_NEWRULE, Q_EQ, 2, Q_NEWRULE, Q_MOD_100 | Q_BETWEEN, 3, 10, Q_NEWRULE, - Q_MOD_100 | Q_NEQ, 0 }; + Q_MOD_100 | Q_NOT | Q_BETWEEN, 0, 2 }; static const uchar tagalogRules[] = { Q_LEQ, 1, Q_NEWRULE, Q_MOD_10 | Q_EQ, 4, Q_OR, Q_MOD_10 | Q_EQ, 6, Q_OR, Q_MOD_10 | Q_EQ, 9 }; @@ -127,7 +126,7 @@ static const char * const malteseForms[] = static const char * const welshForms[] = { "Nullar", "Singular", "Dual", "Sexal", "Plural", 0 }; static const char * const arabicForms[] = - { "Nullar", "Singular", "Dual", "Minority Plural", "Plural", "Plural Form for 100, 200, ...", 0 }; + { "Nullar", "Singular", "Dual", "Minority Plural", "Plural", "Plural (100-102, ...)", 0 }; static const char * const tagalogForms[] = { "Singular", "Plural (consonant-ended)", "Plural (vowel-ended)", 0 }; static const char * const catalanForms[] = { "Singular", "Undecal (11)", "Plural", 0 }; @@ -246,6 +245,7 @@ static const QLocale::Language englishStyleLanguages[] = { QLocale::Turkmen, QLocale::Twi, QLocale::Uigur, + QLocale::Urdu, QLocale::Uzbek, QLocale::Volapuk, QLocale::Wolof, diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp index 5842771..cb943be 100644 --- a/tools/linguist/shared/po.cpp +++ b/tools/linguist/shared/po.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp index ae46ad8..ef59543 100644 --- a/tools/linguist/shared/profileevaluator.cpp +++ b/tools/linguist/shared/profileevaluator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/profileevaluator.h b/tools/linguist/shared/profileevaluator.h index ae1422a..69f47f5 100644 --- a/tools/linguist/shared/profileevaluator.h +++ b/tools/linguist/shared/profileevaluator.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/proitems.cpp b/tools/linguist/shared/proitems.cpp index 1895852..471417e 100644 --- a/tools/linguist/shared/proitems.cpp +++ b/tools/linguist/shared/proitems.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/proitems.h b/tools/linguist/shared/proitems.h index befaa88..aad0ba2 100644 --- a/tools/linguist/shared/proitems.h +++ b/tools/linguist/shared/proitems.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -42,7 +42,6 @@ #ifndef PROITEMS_H #define PROITEMS_H -#include <QtCore/QObject> #include <QtCore/QString> #include <QtCore/QList> @@ -207,10 +206,8 @@ private: OperatorKind m_operatorKind; }; -class ProFile : public QObject, public ProBlock +class ProFile : public ProBlock { - Q_OBJECT - public: explicit ProFile(const QString &fileName); ~ProFile(); diff --git a/tools/linguist/shared/proparserutils.h b/tools/linguist/shared/proparserutils.h index 3eab43f..0ffe4d2 100644 --- a/tools/linguist/shared/proparserutils.h +++ b/tools/linguist/shared/proparserutils.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp index 5563ac5..14f4c2c 100644 --- a/tools/linguist/shared/qm.cpp +++ b/tools/linguist/shared/qm.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/qph.cpp b/tools/linguist/shared/qph.cpp index 799bf7d..40f0386 100644 --- a/tools/linguist/shared/qph.cpp +++ b/tools/linguist/shared/qph.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -54,33 +54,19 @@ QT_BEGIN_NAMESPACE class QPHReader : public QXmlStreamReader { public: - QPHReader(QIODevice &dev, ConversionData &cd) - : QXmlStreamReader(&dev), m_cd(cd) + QPHReader(QIODevice &dev) + : QXmlStreamReader(&dev) {} // the "real thing" bool read(Translator &translator); private: - bool elementStarts(const QString &str) const - { - return isStartElement() && name() == str; - } - bool isWhiteSpace() const { return isCharacters() && text().toString().trimmed().isEmpty(); } - // needed to expand <byte ... /> - QString readContents(); - // needed to join <lengthvariant>s - QString readTransContents(); - - void handleError(); - - ConversionData &m_cd; - enum DataField { NoField, SourceField, TargetField, DefinitionField }; DataField m_currentField; QString m_currentSource; @@ -126,10 +112,10 @@ bool QPHReader::read(Translator &translator) return true; } -static bool loadQPH(Translator &translator, QIODevice &dev, ConversionData &cd) +static bool loadQPH(Translator &translator, QIODevice &dev, ConversionData &) { translator.setLocationsType(Translator::NoLocations); - QPHReader reader(dev, cd); + QPHReader reader(dev); return reader.read(translator); } diff --git a/tools/linguist/shared/simtexth.cpp b/tools/linguist/shared/simtexth.cpp index 0556ed6..090af91 100644 --- a/tools/linguist/shared/simtexth.cpp +++ b/tools/linguist/shared/simtexth.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/simtexth.h b/tools/linguist/shared/simtexth.h index e3cad91..8886d02 100644 --- a/tools/linguist/shared/simtexth.h +++ b/tools/linguist/shared/simtexth.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp index c1f242d..305681d 100644 --- a/tools/linguist/shared/translator.cpp +++ b/tools/linguist/shared/translator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -45,7 +45,6 @@ #include <stdio.h> -#include <QtCore/QCoreApplication> #include <QtCore/QDebug> #include <QtCore/QDir> #include <QtCore/QFile> diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h index 5d0549b..2651af0 100644 --- a/tools/linguist/shared/translator.h +++ b/tools/linguist/shared/translator.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/translatormessage.cpp b/tools/linguist/shared/translatormessage.cpp index afe66fe..2d9320a 100644 --- a/tools/linguist/shared/translatormessage.cpp +++ b/tools/linguist/shared/translatormessage.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/translatormessage.h b/tools/linguist/shared/translatormessage.h index 9f847b0..e5ac1a5 100644 --- a/tools/linguist/shared/translatormessage.h +++ b/tools/linguist/shared/translatormessage.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/ts.cpp b/tools/linguist/shared/ts.cpp index 22f2a1b..6c95dbd 100644 --- a/tools/linguist/shared/ts.cpp +++ b/tools/linguist/shared/ts.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/shared/xliff.cpp b/tools/linguist/shared/xliff.cpp index 6acf67a..61e4b9f 100644 --- a/tools/linguist/shared/xliff.cpp +++ b/tools/linguist/shared/xliff.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/linguist/tests/tst_lupdate.cpp b/tools/linguist/tests/tst_lupdate.cpp index 043e653..d3b7a1c 100644 --- a/tools/linguist/tests/tst_lupdate.cpp +++ b/tools/linguist/tests/tst_lupdate.cpp @@ -2,7 +2,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/tools/linguist/tests/tst_simtexth.cpp b/tools/linguist/tests/tst_simtexth.cpp index 81a7f19..d8315ad 100644 --- a/tools/linguist/tests/tst_simtexth.cpp +++ b/tools/linguist/tests/tst_simtexth.cpp @@ -2,7 +2,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |