[Differential] [Commented On] D4130: Let KConfigDialogManager get a property's change signal from the metaObject

Elvis Angelaccio noreply at phabricator.kde.org
Sat Jan 14 19:20:37 UTC 2017


elvisangelaccio added a comment.


  I see a problem with this patch, it seems it breaks custom widgets that are using properties //without// a `NOTIFY` signal.
  
  In Ark we are using a plain QTreeWidget in the config dialog, and we have the following code:
  
    // Set the custom property that KConfigDialogManager will use to update the settings.
    kcfg_disabledPlugins->setProperty("kcfg_property", QByteArray("disabledPlugins"));
    // Tell KConfigDialogManager to monitor the itemChanged signal for a QTreeWidget instance in the dialog.
    KConfigDialogManager::changedMap()->insert(QString::fromLatin1(QTreeWidget::staticMetaObject.className()),
                                               SIGNAL(itemChanged(QTreeWidgetItem*,int)));
  
  If I remove the `changedMap()` line in ark and apply your patch, the Apply button in the config dialog is no longer enabled whenever the items in the QTreeWidget change.
  
  This could be solved by subclassing QTreeWidget, but that would be annoying :p

REPOSITORY
  R265 KConfigWidgets

REVISION DETAIL
  https://phabricator.kde.org/D4130

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kossebau, #frameworks
Cc: elvisangelaccio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170114/99574686/attachment.html>


More information about the Kde-frameworks-devel mailing list