Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: pull in upstream changes #6

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
200989e
Named magic const
gamecreature Jul 13, 2020
1b4f0f6
Memory leak fix, hide hint if not used. Added langserver constants
gamecreature Jul 14, 2020
b90aadf
Merge branch 'Mudlet-master' (with some additions/changes)
gamecreature Jul 14, 2020
1cb5bc5
Compile fix for README example
emoon Jul 19, 2020
5a01b25
Merge pull request #102 from emoon/readme-fix
gamecreature Jul 19, 2020
de349a0
fix #101, Support for JSON based grammar files.
gamecreature Jul 20, 2020
182d0f1
removed incorrect include file
gamecreature Jul 20, 2020
bb579e6
fixes #90, Several Qt deprecation warnings. Changed 0 to nullptr. Pos…
gamecreature Jul 20, 2020
8fc006b
wip readonly
gamecreature Jul 24, 2020
7dc2228
ref #96, Added support for readonly mode, via widget->setReadonly() o…
gamecreature Jul 25, 2020
d946f68
ref #99, Speed improvements for markAll. (Added beginChanges and endC…
gamecreature Jul 27, 2020
55e675a
ref #106, Missing round function on SuSE. (Changed to qRound)
gamecreature Aug 16, 2020
0c62265
ref #107, Several improvements (Thanks @sebcaux)
gamecreature Aug 19, 2020
a95706d
Disabled TextEditorComponent::inputMethodEvent for Linux
gamecreature Sep 4, 2020
fce8954
Fixed cmake on mac os x
gamecreature Sep 5, 2020
d01c05f
ref #112, Workaround for missing Qt::endl in Qt 5.12
gamecreature Oct 25, 2020
3b6fe55
Named magic const
gamecreature Jul 13, 2020
1621b75
Memory leak fix, hide hint if not used. Added langserver constants
gamecreature Jul 14, 2020
af17b01
Compile fix for README example
emoon Jul 19, 2020
94f9049
fix #101, Support for JSON based grammar files.
gamecreature Jul 20, 2020
aefac95
removed incorrect include file
gamecreature Jul 20, 2020
34ae336
fixes #90, Several Qt deprecation warnings. Changed 0 to nullptr. Pos…
gamecreature Jul 20, 2020
2cded60
wip readonly
gamecreature Jul 24, 2020
67f1dba
ref #96, Added support for readonly mode, via widget->setReadonly() o…
gamecreature Jul 25, 2020
8181bbd
ref #99, Speed improvements for markAll. (Added beginChanges and endC…
gamecreature Jul 27, 2020
0d5b039
ref #106, Missing round function on SuSE. (Changed to qRound)
gamecreature Aug 16, 2020
6fc9e87
ref #107, Several improvements (Thanks @sebcaux)
gamecreature Aug 19, 2020
1be96e7
Disabled TextEditorComponent::inputMethodEvent for Linux
gamecreature Sep 4, 2020
038bbc2
Fixed cmake on mac os x
gamecreature Sep 5, 2020
793f796
ref #112, Workaround for missing Qt::endl in Qt 5.12
gamecreature Oct 25, 2020
d7dd83d
Merge branch 'master' into Update_pullInUpstreamChanges
SlySven Oct 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ edbee-test/edbee-test
.vscode

.vs/
edbee-lib/debug/
edbee-lib/release/
edbee-lib/edbee-lib_autogen/
edbee-lib/qslog/
edbee-test/edbee-test_autogen/
edbee-test/edbee-lib/qslog/
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

edbee.lib:

