Frameworks/Epics/kdelibs cleanups

From KDE Community Wiki

Cleaning up kdelibs

Next to the other efforts for kdelibs modularization, there's also some cleanup tasks which needs to be done accross the whole kdelibs codebase. Tasks in here are probably more suitable for short term, bite sized involvement.

Note: For most of those tasks we try to put an estimation of the difficulty can be: easy, normal, hard (somewhat like in video games). ;-)

Status Description Contact
DONE remove kglobal.h include from staging/kwidgets/src/icons/kiconloader.h, fix compilation by adding the header where necessary (easy) Christoph Cullmann
DONE move ktypelist.h from kdecore/util to kde4support (easy) Christoph Cullmann
DONE move kentrymaptest from kdecore/tests to kconfig/autotests (easy) Christoph Cullmann
DONE move kascii and kasciitest to kde4support (easy) Christoph Cullmann
DONE Port away from KGlobalSettings::singleClick() (easy) Dominik Haumann
DONE #cmakedefine -> #cmakedefine01, #ifdef -> #if, in order to catch missing includes (easy) Nicolas Lécureuil
DONE Port from KCmdLineArgs+KApp to QApp+setApplicationName in all unittests that don't use args (easy) Jeremy Whiting
DONE kio/netaccess.h: there are some "TODOs" about deprecating most methods in favour of job+exec (TODO: compare with synchronousRun) (normal) Àlex Fiestas


DONE Fix kfileplacesmodeltest (normal) Benjamin Port


DONE Move to kcoreaddons the tests in kdecore/tests that are actually tests for classes in kcoreaddons, except kurltest (easy) Anne-Marie Mahfouf


DONE "cp kurlmimetest.cpp kurlmimedatatest.cpp" and port the second one to KUrlMimeData (in order to test both the deprecated API and the new API). After that, move the old one (kurlmimetest) to kde4support. (normal) Lambert Clara


DONE Port kcmdlineargs from KUrl to QUrl, then move KUrl out of kcoreaddons, and into kdecore for now, final destination will be kde4support. (easy) Matt Williams


IN PROGRESS Port kdelibs from KProcess to QProcess (except kpty) (easy). Warning: Need to port some functionnality to Qt 5 Martin Sandsmark


DONE Update qmimetype in kdelibs from the one soon merged to Qt5, port all of kdelibs to the API changes. (normal) David Faure


DONE Create a staging/kconfig framework out of kdecore/config + kdecore/kernel/kauthorized*. Code should be ready (no more dependencies on the rest of kdecore). (normal) David


DONE Port all of kdelibs from KGlobal::config() to KSharedConfig::openConfig(), adjust includes (easy) Claus Christensen


DONE Port all of kdelibs from KMimeType to QMimeType, see KDE5PORTING.html for details (easy) David Faure


DONE deprecate KLineEdit::clickMessage, by applying https://git.reviewboard.kde.org/r/101360/diff/#index_header and porting kdelibs (easy and quick) Benjamin Port


DONE Move KDialog saveDialogSize+restoreDialogSize to static methods taking a QDialog. Benjamin Port


TO DO Go through all users of KEMailSettings (e.g. in lxr.kde.org) to find which methods are actually used, deprecate the others ? <{{{3}}}>


