From 72954a795a6f25039b7c85c44b58ac0cf8e838de Mon Sep 17 00:00:00 2001 From: ArsenArsen Date: Sat, 29 Jul 2017 23:58:09 +0200 Subject: [PATCH] Oops --- KShare.pro | 3 +- aboutbox.ui | 4 +-- colorpicker/colorpickerscene.hpp | 2 +- cropeditor/cropscene.hpp | 27 ++++++++-------- cropeditor/settings/brushpenselection.ui | 14 ++++---- hotkeyinputdialog.ui | 2 +- main.cpp | 2 +- mainwindow.ui | 4 +-- recording/encoders/encodersettingsdialog.ui | 36 ++++++++++----------- settingsdialog.ui | 8 ++--- translations.qrc | 6 +++- uploaders/default/clipboarduploader.cpp | 2 +- 12 files changed, 58 insertions(+), 52 deletions(-) diff --git a/KShare.pro b/KShare.pro index ab036c9..1b95264 100644 --- a/KShare.pro +++ b/KShare.pro @@ -173,7 +173,8 @@ DISTFILES += \ install.sh RESOURCES += \ - icon.qrc + icon.qrc \ + translations.qrc QMAKE_CFLAGS_DEBUG += -g diff --git a/aboutbox.ui b/aboutbox.ui index 8c48a8f..b292fd3 100644 --- a/aboutbox.ui +++ b/aboutbox.ui @@ -6,7 +6,7 @@ 0 0 - 531 + 590 231 @@ -24,7 +24,7 @@ - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> diff --git a/colorpicker/colorpickerscene.hpp b/colorpicker/colorpickerscene.hpp index 76aebd8..8c6c060 100644 --- a/colorpicker/colorpickerscene.hpp +++ b/colorpicker/colorpickerscene.hpp @@ -11,7 +11,7 @@ #include class ColorPickerScene : public QGraphicsScene, public QGraphicsView { - Q_OBJECT + Q_DECLARE_TR_FUNCTIONS(ColorPickerScene) public: ColorPickerScene(QPixmap pixmap, QWidget *parentWidget); void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override; diff --git a/cropeditor/cropscene.hpp b/cropeditor/cropscene.hpp index 4d8c9f2..8dce960 100644 --- a/cropeditor/cropscene.hpp +++ b/cropeditor/cropscene.hpp @@ -84,19 +84,20 @@ private: QList gridRectsX; QList gridRectsY; QGraphicsPolygonItem *cursorItem = nullptr; - QGraphicsPixmapItem *hint = new QGraphicsPixmapItem(screenshotutil::renderText( // - "Press F1 to toggle this hint\n" - "\tHold Shift to slow the cursor down\n" - "\tCtrl+Drag a thing to move it around\n" - "\tAlt+Click a drawing to remove it\n" - "\tPress Return/Enter to finish\n" - "\tPress ESC to cancel\n" - "\tUse the menu bar to draw\n" - "\tNOTE: You must select 'Reset pen selection' before closing the editor\n" - "\tIf you do not it will not close.", - 5, - QColor(0, 0, 0, 125), - Qt::white)); + QGraphicsPixmapItem *hint + = new QGraphicsPixmapItem(screenshotutil::renderText(tr( // + "Press F1 to toggle this hint\n" + "\tHold Shift to slow the cursor down\n" + "\tCtrl+Drag a thing to move it around\n" + "\tAlt+Click a drawing to remove it\n" + "\tPress Return/Enter to finish\n" + "\tPress ESC to cancel\n" + "\tUse the menu bar to draw\n" + "\tNOTE: You must select 'Crop' before closing the editor\n" + "\tIf you do not it will not close."), + 5, + QColor(0, 0, 0, 125), + Qt::white)); }; #endif // CROPSCENE_HPP diff --git a/cropeditor/settings/brushpenselection.ui b/cropeditor/settings/brushpenselection.ui index b949d86..3688e28 100644 --- a/cropeditor/settings/brushpenselection.ui +++ b/cropeditor/settings/brushpenselection.ui @@ -14,7 +14,7 @@ Qt::StrongFocus - Dialog + Dialog @@ -110,7 +110,7 @@ - http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum + http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum <a href="http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum">Blur Hints @@ -126,7 +126,7 @@ - px + px 30.000000000000000 @@ -322,20 +322,20 @@ - w: + w: - px + px - h: + h: - px + px diff --git a/hotkeyinputdialog.ui b/hotkeyinputdialog.ui index 859ec05..22a2c36 100644 --- a/hotkeyinputdialog.ui +++ b/hotkeyinputdialog.ui @@ -11,7 +11,7 @@ - Dialog + Dialog diff --git a/main.cpp b/main.cpp index acb0275..db39488 100644 --- a/main.cpp +++ b/main.cpp @@ -61,7 +61,7 @@ void handler(QtMsgType type, const QMessageLogContext &, const QString &msg) { } void loadTranslation(QString locale) { - QFile resource(":/langs/kshare_" + locale + ".qm"); + QFile resource(":/translations/" + locale + ".qm"); if (!resource.exists()) return; resource.open(QIODevice::ReadOnly); diff --git a/mainwindow.ui b/mainwindow.ui index e3c21b1..3328122 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -11,7 +11,7 @@ - KShare + KShare @@ -97,7 +97,7 @@ &Quit - Ctrl+Q + Ctrl+Q diff --git a/recording/encoders/encodersettingsdialog.ui b/recording/encoders/encodersettingsdialog.ui index 7c945c0..f3a70ad 100644 --- a/recording/encoders/encodersettingsdialog.ui +++ b/recording/encoders/encodersettingsdialog.ui @@ -11,7 +11,7 @@ - Dialog + Dialog @@ -62,14 +62,14 @@ - 2 + 0 Qt::LeftToRight - h264/h265 + h264/h265 @@ -82,59 +82,59 @@ - medium + ultrafast - 5 + 0 - ultrafast + ultrafast - superfast + superfast - veryfast + veryfast - faster + faster - fast + fast - medium + medium - slow + slow - slower + slower - veryslow + veryslow - placebo + placebo @@ -160,7 +160,7 @@ - VP9 + VP9 @@ -174,7 +174,7 @@ - GIF + GIF @@ -198,7 +198,7 @@ - kbps + kbps 999999.000000000000000 diff --git a/settingsdialog.ui b/settingsdialog.ui index 0acfd66..bde0889 100644 --- a/settingsdialog.ui +++ b/settingsdialog.ui @@ -40,7 +40,7 @@ A delay before taking a screenshot, in seconds - s + s @@ -84,7 +84,7 @@ %(date format)date and %ext are supported - Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext + Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext @@ -166,7 +166,7 @@ - x: + x: -999999 @@ -179,7 +179,7 @@ - y: + y: -999999 diff --git a/translations.qrc b/translations.qrc index 7646d2b..a0a6b1f 100644 --- a/translations.qrc +++ b/translations.qrc @@ -1 +1,5 @@ - + + + translations/sr_RS.qm + + diff --git a/uploaders/default/clipboarduploader.cpp b/uploaders/default/clipboarduploader.cpp index 5955d29..bbb2cfd 100644 --- a/uploaders/default/clipboarduploader.cpp +++ b/uploaders/default/clipboarduploader.cpp @@ -14,5 +14,5 @@ void ClipboardUploader::doUpload(QByteArray imgData, QString format) { QApplication::clipboard()->setMimeData(data); } else QApplication::clipboard()->setImage(QImage::fromData(imgData, format.toLocal8Bit().constData())); - notifications::notify(tr("KShare"), tr("Copied to clipboard!")); + notifications::notify("KShare", tr("Copied to clipboard!")); }