From 76c0651e8d1821875be65399d82add99e088c2d3 Mon Sep 17 00:00:00 2001 From: Boyuan Yang <073plan@gmail.com> Date: Wed, 25 Oct 2017 17:10:21 +0800 Subject: [PATCH 01/14] README.md: Add instructions about stretch-backports --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b0e3e7e..a4fae92d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ An unofficial client of Evernote for Linux. #### Install from distribution repository -For users of Debian Stretch (Debian 9), Debian unstable and Ubuntu 17.04+, you may install +For users of Debian Stretch (Debian 9) or later, Debian unstable and Ubuntu 17.04+, you may install from the official repositories. This will become the stable release we will encourage users to install. ```bash @@ -20,6 +20,17 @@ sudo apt update sudo apt install nixnote2 ``` +For users of Debian Stretch (Debian 9), you may also install the +**latest upstream stable release** from `stretch-backports` repository: + +```bash +# !! NOTE: You need to enable stretch-backports repository first +# See https://backports.debian.org for instructions +# After you enabled backports repository, type the following commands: +sudo apt update +sudo apt install nixnote2 -t stretch-backports +``` + You may find the package information on [Debian PTS](https://tracker.debian.org/pkg/nixnote2). #### Install via daily PPA From 17a031e576333ff4aa8399d53a2ac05030815909 Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 10:04:24 +0200 Subject: [PATCH 02/14] Identify changed build --- main.cpp | 2 +- nixnote.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index abebae42..3b538221 100644 --- a/main.cpp +++ b/main.cpp @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) // Show Qt version. This is useful for debugging QLOG_DEBUG() << "Program Home: " << global.fileManager.getProgramDirPath(""); QLOG_DEBUG() << "Built on " << __DATE__ << " at " << __TIME__; - QLOG_DEBUG() << "Built with Qt" << QT_VERSION_STR << "running on" << qVersion(); + QLOG_DEBUG() << "RS-Nixnote2 - Self-Built with Qt" << QT_VERSION_STR << "running on" << qVersion(); diff --git a/nixnote.cpp b/nixnote.cpp index 539b52d4..32b943db 100644 --- a/nixnote.cpp +++ b/nixnote.cpp @@ -693,7 +693,7 @@ void NixNote::setupGui() { QList ids = global.accountsManager->idList(); for (int i=0; icurrentId) { - setWindowTitle("NixNote - " +accountNames[i]); + setWindowTitle("RS-NixNote - " +accountNames[i]); i=ids.size(); } } From acf46e3079494a3ed26845bcce07b2755e61fbd0 Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 10:04:45 +0200 Subject: [PATCH 03/14] Experimental trivial cmake lists file --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..ac7232d2 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 2.8.4) +project(rs-nixnote2) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + +add_custom_target(rs-nixnote2 COMMAND make -C ${PROJECT_SOURCE_DIR}) \ No newline at end of file From f0fe70acc897a1bf2ebe5f3cb3846df022ce0caf Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 10:06:38 +0200 Subject: [PATCH 04/14] Fixing "Unknown Tag record key" (log msg improvements) --- sql/tagtable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/tagtable.cpp b/sql/tagtable.cpp index 2d33de96..1a70bcaa 100644 --- a/sql/tagtable.cpp +++ b/sql/tagtable.cpp @@ -392,7 +392,7 @@ bool TagTable::get(Tag &tag, qint32 lid) { tag.name = query.value(1).toString(); break; default: { - QLOG_ERROR() << "Unknown Tag record key: " << key; + QLOG_ERROR() << "Unknown Tag record key: " << key << " lid: " << lid; } } } From bc3e48eefa2ec2573765fa653ce39e4bba6e926c Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 12:21:43 +0200 Subject: [PATCH 05/14] Revert "Identify changed build" This reverts commit 17a031e576333ff4aa8399d53a2ac05030815909. --- main.cpp | 2 +- nixnote.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 3b538221..abebae42 100644 --- a/main.cpp +++ b/main.cpp @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) // Show Qt version. This is useful for debugging QLOG_DEBUG() << "Program Home: " << global.fileManager.getProgramDirPath(""); QLOG_DEBUG() << "Built on " << __DATE__ << " at " << __TIME__; - QLOG_DEBUG() << "RS-Nixnote2 - Self-Built with Qt" << QT_VERSION_STR << "running on" << qVersion(); + QLOG_DEBUG() << "Built with Qt" << QT_VERSION_STR << "running on" << qVersion(); diff --git a/nixnote.cpp b/nixnote.cpp index 32b943db..539b52d4 100644 --- a/nixnote.cpp +++ b/nixnote.cpp @@ -693,7 +693,7 @@ void NixNote::setupGui() { QList ids = global.accountsManager->idList(); for (int i=0; icurrentId) { - setWindowTitle("RS-NixNote - " +accountNames[i]); + setWindowTitle("NixNote - " +accountNames[i]); i=ids.size(); } } From 80631acdada9227b3360faccfdda7731be4ec7de Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 12:22:05 +0200 Subject: [PATCH 06/14] Added make build path to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 73143d4c..203bd46e 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,7 @@ Makefile.Release .settings cmake-build-debug/ +build/ .idea/ #QMake file From 75e824c4825bf5f656da091047db9dd180aeb037 Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 12:23:41 +0200 Subject: [PATCH 07/14] Fixed problem with ERROR "Unknown Tag record key" --- sql/tagtable.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/tagtable.cpp b/sql/tagtable.cpp index 1a70bcaa..188272ea 100644 --- a/sql/tagtable.cpp +++ b/sql/tagtable.cpp @@ -391,6 +391,10 @@ bool TagTable::get(Tag &tag, qint32 lid) { case (TAG_NAME): tag.name = query.value(1).toString(); break; + case (TAG_ISDIRTY): + // currently just ignore the dirty flag + break; + default: { QLOG_ERROR() << "Unknown Tag record key: " << key << " lid: " << lid; } From a3a82d268d697f40d669843820f205202ae2060f Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 12:25:54 +0200 Subject: [PATCH 08/14] Added new compact date format (just yyMMdd without any delimiters) --- CMakeLists.txt | 4 ++-- dialog/preferences/localepreferences.cpp | 3 ++- dialog/preferences/localepreferences.h | 3 ++- global.cpp | 6 +++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac7232d2..aac27bbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8.4) -project(rs-nixnote2) +project(nixnote2) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -add_custom_target(rs-nixnote2 COMMAND make -C ${PROJECT_SOURCE_DIR}) \ No newline at end of file +add_custom_target(nixnote2 COMMAND make debug -C ${PROJECT_SOURCE_DIR}) \ No newline at end of file diff --git a/dialog/preferences/localepreferences.cpp b/dialog/preferences/localepreferences.cpp index 553a9be3..2d2e6bfc 100644 --- a/dialog/preferences/localepreferences.cpp +++ b/dialog/preferences/localepreferences.cpp @@ -67,7 +67,8 @@ LocalePreferences::LocalePreferences(QWidget *parent) : dateFormat->addItem(tr("dd/MM/yyyy - ")+ date.toString("dd/MM/yyyy"), ddMMyyyy); dateFormat->addItem(tr("d/M/yyyy - ")+ date.toString("d/M/yyyy"), dMyyyy); dateFormat->addItem(tr("yyyy-MM-dd - ")+ date.toString("yyyy-MM-dd"), yyyyMMdd); - dateFormat->addItem(tr("yy-MM-dd - ")+ date.toString("yy-MM-dd"), yyyyMMdd); + dateFormat->addItem(tr("yy-MM-dd - ")+ date.toString("yy-MM-dd"), yyMMdd); + dateFormat->addItem(tr("yyMMdd - ")+ date.toString("yyMMdd"), yyMMdd2); timeFormatLabel = new QLabel(tr("Time Format"), this); diff --git a/dialog/preferences/localepreferences.h b/dialog/preferences/localepreferences.h index 8b0c1f75..a3e1311f 100644 --- a/dialog/preferences/localepreferences.h +++ b/dialog/preferences/localepreferences.h @@ -51,7 +51,8 @@ class LocalePreferences : public QWidget ddMMyyyy = 7, dMyyyy = 8, yyyyMMdd = 9, - yyMMdd = 10 + yyMMdd = 10, + yyMMdd2 = 11 }; enum TimeFormat { HHmmss = 1, diff --git a/global.cpp b/global.cpp index d84a60e8..64dfe91c 100644 --- a/global.cpp +++ b/global.cpp @@ -681,7 +681,8 @@ void Global::setupDateTimeFormat() { ddMMyyyy = 7, dMyyyy = 8, yyyyMMdd = 9, - yyMMdd = 10 + yyMMdd = 10, + yyMMdd2 = 11 }; enum TimeFormat { HHmmss = 1, @@ -733,6 +734,9 @@ void Global::setupDateTimeFormat() { case yyMMdd: datefmt = "yy-MM-dd"; break; + case yyMMdd2: + datefmt = "yyMMdd"; + break; } timefmt = "HH:mm:ss"; From cca4861796104e604a21bb422d735aff75df6d75 Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 15:53:49 +0200 Subject: [PATCH 09/14] Added new compact date format; fixes in cmake file --- CMakeLists.txt | 23 +++++++++++++++++++++++ dialog/preferences/localepreferences.cpp | 3 +++ dialog/preferences/localepreferences.h | 2 ++ global.cpp | 1 + 4 files changed, 29 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index aac27bbf..6ef5eacf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,4 +3,27 @@ project(nixnote2) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +find_package(Qt4 REQUIRED QtGui QtXml QtWebkit QtSql QtNetwork QtXml QtScript) +include_directories(cmdtools) +include_directories(communication) +include_directories(dialog) +include_directories(email) +include_directories(exits) +include_directories(filters) +include_directories(gui) +include_directories(html) +include_directories(logger) +include_directories(models) +include_directories(oauth) +include_directories(plugins) +include_directories(qevercloud) +include_directories(reminders) +include_directories(settings) +include_directories(sql) +include_directories(threads) +include_directories(utilities) +include_directories(watcher) +include_directories(xml) + + add_custom_target(nixnote2 COMMAND make debug -C ${PROJECT_SOURCE_DIR}) \ No newline at end of file diff --git a/dialog/preferences/localepreferences.cpp b/dialog/preferences/localepreferences.cpp index 2d2e6bfc..c10a4620 100644 --- a/dialog/preferences/localepreferences.cpp +++ b/dialog/preferences/localepreferences.cpp @@ -161,6 +161,9 @@ void LocalePreferences::saveValues() { case yyMMdd: datefmt = "yy-MM-dd"; break; + case yyMMdd2: + datefmt = "yyMMdd"; + break; } timefmt = "HH:mm:ss"; diff --git a/dialog/preferences/localepreferences.h b/dialog/preferences/localepreferences.h index a3e1311f..fe1d8793 100644 --- a/dialog/preferences/localepreferences.h +++ b/dialog/preferences/localepreferences.h @@ -41,6 +41,8 @@ class LocalePreferences : public QWidget int getDateFormat(); int getTimeFormat(); QString getTranslation(); + + // see also duplicate in Global - global.cpp enum DateFormat { MMddyy = 1, MMddyyyy = 2, diff --git a/global.cpp b/global.cpp index 64dfe91c..e18f7863 100644 --- a/global.cpp +++ b/global.cpp @@ -671,6 +671,7 @@ void Global::setupDateTimeFormat() { QString datefmt; QString timefmt; + // note: see also duplicate in LocalePreferences - dialog/preferences/localepreferences.cpp enum DateFormat { MMddyy = 1, MMddyyyy = 2, From 7c9a0b481be992d9a1e60948b6a054247a5e8238 Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 19:45:30 +0200 Subject: [PATCH 10/14] Minor: fixed two text typos --- translations/nixnote2_ca.ts | 4 ++-- translations/nixnote2_cs_CZ.ts | 4 ++-- translations/nixnote2_da.ts | 4 ++-- translations/nixnote2_de.ts | 4 ++-- translations/nixnote2_es.ts | 4 ++-- translations/nixnote2_fr.ts | 4 ++-- translations/nixnote2_ja.ts | 4 ++-- translations/nixnote2_pl.ts | 4 ++-- translations/nixnote2_pt.ts | 4 ++-- translations/nixnote2_ru.ts | 4 ++-- translations/nixnote2_sk.ts | 4 ++-- translations/nixnote2_zh_CN.ts | 4 ++-- translations/nixnote2_zh_TW.ts | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/translations/nixnote2_ca.ts b/translations/nixnote2_ca.ts index 81133ac0..bd16e025 100644 --- a/translations/nixnote2_ca.ts +++ b/translations/nixnote2_ca.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_cs_CZ.ts b/translations/nixnote2_cs_CZ.ts index c4a885d5..b77079d0 100644 --- a/translations/nixnote2_cs_CZ.ts +++ b/translations/nixnote2_cs_CZ.ts @@ -295,7 +295,7 @@ posílejte prosím na <i>Milos.Kozina@email.cz</i>.</p></sp - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -898,7 +898,7 @@ posílejte prosím na <i>Milos.Kozina@email.cz</i>.</p></sp - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_da.ts b/translations/nixnote2_da.ts index 24b85999..83cab40a 100644 --- a/translations/nixnote2_da.ts +++ b/translations/nixnote2_da.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_de.ts b/translations/nixnote2_de.ts index c44ae818..bd14d2a2 100644 --- a/translations/nixnote2_de.ts +++ b/translations/nixnote2_de.ts @@ -291,7 +291,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* Vorschau der Schriftarten im Editor* @@ -888,7 +888,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_es.ts b/translations/nixnote2_es.ts index fbbfa481..405fd37d 100644 --- a/translations/nixnote2_es.ts +++ b/translations/nixnote2_es.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_fr.ts b/translations/nixnote2_fr.ts index ede8e7f7..10a27258 100644 --- a/translations/nixnote2_fr.ts +++ b/translations/nixnote2_fr.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_ja.ts b/translations/nixnote2_ja.ts index f20344db..7ad7c1de 100644 --- a/translations/nixnote2_ja.ts +++ b/translations/nixnote2_ja.ts @@ -291,7 +291,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -881,7 +881,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_pl.ts b/translations/nixnote2_pl.ts index 85fa8179..ada73d68 100644 --- a/translations/nixnote2_pl.ts +++ b/translations/nixnote2_pl.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_pt.ts b/translations/nixnote2_pt.ts index 219cadc1..745b9541 100644 --- a/translations/nixnote2_pt.ts +++ b/translations/nixnote2_pt.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_ru.ts b/translations/nixnote2_ru.ts index 8f910e43..09c891e1 100644 --- a/translations/nixnote2_ru.ts +++ b/translations/nixnote2_ru.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_sk.ts b/translations/nixnote2_sk.ts index 6fb2fc91..1e88b19e 100644 --- a/translations/nixnote2_sk.ts +++ b/translations/nixnote2_sk.ts @@ -286,7 +286,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -876,7 +876,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). diff --git a/translations/nixnote2_zh_CN.ts b/translations/nixnote2_zh_CN.ts index d5fe5f9a..bef6149f 100644 --- a/translations/nixnote2_zh_CN.ts +++ b/translations/nixnote2_zh_CN.ts @@ -289,7 +289,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* 在编辑对话框内预览字体* @@ -889,7 +889,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). 使用多线程来保存笔记内容(实验性)。 diff --git a/translations/nixnote2_zh_TW.ts b/translations/nixnote2_zh_TW.ts index d13142a0..76cadd37 100644 --- a/translations/nixnote2_zh_TW.ts +++ b/translations/nixnote2_zh_TW.ts @@ -288,7 +288,7 @@ - Preview fonts in editor dialag* + Preview fonts in editor dialog* @@ -886,7 +886,7 @@ - Use multipe theads to save note contents (experimental). + Use multiple threads to save note contents (experimental). From 76ecab3c4ed32cde86060a42e68f2ba0db4a33ae Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 19:46:33 +0200 Subject: [PATCH 11/14] Minor: fixed two text typos --- dialog/preferences/appearancepreferences.cpp | 2 +- dialog/preferences/debugpreferences.cpp | 2 +- gui/ntableview.cpp | 2 +- nixnote.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dialog/preferences/appearancepreferences.cpp b/dialog/preferences/appearancepreferences.cpp index 562a36cc..f6df3ea7 100644 --- a/dialog/preferences/appearancepreferences.cpp +++ b/dialog/preferences/appearancepreferences.cpp @@ -57,7 +57,7 @@ AppearancePreferences::AppearancePreferences(QWidget *parent) : alternateNoteListColors = new QCheckBox(tr("Alternate note list colors*"), this); autosetUserid = new QCheckBox(tr("Set author on new notes."),this); autosetUserid->setChecked(global.autosetUsername()); - fontPreviewInDialog = new QCheckBox(tr("Preview fonts in editor dialag*")); + fontPreviewInDialog = new QCheckBox(tr("Preview fonts in editor dialog*")); fontPreviewInDialog->setChecked(global.previewFontsInDialog()); traySingleClickAction = new QComboBox(); diff --git a/dialog/preferences/debugpreferences.cpp b/dialog/preferences/debugpreferences.cpp index c27d9e3a..2ca1e466 100644 --- a/dialog/preferences/debugpreferences.cpp +++ b/dialog/preferences/debugpreferences.cpp @@ -64,7 +64,7 @@ DebugPreferences::DebugPreferences(QWidget *parent) : mainLayout->addWidget(interceptSigHup,row++,1); #endif - multiThreadSave = new QCheckBox(tr("Use multipe theads to save note contents (experimental).")); + multiThreadSave = new QCheckBox(tr("Use multiple threads to save note contents (experimental).")); multiThreadSave->setChecked(global.getMultiThreadSave()); mainLayout->addWidget(multiThreadSave,row++,1); diff --git a/gui/ntableview.cpp b/gui/ntableview.cpp index 69638388..91507489 100644 --- a/gui/ntableview.cpp +++ b/gui/ntableview.cpp @@ -85,7 +85,7 @@ NTableView::NTableView(QWidget *parent) : setModel(proxy); // Set the date deligates - QLOG_TRACE() << "Setting up table deligates"; + QLOG_TRACE() << "Setting up table delegates"; dateDelegate = new DateDelegate(); blankNumber = new NumberDelegate(NumberDelegate::BlankNumber); kbNumber = new NumberDelegate(NumberDelegate::KBNumber); diff --git a/nixnote.cpp b/nixnote.cpp index 539b52d4..24c63edb 100644 --- a/nixnote.cpp +++ b/nixnote.cpp @@ -135,7 +135,7 @@ NixNote::NixNote(QWidget *parent) : QMainWindow(parent) translation = global.settings->value("translation", QLocale::system().name()).toString(); global.settings->endGroup(); translation = global.fileManager.getTranslateFilePath("nixnote2_" + translation + ".qm"); - QLOG_DEBUG() << "Looking for transaltions: " << translation; + QLOG_DEBUG() << "Looking for translations: " << translation; bool translationResult = nixnoteTranslator->load(translation); QLOG_DEBUG() << "Translation loaded:" << translationResult; QApplication::instance()->installTranslator(nixnoteTranslator); From f3d628358760395e82a0b95f033017ae40eecb69 Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 19:46:46 +0200 Subject: [PATCH 12/14] Added deployment helper script --- deploy-step.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 deploy-step.sh diff --git a/deploy-step.sh b/deploy-step.sh new file mode 100755 index 00000000..3f230700 --- /dev/null +++ b/deploy-step.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# simple script which can be used as deployment step in qt creator +# $1 is expected to be target directory + + +echo Deploying `pwd` to $1 + +# copy folders ... +cp -r \ + help \ + images \ + java \ + qss \ + translations \ + $1 + +# ... and files required for execution +cp \ + changelog.txt \ + license.html \ + shortcuts.txt \ + $1 + +echo Finished deployment.. \ No newline at end of file From 2bd0bd29d98e5abeff0a46895ef01d25126ac6cf Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 19:47:33 +0200 Subject: [PATCH 13/14] Disable display of elipsis in date columns to allow more compact date columns --- gui/datedelegate.cpp | 11 +++++++++++ gui/datedelegate.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/gui/datedelegate.cpp b/gui/datedelegate.cpp index 88665555..036989c3 100644 --- a/gui/datedelegate.cpp +++ b/gui/datedelegate.cpp @@ -43,3 +43,14 @@ QString DateDelegate::displayText(const QVariant &value, const QLocale &locale) return timestamp.toString(global.dateFormat + QString(" ") +global.timeFormat); // return timestamp.toString(Qt::SystemLocaleShortDate); } + + +void DateDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index) const +{ + QStyleOptionViewItem noption = QStyleOptionViewItem(option); + noption.textElideMode = Qt::ElideNone; + + QStyledItemDelegate::paint(painter, noption, index); +} + diff --git a/gui/datedelegate.h b/gui/datedelegate.h index 384cf99b..6655da5e 100644 --- a/gui/datedelegate.h +++ b/gui/datedelegate.h @@ -28,6 +28,9 @@ class DateDelegate : public QStyledItemDelegate public: DateDelegate(QObject * parent = 0); QString displayText(const QVariant &value, const QLocale &locale) const; + + void paint(QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index) const; }; #endif // DATEDELEGATE_H From 9254504209fb582164b9d52e9eaf8df3e244f174 Mon Sep 17 00:00:00 2001 From: Robert Spiegel Date: Tue, 12 Jun 2018 19:55:48 +0200 Subject: [PATCH 14/14] Improved comments --- CMakeLists.txt | 5 +++++ sql/tagtable.cpp | 1 + 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ef5eacf..6157a214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,8 @@ +# trivial cmake project file to enable debugging in clion +# currently it only does a shortcut to make/Makefile, so its quite suboptimal as Clion doesn't yet +# recognise Qt classes :( +# I try improve later + cmake_minimum_required(VERSION 2.8.4) project(nixnote2) diff --git a/sql/tagtable.cpp b/sql/tagtable.cpp index 188272ea..70aa1caf 100644 --- a/sql/tagtable.cpp +++ b/sql/tagtable.cpp @@ -393,6 +393,7 @@ bool TagTable::get(Tag &tag, qint32 lid) { break; case (TAG_ISDIRTY): // currently just ignore the dirty flag + // fixes https://github.com/baumgarr/nixnote2/issues/363 break; default: {