Frameworks/Epics/kdelibs cleanups

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

Port all of kdelibs from NetAccess::synchronousRun to job->exec, including unittests. This will make it possible to move kio/tests/jobtest.cpp and jobremotetest to staging/kio (and only link them to kiocore). There's a left use in accessmanager.cpp

Aleix Pol

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

DONE

Port kdelibs from KProcess to QProcess (except kpty and KRun) (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)

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.

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.

DONE

Find out what should be part of the link interface and what should not be. (normal but long), details...

wojtask9.kde@gmail.com, Kevin Ottens

DONE

Port from K_GLOBAL_STATIC to Q_GLOBAL_STATIC where the Qt4 API is sufficient

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

DONE

Move KFileDialog to kde4support once the QUrl static methods are in Qt (see the 5.1 epic) https://git.reviewboard.kde.org/r/112037/ - cannot move to kde4support, but all uses of KFileDialog have been removed except for KEncodingFileDialog

Teo Mrnjavac <teo@kde.org>

DONE

Make KEncodingFileDialog static-only in order to reduce KFileDialog usage

KStyle 2/3: Remove everything from KStyle which is not a reimplementation of the following methods: polish, unpolish, eventFilter, styleHint, pixelMetrics, standardIcons https://git.reviewboard.kde.org/r/112519/

wojtask9.kde@gmail.com

DONE

KStyle 3/3: From what remains of KStyle after the previous two tasks, evaluate what is here to enforce platform settings and what might make style developers life too hard, keep only the parts about platform settings and let go the rest (this work should be coordinated with Hugo Pereira Da Costa)

wojtask9.kde@gmail.com

DONE

Port kmimetypechooser.cpp from KRun to QProcess, then move it to a widgets framework that can use KConfig+KCoreAddons (but not kiowidgets, it doesn't use kio)

Vishesh Handa

DONE

Check if KScanDialog is still used. If not, deprecated. If yes, move to a framework that can use KService and KPageDialog, but not kiowidgets, it doesn't use kio

Update QCommandLineParser from the version that landed in qtbase dev and fix compilation (including plasma-framework). At least one thing changed, positionalArguments() and addHelpOption(str) is now setApplicationDescription(str)+addHelpOption(). Please do this before QCommandLineParser reaches qt5.git, or we'll be in trouble.

Martin Gräßlin

DONE

Port KJob to QEventLoopLocker. This provides the replacement of KGlobal::{de,}ref()

Albert Astal Cid, committed by Aurélien Gâteau

DONE

Port kfile/ from NetAccess to exec(). Then move NetAccess to kde4support, after ensuring all methods are documented as deprecated with a replacement solution (ask David if you don't find the replacement).

Àlex Fiestas

DONE

Move find_packages() from kdelibs/CMakeLists.txt to kdelibs/$tier/$framework/CMakeLists.txt:

Modify the current test to run multiple times with different values of said variable

Fix the code to get the tests to pass

the two first are probably much easier than the third

Current state is that inotify backend passes all tests and is the default on linux and only available on linux. QFSW-backend is the only available on windows and fails similar on both linux and windows. The stat and fam backends aren't tested anywhere.