[PATCH] more than one config file in a KConfigDialog
Michael Brade
brade at kde.org
Sun Apr 18 23:06:14 BST 2004
Hi,
attached is a patch that adds a new function KConfigDialog::addPage() which
allows the use of more than one KConfigSkeleton, thus making multiple
configfiles in KConfigDialog possible.
I added a QMap with a per-page KConfigDialogManager in that case of the page
having it's own config file. I also did some cleanups regarding code
duplication (apart from the show() method - I'd rather use updateButtons
directly but it emits widgetModified... :( I didn't fix that yet).
Also, I added an emit widgetModified() to
KConfigDialogManager::updateWidgets(), apart from consistency with
updateSettings() this is needed for updateWidgetsDefault() or the case where
the user clicks on "Defaults": all the managers have to update their widgets
and only _then_ KConfigDialog::updateButtons() should be called - which is
not guaranteed without this signal because of arbitrary signal-slot execution
by Qt.
It all happily works now for KNotes, btw. So it should be bugfree :-) Please
review and comment, otherwise I'll commit tomorrow evening or on Tuesday.
Cheers,
--
Michael Brade; KDE Developer, Student of Computer Science
|-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
°--web: http://www.kde.org/people/michaelb.html
KDE 3: The Next Generation in Desktop Experience
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kconfigdialog.diff
Type: text/x-diff
Size: 12462 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040419/49f4f864/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kconfigdialogmanager.cpp.diff
Type: text/x-diff
Size: 969 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040419/49f4f864/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040419/49f4f864/attachment.sig>
More information about the kde-core-devel
mailing list