Commit b7a557eb authored by Yoann Laissus's avatar Yoann Laissus

Get rid of KGlobal everywhere.

parent cf55014e
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "kdf_debug.h" #include "kdf_debug.h"
#include "kdfutil.h" #include "kdfutil.h"
#include <kglobal.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdefakes.h> #include <kdefakes.h>
#include <kprocess.h> #include <kprocess.h>
...@@ -64,7 +63,7 @@ DiskList::DiskList(QObject *parent) ...@@ -64,7 +63,7 @@ DiskList::DiskList(QObject *parent)
this, SLOT(dfDone()) ); this, SLOT(dfDone()) );
readingDFStdErrOut=false; readingDFStdErrOut=false;
config = KGlobal::config(); config = KSharedConfig::openConfig();
loadSettings(); loadSettings();
} }
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "kdf_debug.h" #include "kdf_debug.h"
#include <kglobal.h>
#include <kprocess.h> #include <kprocess.h>
#include <klocale.h> #include <klocale.h>
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <kdialog.h> #include <kdialog.h>
#include <klocale.h> #include <klocale.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kglobal.h>
#include <klineedit.h> #include <klineedit.h>
#include <QCheckBox> #include <QCheckBox>
...@@ -122,7 +121,7 @@ void KDFConfigWidget::closeEvent(QCloseEvent *) ...@@ -122,7 +121,7 @@ void KDFConfigWidget::closeEvent(QCloseEvent *)
void KDFConfigWidget::applySettings( void ) void KDFConfigWidget::applySettings( void )
{ {
KConfigGroup config(KGlobal::config(), "KDFConfig"); KConfigGroup config(KSharedConfig::openConfig(), "KDFConfig");
if( GUI ) if( GUI )
{ {
...@@ -153,7 +152,7 @@ void KDFConfigWidget::applySettings( void ) ...@@ -153,7 +152,7 @@ void KDFConfigWidget::applySettings( void )
void KDFConfigWidget::loadSettings( void ) void KDFConfigWidget::loadSettings( void )
{ {
KConfigGroup config(KGlobal::config(), "KDFConfig"); KConfigGroup config(KSharedConfig::openConfig(), "KDFConfig");
if( GUI ) if( GUI )
{ {
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kmenu.h> #include <kmenu.h>
#include <ktoolinvocation.h> #include <ktoolinvocation.h>
#include <kglobal.h>
#include <kshell.h> #include <kshell.h>
#include <klocale.h> #include <klocale.h>
#include <khelpclient.h> #include <khelpclient.h>
...@@ -308,7 +307,7 @@ void KDFWidget::updateDFDone( void ){ ...@@ -308,7 +307,7 @@ void KDFWidget::updateDFDone( void ){
QString size,percent; QString size,percent;
if( disk->kBSize() > 0 ) if( disk->kBSize() > 0 )
{ {
percent = KGlobal::locale()->formatNumber(disk->percentFull(), 1) + QLatin1Char( '%' ); percent = QLocale().toString(disk->percentFull()) + QLatin1Char('%');
size = disk->prettyKBSize(); size = disk->prettyKBSize();
} }
else else
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <kfiledialog.h> #include <kfiledialog.h>
#include <kicondialog.h> #include <kicondialog.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kglobal.h>
#include <klocale.h> #include <klocale.h>
#include <klineedit.h> #include <klineedit.h>
#include <kcmodule.h> #include <kcmodule.h>
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <kconfig.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kglobal.h>
#include <QString> #include <QString>
...@@ -50,7 +49,7 @@ CStdOption::~CStdOption( void ) ...@@ -50,7 +49,7 @@ CStdOption::~CStdOption( void )
void CStdOption::updateConfiguration( void ) void CStdOption::updateConfiguration( void )
{ {
KConfigGroup config(KGlobal::config(), "KDFConfig"); KConfigGroup config(KSharedConfig::openConfig(), "KDFConfig");
mFileManager = config.readPathEntry( mFileManager = config.readPathEntry(
"FileManagerCommand", mDefaultFileManager ); "FileManagerCommand", mDefaultFileManager );
mUpdateFrequency = config.readEntry( mUpdateFrequency = config.readEntry(
...@@ -64,7 +63,7 @@ void CStdOption::updateConfiguration( void ) ...@@ -64,7 +63,7 @@ void CStdOption::updateConfiguration( void )
void CStdOption::writeConfiguration( void ) void CStdOption::writeConfiguration( void )
{ {
KConfigGroup config(KGlobal::config(), "KDFConfig"); KConfigGroup config(KSharedConfig::openConfig(), "KDFConfig");
config.writeEntry( "UpdateFrequency", mUpdateFrequency ); config.writeEntry( "UpdateFrequency", mUpdateFrequency );
config.writePathEntry( "FileManagerCommand", mFileManager ); config.writePathEntry( "FileManagerCommand", mFileManager );
config.writeEntry( "PopupIfFull", mPopupIfFull ); config.writeEntry( "PopupIfFull", mPopupIfFull );
...@@ -75,7 +74,7 @@ void CStdOption::writeConfiguration( void ) ...@@ -75,7 +74,7 @@ void CStdOption::writeConfiguration( void )
void CStdOption::writeDefaultFileManager( void ) void CStdOption::writeDefaultFileManager( void )
{ {
KConfigGroup config(KGlobal::config(), "KDFConfig"); KConfigGroup config(KSharedConfig::openConfig(), "KDFConfig");
config.writePathEntry( "FileManagerCommand", mDefaultFileManager ); config.writePathEntry( "FileManagerCommand", mDefaultFileManager );
config.sync(); config.sync();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment