Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package klevernotes for openSUSE:Factory 
checked in at 2025-04-08 17:51:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/klevernotes (Old)
 and      /work/SRC/openSUSE:Factory/.klevernotes.new.1907 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "klevernotes"

Tue Apr  8 17:51:22 2025 rev:4 rq:1267439 version:1.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/klevernotes/klevernotes.changes  2025-03-19 
22:33:22.641250960 +0100
+++ /work/SRC/openSUSE:Factory/.klevernotes.new.1907/klevernotes.changes        
2025-04-08 17:52:10.012848866 +0200
@@ -1,0 +2,10 @@
+Sun Apr  6 19:11:56 UTC 2025 - Christophe Marin <christo...@krop.fr>
+
+- Update to 1.2.1
+  * Remove the requirement for the storage name (no longer
+    need to be "klevernotes")
+  * Fix code block rendering issue with HTML tag
+  * Fix todos saving
+  * Allow items to be moved to the storage root
+
+-------------------------------------------------------------------

Old:
----
  klevernotes-1.2.0.tar.xz
  klevernotes-1.2.0.tar.xz.sig

New:
----
  klevernotes-1.2.1.tar.xz
  klevernotes-1.2.1.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ klevernotes.spec ++++++
--- /var/tmp/diff_new_pack.2XvjoC/_old  2025-04-08 17:52:10.500869321 +0200
+++ /var/tmp/diff_new_pack.2XvjoC/_new  2025-04-08 17:52:10.504869489 +0200
@@ -21,7 +21,7 @@
 
 %bcond_without released
 Name:           klevernotes
-Version:        1.2.0
+Version:        1.2.1
 Release:        0
 Summary:        Note taking and management application
 License:        GPL-3.0-or-later

++++++ klevernotes-1.2.0.tar.xz -> klevernotes-1.2.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/CMakeLists.txt 
new/klevernotes-1.2.1/CMakeLists.txt
--- old/klevernotes-1.2.0/CMakeLists.txt        2025-03-17 17:54:59.000000000 
+0100
+++ new/klevernotes-1.2.1/CMakeLists.txt        2025-03-19 21:29:43.000000000 
+0100
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# SPDX-FileCopyrightText: 2022-2024 Louis Schul <schul9lo...@gmail.com>
+# SPDX-FileCopyrightText: 2022-2025 Louis Schul <schul9lo...@gmail.com>
 
 cmake_minimum_required(VERSION 3.16)
 
-project(klevernotes VERSION "1.1.1")
+project(klevernotes VERSION "1.2.1")
 
 include(FeatureSummary)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/org.kde.klevernotes.metainfo.xml 
new/klevernotes-1.2.1/org.kde.klevernotes.metainfo.xml
--- old/klevernotes-1.2.0/org.kde.klevernotes.metainfo.xml      2025-03-17 
17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/org.kde.klevernotes.metainfo.xml      2025-03-19 
21:29:43.000000000 +0100
@@ -242,6 +242,17 @@
     <color type="primary" scheme_preference="dark">#254545</color>
   </branding>
   <releases>
+    <release version="1.2.1" date="2025-03-19">
+      <description>
+        <p>Bug fixing release:</p>
+        <ul>
+          <li>Remove the requirement for the storage name (no longer need to 
be "klevernotes")</li>
+          <li>Fix code block rendering issue with HTML tag</li>
+          <li>Fix todos saving</li>
+          <li>Allow items to be moved to the storage root</li>
+        </ul>
+      </description>
+    </release>
     <release version="1.2.0" date="2025-03-17">
       <description>
         <p>What's new:</p>
@@ -285,8 +296,8 @@
         </p>
         <ul>
           <li> The parsing is now done on a separated thread, so parsing very 
large notes should still be smooth !</li>
-           <li> The rendering is now disabled if the preview is disabled, 
saving some resources !</li> 
-           <li> Using the toolbar will now add or remove text in a single undo 
block, no more double/triple `Ctrl+Z` to go back to your previous state.</li> 
+          <li> The rendering is now disabled if the preview is disabled, 
saving some resources !</li>
+          <li> Using the toolbar will now add or remove text in a single undo 
block, no more double/triple `Ctrl+Z` to go back to your previous state.</li>
         </ul>
         <p>The editor now has the abilty to be "WYSIWYG".</p>
         <p>By default, the markdown tags will be smaller than the rest of text 
