Skip to content

Commit

Permalink
Merge pull request edbee#138 from SlySven/Fix_removeSomeDepreciationW…
Browse files Browse the repository at this point in the history
…arningsForQt6AndOtherWarningsAndSpellingErrors

Fix remove some depreciation warnings for qt6 and other warnings and spelling errors
  • Loading branch information
gamecreature authored Mar 21, 2023
2 parents fedec15 + 08bd017 commit 9872111
Show file tree
Hide file tree
Showing 29 changed files with 155 additions and 139 deletions.
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
edbee.lib:

- fix #136, BREAKING CHANGE: return type TextEditorController::executeCommand changed to void.
- changed TextEditorController slot argumens to fully-qualified types.
- changed TextEditorController slot arguments to fully-qualified types.
- ref #136, remove TextDocumentController readonly methods from slots
- Fix out-of-bounds write in TextDocumentSerializer
- add #135, QAccessibleTextInterface support
- add TextBuffer::emitTextChanged is extended with the oldText. SIGNAL void emitTextChanged( TextBufferChange* change, QString oldText = QString()); (WARNING: signal interface changes )
- fix #133, Added Qt 6.3.0 compatibility
- fix #132, Writing diacritics in Linux
- ref #128, Build in supprort for virtual characters. Alternate position/cursor calculations via TextLayout
- ref #128, Build in support for virtual characters. Alternate position/cursor calculations via TextLayout
- ref #127,
- Option to show Unicode BIDI characters (CVE-2021-425740). (as red icons for now)
- It is configurable via 'TexteditorConfig::renderBidiContolCharacters', and defaults to true
Expand All @@ -19,7 +19,7 @@ edbee.lib:
- fix #121, Standard Keys not working correctly (Fixed by fetching ALL keybindings via QKeySequence::keyBinding)
- fix #119, Missing `case MoveCaretToWordBoundary:` in `switch` statement
- fix #118, Missing `override` specifier in command header files
- fix #115, basic Tripple-click support
- fix #115, basic Triple-click support
- fix #114, Double-click + drag should end at word boundaries
- #112, Workaround for missing Qt::endl in Qt 5.12
- Support for sticky-selection in replaceSelection methods. (Required for InpuMethod entry)
Expand All @@ -31,7 +31,7 @@ edbee.lib:
- 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!
- fix #90, Fixed several Qt deprecation warnings. Changed 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
Expand Down Expand Up @@ -59,7 +59,7 @@ edbee.lib:
- Line numbers of lines with selection are rendered with 100% opacity
- fix #38, Margin line-number font size is now set to the font size of the editor. It also renders number with an opacity of 0.5.
- fix #32, Changing showWhiteSpace option does not trigger a redraw
- add #31, Support for rendering borderedTextRanges. These are textranges rendered with borders, that aren't selected. TextEditorController has a member 'borderedTextRanges()'. Altering this rangeset (and updating the view controller::update) renderes borders aroudn the given ranges
- add #31, Support for rendering borderedTextRanges. These are textranges rendered with borders, that aren't selected. TextEditorController has a member 'borderedTextRanges()'. Altering this rangeset (and updating the view controller::update) renders borders around the given ranges
- fix #30, Edbee crashes when you cut/copy with nothing selected. (Bug in clipboard operation)
- fix #27, Theme loading/handling bugfixes
- Theme-colors with alpha channels are parsed correctly. (QColor expects #AARRGGBB, theme uses #RRGGBBAA)
Expand All @@ -69,7 +69,7 @@ edbee.lib:
- fix #26, Changing a theme in the ThemeManager, now updates the ThemePointer used by the renderer. (Fixes corruption on theme reloading)
- fix #25, Removed the 'memory ok :-D' message
- fix #24, Clearing the undostack unregistered all controllers incorrectly
- fix #23, Scope invaldating optimization wasn't working correctly. Removed optimization for now
- fix #23, Scope invalidating optimization wasn't working correctly. Removed optimization for now
- fix #19, Workaround-hack for non-bmp-unicode character movement. (experimental)
- Added DebugCommand::DumpCharacterCodes (for dumping hex-character codes)
- fix #14, MinGW compatibility: Disabled memoryLeak detection and fixed mingw compilation (different library-name is generated for mingw)
Expand All @@ -86,7 +86,7 @@ edbee.lib:
- fix #6, Theme Manager only attempts to load a theme if a theme path has been set.
- fix, updated Onigmo (Oniguruma-mod) library to version 6.1.1 (Fixes memory corruption with lexing)
- fix, removed config.h reference from simpleprofiler.h (Which caused compilation via to fail, refs issue #1)
- fix, mouse double click didn't select wordt anymore. (Issue with newer Qt version??)
- fix, mouse double click didn't select word any more. (Issue with newer Qt version??)
- fix, moveCaret after the last character didn't work correctly on the if the last line didn't end with a newline
- fix, Syntax highlighting didn't work on the last line of the document. (First highlight after the first enter)
- fix, onig.pri, it contained strange references to qslog
Expand Down Expand Up @@ -118,9 +118,9 @@ All lines above refer to github-issue numbers
- fix #124, Line breaks (\n) are rendered with QTextLayout, which results in a strange character on a Linux environment (github issue 2)
- fix #123, Updated oniguruma to 5.13.5 to solve a segfault on Ubuntu 13 (64bits)
- fix #122, Library can't be compiled on Linux, unix is a predefined word on unix
- fix #118, The width of the editor component should add an extra spacing so the caret isn't placed agains the right window border
- fix #118, The width of the editor component should add an extra spacing so the caret isn't placed against the right window border
- fix #117, The last line doesn't show the caret marker in the line-number column
- fix #116, The linenumber column isn't updated properly when the number of digets increases.
- fix #116, The line-number column isn't updated properly when the number of digits increases.
- fix #114, Added a factory keymap so the editor works out of the box
- fix #103, Renamed the *TextChange related classes. So it's more clear what the changes represent
- fix #73, Complete rewrite of coalescing (change-merging) algorithm, so all textchanges are mergable. (Fixes #98,#97,#95,#41,#99,#100,#101)
Expand All @@ -137,8 +137,8 @@ All lines above refer to github-issue numbers
- fix #66, Grammar type detection (by filename) detected the wrong grammars. (it forgot to check the '.' )
- fix #40, text now is by default case insensitive
- fix #30, #32, Searching selection via the findcommand now result in soft undoable changes
- fix #20, Changing TextEditorConfig now automaticly updates the state of edbee.
- fix #21, Improved fallback pallette when a theme cannot be loaded. (fixes complete black screen)
- fix #20, Changing TextEditorConfig now automatically updates the state of edbee.
- fix #21, Improved fallback palette when a theme cannot be loaded. (fixes complete black screen)
- fix #16, linespacing issue, the space always was at least 1 pixel
- fix #2, made it possible to configure TextEditorConfig. (was hardcoded)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ You can contribute via github
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Of course you can also contribute by contacting me via twitter @gamecreature or drop me al message
Of course you can also contribute by contacting me via twitter @gamecreature or drop me a message
via the email-address supplied at [https://github.com/gamecreature](https://github.com/gamecreature)
Issues?
Expand Down
4 changes: 2 additions & 2 deletions edbee-lib/doc/coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ QList<Item*> itemRefList_;
Method definitions
------------------

Seperate methods from eachother with 2 blank lines. This improves the visible separation of method bodies.
Separate methods from each other with 2 blank lines. This improves the visible separation of method bodies.


Ownership
Expand Down Expand Up @@ -77,7 +77,7 @@ Memory Leak Detection and include order
---------------------------------------

We use custom memory leak detection. To enable this leak detection it is required to include 'debug.h'
Uou must include "debug.h" in every Source file AFTER all pre-compiled items and header files. Example:
You must include "debug.h" in every Source file AFTER all pre-compiled items and header files. Example:

~~~{.cpp}
// first you should include the source's header file. (This allows you to see if the headers users 'missing' dependencies'
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/edbee/commands/commentcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static int insertBlockComment( TextEditorController* controller, TextRange& rang
{
TextDocument* doc = controller->textDocument();

// for safety I don't use the range anymore. It's adjusted automaticly, but could in theory vanish
// for safety I don't use the range anymore. It's adjusted automatically, but could in theory vanish
int min = range.min();
int max = range.max();

Expand Down
8 changes: 4 additions & 4 deletions edbee-lib/edbee/edbee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ void Edbee::setGrammarPath( const QString& grammarPath )
}


/// Setst the path where to find the theme files
/// Sets the path where to find the theme files
/// @param themePath the path to find the themes
void Edbee::setThemePath( const QString& themePath )
{
themePath_ = themePath;
}


/// This method automaticly initializes the edbee library it this hasn't already been done
/// This method automatically initializes the edbee library it this hasn't already been done
void Edbee::autoInit()
{
if( !inited_ ) {
Expand Down Expand Up @@ -222,7 +222,7 @@ void Edbee::shutdown()
}


/// Call this method to automaticly shutdown the texteditor manager on shutdown
/// Call this method to automatically shutdown the texteditor manager on shutdown
/// (This method listens to the qApp::aboutToQuit signal
void Edbee::autoShutDownOnAppExit()
{
Expand Down Expand Up @@ -288,7 +288,7 @@ TextKeyMapManager* Edbee::keyMapManager()
}


/// Rreturns the dynamicvariables object
/// Returns the dynamicvariables object
DynamicVariables* Edbee::environmentVariables()
{
Q_ASSERT(inited_);
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/edbee/models/changes/abstractrangedchange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ bool AbstractRangedChange::merge( AbstractRangedChange* change )
}


/// This method checks if this textchange is overlapped by the second text change
/// This method checks if this textchange is overlapped by the second textchange
/// overlapping is an exclusive overlap, which means the changes are really on top of eachother
/// to test if the changes are touching use isTouchedBy
/// @param secondChange the other change to compare it to
Expand Down
4 changes: 2 additions & 2 deletions edbee-lib/edbee/models/changes/linedatalistchange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class TextLineDataManager;


/// The line data text change constructor
/// @param manger the line data manager
/// @param manager the line data manager
/// @param line the starting line of the change
/// @param length the number of lines affected
/// @param newLength the new number of lines
LineDataListChange::LineDataListChange( TextLineDataManager* manager, int line, int length, int newLength )
: managerRef_(manager)
, offset_(line)
, docLength_(newLength)
, oldListList_(0)
, oldListList_(nullptr)
, contentLength_(length)
{
}
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/edbee/models/changes/mergablechangegroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void MergableChangeGroup::giveChange(TextDocument* doc, Change* change)
delete newSelection_;
newSelection_ = selectionChange->takeRangeSet();

/// we can simply delete the change, the ComplexTextChange automaticly records the last change selection on the undoGroupEnd
/// we can simply delete the change, the ComplexTextChange automatically records the last change selection on the undoGroupEnd
delete change;
return;
}
Expand Down
4 changes: 2 additions & 2 deletions edbee-lib/edbee/models/textautocompleteprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace TextAutoCompleteKind {
}


/// An autocomplete item that's being returned
/// An autocomplete item that is being returned
/// Currently simply a string.
/// It's placed in a seperate class for future extentions (LSP: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_completion)
/// It is placed in a separate class for future extensions (LSP: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_completion)
class EDBEE_EXPORT TextAutoCompleteItem {
public:
TextAutoCompleteItem( const QString& label, const int kind = 0, const QString& detail = "", const QString& documentation = "");
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/edbee/models/textdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Change *TextDocument::executeAndGiveChange(Change* change, int coalesceId )
return documentFilter()->filterChange( this, change, coalesceId );
} else {

beginUndoGroup(); // automaticly group changes together (when changes happend on emition)
beginUndoGroup(); // automatically group changes together (when changes happen on emission)
change->execute( this );
Change* result = giveChangeWithoutFilter( change, coalesceId );
Q_UNUSED(result)
Expand Down
4 changes: 2 additions & 2 deletions edbee-lib/edbee/models/textdocumentscopes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void MultiLineScopedTextRange::setGrammarRule(TextGrammarRule* rule)
}


/// Returnst he active grammar rule
/// Returns the active grammar rule
TextGrammarRule* MultiLineScopedTextRange::grammarRule() const
{
return ruleRef_;
Expand Down Expand Up @@ -940,7 +940,7 @@ TextScopeList TextDocumentScopes::scopesAtOffset( int offset, bool includeEnd )
}


/// This method returns all scoped ranges at the given offest
/// This method returns all scoped ranges at the given offset
/// Hmmm this is almost exactly the same implementation as the scopesAtOffset method !? (perhaps we should refactor this)
///
/// Warning you MUST destroy (qDeleteAll) the list with scoped textranges returned by this list
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/edbee/models/texteditorconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void TextEditorConfig::setUndoGroupPerSpace(bool enable)
}


/// should the caret-offset been shown. The texteditor can signal a
/// should the caret-offset be shown. The texteditor can signal a
/// statusbar text to a slot. This text can optionally contain the
/// current caret offset
bool TextEditorConfig::showCaretOffset() const
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/edbee/models/texteditorkeymap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ QKeySequence TextEditorKeyMap::getSequence(const QString& name) const
}


/// Returns al list of all keysequences for the given command
/// Returns a list of all keysequences for the given command
/// This method will also search the parents for the given keysequences
QList<TextEditorKey*> TextEditorKeyMap::getAll(const QString& name) const
{
Expand Down
13 changes: 7 additions & 6 deletions edbee-lib/edbee/models/textrange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void TextRange::moveCaretByCharGroup(TextDocument *doc, int amount, const QStrin
}
}

// al other characters are valid
// all other characters are valid
if( !found ) {
QString str = characterGroups.join("");
str.append(whitespace);
Expand Down Expand Up @@ -778,7 +778,7 @@ void TextRangeSetBase::expandToWords(const QString& whitespace, const QStringLis


/// Selects the word at the given offset
/// @param offset the offset of the wordt to select
/// @param offset the offset of the word to select
void TextRangeSetBase::selectWordAt(int offset, const QString& whitespace, const QStringList& characterGroups )
{
TextRange newRange(offset,offset);
Expand All @@ -789,7 +789,7 @@ void TextRangeSetBase::selectWordAt(int offset, const QString& whitespace, const


/// Toggles a word selection at the given location
/// The idea is the following, double-click an empty place to select the wordt at the given location
/// The idea is the following, double-click an empty place to select the word at the given location
/// Double click an existing selection to remove the selection (and caret)
void TextRangeSetBase::toggleWordSelectionAt(int offset, const QString& whitespace, const QStringList& characterGroups)
{
Expand Down Expand Up @@ -848,7 +848,7 @@ void TextRangeSetBase::moveCaretsByCharGroup(int amount, const QString& whitespa
}


/// Moves al carets to the given line boundary (line-boundary automaticly switches between column 0 and first non-whitespace character)
/// Moves all carets to the given line boundary (line-boundary automatically switches between column 0 and first non-whitespace character)
/// @param direction the direction < 0 to the start of the line (or first char) > 0 to the end of the line
/// @param whitespace the characters to see as whitespace
void TextRangeSetBase::moveCaretsToLineBoundary(int direction , const QString& whitespace)
Expand Down Expand Up @@ -936,7 +936,7 @@ void TextRangeSetBase::mergeOverlappingRanges( bool joinBorders )



/// This mehtod sets the first range item
/// This method sets the first range item
/// @param anchor the anchor of the selection
/// @param caret the caret position
/// @param index the default range index (default 0)
Expand Down Expand Up @@ -979,7 +979,7 @@ TextDocument*TextRangeSetBase::textDocument() const

/// This method adds (or removes) the given spatial length at the given location.
///
/// It adjusts all locations, anchors with the given locations. It automaticly moves carets,
/// It adjusts all locations, anchors with the given locations. It automatically moves carets,
/// 'removes' selection etc.
///
/// @param pos the position to add the spatial length to
Expand Down Expand Up @@ -1232,6 +1232,7 @@ bool DynamicTextRangeSet::deleteMode() const
/// This method is notified if a change happens to the textbuffer
void DynamicTextRangeSet::textChanged(edbee::TextBufferChange change, QString oldText)
{
Q_UNUSED(oldText)
changeSpatial( change.offset(), change.length(), change.newTextLength(), stickyMode_, deleteMode_ );
}

Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/edbee/models/textrange.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class EDBEE_EXPORT TextRange {
/// This abstract class represents a set of textranges
/// The ranges are kept ordered and will not contain overlapping regions.
///
/// Every method automaticly orders and merges overlapping ranges.
/// Every method automatically orders and merges overlapping ranges.
/// Except when the changing_ flag is != 0. The sorting and merging only happens
/// when changing is 0. This way it possible to add/update muliple rages without the direct
/// performance hit of sorting and merging.
Expand Down
Loading

0 comments on commit 9872111

Please sign in to comment.