Skip to content

Commit 7acf03f

Browse files
committed
Merge branch 'hotfix/v0.11.1'
2 parents b8b6194 + e623196 commit 7acf03f

12 files changed

+600
-344
lines changed

CuteMarkEd.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
33
<?define ManufacturerName="CuteMarkEd Project"?>
44
<?define ProductName="CuteMarkEd"?>
5-
<?define ProductVersion="0.11.0"?>
5+
<?define ProductVersion="0.11.1"?>
66
<Product Name="$(var.ProductName)"
77
Id="*"
88
UpgradeCode="335156FC-CB7F-4357-98D4-B5519E66402B"

README.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,27 @@ A Qt-based, free and open source markdown editor with live HTML preview, math ex
88

99
### DOWNLOAD
1010

11-
[Sources](https://github.com/cloose/CuteMarkEd/archive/v0.11.0.tar.gz)
12-
[MS Windows (Installer)](http://dl.bintray.com/cloose/CuteMarkEd/cutemarked-0.11.0.msi)
13-
[MS Windows (ZIP file)](http://dl.bintray.com/cloose/CuteMarkEd/cutemarked-0.11.0.zip)
11+
[Sources](https://github.com/cloose/CuteMarkEd/archive/v0.11.1.tar.gz)
12+
[MS Windows (Installer)](http://dl.bintray.com/cloose/CuteMarkEd/cutemarked-0.11.1.msi)
13+
[MS Windows (ZIP file)](http://dl.bintray.com/cloose/CuteMarkEd/cutemarked-0.11.1.zip)
1414
[OpenSUSE 13.1 (RPM)](https://build.opensuse.org/project/show?project=home%3Acloose1974)
1515
[Fedora 20 (RPM)](https://build.opensuse.org/project/show?project=home%3Acloose1974)
1616
[Fedora 21 (RPM)](https://build.opensuse.org/project/show?project=home%3Acloose1974)
1717

1818
### NEWS
1919

20+
#### Version 0.11.1
21+
22+
Improvements:
23+
24+
* `IMPROVED` Updated French translation
25+
26+
Fixes:
27+
28+
* `FIXED` Custom shortcuts not working (#224)
29+
* `FIXED` Disappearing spell checker highlighting (#228)
30+
* `FIXED` Wrong german quotes snippet (#229)
31+
2032
#### Version 0.11.0
2133

2234
Highlights:
@@ -51,26 +63,6 @@ Fixes:
5163
* `FIXED` Build with MSVC 2013 and MacOSX
5264
* `FIXED` Parallel build with e.g. make -j2
5365

54-
#### Version 0.10.2
55-
56-
New Features:
57-
58-
* `NEW` Added Indonesian translation created by bedouin
59-
* `NEW` Added Danish translation created by mljjlm
60-
61-
Improvements:
62-
63-
* `IMPROVED` Updated Greek translation
64-
* `IMPROVED` Updated Chinese translation
65-
66-
Fixes:
67-
68-
* `FIXED` Copy & Paste problems on Windows (#161, #203)
69-
* `FIXED` Restore fullscreen mode after startup (#164)
70-
* `FIXED` Build on Fedora with both Qt4 and Qt5 installed (#165)
71-
* `FIXED` Replaced generic editor icon with own icon on Linux
72-
73-
7466
### DEPENDENCIES
7567

7668
* [Qt 5.2](http://qt-project.org) (LGPL v2.1)

app/aboutdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "aboutdialog.h"
1818
#include "ui_aboutdialog.h"
1919

20-
static const QString COPYRIGHT = QStringLiteral("Copyright 2013-2014 Christian Loose");
20+
static const QString COPYRIGHT = QStringLiteral("Copyright 2013-2015 Christian Loose");
2121
static const QString HOMEPAGE = QStringLiteral("<a href=\"http://cloose.github.io/CuteMarkEd\">http://cloose.github.io/CuteMarkEd</a>");
2222

2323
AboutDialog::AboutDialog(QWidget *parent) :

app/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
5656
app.setOrganizationName("CuteMarkEd Project");
5757
app.setApplicationName("CuteMarkEd");
5858
app.setApplicationDisplayName("CuteMarkEd");
59-
app.setApplicationVersion("0.11.0");
59+
app.setApplicationVersion("0.11.1");
6060

6161
#ifdef Q_OS_WIN
6262
QStringList fileTypes;

app/mainwindow.cpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,23 +1139,27 @@ void MainWindow::setupHtmlSourceView()
11391139

11401140
void MainWindow::setupCustomShortcuts()
11411141
{
1142-
// file menu
1143-
foreach (QAction *action, ui->menuFile->actions()) {
1144-
setCustomShortcut(action);
1145-
}
1146-
// edit menu
1147-
foreach (QAction *action, ui->menuEdit->actions()) {
1148-
setCustomShortcut(action);
1149-
}
1150-
// view menu
1151-
foreach (QAction *action, ui->menuView->actions()) {
1152-
setCustomShortcut(action);
1153-
}
1142+
setCustomShortcut(ui->menuFile);
1143+
setCustomShortcut(ui->menuEdit);
1144+
setCustomShortcut(ui->menuView);
1145+
11541146
foreach (QAction *action, ui->plainTextEdit->actions()) {
11551147
setCustomShortcut(action);
11561148
}
11571149
}
11581150

1151+
void MainWindow::setCustomShortcut(QMenu *menu)
1152+
{
1153+
foreach (QAction *action, menu->actions()) {
1154+
if (action->menu()) {
1155+
// recurse into submenu
1156+
setCustomShortcut(action->menu());
1157+
} else {
1158+
setCustomShortcut(action);
1159+
}
1160+
}
1161+
}
1162+
11591163
void MainWindow::setCustomShortcut(QAction *action)
11601164
{
11611165
if (options->hasCustomShortcut(action->objectName())) {

app/mainwindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ private slots:
136136
void setupHtmlPreview();
137137
void setupHtmlSourceView();
138138
void setupCustomShortcuts();
139+
void setCustomShortcut(QMenu *menu);
139140
void setCustomShortcut(QAction *action);
140141
void updateExtensionStatus();
141142
void syncWebViewToHtmlSource();

app/markdown-snippets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{
2525
"trigger": "gq",
2626
"description": "German Quotes",
27-
"snippet": "&bdquo;&rdquo;",
27+
"snippet": "&bdquo;&ldquo;",
2828
"cursor": 7,
2929
"builtIn": true
3030
},

app/markdownhighlighter.cpp

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,7 @@ void MarkdownHighlighter::highlightBlock(const QString &textBlock)
8787

8888
// check spelling of passed text block
8989
if (spellingCheckEnabled) {
90-
QStringList wordList = textBlock.split(QRegExp("\\W+"), QString::SkipEmptyParts);
91-
int index = 0;
92-
foreach (QString word, wordList) {
93-
index = textBlock.indexOf(word, index);
94-
95-
if (!spellChecker->isCorrect(word)) {
96-
setFormat(index, word.length(), spellFormat);
97-
}
98-
index += word.length();
99-
}
90+
checkSpelling(textBlock);
10091
}
10192

10293
QString text = document()->toPlainText();
@@ -176,6 +167,20 @@ void MarkdownHighlighter::applyFormat(unsigned long pos, unsigned long end,
176167
}
177168
}
178169

170+
void MarkdownHighlighter::checkSpelling(const QString &textBlock)
171+
{
172+
QStringList wordList = textBlock.split(QRegExp("\\W+"), QString::SkipEmptyParts);
173+
int index = 0;
174+
foreach (QString word, wordList) {
175+
index = textBlock.indexOf(word, index);
176+
177+
if (!spellChecker->isCorrect(word)) {
178+
setFormat(index, word.length(), spellFormat);
179+
}
180+
index += word.length();
181+
}
182+
}
183+
179184
void MarkdownHighlighter::resultReady(pmh_element **elements, unsigned long base_offset)
180185
{
181186
if (!elements) {
@@ -184,7 +189,9 @@ void MarkdownHighlighter::resultReady(pmh_element **elements, unsigned long base
184189
}
185190

186191
// clear any format before base_offset
187-
applyFormat(0, base_offset - 1, QTextCharFormat(), false);
192+
if (base_offset > 0) {
193+
applyFormat(0, base_offset - 1, QTextCharFormat(), false);
194+
}
188195

189196
// apply highlight results
190197
for (int i = 0; i < highlightingStyles.size(); i++) {

app/markdownhighlighter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ private slots:
4848

4949
private:
5050
void applyFormat(unsigned long pos, unsigned long end, QTextCharFormat format, bool merge);
51+
void checkSpelling(const QString &textBlock);
5152

5253
HighlightWorkerThread *workerThread;
5354
QVector<PegMarkdownHighlight::HighlightingStyle> highlightingStyles;

app/optionsdialog.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ void OptionsDialog::readState()
311311
ui->portLineEdit->setText(QString::number(options->proxyPort()));
312312
ui->userNameLineEdit->setText(options->proxyUser());
313313
ui->passwordLineEdit->setText(options->proxyPassword());
314+
315+
// shortcut settings
316+
for (int i = 0; i < ui->shortcutsTable->rowCount(); ++i) {
317+
if (options->hasCustomShortcut(actions[i]->objectName())) {
318+
ui->shortcutsTable->item(i, 1)->setData(Qt::EditRole, options->customShortcut(actions[i]->objectName()));
319+
}
320+
}
314321
}
315322

316323
void OptionsDialog::saveState()

0 commit comments

Comments
 (0)