[umbrello] [Bug 449662] request: add undo feature
    Oliver Kellogg 
    bugzilla_noreply at kde.org
       
    Fri Feb 18 17:40:13 GMT 2022
    
    
  
https://bugs.kde.org/show_bug.cgi?id=449662
--- Comment #9 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
(In reply to Oliver Kellogg from comment #7)
> [...]
> I tried that and to my amazement, on KF5 it isn't even trying to look up the
> icon file (see attachment).
After some debugging, I guess this may have to do with QIcon caching.
Apparently, Qt somehow manages to fabricate an icon, e.g. for "edit-undo",
without searching for icon files in that moment.
For better understanding, I patched UMLApp::readOptions() as follows:
diff --git a/umbrello/uml.cpp b/umbrello/uml.cpp
index 7d094290b..6a81139d1 100644
--- a/umbrello/uml.cpp
+++ b/umbrello/uml.cpp
@@ -1131,7 +1132,12 @@ void UMLApp::saveOptions()
 void UMLApp::readOptions()
 {
     // bar status settings
-   
toolBar(QLatin1String("mainToolBar"))->applySettings(m_config->group("toolbar"));
+    KToolBar *mainToolBar = toolBar(QLatin1String("mainToolBar"));
+    mainToolBar->applySettings(m_config->group("toolbar"));
+    QIcon qi = QIcon::fromTheme(QLatin1String("edit-undo"));
+    editUndo->setIcon(qi);
+    mainToolBar->addAction(editUndo);
+
     // do config for work toolbar
     m_toolsbar->applySettings(m_config->group("workbar"));
     fileOpenRecent->loadEntries(m_config->group("Recent Files"));
... and with that patch, the Undo icon does appear!
IMHO the Undo/Redo actions are no longer automatically filled into
toolBar(QLatin1String("mainToolBar")) as they were in KDE4.
BTW, if the editUndo->setIcon(qi) call is left out then instead of the Undo
icon there appears the text "Undo".
-- 
You are receiving this mail because:
You are the assignee for the bug.
    
    
More information about the umbrello-devel
mailing list