Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package featherpad for openSUSE:Factory checked in at 2022-10-10 18:46:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/featherpad (Old) and /work/SRC/openSUSE:Factory/.featherpad.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "featherpad" Mon Oct 10 18:46:56 2022 rev:28 rq:1008924 version:1.3.3 Changes: -------- --- /work/SRC/openSUSE:Factory/featherpad/featherpad.changes 2022-09-13 15:11:13.424952514 +0200 +++ /work/SRC/openSUSE:Factory/.featherpad.new.2275/featherpad.changes 2022-10-10 18:47:22.775233404 +0200 @@ -1,0 +2,9 @@ +Sat Oct 8 08:31:18 UTC 2022 - Michael Vetter <mvet...@suse.com> + +- Update to 1.3.3: + * A crash on pasting empty clipboard is fixed. + The fix can be seen as a workaround because the root cause is in Qt. + * Silenced the compilation warnings with Qt 6.4. + * Covered indented here-docs in Bash and Perl syntax highlighting. + +------------------------------------------------------------------- Old: ---- V1.3.2.tar.gz New: ---- V1.3.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ featherpad.spec ++++++ --- /var/tmp/diff_new_pack.IrMzD6/_old 2022-10-10 18:47:23.279234501 +0200 +++ /var/tmp/diff_new_pack.IrMzD6/_new 2022-10-10 18:47:23.283234509 +0200 @@ -17,7 +17,7 @@ Name: featherpad -Version: 1.3.2 +Version: 1.3.3 Release: 0 Summary: Qt5-based plaintext editor License: GPL-3.0-only ++++++ V1.3.2.tar.gz -> V1.3.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/ChangeLog new/FeatherPad-1.3.3/ChangeLog --- old/FeatherPad-1.3.2/ChangeLog 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/ChangeLog 2022-10-07 22:54:48.000000000 +0200 @@ -1,3 +1,10 @@ +V1.3.3 +--------- + * Fixed crash on pasting with empty clipboard. + * Covered tab-indented here-docs in Bash syntax highlighting. + * Covered indented here-docs in Perl syntax highlighting. + * Silenced the compilation warnings with Qt ??? 6.4. + V1.3.2 --------- * Added a real Unix signal handler. It was needed to work around a Qt6 bug under Wayland, which reported close signals of Wayland WMs as non-spontaneous (there was no prompt on closing windows by Wayland WMs). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/NEWS new/FeatherPad-1.3.3/NEWS --- old/FeatherPad-1.3.2/NEWS 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/NEWS 2022-10-07 22:54:48.000000000 +0200 @@ -1,5 +1,5 @@ Latest version: - 10 Sep 2022, V1.3.2 + 8 Oct 2022, V1.3.3 See "ChangeLog" for changes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/README_OS2.md new/FeatherPad-1.3.3/README_OS2.md --- old/FeatherPad-1.3.2/README_OS2.md 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/README_OS2.md 2022-10-07 22:54:48.000000000 +0200 @@ -1,14 +1,14 @@ # FeatherPad for OS/2 (by josch1710) ## Clipboard -The Qt5 port doesn't support the system clipboard, yet +Before version 5.15.2-1, the OS/2 port of Qt5 didn't support the system clipboard (cf https://github.com/bitwiseworks/qtbase-os2/issues/123). -Because of this, FeatherPad can't support the system clipboard, either. -The application clipboard will work, though. +If you have an older version of Qt5, please update to the newest version. +Otherwise, FeatherPad can't support the system clipboard. The application clipboard will work, though. ## Command line -Because of limitation of Presentation Manager application, you will not see +Because of limitations of Presentation Manager applications, you will not see any output on the command line. If you want to see the help or version strings on the command line, you have to redirect the output, e.g. `featherpad -h | tee -`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/CMakeLists.txt new/FeatherPad-1.3.3/featherpad/CMakeLists.txt --- old/FeatherPad-1.3.2/featherpad/CMakeLists.txt 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/CMakeLists.txt 2022-10-07 22:54:48.000000000 +0200 @@ -20,7 +20,7 @@ # OS/2 needs an additional lib and tune the processor if(OS2) - #add_definitions(-mtune=${CMAKE_SYSTEM_PROCESSOR} -march=${CMAKE_SYSTEM_PROCESSOR}) + add_definitions(-mtune=pentium4 -march=pentium4) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lcx") endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/data/translations/featherpad_hi.ts new/FeatherPad-1.3.3/featherpad/data/translations/featherpad_hi.ts --- old/FeatherPad-1.3.2/featherpad/data/translations/featherpad_hi.ts 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/data/translations/featherpad_hi.ts 2022-10-07 22:54:48.000000000 +0200 @@ -193,87 +193,87 @@ <message> <location filename="../../fp.ui" line="572"/> <source>&Find</source> - <translation type="unfinished"></translation> + <translation>?????????????????? (&F)</translation> </message> <message> <location filename="../../fp.ui" line="578"/> <source>Ctrl+F</source> - <translation type="unfinished"></translation> + <translation>Ctrl+F</translation> </message> <message> <location filename="../../fp.ui" line="586"/> <source>Show/hide replacement dock</source> - <translation type="unfinished"></translation> + <translation>????????????????????????????????? ????????? ??????????????????/??????????????????</translation> </message> <message> <location filename="../../fp.ui" line="589"/> <source>Ctrl+R</source> - <translation type="unfinished"></translation> + <translation type="unfinished">Ctrl+R</translation> </message> <message> <location filename="../../fp.ui" line="594"/> <source>Save &As</source> - <translation type="unfinished"></translation> + <translation>?????? ????????? ????????? ?????????????????? (&A)</translation> </message> <message> <location filename="../../fp.ui" line="597"/> <source>Ctrl+Shift+S</source> - <translation type="unfinished"></translation> + <translation type="unfinished">Ctrl+Shift+S</translation> </message> <message> <location filename="../../fp.ui" line="602"/> <source>&Print</source> - <translation type="unfinished"></translation> + <translation>?????????????????? (&P)</translation> </message> <message> <location filename="../../fp.ui" line="605"/> <source>Ctrl+P</source> - <translation type="unfinished"></translation> + <translation>Ctrl+P</translation> </message> <message> <location filename="../../fp.ui" line="610"/> <source>Documen&t Properties</source> - <translation type="unfinished"></translation> + <translation>?????????????????????????????? ?????? ?????????</translation> </message> <message> <location filename="../../fp.ui" line="613"/> <source>Ctrl+Shift+D</source> - <translation type="unfinished"></translation> + <translation>Ctrl+Shift+D</translation> </message> <message> <location filename="../../fp.ui" line="618"/> <source>&Close</source> - <translation type="unfinished"></translation> + <translation>????????? ???????????? (&C)</translation> </message> <message> <location filename="../../fp.ui" line="621"/> <source>Ctrl+Shift+Q</source> - <translation type="unfinished"></translation> + <translation>Ctrl+Shift+Q</translation> </message> <message> <location filename="../../fp.ui" line="626"/> <source>&Quit</source> - <translation type="unfinished"></translation> + <translation>?????????????????? (&Q)</translation> </message> <message> <location filename="../../fp.ui" line="629"/> <source>Ctrl+Q</source> - <translation type="unfinished"></translation> + <translation>Ctrl+Q</translation> </message> <message> <location filename="../../fp.ui" line="637"/> <source>&Cut</source> - <translation type="unfinished"></translation> + <translation>??????????????? (&C)</translation> </message> <message> <location filename="../../fp.ui" line="640"/> <source>Ctrl+X</source> - <translation type="unfinished"></translation> + <translation>Ctrl+X</translation> </message> <message> <location filename="../../fp.ui" line="648"/> <source>C&opy</source> - <translation type="unfinished"></translation> + <translation>???????????? ???????????? (&o)</translation> </message> <message> <location filename="../../fp.ui" line="651"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/fpwin.cpp new/FeatherPad-1.3.3/featherpad/fpwin.cpp --- old/FeatherPad-1.3.2/featherpad/fpwin.cpp 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/fpwin.cpp 2022-10-07 22:54:48.000000000 +0200 @@ -2912,7 +2912,7 @@ QString lineStr = "</i> <b>" + tr ("Lines"); int i = str.indexOf (encodStr); int j = str.indexOf (lineStr); - int offset = encodStr.count() + 9; // size of ":</b> <i>" + int offset = encodStr.size() + 9; // size of ":</b> <i>" str.replace (i + offset, j - i - offset, checkToEncoding()); statusLabel->setText (str); } @@ -3652,7 +3652,7 @@ { QString lineStr = "</i> <b>" + tr ("Lines"); int j = str.indexOf (lineStr); - int offset = syntaxStr.count() + 9; // size of ":</b> <i>" + int offset = syntaxStr.size() + 9; // size of ":</b> <i>" str.replace (i + offset, j - i - offset, textEdit->getProg()); } } @@ -4549,7 +4549,7 @@ QString str = statusLabel->text(); QString selStr = tr ("Sel. Chars"); QString wordStr = " <b>" + tr ("Words"); - int i = str.indexOf (selStr) + selStr.count(); + int i = str.indexOf (selStr) + selStr.size(); int j = str.indexOf (wordStr); if (sel == 0) { @@ -4574,8 +4574,8 @@ charN.setNum (pos); charN = "<i> " + charN + "</i>"; QString str = posLabel->text(); QString scursorStr = "<b>" + tr ("Position:") + "</b>"; - int i = scursorStr.count(); - str.replace (i, str.count() - i, charN); + int i = scursorStr.size(); + str.replace (i, str.size() - i, charN); posLabel->setText (str); } /*************************/ @@ -6143,7 +6143,7 @@ { QString lineStr = "</i> <b>" + tr ("Lines"); int j = str.indexOf (lineStr); - int offset = syntaxStr.count() + 9; // size of ":</b> <i>" + int offset = syntaxStr.size() + 9; // size of ":</b> <i>" str.replace (i + offset, j - i - offset, thisTextEdit->getProg()); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/highlighter/highlighter-rest.cpp new/FeatherPad-1.3.3/featherpad/highlighter/highlighter-rest.cpp --- old/FeatherPad-1.3.2/featherpad/highlighter/highlighter-rest.cpp 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/highlighter/highlighter-rest.cpp 2022-10-07 22:54:48.000000000 +0200 @@ -109,7 +109,7 @@ if (text.indexOf (codeBlockStart1, 0, &match) == 0) { // also overwrites commentFormat /* the ".. code-block::" part will be formatted later */ - setFormat (match.capturedLength(), text.count() - match.capturedLength(), codeBlockFormat); + setFormat (match.capturedLength(), text.size() - match.capturedLength(), codeBlockFormat); setCurrentBlockState (codeBlockState); } /* perhaps the start of a code block */ @@ -124,10 +124,10 @@ if (TextBlockData *prevData = static_cast<TextBlockData *>(prevBlock.userData())) { QString prevLabel = prevData->labelInfo(); - if (prevLabel.startsWith ("c") && text.startsWith (prevLabel.right(prevLabel.count() - 1))) + if (prevLabel.startsWith ("c") && text.startsWith (prevLabel.right(prevLabel.size() - 1))) { // not a code block start but a comment isCommented = true; - setFormat (0, text.count(), commentFormat); + setFormat (0, text.size(), commentFormat); setCurrentBlockState (previousBlockState()); data->insertInfo (prevLabel); } @@ -139,7 +139,7 @@ { QTextCharFormat blockFormat = codeBlockFormat; blockFormat.setFontWeight (QFont::Bold); - setFormat (text.count() - 2, 2, blockFormat); + setFormat (text.size() - 2, 2, blockFormat); setCurrentBlockState (codeBlockState); } } @@ -165,7 +165,7 @@ setCurrentBlockState (codeBlockState); else { // a code line - setFormat (0, text.count(), codeBlockFormat); + setFormat (0, text.size(), codeBlockFormat); if (spaces == 0) // a line without indent only keeps the code block setCurrentBlockState (codeBlockState); else @@ -182,7 +182,7 @@ } else { - setFormat (0, text.count(), codeBlockFormat); + setFormat (0, text.size(), codeBlockFormat); setCurrentBlockState (previousBlockState()); data->insertInfo (prevLabel); } @@ -192,9 +192,9 @@ /* definitely a comment */ if (!isCodeLine) { - setFormat (0, text.count(), commentFormat); + setFormat (0, text.size(), commentFormat); if ((previousBlockState() >= endState || previousBlockState() < -1) - && prevLabel.startsWith ("c") && text.startsWith (prevLabel.right(prevLabel.count() - 1))) + && prevLabel.startsWith ("c") && text.startsWith (prevLabel.right(prevLabel.size() - 1))) { setCurrentBlockState (previousBlockState()); data->insertInfo (prevLabel); @@ -227,7 +227,7 @@ setCurrentBlockState (codeBlockState); else { // a code line - setFormat (0, text.count(), codeBlockFormat); + setFormat (0, text.size(), codeBlockFormat); if (spaces == 0) // a line without indent only keeps the code block setCurrentBlockState (codeBlockState); else @@ -248,15 +248,15 @@ { QString prevLabel = prevData->labelInfo(); if (text.isEmpty() - || ((prevLabel.startsWith ("c") && text.startsWith (prevLabel.right(prevLabel.count() - 1))) + || ((prevLabel.startsWith ("c") && text.startsWith (prevLabel.right(prevLabel.size() - 1))) || text.startsWith (prevLabel))) { setCurrentBlockState (previousBlockState()); data->insertInfo (prevLabel); if (prevLabel.startsWith ("c")) // a comment continues - setFormat (0, text.count(), commentFormat); + setFormat (0, text.size(), commentFormat); else - setFormat (0, text.count(), codeBlockFormat); + setFormat (0, text.size(), codeBlockFormat); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/highlighter/highlighter.cpp new/FeatherPad-1.3.3/featherpad/highlighter/highlighter.cpp --- old/FeatherPad-1.3.2/featherpad/highlighter/highlighter.cpp 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/highlighter/highlighter.cpp 2022-10-07 22:54:48.000000000 +0200 @@ -841,7 +841,7 @@ /* without space after "<<" and with ";" at the end */ //hereDocDelimiter.setPattern ("<<([A-Za-z0-9_]+)(?:;)|<<(\'[A-Za-z0-9_]+\')(?:;)|<<(\"[A-Za-z0-9_]+\")(?:;)"); /* can contain spaces inside quote marks or backquotes and usually has ";" at the end */ - hereDocDelimiter.setPattern ("<<(?![0-9]+\\b)([A-Za-z0-9_]+)(?:;{0,1})|<<(?:\\s*)(\'[A-Za-z0-9_\\s]+\')(?:;{0,1})|<<(?:\\s*)(\"[A-Za-z0-9_\\s]+\")(?:;{0,1})|<<(?:\\s*)(`[A-Za-z0-9_\\s]+`)(?:;{0,1})"); + hereDocDelimiter.setPattern ("<<~?(?![0-9]+\\b)([A-Za-z0-9_]+)(?:;{0,1})|<<~?(?:\\s*)(\'[A-Za-z0-9_\\s]+\')(?:;{0,1})|<<~?(?:\\s*)(\"[A-Za-z0-9_\\s]+\")(?:;{0,1})|<<~?(?:\\s*)(`[A-Za-z0-9_\\s]+`)(?:;{0,1})"); } else { @@ -1141,12 +1141,6 @@ rule.format = desktopFormat; highlightingRules.append (rule); - desktopFormat.setForeground (Blue); - /* [...] and before = (like ...[en]=)*/ - rule.pattern.setPattern ("^[^\\=\\[]+\\[.*\\](?=\\s*\\=)"); - rule.format = desktopFormat; - highlightingRules.append (rule); - if (progLan == "toml") { desktopFormat.setForeground (Violet); @@ -1155,6 +1149,12 @@ } else { + desktopFormat.setForeground (Blue); + /* [...] and before = (like ...[en]=) */ + rule.pattern.setPattern ("^[^\\=\\[]+\\[.*\\](?=\\s*\\=)"); + rule.format = desktopFormat; + highlightingRules.append (rule); + desktopFormat.setForeground (DarkGreenAlt); /* before = and [] */ rule.pattern.setPattern ("^[^\\=\\[]+(?=(\\[.*\\])*\\s*\\=)"); @@ -2042,11 +2042,13 @@ && currentBlockState() % 2 == 0) { QRegularExpressionMatch match; - QRegularExpression delimPart (progLan == "ruby" ? "<<(-|~){0,1}" : "<<\\s*"); + QRegularExpression delimPart (progLan == "ruby" ? "<<(-|~){0,1}" : + progLan == "perl" ? "<<~?\\s*" : + "<<\\s*"); if (text.lastIndexOf (delimPart, pos, &match) == pos - match.capturedLength()) return true; // escaped start quote if (progLan == "perl") // space is allowed - delimPart.setPattern ("<<(?:\\s*)(\'[A-Za-z0-9_\\s]+)|<<(?:\\s*)(\"[A-Za-z0-9_\\s]+)|<<(?:\\s*)(`[A-Za-z0-9_\\s]+)"); + delimPart.setPattern ("<<~?(?:\\s*)(\'[A-Za-z0-9_\\s]+)|<<~?(?:\\s*)(\"[A-Za-z0-9_\\s]+)|<<~?(?:\\s*)(`[A-Za-z0-9_\\s]+)"); else if (progLan == "ruby") delimPart.setPattern ("<<(?:-|~){0,1}(\'[A-Za-z0-9]+)|<<(?:-|~){0,1}(\"[A-Za-z0-9]+)"); else @@ -3634,13 +3636,24 @@ delimStr = delimStr.split ('\'').at (1); if (delimStr.contains ('\"')) delimStr = delimStr.split ('\"').at (1); - /* remove the start backslash if it exists */ - if (QString (delimStr.at (0)) == "\\") + /* remove the start backslash (with bash) if it exists */ + if (delimStr.startsWith ("\\")) delimStr = delimStr.remove (0, 1); } if (!delimStr.isEmpty()) { + setFormat (text.indexOf (delimStr, pos), + delimStr.length(), + delimFormat); + + if (progLan == "sh" + && text.length() > pos + 2 && text.at (pos + 2) == '-') + { + /* "<<-" causes all leading tab characters to be ignored at + the end of the here-doc. So, it should be distinguished. */ + delimStr = "-" + delimStr; + } int n = static_cast<int>(qHash (delimStr)); int state = 2 * (n + (n >= 0 ? endState/2 + 1 : 0)); // always an even number but maybe negative if (progLan == "sh") @@ -3655,9 +3668,6 @@ } } setCurrentBlockState (state); - setFormat (text.indexOf (delimStr, pos), - delimStr.length(), - delimFormat); TextBlockData *data = static_cast<TextBlockData *>(currentBlock().userData()); if (!data) return false; @@ -3683,15 +3693,29 @@ { QRegularExpressionMatch rMatch; /* the terminating string must appear on a line by itself */ - QRegularExpression r ("\\s*" + delimStr + "(?=\\s*$)"); + QRegularExpression r ("^\\s*" + delimStr + "(?=\\s*$)"); if (text.indexOf (r, 0, &rMatch) == 0) l = rMatch.capturedLength(); } - else if (text == delimStr - || (text.startsWith (delimStr) - && text.indexOf (QRegularExpression ("\\W+")) == delimStr.length())) + else // if (progLan == "sh") { - l = delimStr.length(); + if (!delimStr.startsWith ("-")) + { + if (text == delimStr) + l = delimStr.length(); + } + else if (delimStr.length() > 1) + { // the here-doc started with "<<-" +#if (QT_VERSION < QT_VERSION_CHECK(6,0,0)) + QString tmp = delimStr.mid (1); +#else + QString tmp = delimStr.sliced (1); +#endif + QRegularExpression r ("^\\t*" + tmp + "$"); + QRegularExpressionMatch rMatch; + if (text.indexOf (r, 0, &rMatch) == 0) + l = rMatch.capturedLength(); + } } if (l > 0) { @@ -3773,12 +3797,12 @@ setFormat (indx, 1, debFormat); indx ++; - if (indx < text.count()) + if (indx < text.size()) { /* after ":" */ debFormat.setFontWeight (QFont::Normal); debFormat.setForeground (DarkGreenAlt); - setFormat (indx, text.count() - indx , debFormat); + setFormat (indx, text.size() - indx , debFormat); } } } @@ -3786,7 +3810,7 @@ { formatFurther = true; debFormat.setForeground (DarkGreenAlt); - setFormat (0, text.count(), debFormat); + setFormat (0, text.size(), debFormat); } if (formatFurther) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/main.cpp new/FeatherPad-1.3.3/featherpad/main.cpp --- old/FeatherPad-1.3.2/featherpad/main.cpp 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/main.cpp 2022-10-07 22:54:48.000000000 +0200 @@ -32,7 +32,7 @@ int main (int argc, char **argv) { const QString name = "FeatherPad"; - const QString version = "1.3.2"; + const QString version = "1.3.3"; const QString firstArg = QString::fromUtf8 (argv[1]); if (firstArg == "--help" || firstArg == "-h") { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/tabbar.cpp new/FeatherPad-1.3.3/featherpad/tabbar.cpp --- old/FeatherPad-1.3.2/featherpad/tabbar.cpp 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/tabbar.cpp 2022-10-07 22:54:48.000000000 +0200 @@ -187,13 +187,21 @@ /*************************/ void TabBar::finishMouseMoveEvent() { - QMouseEvent finishingEvent (QEvent::MouseMove, QPoint(), Qt::NoButton, Qt::NoButton, Qt::NoModifier); + QMouseEvent finishingEvent (QEvent::MouseMove, QPoint(), +#if (QT_VERSION >= QT_VERSION_CHECK(6,4,0)) + QCursor::pos(), +#endif + Qt::NoButton, Qt::NoButton, Qt::NoModifier); mouseMoveEvent (&finishingEvent); } /*************************/ void TabBar::releaseMouse() { - QMouseEvent releasingEvent (QEvent::MouseButtonRelease, QPoint(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); + QMouseEvent releasingEvent (QEvent::MouseButtonRelease, QPoint(), +#if (QT_VERSION >= QT_VERSION_CHECK(6,4,0)) + QCursor::pos(), +#endif + Qt::LeftButton, Qt::NoButton, Qt::NoModifier); mouseReleaseEvent (&releasingEvent); } /*************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FeatherPad-1.3.2/featherpad/textedit.cpp new/FeatherPad-1.3.3/featherpad/textedit.cpp --- old/FeatherPad-1.3.2/featherpad/textedit.cpp 2022-09-10 17:27:03.000000000 +0200 +++ new/FeatherPad-1.3.3/featherpad/textedit.cpp 2022-10-07 22:54:48.000000000 +0200 @@ -367,8 +367,8 @@ n += qMax (qRound (qAbs (x) / spaceL) - 1, 0); // x is negative for RTL ++i; } - n += txt.count(); - n = spaceTab.count() - n % spaceTab.count(); + n += txt.size(); + n = spaceTab.size() - n % spaceTab.size(); QString res; for (int i = 0 ; i < n; ++i) res += " "; @@ -404,9 +404,9 @@ n += qMax (qRound (qAbs (x) / spaceL) - 1, 0); ++i; } - n += txt.count(); - n = n % textTab_.count(); - if (n == 0) n = textTab_.count(); + n += txt.size(); + n = n % textTab_.size(); + if (n == 0) n = textTab_.size(); if (twoSpace) n = qMin (n, 2); @@ -1281,7 +1281,7 @@ { keepTxtCurHPos_ = false; // txtCurHPos_ isn't reset here because there may be nothing to paste - pasting_ = true; // see insertFromMimeData() + pasting_ = true; // see insertFromMimeData() QPlainTextEdit::paste(); pasting_ = false; } @@ -1316,11 +1316,13 @@ // We also want to control whether the pasted URLs should be opened. bool TextEdit::canInsertFromMimeData (const QMimeData* source) const { - return source->hasUrls() || QPlainTextEdit::canInsertFromMimeData (source); + return source != nullptr + && (source->hasUrls() || QPlainTextEdit::canInsertFromMimeData (source)); } void TextEdit::insertFromMimeData (const QMimeData* source) { keepTxtCurHPos_ = false; + if (source == nullptr) return; if (source->hasUrls()) { const QList<QUrl> urlList = source->urls(); @@ -1359,7 +1361,7 @@ } } } - else + else if (source->hasText()) QPlainTextEdit::insertFromMimeData (source); } /*************************/ @@ -2600,7 +2602,7 @@ i = 0; continue; } - cursor.setPosition (cursor.anchor() + subStr.count()); + cursor.setPosition (cursor.anchor() + subStr.size()); break; } else @@ -2648,7 +2650,7 @@ while (cursor.anchor() > cursor.block().position()) { /* ... move the cursor to left and search backward until a match is found */ - cursor.setPosition (cursor.block().position() + subStr.count()); + cursor.setPosition (cursor.block().position() + subStr.size()); if (!findBackward (document(), subStr, cursor, flags)) return QTextCursor(); } @@ -2694,7 +2696,7 @@ i = 0; continue; } - cursor.setPosition (cursor.anchor() - subStr.count()); + cursor.setPosition (cursor.anchor() - subStr.size()); break; } else