TO DO Replace usage of KSocketFactory by the implementation of the method (it's very short). ? <{{{3}}}>


IN PROGRESS Finish deprecating methods marked as @deprecated (add macro+ifdef, ensure kdelibs doesn't use). Benjamin Port


TO DO Move kio/kfile/kdiskfreespace.cpp to kde4support ? <{{{3}}}>


TO DO Move K4AboutData and KComponentData to kde4support (not used anymore, apparently) ? <{{{3}}}>


TO DO Replace signals: with Q_SIGNALS: and slots with Q_SLOTS: everywhere in kdelibs (to make moving less work) ? <{{{3}}}>


TO DO Move tests that didn't follow their classes. E.g. kcompositejobtest from kdecore/tests to kcoreaddons/autotests. ? <{{{3}}}>


DONE Move KDialogQueue into separate files. Benjamin Port


DONE Port all of kdelibs (except kde*support and classes aimed for tier4) from KDialog to QDialog Kevin Ottens


DONE Port from KGlobalSettings::desktopGeometry to QApplication::desktop()->screenGeometry (very easy) Stephen Kelly


DONE extract KProtocolInfo out of ksycoca, making it simply read from installed files on demand. (normal) David Faure


DONE move KProtocolInfo to KIO, requires to split out its unittests from kmimetypetest, and to somehow sort out the call to KProtocolInfo inside kmimetype (normal) David Faure


DONE when gpgmepp is not found, make plasma only skip the Signature class, rather than skipping all of plasma (easy) David Faure


DONE One of the things we need to remove is all of the use of the Q_WS_* defines. (easy)

git grep Q_WS_

Some of them should be ported to a Q_OS_ define (eg, some of Q_WS_WIN should be ported to Q_OS_WIN), but *not all of them*, so this can't just be changed with a script. It should be done manually. Some of them need to be ported to QPA (lighthouse) in some way.

Kevin Ottens


For a walk through example, see this thread

IN PROGRESS Another thing that should be done is using Find packages from ECM or CMake. (normal)

For example, run 'git grep find_package' in tier1/solid. Some of the results are provided by CMake, and some come from the local kdelibs/cmake/modules folder. The kdelibs/cmake/modules folder should not need to be used. For example find_package(Flex) in solid should be replaced with find_package(FLEX) which is provided by CMake.

The goal is to be able to run

cd tier1/solid && mkdir build && cd build && cmake .. && make

for each framework.

This is already possible with the itemmodels framework.

It also works with solid, because the packages it searches for are optional and the FindFoo.cmake files are not found.

George Goldberg (grundleborg)

Frameworks Done:

  • tier1/itemmodels (except for autotests)
  • tier1/karchive
  • tier1/kcodecs
  • tier1/kcoreaddons
  • tier1/kdbusaddons
  • tier1/kideltime
  • tier1/kjs (*)
  • tier1/kplotting
  • tier1/kwidgetsaddons
  • tier1/kwindowsystem
  • tier1/solid (*)
  • tier1/sonnet (*)
  • tier1/threadweaver
  • tier2/kauth (*)
  • tier2/kconfig has problems building. need to resolve these first.

(*) Means that there are still FindFOO.cmake files in the framework's directory.


IN PROGRESS Find out what should be part of the link interface and what should not be. (normal but long), details... [email protected]
DONE Port from K_GLOBAL_STATIC to Q_GLOBAL_STATIC where the Qt4 API is sufficient Albert Astals Cid
DONE Port from K_GLOBAL_STATIC to Q_GLOBAL_STATIC needs Qt 5.1 changes ?


TO DO Porting in KDE_Core/KLocale/Frameworks ? <{{{3}}}>


IN PROGRESS Make the code portable: port away from kde_file.h, i.e. from KDE::open/rename/stat/lstat/access/... to QFile.

Update: kioslave/file is almost done, some last pieces are missing

Martin Klapetek

David Gil


DONE KDEGuiAddons should be renamed and maybe repurposed Kevin Ottens


DONE qWarning << QUrl::errorString() rather than QMessageBox with QUrl::toString() (which is empty) to the user when the URL is invalid (grep for "Invalid URL"?) Martin Klapetek


DONE kdeui/colors/kcolorhelpers_p.h has at least a copy in

kdeguiaddons, and perhaps another in kcolorwidgets. Resolve that.

Kévin Ottens


DONE Port all of kdelibs from KIcon to QIcon / KDE:::icon(), then move KIcon out (easy) David Faure


DONE Port all uses of time_t to QDateTime (or qint64 when serializing). Ignore kdecore and karchive, other people are reworking these bits anyway. David Gil


TO DO Port all uses of mode_t (hard) ? <{{{3}}}>


DONE KGlobalSettings is initalized by KApplication. Find out if any parts of it work without that, and split it into parts that work without the initialization and parts that don't.

Conclusion: Let's just bury KGlobalSettings 10m underground. https://git.reviewboard.kde.org/r/111348/

[email protected]


DONE Port away from and deprecate KHBox/KVBox Albert Astals Cid


DONE Port KStandardAction from KAction to QAction Kevin Ottens


DONE Move KTabBar to kde4support and port users in kdelibs to QTabbar. preferably KTabWidget should go the same way, but needs a feature in Qt (see the qt5.1 epic) Kevin Kin-Foo


IN PROGRESS Use tr() again (rather than QCoreApplication::translate with empty context) in all tier1+tier2+staging frameworks (except the ones which will go to tier3, they can use i18n) George Goldberg (grundleborg)

done, however there are some incorrect uses of QObject::tr() still floating around which need fixing in a later patch.


DONE Move KDialog to kde4support (once all other KDialog related cleanups are done) Kevin Ottens


DONE Move KRestrictedLine to kde4support Kevin Kin-Foo


DONE Move KDialogButtonBox to kde4support David Faure


DONE Move KDoubleValidator to kde4support David Faure


DONE Move KListWidget to kde4support (replace uses with QListWidget) Martin Klapetek


DONE Move KMenu to kde4support (once QMenu supports title items and keyboard navigation) Kevin Ottens


DONE Move KPushButton DnD support to an event filter Kevin Ottens


DONE Once KPushButton DnD and delayed menu support are out, move KPushButton to kde4support Kevin Ottens


DONE Move KSplashScreen to kde4support David Faure


DONE Replace KUndoStack with two methods in a namespace Tobias Koenig


DONE Move KShortcut in kde4support Kevin Ottens


DONE Move all global shortcut facilities of KAction in KGlobalAccel (which would then register QActions) Valentin Rusu


DONE Move all gesture facilities of KAction in KGestureMap (which would then register QActions) Valentin Rusu


DONE Move KAction::event to an event filter, see how to make it available to all QAction instances when using the consistency framework Kevin Ottens


DONE Once KAction has no original feature left, move it to kde4support Kevin Ottens


DONE KApplication::*Timestamp methods go to a new QObject subclass in tier4/kinterprocesswindowing Kevin Ottens


DONE KApplication::sessionConfig go to kconfig-gui, probably has a static method there Kevin Ottens


DONE KApplication::*startupId go with KStartupInfo to kwindowsystem Kevin Ottens


DONE Move KApplication to kde4support Kevin Ottens


DONE Move KStatusBar to kde4support Kevin Ottens


DONE Move KColorDialog to kde4support Kevin Ottens


DONE Move KMenuBar to kde4support Kevin Ottens


DONE Move KToolBar to xmlgui Miquel i Aleix


DONE Move KMainWindow to xmlgui Miquel i Aleix


DONE Move KInputDialog to kde4support once its features are in Qt (see the Contributions to Qt5 epic) David Gil


TO DO Move KDateTime to kde4support once its features are in Qt (see the 5.1 epic) ? <{{{3}}}>


DONE Split WId methods of KMessageBox into tier4/kinterprocesswindowing Valentin Rusu


DONE Split queued methods of KMessageBox into kde4support Valentin Rusu


IN PROGRESS Implement queueing directly in KDialogJobUiDelegate Valentin Rusu


DONE Add a KMessageBoxDontAskAgainInterface, with a QHash based private implementation in KMessageBox David Faure


DONE Add a setter to KMessageBox in order to change the KMessageBoxDontAskAgainInterface implementation used by KMessageBox and an implementation set in our FrameworkIntegrationPlugin which uses KConfig David Faure


DONE Move rest of KMessageBox to kwidgets Valentin Rusu


DONE Move KProgressDialog to kde4support Kevin Ottens


TO DO Move KFileDialog to kde4support once the QUrl static methods are in Qt (see the 5.1 epic) ? <{{{3}}}>


IN PROGRESS Have KMessageWidget look at the styleHint() flag to decide to animate or not (not existing yet, see 5.1 epic) Àlex Fiestas


IN PROGRESS Have KMainWindow look at the styleHint() flag to decide to animate or not (not existing yet, see 5.1 epic) Àlex Fiestas


DONE Move KFadeWidgetEffect to kde4support Kevin Ottens


TO DO Have KIO widgets look at the styleHint() flag to decide to animate or not (not existing yet, see 5.1 epic) [email protected] <{{{3}}}>


TO DO Have the polish() call of KStyle force the default fonts on widgets (font are picked in the same way KGlobalSettings

did)

? <{{{3}}}>


TO DO Have a way to trigger the reloading of the toolbar settings, was done by KGlobalSettings::toolbarAppareanceChanged. Unittested by ktoolbar_unittest. A simple DBus signal could do.) ? <{{{3}}}>


IN PROGRESS Implement KStyle::styleHint() to support the opaqueResize and animate flags (not existing yet, see 5.1 epic) value of those flags picked like KGlobalSettings did Àlex Fiestas


IN PROGRESS Port uses of KGlobalSettings::(in)active(Title/Text)Color() in khtml to use KColorScheme instead [email protected] https://git.reviewboard.kde.org/r/111171/


IN PROGRESS KGlobalSettings font methods: Make sure that kdeplatformtheme loads the font settings properly. Waiting for https://codereview.qt-project.org/#change,59808 [email protected]


TO DO KGlobalSettings::isMultiHead should be duplicated in plasma-framework, it only reads an environment variable, should see how to translate the Windows version ? <{{{3}}}>


IN PROGRESS KGlobalSettings::createApplicationPalette/createNewApplicationPalette: Make sure that kdeplatformtheme provides what we need

https://git.reviewboard.kde.org/r/111405/

[email protected]


TO DO Move KGlobalSettings to kde4support. Depends on many other tasks here ? <{{{3}}}>


TO DO Move KStyle to tier4/consistency ? <{{{3}}}>


DONE Import QCommandLineArguments from gitorious into libkdeqt5staging David Faure


DONE Use Q_COREAPP_STARTUP_FUNCTION to initialize KCrash David Faure


DONE Use Q_COREAPP_STARTUP_FUNCTION to initialize KCheckAccelerators David Faure


DONE Add the necessary to the integration plugin so that calling QDesktopServices::openUrl("help:/") is exactly the same as using KHelpClient::invokeHelp()

https://git.reviewboard.kde.org/r/111298/

[email protected]


TO DO Make KLocalizedString::isApplicationTranslatedInto and QLocale::uiLanguages codes compatible. See https://git.reviewboard.kde.org/r/111178 ? <{{{3}}}>