- #112, Workaround for missing Qt::endl in Qt 5.12
- Support for sticky-selection in replaceSelection methods. (Required for InpuMethod entry)
- Improved TextEditorComponent::InputMethodEvent... It now support special chars entry like expected. (Option+e, e => ´ => é)
- ref #107, Several improvements (Thanks @sebcaux)
- Fixed gapvector destructor: it did not use an array delete.
- TextEditorWidget::setHorizontalScrollBar not emits the correct horizontalScrollBarChanged event.
- (Did not include the condition defines, for older Qt versions)
- ref #106, Missing round function on SuSE. (Changed to qRound)
- ref #99, Speed improvements for markAll. (Added beginChanges and endChanges, to prevent updating)
- fix #96, Added support for readonly mode, via widget->setReadonly() or controller->setReadonly
- fix #90, Fixed several Qt deprecation warnings. Chagned 0 to nullptr. Possible incompatibility with older releases!
- add #101, Support for JSON based grammar files.
- fix #67, PlacholderText support via TextEditorWidget::setPlaceholderText. (uses 70% opacity of foreground color)
- fix #98, Missing header include in Qt 5.15rc
- fix #94 (partial), Resource delete fix in TextDocumentscopes
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Of course it would also be nice to fill the editor with a file. you can use the

edbee::TextEditorWidget* widget = new edbee::TextEditorWidget();
edbee::TextDocumentSerializer serializer( widget->textDocument() );
if( !serializer.load( "your-filename.rb" ) ) {
QFile file( QStringLiteral("your-filename.rb") );
if( !serializer.load( &file ) ) {
QMessageBox::warning(this, tr("Error opening file"), tr("Error opening file!\n%1").arg(serializer.errorString()) );
}

Expand Down
251 changes: 128 additions & 123 deletions edbee-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,167 +5,172 @@ IF(POLICY CMP0020)
CMAKE_POLICY(SET CMP0020 NEW)
ENDIF()

# hack?? https://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
set(CMAKE_MACOSX_RPATH 1)

PROJECT(edbee-lib)

add_subdirectory(../vendor/qslog/ qslog)

SET(SOURCES
edbee/util/mem/debug_new.cpp
edbee/util/mem/debug_allocs.cpp
edbee/util/simpleprofiler.cpp
edbee/util/textcodecdetector.cpp
edbee/util/lineending.cpp
edbee/texteditorwidget.cpp
edbee/views/textrenderer.cpp
edbee/models/textdocument.cpp
edbee/models/chardocument/chartextdocument.cpp
edbee/models/texteditorconfig.cpp
edbee/models/texteditorkeymap.cpp
edbee/models/textundostack.cpp
edbee/views/textcaretcache.cpp
edbee/models/textlexer.cpp
edbee/models/textrange.cpp
edbee/views/textselection.cpp
edbee/models/textdocumentscopes.cpp
edbee/lexers/grammartextlexer.cpp
edbee/util/gapvector.h
edbee/util/lineoffsetvector.cpp
edbee/models/textlinedata.cpp
edbee/models/textbuffer.cpp
edbee/models/chardocument/chartextbuffer.cpp
edbee/texteditorcontroller.cpp
edbee/texteditorcommand.cpp
edbee/commands/selectioncommand.cpp
edbee/commands/undocommand.cpp
edbee/commands/redocommand.cpp
edbee/commands/replaceselectioncommand.cpp
edbee/commands/commentcommand.cpp
edbee/commands/copycommand.cpp
edbee/commands/cutcommand.cpp
edbee/commands/pastecommand.cpp
edbee/io/textdocumentserializer.cpp
edbee/util/test.cpp
edbee/util/textcodec.cpp
edbee/io/tmlanguageparser.cpp
edbee/commands/debugcommand.cpp
edbee/util/regexp.cpp
edbee/io/tmthemeparser.cpp
edbee/io/baseplistparser.cpp
edbee/io/jsonparser.cpp
edbee/models/textgrammar.cpp
edbee/models/texteditorcommandmap.cpp
edbee/views/components/texteditorautocompletecomponent.cpp
edbee/views/components/texteditorcomponent.cpp
edbee/views/components/texteditorrenderer.cpp
edbee/views/components/textmargincomponent.cpp
edbee/views/texttheme.cpp
edbee/views/texteditorscrollarea.cpp
edbee/models/textsearcher.cpp
edbee/commands/findcommand.cpp
edbee/io/keymapparser.cpp
edbee/commands/tabcommand.cpp
edbee/edbee.cpp
edbee/models/textdocumentfilter.cpp
edbee/util/cascadingqvariantmap.cpp
edbee/commands/duplicatecommand.cpp
edbee/commands/findcommand.cpp
edbee/commands/movelinecommand.cpp
edbee/commands/newlinecommand.cpp
edbee/util/util.cpp
edbee/commands/pastecommand.cpp
edbee/commands/redocommand.cpp
edbee/commands/removecommand.cpp
edbee/commands/replaceselectioncommand.cpp
edbee/commands/selectioncommand.cpp
edbee/commands/tabcommand.cpp
edbee/commands/togglereadonlycommand.cpp
edbee/commands/undocommand.cpp
edbee/data/factorycommandmap.cpp
edbee/data/factorykeymap.cpp
edbee/edbee.cpp
edbee/io/baseplistparser.cpp
edbee/io/jsonparser.cpp
edbee/io/keymapparser.cpp
edbee/io/textdocumentserializer.cpp
edbee/io/tmlanguageparser.cpp
edbee/io/tmthemeparser.cpp
edbee/lexers/grammartextlexer.cpp
edbee/models/change.cpp
edbee/models/changes/abstractrangedchange.cpp
edbee/models/changes/linedatalistchange.cpp
edbee/models/changes/linedatachange.cpp
edbee/models/changes/linedatalistchange.cpp
edbee/models/changes/mergablechangegroup.cpp
edbee/models/changes/selectionchange.cpp
edbee/models/changes/textchange.cpp
edbee/models/changes/textchangewithcaret.cpp
edbee/models/changes/mergablechangegroup.cpp
edbee/commands/commentcommand.cpp
edbee/util/rangesetlineiterator.cpp
edbee/models/chardocument/chartextbuffer.cpp
edbee/models/chardocument/chartextdocument.cpp
edbee/models/dynamicvariables.cpp
edbee/util/rangelineiterator.cpp
edbee/data/factorykeymap.cpp
edbee/data/factorycommandmap.cpp
edbee/models/textautocompleteprovider.cpp
edbee/models/textbuffer.cpp
edbee/models/textdocument.cpp
edbee/models/textdocumentfilter.cpp
edbee/models/textdocumentscopes.cpp
edbee/models/texteditorcommandmap.cpp
edbee/models/texteditorconfig.cpp
edbee/models/texteditorkeymap.cpp
edbee/models/textgrammar.cpp
edbee/models/textlexer.cpp
edbee/models/textlinedata.cpp
edbee/models/textrange.cpp
edbee/models/textsearcher.cpp
edbee/models/textundostack.cpp
edbee/texteditorcommand.cpp
edbee/texteditorcontroller.cpp
edbee/texteditorwidget.cpp
edbee/util/cascadingqvariantmap.cpp
edbee/util/gapvector.h
edbee/util/lineending.cpp
edbee/util/lineoffsetvector.cpp
edbee/util/mem/debug_allocs.cpp
edbee/util/mem/debug_new.cpp
edbee/util/rangelineiterator.cpp
edbee/util/rangesetlineiterator.cpp
edbee/util/regexp.cpp
edbee/util/simpleprofiler.cpp
edbee/util/test.cpp
edbee/util/textcodec.cpp
edbee/util/textcodecdetector.cpp
edbee/util/util.cpp
edbee/views/components/texteditorautocompletecomponent.cpp
edbee/views/components/texteditorcomponent.cpp
edbee/views/components/texteditorrenderer.cpp
edbee/views/components/textmargincomponent.cpp
edbee/views/textcaretcache.cpp
edbee/views/texteditorscrollarea.cpp
edbee/views/textrenderer.cpp
edbee/views/textselection.cpp
edbee/views/texttheme.cpp
)

SET(HEADERS
edbee/util/logging.h
edbee/util/mem/debug_new.h
edbee/util/mem/debug_allocs.h
edbee/util/simpleprofiler.h
edbee/util/textcodecdetector.h
edbee/util/lineending.h
edbee/texteditorwidget.h
edbee/views/textrenderer.h
edbee/models/textdocument.h
edbee/models/chardocument/chartextdocument.h
edbee/models/texteditorconfig.h
edbee/models/texteditorkeymap.h
edbee/models/textundostack.h
edbee/texteditorcontroller.h
edbee/views/textcaretcache.h
edbee/models/textlexer.h
edbee/models/textrange.h
edbee/views/textselection.h
edbee/models/textdocumentscopes.h
edbee/lexers/grammartextlexer.h
edbee/util/lineoffsetvector.h
edbee/models/textlinedata.h
edbee/models/textbuffer.h
edbee/models/chardocument/chartextbuffer.h
edbee/texteditorcommand.h
edbee/commands/selectioncommand.h
edbee/commands/undocommand.h
edbee/commands/redocommand.h
edbee/commands/replaceselectioncommand.h
edbee/commands/commentcommand.h
edbee/commands/copycommand.h
edbee/commands/cutcommand.h
edbee/commands/pastecommand.h
edbee/models/textdocumentfilter.h
edbee/debug.h
edbee/io/textdocumentserializer.h
edbee/util/test.h
edbee/util/textcodec.h
edbee/io/tmlanguageparser.h
edbee/commands/debugcommand.h
edbee/util/regexp.h
edbee/io/tmthemeparser.h
edbee/io/baseplistparser.h
edbee/io/jsonparser.h
edbee/models/textgrammar.h
edbee/models/texteditorcommandmap.h
edbee/views/components/texteditorautocompletecomponent.h
edbee/views/components/texteditorcomponent.h
edbee/views/components/texteditorrenderer.h
edbee/views/components/textmargincomponent.h
edbee/views/texttheme.h
edbee/views/texteditorscrollarea.h
edbee/models/textsearcher.h
edbee/commands/findcommand.h
edbee/io/keymapparser.h
edbee/commands/tabcommand.h
edbee/edbee.h
edbee/util/cascadingqvariantmap.h
edbee/commands/duplicatecommand.h
edbee/commands/findcommand.h
edbee/commands/movelinecommand.h
edbee/commands/newlinecommand.h
edbee/util/util.h
edbee/commands/pastecommand.h
edbee/commands/redocommand.h
edbee/commands/removecommand.h
edbee/commands/replaceselectioncommand.h
edbee/commands/selectioncommand.h
edbee/commands/tabcommand.h
edbee/commands/togglereadonlycommand.h
edbee/commands/undocommand.h
edbee/data/factorycommandmap.h
edbee/data/factorykeymap.h
edbee/debug.h
edbee/edbee.h
edbee/io/baseplistparser.h
edbee/io/jsonparser.h
edbee/io/keymapparser.h
edbee/io/textdocumentserializer.h
edbee/io/tmlanguageparser.h
edbee/io/tmthemeparser.h
edbee/lexers/grammartextlexer.h
edbee/models/change.h
edbee/models/changes/abstractrangedchange.h
edbee/models/changes/linedatalistchange.h
edbee/models/changes/linedatachange.h
edbee/models/changes/linedatalistchange.h
edbee/models/changes/mergablechangegroup.h
edbee/models/changes/selectionchange.h
edbee/models/changes/textchange.h
edbee/models/changes/textchangewithcaret.h
edbee/models/changes/mergablechangegroup.h
edbee/commands/commentcommand.h
edbee/util/rangesetlineiterator.h
edbee/models/chardocument/chartextbuffer.h
edbee/models/chardocument/chartextdocument.h
edbee/models/dynamicvariables.h
edbee/util/rangelineiterator.h
edbee/data/factorykeymap.h
edbee/data/factorycommandmap.h
edbee/models/textautocompleteprovider.h
edbee/models/textbuffer.h
edbee/models/textdocument.h
edbee/models/textdocumentfilter.h
edbee/models/textdocumentscopes.h
edbee/models/texteditorcommandmap.h
edbee/models/texteditorconfig.h
edbee/models/texteditorkeymap.h
edbee/models/textgrammar.h
edbee/models/textlexer.h
edbee/models/textlinedata.h
edbee/models/textrange.h
edbee/models/textsearcher.h
edbee/models/textundostack.h
edbee/texteditorcommand.h
edbee/texteditorcontroller.h
edbee/texteditorwidget.h
edbee/util/cascadingqvariantmap.h
edbee/util/lineending.h
edbee/util/lineoffsetvector.h
edbee/util/logging.h
edbee/util/mem/debug_allocs.h
edbee/util/mem/debug_new.h
edbee/util/rangelineiterator.h
edbee/util/rangesetlineiterator.h
edbee/util/regexp.h
edbee/util/simpleprofiler.h
edbee/util/test.h
edbee/util/textcodec.h
edbee/util/textcodecdetector.h
edbee/util/util.h
edbee/views/components/texteditorautocompletecomponent.h
edbee/views/components/texteditorcomponent.h
edbee/views/components/texteditorrenderer.h
edbee/views/components/textmargincomponent.h
edbee/views/textcaretcache.h
edbee/views/texteditorscrollarea.h
edbee/views/textrenderer.h
edbee/views/textselection.h
edbee/views/texttheme.h
)

FIND_PACKAGE(Qt5Core REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions edbee-lib/edbee-lib.pri
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SOURCES += \
$$PWD/edbee/commands/replaceselectioncommand.cpp \
$$PWD/edbee/commands/selectioncommand.cpp \
$$PWD/edbee/commands/tabcommand.cpp \
$$PWD/edbee/commands/togglereadonlycommand.cpp \
$$PWD/edbee/commands/undocommand.cpp \
$$PWD/edbee/data/factorycommandmap.cpp \
$$PWD/edbee/data/factorykeymap.cpp \
Expand Down Expand Up @@ -95,6 +96,7 @@ HEADERS += \
$$PWD/edbee/commands/replaceselectioncommand.h \
$$PWD/edbee/commands/selectioncommand.h \
$$PWD/edbee/commands/tabcommand.h \
$$PWD/edbee/commands/togglereadonlycommand.h \
$$PWD/edbee/commands/undocommand.h \
$$PWD/edbee/data/factorycommandmap.h \
$$PWD/edbee/data/factorykeymap.h \
Expand Down
5 changes: 5 additions & 0 deletions edbee-lib/edbee/commands/copycommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,9 @@ QString CopyCommand::toString()
return "CopyCommand";
}

bool CopyCommand::readonly()
{
return true;
}

} // edbee
5 changes: 3 additions & 2 deletions edbee-lib/edbee/commands/copycommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ class EDBEE_EXPORT CopyCommand : public TextEditorCommand
static const QString EDBEE_TEXT_TYPE;

public:
virtual void execute( TextEditorController* controller );
virtual QString toString();
virtual void execute( TextEditorController* controller ) override;
virtual QString toString() override;
virtual bool readonly() override;
};


Expand Down
5 changes: 5 additions & 0 deletions edbee-lib/edbee/commands/debugcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ QString DebugCommand::toString()
return "DebugCommand";
}

bool DebugCommand::readonly()
{
return true;
}

/// This method dumps the scopes
void DebugCommand::dumpScopes( TextEditorController* controller )
{
Expand Down
5 changes: 3 additions & 2 deletions edbee-lib/edbee/commands/debugcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class EDBEE_EXPORT DebugCommand : public TextEditorCommand

DebugCommand( DebugCommandType command );

virtual void execute( TextEditorController* controller );
virtual QString toString();
virtual void execute(TextEditorController* controller) override;
virtual QString toString() override;
virtual bool readonly() override;

protected:

Expand Down
Loading