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
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..6157a214
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 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)
+
+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/README.md b/README.md
index bcd7e4bf..f4a8efee 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
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
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/dialog/preferences/localepreferences.cpp b/dialog/preferences/localepreferences.cpp
index 553a9be3..c10a4620 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);
@@ -160,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 8b0c1f75..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,
@@ -51,7 +53,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..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,
@@ -681,7 +682,8 @@ void Global::setupDateTimeFormat() {
ddMMyyyy = 7,
dMyyyy = 8,
yyyyMMdd = 9,
- yyMMdd = 10
+ yyMMdd = 10,
+ yyMMdd2 = 11
};
enum TimeFormat {
HHmmss = 1,
@@ -733,6 +735,9 @@ void Global::setupDateTimeFormat() {
case yyMMdd:
datefmt = "yy-MM-dd";
break;
+ case yyMMdd2:
+ datefmt = "yyMMdd";
+ break;
}
timefmt = "HH:mm:ss";
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
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);
diff --git a/sql/tagtable.cpp b/sql/tagtable.cpp
index 2d33de96..70aa1caf 100644
--- a/sql/tagtable.cpp
+++ b/sql/tagtable.cpp
@@ -391,8 +391,13 @@ 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
+ // fixes https://github.com/baumgarr/nixnote2/issues/363
+ break;
+
default: {
- QLOG_ERROR() << "Unknown Tag record key: " << key;
+ QLOG_ERROR() << "Unknown Tag record key: " << key << " lid: " << lid;
}
}
}
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).