From 5e2b563d572855d2a080a3708bbd9debd1195fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Tue, 5 Nov 2019 13:00:29 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@625 a8b55f48-bf90-11e4-a774-851b48703e85 --- make_android.bat | 9 ++++++--- make_android.sh | 2 +- make_libs_android.bat | 2 +- make_libs_android_all.bat | 2 +- qad/application/emainwindow.cpp | 20 ++++++++++---------- qad/blockview/drawtools.cpp | 22 +++++++++++----------- qad/graphic/graphic.cpp | 2 +- qad/sql_table/sql_table_widget.cpp | 8 ++++---- qad/utils/qpiconfig.cpp | 27 +++++++++++++++++++++++++-- qad/utils/qpiconfig.h | 2 +- qad/utils/qpievaluator.cpp | 7 ++++++- qad/widgets/qcodeedit.cpp | 2 +- qad/widgets/qvariantedit.cpp | 2 +- qcd_utils/pult/cddirectk.cpp | 4 ++-- qcd_utils/pult/cdgraphics.cpp | 4 ++-- qcd_utils/qcd_model.cpp | 16 ++++++++-------- qglview/glmaterial.h | 24 ++++++++++++------------ qglview/openglwindow.cpp | 1 + 18 files changed, 94 insertions(+), 62 deletions(-) diff --git a/make_android.bat b/make_android.bat index 470a994..a18e195 100644 --- a/make_android.bat +++ b/make_android.bat @@ -18,6 +18,7 @@ if %_usage_%==1 ( ) set QARCH= set AARCH= +set _PLATFORM_=%~1 if %~2==arm ( set QARCH=armv7 set AARCH=armeabi-v7a @@ -25,21 +26,23 @@ if %~2==arm ( if %~2==arm64 ( set QARCH=arm64_v8a set AARCH=arm64-v8a + if /i %_PLATFORM_% LSS 21 set _PLATFORM_=21 ) if %~2==x86 ( set QARCH=x86 set AARCH=x86 ) if %~2==x86_64 ( - echo Qt doesn`t support x86_64, building without Qt + set QARCH=x86_64 set AARCH=x86_64 + if /i %_PLATFORM_% LSS 21 set _PLATFORM_=21 ) set Qt5_ROOT=%ANDROID_QT5_DIR%\android_%QARCH%\lib\cmake set Qt5_DIR=%Qt5_ROOT%\Qt5 if NOT [%QARCH%]==[] ( @echo on - cmake_mgw -Wno-dev -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-%~1 -DANDROID_ABI=%AARCH% -DICU=0 -DQt4=0 -DQt5=1 -DQGLVIEW=0 -DQt5_DIR=%Qt5_ROOT%\Qt5 -DQt5LinguistTools_DIR=%Qt5_ROOT%\Qt5LinguistTools -DQt5UiPlugin_DIR=%Qt5_ROOT%\Qt5UiPlugin -DQt5Widgets_DIR=%Qt5_ROOT%\Qt5Widgets -DQt5Core_DIR=%Qt5_ROOT%\Qt5Core -DQt5Gui_DIR=%Qt5_ROOT%\Qt5Gui -DQt5Sql_DIR=%Qt5_ROOT%\Qt5Sql -DQt5OpenGL_DIR=%Qt5_ROOT%\Qt5OpenGL -DQt5PrintSupport_DIR=%Qt5_ROOT%\Qt5PrintSupport -DQt5Script_DIR=%Qt5_ROOT%\Qt5Script -DQt5Positioning_DIR=%Qt5_ROOT%\Qt5Positioning %~3 %~4 %~5 %~6 + cmake_mgw -Wno-dev -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-%_PLATFORM_% -DANDROID_ABI=%AARCH% -DICU=0 -DQt4=0 -DQt5=1 -DQGLVIEW=0 -DQt5_DIR=%Qt5_ROOT%\Qt5 -DQt5LinguistTools_DIR=%Qt5_ROOT%\Qt5LinguistTools -DQt5UiPlugin_DIR=%Qt5_ROOT%\Qt5UiPlugin -DQt5Widgets_DIR=%Qt5_ROOT%\Qt5Widgets -DQt5Core_DIR=%Qt5_ROOT%\Qt5Core -DQt5Gui_DIR=%Qt5_ROOT%\Qt5Gui -DQt5Sql_DIR=%Qt5_ROOT%\Qt5Sql -DQt5OpenGL_DIR=%Qt5_ROOT%\Qt5OpenGL -DQt5PrintSupport_DIR=%Qt5_ROOT%\Qt5PrintSupport -DQt5Script_DIR=%Qt5_ROOT%\Qt5Script -DQt5Positioning_DIR=%Qt5_ROOT%\Qt5Positioning -DQt5Network_DIR=%Qt5_ROOT%\Qt5Network -DQt5Qml_DIR=%Qt5_ROOT%\Qt5Qml -DQt5Quick_DIR=%Qt5_ROOT%\Qt5Quick -DQt5QuickWidgets_DIR=%Qt5_ROOT%\Qt5QuickWidgets %~3 %~4 %~5 %~6 ) else ( @echo on - cmake_mgw -Wno-dev -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-%~1 -DANDROID_ABI=%AARCH% -DICU=0 -DQt4=0 -DQt5=0 -DQGLVIEW=0 %~3 %~4 %~5 %~6 + cmake_mgw -Wno-dev -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-%_PLATFORM_% -DANDROID_ABI=%AARCH% -DICU=0 -DQt4=0 -DQt5=0 -DQGLVIEW=0 %~3 %~4 %~5 %~6 ) diff --git a/make_android.sh b/make_android.sh index e4e0fef..b6f8cc3 100755 --- a/make_android.sh +++ b/make_android.sh @@ -8,4 +8,4 @@ export Qt5Gui_DIR=${Qt5_ROOT}/Qt5Gui export Qt5Sql_DIR=${Qt5_ROOT}/Qt5Sql export Qt5OpenGL_DIR=${Qt5_ROOT}/Qt5OpenGL export Qt5Designer_DIR=${Qt5_ROOT}/Qt5Designer -rm -rf * && cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=/mnt/data/Distrib/Android/android-sdk-linux/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-24 -DICU=0 -DQt4=0 -DQt5=1 -DQt5_DIR=${Qt5_ROOT}/Qt5 -DQt5LinguistTools_DIR=${Qt5_ROOT}/Qt5LinguistTools -DQt5UiPlugin_DIR=${Qt5_ROOT}/Qt5UiPlugin -DQt5Widgets_DIR=${Qt5_ROOT}/Qt5Widgets -DQt5Core_DIR=${Qt5_ROOT}/Qt5Core -DQt5Gui_DIR=${Qt5_ROOT}/Qt5Gui -DQt5Sql_DIR=${Qt5_ROOT}/Qt5Sql -DQt5OpenGL_DIR=${Qt5_ROOT}/Qt5OpenGL ../libs +rm -rf * && cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=/mnt/data/Distrib/Android/android-sdk-linux/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-24 -DICU=0 -DQt4=0 -DQt5=1 -DQt5_DIR=${Qt5_ROOT}/Qt5 -DQt5LinguistTools_DIR=${Qt5_ROOT}/Qt5LinguistTools -DQt5UiPlugin_DIR=${Qt5_ROOT}/Qt5UiPlugin -DQt5Widgets_DIR=${Qt5_ROOT}/Qt5Widgets -DQt5Core_DIR=${Qt5_ROOT}/Qt5Core -DQt5Gui_DIR=${Qt5_ROOT}/Qt5Gui -DQt5Sql_DIR=${Qt5_ROOT}/Qt5Sql -DQt5OpenGL_DIR=${Qt5_ROOT}/Qt5OpenGL -DQt5Positioning_DIR=${Qt5_ROOT}/Qt5Positioning -DQt5Network_DIR=${Qt5_ROOT}/Qt5Network -DQt5Qml_DIR=${Qt5_ROOT}/Qt5Qml -DQt5Quick_DIR=${Qt5_ROOT}/Qt5Quick -DQt5QuickWidgets_DIR=${Qt5_ROOT}/Qt5QuickWidgets ../libs diff --git a/make_libs_android.bat b/make_libs_android.bat index 20513cc..ff74234 100644 --- a/make_libs_android.bat +++ b/make_libs_android.bat @@ -1,6 +1,6 @@ @echo off mkdir ..\libs_build_android_%~1 cd ..\libs_build_android_%~1 -call ..\libs\make_android 19 %~1 ..\libs "-DUTILS=0" +call ..\libs\make_android 21 %~1 ..\libs "-DUTILS=0 -DDEBUG=0 -DCMAKE_BUILD_TYPE=Release" call make install -j4 cd ..\libs diff --git a/make_libs_android_all.bat b/make_libs_android_all.bat index 54eb321..b15632e 100644 --- a/make_libs_android_all.bat +++ b/make_libs_android_all.bat @@ -1,4 +1,4 @@ @echo off -for %%a in (x86,arm) do ( +for %%a in (x86,x86_64,arm,arm64) do ( call .\make_libs_android %%a ) diff --git a/qad/application/emainwindow.cpp b/qad/application/emainwindow.cpp index 3cd054b..13968a8 100644 --- a/qad/application/emainwindow.cpp +++ b/qad/application/emainwindow.cpp @@ -12,10 +12,10 @@ action_show_all_docks(this), action_hide_all_docks(this), first_show(true) { action_clear_recent = new QAction(QIcon(":/icons/edit-clear.png"), tr("Clear recent list"), this); connect(action_clear_recent, SIGNAL(triggered()), this, SLOT(clearRecent())); qRegisterMetaType("Qt::DockWidgetArea"); - action_show_all_tools.setText(trUtf8("Show all")); - action_show_all_docks.setText(trUtf8("Show all")); - action_hide_all_tools.setText(trUtf8("Hide all")); - action_hide_all_docks.setText(trUtf8("Hide all")); + action_show_all_tools.setText(tr("Show all")); + action_show_all_docks.setText(tr("Show all")); + action_hide_all_tools.setText(tr("Hide all")); + action_hide_all_docks.setText(tr("Hide all")); action_show_all_tools.setIcon(QIcon(":/icons/layer-visible-on.png")); action_show_all_docks.setIcon(QIcon(":/icons/layer-visible-on.png")); action_hide_all_tools.setIcon(QIcon(":/icons/layer-visible-off.png")); @@ -133,7 +133,7 @@ QMenu * EMainWindow::createPopupMenu() { lbl = new QLabel(); lbl->setFrameShape(QFrame::StyledPanel); lbl->setFrameShadow(QFrame::Sunken); - lbl->setText(trUtf8("Toolbars")); + lbl->setText(tr("Toolbars")); lbl->setFont(f); lbl->setAlignment(Qt::AlignCenter); wa->setDefaultWidget(lbl); @@ -158,7 +158,7 @@ QMenu * EMainWindow::createPopupMenu() { lbl = new QLabel(); lbl->setFrameShape(QFrame::StyledPanel); lbl->setFrameShadow(QFrame::Sunken); - lbl->setText(trUtf8("Docks")); + lbl->setText(tr("Docks")); lbl->setFont(f); lbl->setAlignment(Qt::AlignCenter); wa->setDefaultWidget(lbl); @@ -376,7 +376,7 @@ void EMainWindow::newFile() { void EMainWindow::openFile() { if (!checkSave()) return; - QString ret = QFileDialog::getOpenFileName(this, trUtf8("Select file to open"), file_name, loadFilter()); + QString ret = QFileDialog::getOpenFileName(this, tr("Select file to open"), file_name, loadFilter()); if (ret.isEmpty()) return; if (load(ret)) addToRecent(ret); @@ -385,7 +385,7 @@ void EMainWindow::openFile() { void EMainWindow::openFiles() { if (!checkSave()) return; - QStringList ret = QFileDialog::getOpenFileNames(this, trUtf8("Select files to open"), file_name, loadFilter()); + QStringList ret = QFileDialog::getOpenFileNames(this, tr("Select files to open"), file_name, loadFilter()); foreach (QString s, ret) { if (load(s)) addToRecent(s); @@ -395,7 +395,7 @@ void EMainWindow::openFiles() { bool EMainWindow::saveFile(bool ask) { if (ask) { - int ret = QMessageBox::question(this, windowTitle(), trUtf8("Save changes%1?").arg(!file_name.isEmpty() ? (trUtf8(" in") + " \"" + file_name + "\"") : ""), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save); + int ret = QMessageBox::question(this, windowTitle(), tr("Save changes%1?").arg(!file_name.isEmpty() ? (tr(" in") + " \"" + file_name + "\"") : ""), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save); if (ret == QMessageBox::Cancel) return false; if (ret == QMessageBox::Save) return saveFile(); return true; @@ -408,7 +408,7 @@ bool EMainWindow::saveFile(bool ask) { bool EMainWindow::saveAsFile() { - QString ret = QFileDialog::getSaveFileName(this, trUtf8("Select file to save"), file_name, saveFilter()); + QString ret = QFileDialog::getSaveFileName(this, tr("Select file to save"), file_name, saveFilter()); if (ret.isEmpty()) return false; if (save(ret)) addToRecent(ret); diff --git a/qad/blockview/drawtools.cpp b/qad/blockview/drawtools.cpp index 1dd1168..391c2d0 100644 --- a/qad/blockview/drawtools.cpp +++ b/qad/blockview/drawtools.cpp @@ -264,22 +264,22 @@ actions_Z_up(this), actions_Z_top(this), actions_Z_down(this), actions_Z_bottom( new_item = cur_item = 0; view_ = 0; resize_enabled = true; - text_dlg.setWindowTitle(trUtf8("Edit text")); + text_dlg.setWindowTitle(tr("Edit text")); text_dlg.setLayout(new QBoxLayout(QBoxLayout::TopToBottom)); QDialogButtonBox * bbox = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel); connect(bbox, SIGNAL(accepted()), &text_dlg, SLOT(accept())); connect(bbox, SIGNAL(rejected()), &text_dlg, SLOT(reject())); text_dlg.layout()->addWidget(&text_edit); text_dlg.layout()->addWidget(bbox); - actions_Z_up.setText(trUtf8("Bring\nforward")); actions_Z_up.setIcon(QIcon(":/icons/z-up.png")); actions_Z_up.setEnabled(false); - actions_Z_top.setText(trUtf8("Bring\nto front")); actions_Z_top.setIcon(QIcon(":/icons/z-top.png")); actions_Z_top.setEnabled(false); - actions_Z_down.setText(trUtf8("Send\nbackward")); actions_Z_down.setIcon(QIcon(":/icons/z-down.png")); actions_Z_down.setEnabled(false); - actions_Z_bottom.setText(trUtf8("Send\nto back")); actions_Z_bottom.setIcon(QIcon(":/icons/z-bottom.png")); actions_Z_bottom.setEnabled(false); - actions_add << newAction(trUtf8("Draw\nRectangle"), QIcon(":/icons/draw-rectangle.png"), 1) - << newAction(trUtf8("Draw\nEllipse"), QIcon(":/icons/draw-ellipse.png"), 2) - << newAction(trUtf8("Draw\nLine"), QIcon(":/icons/draw-line.png"), 4) - << newAction(trUtf8("Draw\nText"), QIcon(":/icons/draw-text.png"), 0) - << newAction(trUtf8("Draw\nImage"), QIcon(":/icons/view-preview.png"), 3); + actions_Z_up.setText(tr("Bring\nforward")); actions_Z_up.setIcon(QIcon(":/icons/z-up.png")); actions_Z_up.setEnabled(false); + actions_Z_top.setText(tr("Bring\nto front")); actions_Z_top.setIcon(QIcon(":/icons/z-top.png")); actions_Z_top.setEnabled(false); + actions_Z_down.setText(tr("Send\nbackward")); actions_Z_down.setIcon(QIcon(":/icons/z-down.png")); actions_Z_down.setEnabled(false); + actions_Z_bottom.setText(tr("Send\nto back")); actions_Z_bottom.setIcon(QIcon(":/icons/z-bottom.png")); actions_Z_bottom.setEnabled(false); + actions_add << newAction(tr("Draw\nRectangle"), QIcon(":/icons/draw-rectangle.png"), 1) + << newAction(tr("Draw\nEllipse"), QIcon(":/icons/draw-ellipse.png"), 2) + << newAction(tr("Draw\nLine"), QIcon(":/icons/draw-line.png"), 4) + << newAction(tr("Draw\nText"), QIcon(":/icons/draw-text.png"), 0) + << newAction(tr("Draw\nImage"), QIcon(":/icons/view-preview.png"), 3); buttons_align << ui->buttonAlignTL << ui->buttonAlignTC << ui->buttonAlignTR << ui->buttonAlignCL << ui->buttonAlignCC << ui->buttonAlignCR << ui->buttonAlignBL << ui->buttonAlignBC << ui->buttonAlignBR; @@ -807,7 +807,7 @@ void DrawTools::buttonImage_clicked() { f += "*."; f += i; } - QString ret = QFileDialog::getOpenFileName(0, trUtf8("Select image"), prev_dir, QString("Images(%1)").arg(f)); + QString ret = QFileDialog::getOpenFileName(0, tr("Select image"), prev_dir, QString("Images(%1)").arg(f)); if (ret.isEmpty()) return; QImage im(ret); if (im.isNull()) return; diff --git a/qad/graphic/graphic.cpp b/qad/graphic/graphic.cpp index 02f7e12..3ed5b2d 100644 --- a/qad/graphic/graphic.cpp +++ b/qad/graphic/graphic.cpp @@ -1633,7 +1633,7 @@ void Graphic::updateLegend(bool es) { graphics[i].pb->setProperty("graphic_num", i); graphics[i].pb->setContextMenuPolicy(Qt::ActionsContextMenu); //qDebug() << graphics[i].pb->actions(); - QAction * act = new QAction(trUtf8("Check all"), 0); + QAction * act = new QAction(tr("Check all"), 0); act->setCheckable(true); act->setChecked(true); graphics[i].pb->addAction(act); diff --git a/qad/sql_table/sql_table_widget.cpp b/qad/sql_table/sql_table_widget.cpp index 8caf1be..faede53 100644 --- a/qad/sql_table/sql_table_widget.cpp +++ b/qad/sql_table/sql_table_widget.cpp @@ -231,7 +231,7 @@ SQLFilterEdit::SQLFilterEdit(const ColumnProperties & prop, const QString & conn combo = new QComboBox(); combo->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); QStringList sl; - sl << " " << "=" << trUtf8("≈") << trUtf8("≠") << ">" << trUtf8("≥") << "<" << trUtf8("≤"); + sl << " " << "=" << QString::fromUtf8("≈") << QString::fromUtf8("≠") << ">" << QString::fromUtf8("≥") << "<" << QString::fromUtf8("≤"); combo->addItems(sl); combo->setCurrentIndex(0); connect(line, SIGNAL(valueChanged(QVariant)), this, SIGNAL(filterChanged())); @@ -353,9 +353,9 @@ SQLTableWidget::SQLTableWidget(QWidget * parent): QWidget(parent), filters_group connect(ui->view->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrolled(int))); - //act_add.setText(trUtf8("Add ...")); - //act_del.setText(trUtf8("Remove selected")); - action_del = new QAction(QIcon(":/icons/edit-delete.png"), trUtf8("Remove selected"), this); + //act_add.setText(tr("Add ...")); + //act_del.setText(tr("Remove selected")); + action_del = new QAction(QIcon(":/icons/edit-delete.png"), tr("Remove selected"), this); connect(action_del, SIGNAL(triggered(bool)), this, SLOT(del_triggered())); popup_menu.addAction(action_del); ui->actionFilter_AND->setChecked(true); diff --git a/qad/utils/qpiconfig.cpp b/qad/utils/qpiconfig.cpp index 1c655c2..52c474f 100644 --- a/qad/utils/qpiconfig.cpp +++ b/qad/utils/qpiconfig.cpp @@ -410,7 +410,12 @@ QPIConfig::Entry & QPIConfig::addEntry(const QString & name, const QString & val tn += delim + i; } QPIConfig::Branch ch = entry->_children; - qSort(ch.begin(), ch.end(), QPIConfig::Entry::compare); +#if QT_VERSION < QT_VERSION_CHECK(5,13,0) + qSort +#else + std::sort +#endif + (ch.begin(), ch.end(), QPIConfig::Entry::compare); te = (entry->isLeaf() ? 0 : ch.back()); ce = new Entry(); ce->delim = delim; @@ -423,7 +428,12 @@ QPIConfig::Entry & QPIConfig::addEntry(const QString & name, const QString & val if (toRoot) ce->_line = other.size(); else { ch = entry->_parent->_children; - qSort(ch.begin(), ch.end(), QPIConfig::Entry::compare); +#if QT_VERSION < QT_VERSION_CHECK(5,13,0) + qSort +#else + std::sort +#endif + (ch.begin(), ch.end(), QPIConfig::Entry::compare); ce->_line = ch.back()->_line + 1; } } else { @@ -473,6 +483,19 @@ void QPIConfig::setValue(const QString & name, const QString & value, const QStr } +QPIConfig::Branch QPIConfig::allLeaves() { + Branch b; + allLeaves(b, &root); +#if QT_VERSION < QT_VERSION_CHECK(5,13,0) + qSort +#else + std::sort +#endif + (b.begin(), b.end(), Entry::compare); + return b; +} + + int QPIConfig::entryIndex(const QString & name) { QStringList tree = name.split(delim); Entry * ce = &root; diff --git a/qad/utils/qpiconfig.h b/qad/utils/qpiconfig.h index f15a94d..fe574ef 100644 --- a/qad/utils/qpiconfig.h +++ b/qad/utils/qpiconfig.h @@ -223,7 +223,7 @@ public: bool isEntryExists(const QString & name) const {return entryExists(&root, name);} Branch allTree() {Branch b; foreach (Entry * i, root._children) b << i; return b;} - Branch allLeaves() {Branch b; allLeaves(b, &root); qSort(b.begin(), b.end(), Entry::compare); return b;} + Branch allLeaves(); int entryIndex(const QString & name); QString getName(uint number) {return entryByIndex(number)._name;} diff --git a/qad/utils/qpievaluator.cpp b/qad/utils/qpievaluator.cpp index d03fd77..8357c21 100644 --- a/qad/utils/qpievaluator.cpp +++ b/qad/utils/qpievaluator.cpp @@ -64,7 +64,12 @@ void QPIEvaluatorContent::clearCustomVariables() { void QPIEvaluatorContent::sortVariables() { var_index.clear(); - qSort(variables.begin(), variables.end()); +#if QT_VERSION < QT_VERSION_CHECK(5,13,0) + qSort +#else + std::sort +#endif + (variables.begin(), variables.end()); for (int i = 0; i < variables.size(); i++) var_index[variables[i].name] = i; /* diff --git a/qad/widgets/qcodeedit.cpp b/qad/widgets/qcodeedit.cpp index 4ee766f..d9ae230 100644 --- a/qad/widgets/qcodeedit.cpp +++ b/qad/widgets/qcodeedit.cpp @@ -50,7 +50,7 @@ QCodeEdit::QCodeEdit(QWidget * parent): QWidget(parent) { widget_help->layout()->addWidget(lbl_help[i]); } lbl_help[1]->setIcon(QIcon(":/icons/f1.png")); - lbl_help[1]->setText(trUtf8("Press F1 for details")); + lbl_help[1]->setText(tr("Press F1 for details")); completer = new QTreeWidget(); completer->setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); completer->setFocusPolicy(Qt::NoFocus); diff --git a/qad/widgets/qvariantedit.cpp b/qad/widgets/qvariantedit.cpp index 64131e4..42eebec 100644 --- a/qad/widgets/qvariantedit.cpp +++ b/qad/widgets/qvariantedit.cpp @@ -183,7 +183,7 @@ void QVariantEdit::_recreate(const QVariant & new_value) { if (!new_value.isValid()) { if (_cur_edit != _empty) _delete(); if (_empty == 0) { - _empty = new QLabel(trUtf8("Invalid value"), this); + _empty = new QLabel(tr("Invalid value"), this); _empty->setAlignment(Qt::AlignCenter); _cur_edit = _empty; _resize(); diff --git a/qcd_utils/pult/cddirectk.cpp b/qcd_utils/pult/cddirectk.cpp index 7ab3be6..f2dc425 100644 --- a/qcd_utils/pult/cddirectk.cpp +++ b/qcd_utils/pult/cddirectk.cpp @@ -29,7 +29,7 @@ KDockWidget::KDockWidget(QString title, QMainWindow * p): QDockWidget(title, p) connect(a, SIGNAL(triggered(bool)), this, SIGNAL(removeRequest())); dactions << a; menu_k = new QMenu(this); - menu_k->setTitle(trUtf8("Remove K")); + menu_k->setTitle(tr("Remove K")); lay = new QFormLayout(); lay->setContentsMargins(0, qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin), 0, 0); lay->setLabelAlignment(Qt::AlignRight | Qt::AlignVCenter); @@ -199,7 +199,7 @@ void KDockWidget::removeRow(int r) { void KDockWidget::rename() { - QString nn = QInputDialog::getText(this, trUtf8("Rename area"), trUtf8("New area name:"), + QString nn = QInputDialog::getText(this, tr("Rename area"), tr("New area name:"), QLineEdit::Normal, windowTitle()); if (nn.isEmpty()) return; setWindowTitle(nn); diff --git a/qcd_utils/pult/cdgraphics.cpp b/qcd_utils/pult/cdgraphics.cpp index ea08f4c..04841f7 100644 --- a/qcd_utils/pult/cdgraphics.cpp +++ b/qcd_utils/pult/cdgraphics.cpp @@ -45,7 +45,7 @@ GDockWidget::GDockWidget(QString title, QMainWindow * p): QDockWidget(title, p) connect(a, SIGNAL(triggered(bool)), this, SIGNAL(removeRequest())); dactions << a; menu_x = new QMenu(this); - menu_x->setTitle(trUtf8("Remove X")); + menu_x->setTitle(tr("Remove X")); graphic = new CDGraphicWidget(); graphic->graphic()->viewport()->setAcceptDrops(true); graphic->graphic()->viewport()->installEventFilter(this); @@ -187,7 +187,7 @@ CDGraphicWidget * GDockWidget::viewportGraphic(QObject * o) const { void GDockWidget::rename() { - QString nn = QInputDialog::getText(this, trUtf8("Rename area"), trUtf8("New area name:"), + QString nn = QInputDialog::getText(this, tr("Rename area"), tr("New area name:"), QLineEdit::Normal, windowTitle()); if (nn.isEmpty()) return; setWindowTitle(nn); diff --git a/qcd_utils/qcd_model.cpp b/qcd_utils/qcd_model.cpp index f9264d1..48607f0 100644 --- a/qcd_utils/qcd_model.cpp +++ b/qcd_utils/qcd_model.cpp @@ -265,14 +265,14 @@ QVariant CDItemModel::data(const QModelIndex &index, int role) const { QVariant CDItemModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch (section) { - case cID: return trUtf8("Index"); - case cName_Cmd: return interface->cdType() == CDType::cdC ? trUtf8("Command") : trUtf8("Name"); - case cType: return trUtf8("Type"); - case cXMode: return trUtf8("Mode"); - case cXAvg: return trUtf8("Averaging"); - case cExpression: return trUtf8("Expression"); - case cValue: return trUtf8("Value"); - case cComment: return trUtf8("Comment"); + case cID: return tr("Index"); + case cName_Cmd: return interface->cdType() == CDType::cdC ? tr("Command") : tr("Name"); + case cType: return tr("Type"); + case cXMode: return tr("Mode"); + case cXAvg: return tr("Averaging"); + case cExpression: return tr("Expression"); + case cValue: return tr("Value"); + case cComment: return tr("Comment"); } } return QVariant(); diff --git a/qglview/glmaterial.h b/qglview/glmaterial.h index 8288346..93a6d4a 100644 --- a/qglview/glmaterial.h +++ b/qglview/glmaterial.h @@ -1,19 +1,19 @@ /* - QGLView - Copyright (C) 2019 Ivan Pelipenko peri4ko@yandex.ru + QGLView + Copyright (C) 2019 Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ #ifndef GLMATERIAL_H diff --git a/qglview/openglwindow.cpp b/qglview/openglwindow.cpp index 8dc5d39..fea547c 100644 --- a/qglview/openglwindow.cpp +++ b/qglview/openglwindow.cpp @@ -3,6 +3,7 @@ #include #include #include +#include OpenGLWindow::OpenGLWindow(QWindow *parent)