by 50%, this can of course be tweaked in the settings.</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/klevernotes-1.2.0/src/contents/ui/dialogs/MoveDialog.qml 
new/klevernotes-1.2.1/src/contents/ui/dialogs/MoveDialog.qml
--- old/klevernotes-1.2.0/src/contents/ui/dialogs/MoveDialog.qml        
2025-03-17 17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/contents/ui/dialogs/MoveDialog.qml        
2025-03-19 21:29:43.000000000 +0100
@@ -19,6 +19,7 @@
     required property bool isNote
 
     readonly property var clickedIndex: searchBar.clickedIndex
+    readonly property bool moveToRoot: moveToRootSwitch.checked
 
     title: i18nc("@title:dialog, to move a folder/note", "Move")
 
@@ -38,6 +39,7 @@
     contentItem: ColumnLayout {
         spacing: Kirigami.Units.largeSpacing * 2
         Label {
+            id: subtitle
             text: isNote 
                 ? i18nc("@subtitle:dialog", "Where do you want to move this 
note ?") 
                 : i18nc("@subtitle:dialog", "Where do you want to move this 
folder ?")
@@ -45,9 +47,18 @@
             Layout.fillWidth: true
         }
 
+        FormCard.FormDelegateSeparator { above: subtitle; below: 
moveToRootSwitch }
+
+        FormCard.FormSwitchDelegate {
+            id: moveToRootSwitch
+            text: i18nc("@label:checkbox, move this folder/note to the root of 
the storage", "Move to storage root")
+        }
+
         SearchBar {
             id: searchBar
 
+            enabled: !moveToRootSwitch.checked
+
             treeView: textPromptDialog.treeView
             inSideBar: false
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/klevernotes-1.2.0/src/contents/ui/dialogs/StorageDialog.qml 
new/klevernotes-1.2.1/src/contents/ui/dialogs/StorageDialog.qml
--- old/klevernotes-1.2.0/src/contents/ui/dialogs/StorageDialog.qml     
2025-03-17 17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/contents/ui/dialogs/StorageDialog.qml     
2025-03-19 21:29:43.000000000 +0100
@@ -91,13 +91,7 @@
         if (userChoice === setupPopup.newStorage){
             folderPath = folderPath.concat("/klevernotes")
         }
-        var pathEnd = folderPath.substring(folderPath.length, 
folderPath.length-11)
-
-        if (pathEnd.toLowerCase() !== "klevernotes") {
-            subtitle = i18nc("@subtitle:dialog, Storage as in 'the folder 
where all the notes will be stored'", "It looks like the selected folder is not 
a KleverNotes storage.\n\nPlease choose a location for your future KleverNotes 
storage or select an existing one.")
-            setupPopup.folder = ""
-            return
-        }
+        
         Config.storagePath = folderPath
 
         const fullNotification = setupPopup.userChoice + folderPath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/src/contents/ui/pages/MainPage.qml 
new/klevernotes-1.2.1/src/contents/ui/pages/MainPage.qml
--- old/klevernotes-1.2.0/src/contents/ui/pages/MainPage.qml    2025-03-17 
17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/contents/ui/pages/MainPage.qml    2025-03-19 
21:29:43.000000000 +0100
@@ -81,7 +81,7 @@
 
         ToDoView {
             id: todoView
-            path: hasNote ? currentlySelected.path + "/todo.json" : ""
+            path: hasNote ? currentlySelected.path + ".todo.json" : ""
             visible: 0.5 < opacity
             opacity: 0
             Layout.fillHeight: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/klevernotes-1.2.0/src/contents/ui/sideBar/ContextMenu.qml 
new/klevernotes-1.2.1/src/contents/ui/sideBar/ContextMenu.qml
--- old/klevernotes-1.2.0/src/contents/ui/sideBar/ContextMenu.qml       
2025-03-17 17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/contents/ui/sideBar/ContextMenu.qml       
2025-03-19 21:29:43.000000000 +0100
@@ -98,9 +98,13 @@
         treeView: contextMenu.treeView
         isNote: treeView.currentClickedItem.isNote
 
-        onApplied: if (clickedIndex && treeView.currentModelIndex) {
+        onApplied: if ((clickedIndex || moveDialog.moveToRoot) && 
treeView.currentModelIndex) {
             applicationWindow().saveState()
-            treeView.model.moveRow(treeView.currentModelIndex, clickedIndex)
+            if (moveDialog.moveToRoot) {
+                treeView.model.moveRow(treeView.currentModelIndex)
+            } else {
+                treeView.model.moveRow(treeView.currentModelIndex, 
clickedIndex)
+            } 
             close()
         }
         onRejected: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/src/logic/parser/md4qt/parser.h 
new/klevernotes-1.2.1/src/logic/parser/md4qt/parser.h
--- old/klevernotes-1.2.0/src/logic/parser/md4qt/parser.h       2025-03-17 
17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/logic/parser/md4qt/parser.h       2025-03-19 
21:29:43.000000000 +0100
@@ -8828,7 +8828,7 @@
         item->setChecked(checked);
     }
 
-    bool fensedCode = false;
+    bool fencedCode = false;
     typename Trait::String startOfCode;
     bool wasEmptyLine = false;
 
@@ -8887,24 +8887,24 @@
 
     if (processHtml(std::prev(it)) == -2) {
         for (auto last = fr.m_data.end(); it != last; ++it, ++pos) {
-            if (!fensedCode) {
-                fensedCode = 
isCodeFences<Trait>(it->first.asString().startsWith(typename 
Trait::String(indent, Trait::latin1ToChar(' ')))
+            if (!fencedCode) {
+                fencedCode = 
isCodeFences<Trait>(it->first.asString().startsWith(typename 
Trait::String(indent, Trait::latin1ToChar(' ')))
                                                      ? 
it->first.asString().sliced(indent)
                                                      : it->first.asString());
 
-                if (fensedCode) {
+                if (fencedCode) {
                     startOfCode = startSequence<Trait>(it->first.asString());
                 }
-            } else if (fensedCode
+            } else if (fencedCode
                        && 
isCodeFences<Trait>(it->first.asString().startsWith(typename 
Trait::String(indent, Trait::latin1ToChar(' ')))
                                                   ? 
it->first.asString().sliced(indent)
                                                   : it->first.asString(),
                                               true)
                        && 
startSequence<Trait>(it->first.asString()).contains(startOfCode)) {
-                fensedCode = false;
+                fencedCode = false;
             }
 
-            if (!fensedCode) {
+            if (!fencedCode) {
                 long long int newIndent = 0;
                 bool ok = false;
 
@@ -8959,7 +8959,26 @@
                                 wasEmptyLine = false;
                             }
 
-                            if (ok || ns >= indent + newIndent || ns == 
it->first.length() || !wasEmptyLine) {
+                            auto currentStr = 
it->first.asString().startsWith(typename Trait::String(indent, 
Trait::latin1ToChar(' ')))
+                                ? it->first.sliced(indent)
+                                : it->first;
+
+                            const auto type = whatIsTheLine(currentStr);
+
+                            bool mayBreak = false;
+
+                            switch (type) {
+                            case BlockType::Code:
+                            case BlockType::Blockquote:
+                            case BlockType::Heading:
+                                mayBreak = true;
+                                break;
+
+                            default:
+                                break;
+                            }
+
+                            if (ok || ns >= indent + newIndent || ns == 
it->first.length() || (!wasEmptyLine && !mayBreak)) {
                                 nestedList.push_back(*it);
                             } else {
                                 break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/src/logic/parser/renderer.cpp 
new/klevernotes-1.2.1/src/logic/parser/renderer.cpp
--- old/klevernotes-1.2.0/src/logic/parser/renderer.cpp 2025-03-17 
17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/logic/parser/renderer.cpp 2025-03-19 
21:29:43.000000000 +0100
@@ -201,17 +201,17 @@
         static const QString plantUMLStr = QStringLiteral("plantuml");
 
         const QString lang = c->syntax();
-        const QString _text = c->text();
-        QString code = _text;
+        const QString text = c->text();
 
         QString returnValue;
         if (m_pluginHelper && m_pumlEnable && (lang.toLower() == pumlStr || 
lang.toLower() == plantUMLStr)) {
-            QPair<QString, QString> imageInfo = 
m_pluginHelper->pumlParserUtils()->renderCode(_text, m_pumlDark);
+            QPair<QString, QString> imageInfo = 
m_pluginHelper->pumlParserUtils()->renderCode(text, m_pumlDark);
 
             returnValue = image(imageInfo.first, imageInfo.second);
         } else {
-            if (m_pluginHelper) {
-                code = 
m_pluginHelper->highlightParserUtils()->getCode(m_codeHighlight, _text, lang);
+            QString code = prepareTextForHtml(text);
+            if (m_pluginHelper && !lang.isEmpty()) {
+                code = 
m_pluginHelper->highlightParserUtils()->getCode(m_codeHighlight, text, lang);
             }
             returnValue = Renderer::code(code);
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/src/logic/treeview/treeItem.h 
new/klevernotes-1.2.1/src/logic/treeview/treeItem.h
--- old/klevernotes-1.2.0/src/logic/treeview/treeItem.h 2025-03-17 
17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/logic/treeview/treeItem.h 2025-03-19 
21:29:43.000000000 +0100
@@ -117,7 +117,7 @@
 private:
     // Position in tree
     std::vector<std::unique_ptr<TreeItem>> m_children;
-    TreeItem *m_parentItem;
+    TreeItem *m_parentItem = nullptr;
 
     NoteTreeModel *m_model;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/src/logic/treeview/treeModel.cpp 
new/klevernotes-1.2.1/src/logic/treeview/treeModel.cpp
--- old/klevernotes-1.2.0/src/logic/treeview/treeModel.cpp      2025-03-17 
17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/logic/treeview/treeModel.cpp      2025-03-19 
21:29:43.000000000 +0100
@@ -107,8 +107,10 @@
     }
 
     const auto childItem = static_cast<TreeItem *>(index.internalPointer());
+    if (childItem == m_rootItem.get()) {
+        return {};
+    }
     const auto parentItem = childItem->getParentItem();
-
     if (parentItem == m_rootItem.get()) {
         return {};
     }
@@ -229,7 +231,11 @@
     }
 }
 
-void NoteTreeModel::handleMoveItem(const QModelIndex &rowModelIndex, const 
QModelIndex &newParentIndex, const QString &name, MoveError error)
+void NoteTreeModel::handleMoveItem(const QModelIndex &rowModelIndex,
+                                   const QModelIndex &newParentIndex,
+                                   const QString &path,
+                                   const QString &name,
+                                   MoveError error)
 {
     const auto newParent = static_cast<TreeItem 
*>(newParentIndex.internalPointer());
 
@@ -244,7 +250,9 @@
         break;
     }
     default: {
-        newParent->askForExpand(newParentIndex);
+        if (static_cast<TreeItem *>(newParentIndex.internalPointer()) != 
m_rootItem.get()) {
+            newParent->askForExpand(newParentIndex);
+        }
 
         const int oldRowNumber = rowModelIndex.row();
         const QModelIndex oldParentIndex = parent(rowModelIndex);
@@ -256,8 +264,8 @@
         // actually remove the row, that's why we don't use the already 
avalaible 'row' TreeItem
         auto row = oldParent->takeUniqueChildAt(oldRowNumber);
         row->setName(name);
+        row->setPath(path);
         newParent->appendChild(std::move(row));
-
         endMoveRows();
 
         Q_EMIT forceFocus(createIndex(newRowIndex, 0, 
newParent->child(newRowIndex)));
@@ -265,10 +273,12 @@
     }
 }
 
-void NoteTreeModel::moveRow(const QModelIndex &rowModelIndex, const 
QModelIndex &newParentIndex, const QString &newName)
+void NoteTreeModel::moveRow(const QModelIndex &rowModelIndex, const 
QModelIndex &_newParentIndex, const QString &newName)
 {
     auto row = static_cast<TreeItem *>(rowModelIndex.internalPointer());
 
+    QModelIndex newParentIndex = _newParentIndex.isValid() ? _newParentIndex : 
createIndex(m_rootItem->row(), 0, m_rootItem.get());
+
     const auto newParent = static_cast<TreeItem 
*>(newParentIndex.internalPointer());
 
     const QString rowDir = row->getDir();
@@ -277,6 +287,7 @@
     const QString newParentPath = newParent->getPath();
     const QString finalName = newName.isEmpty() ? rowName : newName;
     const QString newBasePath = newParentPath + slash + finalName;
+    QString finalPath = newParentPath;
 
     MoveError error;
     QDir dir;
@@ -286,6 +297,8 @@
         const QString newNotePath = newBasePath + mdEnding;
         const QString newTodoPath = newBasePath + todoEnding;
 
+        finalPath = newNotePath;
+
         error = (dir.exists(newNotePath) || dir.exists(newTodoPath)) ? 
MoveError::NameExist : MoveError::NoError;
 
         if (!error) {
@@ -299,7 +312,7 @@
         }
     }
 
-    return handleMoveItem(rowModelIndex, newParentIndex, finalName, error);
+    return handleMoveItem(rowModelIndex, newParentIndex, finalPath, finalName, 
error);
 }
 
 void NoteTreeModel::rename(const QModelIndex &rowModelIndex, const QString 
&newName)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/src/logic/treeview/treeModel.h 
new/klevernotes-1.2.1/src/logic/treeview/treeModel.h
--- old/klevernotes-1.2.0/src/logic/treeview/treeModel.h        2025-03-17 
17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/logic/treeview/treeModel.h        2025-03-19 
21:29:43.000000000 +0100
@@ -89,7 +89,7 @@
      * @param newParentIndex: The QModelIndex pointing to the new parent for 
the row
      * @param newName: The possible new name for the row
      */
-    Q_INVOKABLE void moveRow(const QModelIndex &rowModelIndex, const 
QModelIndex &newParentIndex, const QString &newName = QLatin1String());
+    Q_INVOKABLE void moveRow(const QModelIndex &rowModelIndex, const 
QModelIndex &newParentIndex = {}, const QString &newName = QLatin1String());
 
     /*
      * Remove the Item from the model
@@ -219,6 +219,7 @@
      *
      * @param rowModelIndex: The QModelIndex pointing to the Item that has 
been moved
      * @param newParentIndex: The QModelIndex pointing to the new parent of 
the Item
+     * @param newPath: The potential new path for the row
      * @param newName: The potential new name for the row
      * @param error: A potential error code based on the `MoveError` enum
      *
@@ -226,7 +227,7 @@
      * @signal errorOccurred: If the Item could not be moved
      * @signal forceFocus: Ask for the Item to be focused
      */
-    void handleMoveItem(const QModelIndex &rowModelIndex, const QModelIndex 
&newParentIndex, const QString &newName, MoveError error);
+    void handleMoveItem(const QModelIndex &rowModelIndex, const QModelIndex 
&newParentIndex, const QString &newPath, const QString &newName, MoveError 
error);
 
     // Storage Handler
     /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/klevernotes-1.2.0/src/main.cpp 
new/klevernotes-1.2.1/src/main.cpp
--- old/klevernotes-1.2.0/src/main.cpp  2025-03-17 17:54:59.000000000 +0100
+++ new/klevernotes-1.2.1/src/main.cpp  2025-03-19 21:29:43.000000000 +0100
@@ -55,13 +55,13 @@
         // A displayable program name string.
         i18nc("@title", "KleverNotes"),
         // The program version string.
-        QStringLiteral("1.1.1"),
+        QStringLiteral("1.2.1"),
         // Short description of what the app does.
         i18n("Note taking and management application"),
         // The license this code is released under.
         KAboutLicense::GPL,
         // Copyright Statement.
-        i18n("(c) 2022-2023"));
+        i18n("(c) 2022-2025"));
     aboutData.addAuthor(i18nc("@info:credit", "Louis Schul"),
                         // i18nc("@info:credit", "Author Role"),
                         QStringLiteral("schul9lo...@outlook.fr")

Reply via email to