-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev'
- Loading branch information
Showing
24 changed files
with
246 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/build | ||
/dist | ||
CMakeLists.txt.user | ||
CMakeLists.txt.user* | ||
.*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
[submodule "singleapplication"] | ||
path = singleapplication/src | ||
path = 3rdparty/singleapplication/src | ||
url = https://github.com/itay-grudev/SingleApplication | ||
[submodule "qpropgen"] | ||
path = qpropgen | ||
path = 3rdparty/qpropgen | ||
url = https://github.com/agateau/qpropgen | ||
[submodule "3rdparty/catch2"] | ||
path = 3rdparty/catch2 | ||
url = https://github.com/catchorg/Catch2 |
Submodule qpropgen
updated
from 000000 to 9eef91
5 changes: 2 additions & 3 deletions
5
singleapplication/CMakeLists.txt → 3rdparty/singleapplication/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule src
updated
from 000000 to c03d32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
# Changelog | ||
|
||
## 1.0.1 - 2019-01-12 | ||
|
||
### Fixed | ||
- Fixed indentation and make it respect indentation columns. | ||
- Made it possible to indent/unindent selected lines with Tab/Shift+Tab. | ||
- Update welcome text to reflect current shortcuts. | ||
|
||
### Added | ||
- Added unit-tests. | ||
- Added Travis integration. | ||
- Added rpm and deb packages generated using CPack. | ||
|
||
## 1.0.0 - 2018-12-30 | ||
|
||
First release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Check working tree is up to date and clean: | ||
|
||
git checkout dev | ||
git pull | ||
git status | ||
|
||
Update CHANGELOG.md: | ||
|
||
r!git log --pretty=format:'- \%s (\%an)' x.y.z-1..HEAD | ||
|
||
Bump version number in CMakeLists.txt | ||
|
||
Commit and push | ||
|
||
Build packages: | ||
|
||
docker run -v $PWD:/root/nanonote nanonote:1 /root/nanonote/ci/build-packages | ||
|
||
Smoke test binary packages | ||
|
||
- Test welcome text is OK | ||
- Test screenshot matches | ||
|
||
Merge dev in master: | ||
|
||
git checkout master | ||
git pull | ||
git merge --no-ff origin/dev | ||
|
||
Create "x.y.z" tag: | ||
|
||
git tag -a x.y.z | ||
|
||
Push: | ||
|
||
git push | ||
git push --tags | ||
|
||
Publish packages on GitHub | ||
|
||
Write blog post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
set -ev | ||
cd $(dirname $0) | ||
cp ../qpropgen/requirements.txt . | ||
cp ../3rdparty/qpropgen/requirements.txt . | ||
docker build -t nanonote:1 . |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
add_executable(tests | ||
tests.cpp | ||
IndentExtensionTest.cpp | ||
LinkSyntaxHighlighterTest.cpp | ||
TestUtils.cpp | ||
) | ||
|
||
target_link_libraries(tests | ||
nanonotelib | ||
Qt5::Test | ||
Catch2::Catch2 | ||
) | ||
|
||
add_test(NAME tests COMMAND tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "IndentExtension.h" | ||
|
||
#include <QMainWindow> | ||
#include <QTest> | ||
#include <QTextCursor> | ||
|
||
#include <catch2/catch.hpp> | ||
|
||
#include "TestUtils.h" | ||
|
||
TEST_CASE("textedit") { | ||
QMainWindow window; | ||
TextEdit *edit = new TextEdit; | ||
window.setCentralWidget(edit); | ||
edit->addExtension(new IndentExtension(edit)); | ||
SECTION("indent insert spaces") { | ||
edit->setPlainText("Hello"); | ||
|
||
SECTION("indent from beginning of line") { | ||
QTest::keyClick(edit, Qt::Key_Tab); | ||
REQUIRE(edit->toPlainText() == QString(" Hello")); | ||
} | ||
|
||
SECTION("indent from middle of word") { | ||
QTest::keyClick(edit, Qt::Key_Right); | ||
QTest::keyClick(edit, Qt::Key_Tab); | ||
REQUIRE(edit->toPlainText() == QString("H ello")); | ||
} | ||
} | ||
|
||
SECTION("indent whole lines") { | ||
edit->setPlainText("1\n2\n3\n"); | ||
edit->moveCursor(QTextCursor::Down, QTextCursor::KeepAnchor); | ||
edit->moveCursor(QTextCursor::Down, QTextCursor::KeepAnchor); | ||
QTest::keyClick(edit, Qt::Key_Tab); | ||
REQUIRE(edit->toPlainText() == QString(" 1\n 2\n3\n")); | ||
} | ||
|
||
SECTION("unindent whole lines") { | ||
edit->setPlainText(" 1\n 2\n3\n"); | ||
edit->moveCursor(QTextCursor::Down, QTextCursor::KeepAnchor); | ||
edit->moveCursor(QTextCursor::Down, QTextCursor::KeepAnchor); | ||
QTest::keyClick(edit, Qt::Key_Backtab); | ||
REQUIRE(edit->toPlainText() == QString("1\n2\n3\n")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "LinkSyntaxHighlighter.h" | ||
|
||
#include <catch2/catch.hpp> | ||
|
||
TEST_CASE("getLinkAt") { | ||
QString text = "link to http://google.fr. The end."; | ||
QUrl expected("http://google.fr"); | ||
SECTION("before link") { | ||
REQUIRE(LinkSyntaxHighlighter::getLinkAt(text, 0) == QUrl()); | ||
} | ||
SECTION("at link") { | ||
REQUIRE(LinkSyntaxHighlighter::getLinkAt(text, 10) == expected); | ||
} | ||
SECTION("after link") { | ||
REQUIRE(LinkSyntaxHighlighter::getLinkAt(text, 25) == QUrl()); | ||
} | ||
} |
Oops, something went wrong.