Frameworks/Epics/Splitting kdelibs/Common Solutions

From KDE Community Wiki
Revision as of 19:49, 3 December 2011 by Nef (talk | contribs) (Created page with "== KDebug == Replace KDebug by QDebug and the traces shouldn't be activated in release mode. == KWarning == Replace KWarning by QWarning and the traces shouldn't be activated ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

KDebug

Replace KDebug by QDebug and the traces shouldn't be activated in release mode.

KWarning

Replace KWarning by QWarning and the traces shouldn't be activated in release mode.

for example :

kWarning(7041) << "warning message"

Can be replaced by :

qWarning() << "warning message"

KTemporaryFile

Replace KTemporaryFile by QTemporaryFile

for example :

  tmpFile = new KTemporaryFile();
  tmpFile->setPrefix(QLatin1String("prefix-"));
  tmpFile->setSuffix(QLatin1String(".txt"));

Can be replaced by :

  tmpFile = new QTemporaryFile();
  tmpFile->setFileTemplate(QLatin1String("prefix-XXXXXX.txt"));


KMimeType

Working progress


KSaveFile

Working progress