Commit 51d19b4d authored by Laurent Montel's avatar Laurent Montel 😁

kdelibs4support--

parent 4d57f1d0
...@@ -334,7 +334,7 @@ bool KCookiesManagement::cookieDetails(CookieProp *cookie) ...@@ -334,7 +334,7 @@ bool KCookiesManagement::cookieDetails(CookieProp *cookie)
{ {
KDateTime expDate; KDateTime expDate;
expDate.setTime_t(tmp); expDate.setTime_t(tmp);
cookie->expireDate = KGlobal::locale()->formatDateTime(expDate); cookie->expireDate = KLocale::global()->formatDateTime(expDate);
} }
tmp = (*c).toUInt(&ok); tmp = (*c).toUInt(&ok);
......
...@@ -70,7 +70,7 @@ SMBRoOptions::SMBRoOptions(QWidget *parent, const QVariantList &, const KCompone ...@@ -70,7 +70,7 @@ SMBRoOptions::SMBRoOptions(QWidget *parent, const QVariantList &, const KCompone
layout->addWidget(m_showHiddenShares,4,0, 1, 2 ); layout->addWidget(m_showHiddenShares,4,0, 1, 2 );
m_encodingList = new KComboBox( false, this ); m_encodingList = new KComboBox( false, this );
QStringList _strList = KGlobal::charsets()->availableEncodingNames(); QStringList _strList = KCharsets::charsets()->availableEncodingNames();
m_encodingList->addItems( _strList ); m_encodingList->addItems( _strList );
label = new QLabel( i18n( "MS Windows encoding:" ), this ); label = new QLabel( i18n( "MS Windows encoding:" ), this );
...@@ -105,7 +105,7 @@ void SMBRoOptions::load() ...@@ -105,7 +105,7 @@ void SMBRoOptions::load()
// m_workgroupLe->setText(group.readEntry("Workgroup")); // m_workgroupLe->setText(group.readEntry("Workgroup"));
// m_showHiddenShares->setChecked(group.readEntry("ShowHiddenShares", QVariant(false)).toBool()); // m_showHiddenShares->setChecked(group.readEntry("ShowHiddenShares", QVariant(false)).toBool());
//QStringList _strList = KGlobal::charsets()->availableEncodingNames(); //QStringList _strList = KCharsets::charsets()->availableEncodingNames();
//QString m_encoding = QTextCodec::codecForLocale()->name(); //QString m_encoding = QTextCodec::codecForLocale()->name();
//m_encodingList->setCurrentIndex( _strList.indexOf( group.readEntry( "Encoding", m_encoding.toLower() ) ) ); //m_encodingList->setCurrentIndex( _strList.indexOf( group.readEntry( "Encoding", m_encoding.toLower() ) ) );
......
...@@ -97,7 +97,7 @@ void UserAgentInfo::parseDescription() ...@@ -97,7 +97,7 @@ void UserAgentInfo::parseDescription()
tmp.replace( QFL("appSysRelease"), QString(utsn.release) ); tmp.replace( QFL("appSysRelease"), QString(utsn.release) );
tmp.replace( QFL("appMachineType"), QString(utsn.machine) ); tmp.replace( QFL("appMachineType"), QString(utsn.machine) );
QStringList languageList = KGlobal::locale()->languageList(); QStringList languageList = KLocale::global()->languageList();
if ( languageList.count() ) if ( languageList.count() )
{ {
int ind = languageList.indexOf( QLatin1String("C") ); int ind = languageList.indexOf( QLatin1String("C") );
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#if defined Q_WS_X11 && !defined K_WS_QTONLY #if defined Q_WS_X11 && !defined K_WS_QTONLY
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <QFontDatabase>
#endif #endif
#include "appearance.moc" #include "appearance.moc"
...@@ -236,7 +237,7 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList&) ...@@ -236,7 +237,7 @@ KAppearanceOptions::KAppearanceOptions(QWidget *parent, const QVariantList&)
m_pEncoding = new QComboBox( this ); m_pEncoding = new QComboBox( this );
m_pEncoding->setEditable( false ); m_pEncoding->setEditable( false );
encodings = KGlobal::charsets()->availableEncodingNames(); encodings = KCharsets::charsets()->availableEncodingNames();
encodings.prepend(i18n("Use Language Encoding")); encodings.prepend(i18n("Use Language Encoding"));
m_pEncoding->addItems( encodings ); m_pEncoding->addItems( encodings );
fl->addRow(i18n( "Default encoding:"), m_pEncoding); fl->addRow(i18n( "Default encoding:"), m_pEncoding);
...@@ -349,8 +350,8 @@ void KAppearanceOptions::load() ...@@ -349,8 +350,8 @@ void KAppearanceOptions::load()
fSize = fMinSize; fSize = fMinSize;
defaultFonts = QStringList(); defaultFonts = QStringList();
defaultFonts.append( READ_ENTRY( "StandardFont", KGlobalSettings::generalFont().family() ) ); defaultFonts.append( READ_ENTRY( "StandardFont", QFontDatabase::systemFont(QFontDatabase::GeneralFont).family() ) );
defaultFonts.append( READ_ENTRY( "FixedFont", KGlobalSettings::fixedFont().family() ) ); defaultFonts.append( READ_ENTRY( "FixedFont", QFontDatabase::systemFont(QFontDatabase::FixedFont).family() ) );
defaultFonts.append( READ_ENTRY( "SerifFont", HTML_DEFAULT_VIEW_SERIF_FONT ) ); defaultFonts.append( READ_ENTRY( "SerifFont", HTML_DEFAULT_VIEW_SERIF_FONT ) );
defaultFonts.append( READ_ENTRY( "SansSerifFont", HTML_DEFAULT_VIEW_SANSSERIF_FONT ) ); defaultFonts.append( READ_ENTRY( "SansSerifFont", HTML_DEFAULT_VIEW_SANSSERIF_FONT ) );
defaultFonts.append( READ_ENTRY( "CursiveFont", HTML_DEFAULT_VIEW_CURSIVE_FONT ) ); defaultFonts.append( READ_ENTRY( "CursiveFont", HTML_DEFAULT_VIEW_CURSIVE_FONT ) );
......
...@@ -51,7 +51,7 @@ void KHTTPOptions::load() ...@@ -51,7 +51,7 @@ void KHTTPOptions::load()
{ {
QString tmp; QString tmp;
KConfigGroup cg(m_pConfig, "Browser Settings/HTTP"); KConfigGroup cg(m_pConfig, "Browser Settings/HTTP");
tmp = cg.readEntry( "AcceptLanguages",KGlobal::locale()->languageList().join(",")); tmp = cg.readEntry( "AcceptLanguages",KLocale::global()->languageList().join(","));
le_languages->setText( tmp ); le_languages->setText( tmp );
tmp = cg.readEntry( "AcceptCharsets",defaultCharsets); tmp = cg.readEntry( "AcceptCharsets",defaultCharsets);
le_charsets->setText( tmp ); le_charsets->setText( tmp );
...@@ -67,7 +67,7 @@ void KHTTPOptions::save() ...@@ -67,7 +67,7 @@ void KHTTPOptions::save()
void KHTTPOptions::defaults() void KHTTPOptions::defaults()
{ {
le_languages->setText( KGlobal::locale()->languageList().join(",") ); le_languages->setText( KLocale::global()->languageList().join(",") );
le_charsets->setText( defaultCharsets ); le_charsets->setText( defaultCharsets );
} }
......
...@@ -56,7 +56,8 @@ K_EXPORT_PLUGIN(KCMHistoryFactory("kcmhistory")) ...@@ -56,7 +56,8 @@ K_EXPORT_PLUGIN(KCMHistoryFactory("kcmhistory"))
HistorySidebarConfig::HistorySidebarConfig( QWidget *parent, const QVariantList & ) HistorySidebarConfig::HistorySidebarConfig( QWidget *parent, const QVariantList & )
: KCModule (KCMHistoryFactory::componentData(), parent, QVariantList()) : KCModule (KCMHistoryFactory::componentData(), parent, QVariantList())
{ {
KGlobal::locale()->insertCatalog("konqueror"); //KF5 port: remove this line and define TRANSLATION_DOMAIN in CMakeLists.txt instead
//KLocale::global()->insertCatalog("konqueror");
m_settings = KonqHistorySettings::self(); m_settings = KonqHistorySettings::self();
......
...@@ -42,7 +42,7 @@ KonquerorApplication::KonquerorApplication() ...@@ -42,7 +42,7 @@ KonquerorApplication::KonquerorApplication()
void KonquerorApplication::slotReparseConfiguration() void KonquerorApplication::slotReparseConfiguration()
{ {
KGlobal::config()->reparseConfiguration(); KSharedConfig::openConfig()->reparseConfiguration();
KonqFMSettings::reparseConfiguration(); KonqFMSettings::reparseConfiguration();
QList<KonqMainWindow*> *mainWindows = KonqMainWindow::mainWindowList(); QList<KonqMainWindow*> *mainWindows = KonqMainWindow::mainWindowList();
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <kcolorscheme.h> #include <kcolorscheme.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <unistd.h> #include <unistd.h>
#include <QFontDatabase>
class KonqIcon { class KonqIcon {
public: public:
...@@ -91,7 +92,7 @@ QPixmap KonqClosedWindowItem::icon() const ...@@ -91,7 +92,7 @@ QPixmap KonqClosedWindowItem::icon() const
int oldWidth = overlayImg.width(); int oldWidth = overlayImg.width();
QString countStr = QString::number( m_numTabs ); QString countStr = QString::number( m_numTabs );
QFont f = KGlobalSettings::generalFont(); QFont f = QFontDatabase::systemFont(QFontDatabase::GeneralFont);
f.setBold(true); f.setBold(true);
float pointSize = f.pointSizeF(); float pointSize = f.pointSizeF();
......
...@@ -61,7 +61,7 @@ KonqClosedWindowsManager::KonqClosedWindowsManager() ...@@ -61,7 +61,7 @@ KonqClosedWindowsManager::KonqClosedWindowsManager()
QString file = KStandardDirs::locateLocal("tmp", filename); QString file = KStandardDirs::locateLocal("tmp", filename);
QFile::remove(file); QFile::remove(file);
KConfigGroup configGroup(KGlobal::config(), "Undo"); KConfigGroup configGroup(KSharedConfig::openConfig(), "Undo");
m_numUndoClosedItems = configGroup.readEntry("Number of Closed Windows", 0); m_numUndoClosedItems = configGroup.readEntry("Number of Closed Windows", 0);
m_konqClosedItemsConfig = 0L; m_konqClosedItemsConfig = 0L;
...@@ -367,7 +367,7 @@ void KonqClosedWindowsManager::saveConfig() ...@@ -367,7 +367,7 @@ void KonqClosedWindowsManager::saveConfig()
closedWindowItem->configGroup().copyTo(&configGroup); closedWindowItem->configGroup().copyTo(&configGroup);
} }
KConfigGroup configGroup(KGlobal::config(), "Undo"); KConfigGroup configGroup(KSharedConfig::openConfig(), "Undo");
configGroup.writeEntry("Number of Closed Windows", m_closedWindowItemList.size()); configGroup.writeEntry("Number of Closed Windows", m_closedWindowItemList.size());
configGroup.sync(); configGroup.sync();
...@@ -404,7 +404,7 @@ void KonqClosedWindowsManager ::readConfig() ...@@ -404,7 +404,7 @@ void KonqClosedWindowsManager ::readConfig()
if(!configGroup.exists()) if(!configGroup.exists())
{ {
m_numUndoClosedItems = i; m_numUndoClosedItems = i;
KConfigGroup configGroup(KGlobal::config(), "Undo"); KConfigGroup configGroup(KSharedConfig::openConfig(), "Undo");
configGroup.writeEntry("Number of Closed Windows", configGroup.writeEntry("Number of Closed Windows",
m_closedWindowItemList.size()); m_closedWindowItemList.size());
configGroup.sync(); configGroup.sync();
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include <konqmainwindow.h> #include <konqmainwindow.h>
#include <kstringhandler.h> #include <kstringhandler.h>
#include <kshortcut.h> #include <kshortcut.h>
#include <QApplication>
// Local // Local
#include "konqview.h" #include "konqview.h"
...@@ -594,7 +595,7 @@ void KonqCombo::mouseMoveEvent( QMouseEvent *e ) ...@@ -594,7 +595,7 @@ void KonqCombo::mouseMoveEvent( QMouseEvent *e )
if ( e->buttons() & Qt::LeftButton && if ( e->buttons() & Qt::LeftButton &&
(e->pos() - m_dragStart).manhattanLength() > (e->pos() - m_dragStart).manhattanLength() >
KGlobalSettings::dndEventDelay() ) QApplication::startDragDistance() )
{ {
KUrl url( currentText() ); KUrl url( currentText() );
if ( url.isValid() ) if ( url.isValid() )
......
...@@ -71,7 +71,7 @@ KonqExtensionManager::KonqExtensionManager(QWidget *parent, KonqMainWindow *main ...@@ -71,7 +71,7 @@ KonqExtensionManager::KonqExtensionManager(QWidget *parent, KonqMainWindow *main
d->mainWindow = mainWindow; d->mainWindow = mainWindow;
d->activePart = activePart; d->activePart = activePart;
d->pluginSelector->addPlugins("konqueror", i18n("Extensions"), "Extensions", KGlobal::config()); d->pluginSelector->addPlugins("konqueror", i18n("Extensions"), "Extensions", KSharedConfig::openConfig());
if ( activePart ) { if ( activePart ) {
KAboutData componentData = activePart->componentData(); KAboutData componentData = activePart->componentData();
d->pluginSelector->addPlugins(componentData.componentName(), i18n("Extensions"), "Tools"); d->pluginSelector->addPlugins(componentData.componentName(), i18n("Extensions"), "Tools");
......
...@@ -75,7 +75,7 @@ KonqHistoryDialog::KonqHistoryDialog(KonqMainWindow *parent) ...@@ -75,7 +75,7 @@ KonqHistoryDialog::KonqHistoryDialog(KonqMainWindow *parent)
mainLayout->addWidget(toolBar); mainLayout->addWidget(toolBar);
mainLayout->addWidget(m_historyView); mainLayout->addWidget(m_historyView);
restoreDialogSize(KGlobal::config()->group("History Dialog")); restoreDialogSize(KSharedConfig::openConfig()->group("History Dialog"));
// give focus to the search line edit when opening the dialog (#240513) // give focus to the search line edit when opening the dialog (#240513)
m_historyView->lineEdit()->setFocus(); m_historyView->lineEdit()->setFocus();
...@@ -83,7 +83,7 @@ KonqHistoryDialog::KonqHistoryDialog(KonqMainWindow *parent) ...@@ -83,7 +83,7 @@ KonqHistoryDialog::KonqHistoryDialog(KonqMainWindow *parent)
KonqHistoryDialog::~KonqHistoryDialog() KonqHistoryDialog::~KonqHistoryDialog()
{ {
KConfigGroup group(KGlobal::config(), "History Dialog"); KConfigGroup group(KSharedConfig::openConfig(), "History Dialog");
saveDialogSize(group); saveDialogSize(group);
} }
......
...@@ -136,9 +136,9 @@ QVariant HistoryEntry::data(int role, int /*column*/) const ...@@ -136,9 +136,9 @@ QVariant HistoryEntry::data(int role, int /*column*/) const
case KonqHistory::DetailedToolTipRole: case KonqHistory::DetailedToolTipRole:
return i18n("<qt><center><b>%1</b></center><hr />Last visited: %2<br />" return i18n("<qt><center><b>%1</b></center><hr />Last visited: %2<br />"
"First visited: %3<br />Number of times visited: %4</qt>", "First visited: %3<br />Number of times visited: %4</qt>",
Qt::escape(entry.url.pathOrUrl()), entry.url.pathOrUrl().toHtmlEscaped(),
KGlobal::locale()->formatDateTime(entry.lastVisited), KLocale::global()->formatDateTime(entry.lastVisited),
KGlobal::locale()->formatDateTime(entry.firstVisited), KLocale::global()->formatDateTime(entry.firstVisited),
entry.numberOfTimesVisited); entry.numberOfTimesVisited);
case KonqHistory::LastVisitedRole: case KonqHistory::LastVisitedRole:
return entry.lastVisited; return entry.lastVisited;
......
...@@ -62,7 +62,7 @@ void KonqHistorySettings::readSettings(bool reparse) ...@@ -62,7 +62,7 @@ void KonqHistorySettings::readSettings(bool reparse)
KSharedConfigPtr config; KSharedConfigPtr config;
if (KGlobal::mainComponent().componentName() == QLatin1String("konqueror")) if (KGlobal::mainComponent().componentName() == QLatin1String("konqueror"))
config = KGlobal::config(); config = KSharedConfig::openConfig();
else else
config = KSharedConfig::openConfig("konquerorrc"); config = KSharedConfig::openConfig("konquerorrc");
......
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
#include <kshortcut.h> #include <kshortcut.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kurlauthorized.h> #include <kurlauthorized.h>
#include <QFontDatabase>
template class QList<QPixmap*>; template class QList<QPixmap*>;
template class QList<KToggleAction*>; template class QList<KToggleAction*>;
...@@ -295,7 +296,7 @@ KonqMainWindow::KonqMainWindow( const KUrl &initialURL, const QString& xmluiFile ...@@ -295,7 +296,7 @@ KonqMainWindow::KonqMainWindow( const KUrl &initialURL, const QString& xmluiFile
createGUI( 0 ); createGUI( 0 );
m_combo->setParent( toolBar("locationToolBar") ); m_combo->setParent( toolBar("locationToolBar") );
m_combo->setFont( KGlobalSettings::generalFont() ); m_combo->setFont( QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
m_combo->show(); m_combo->show();
checkDisableClearButton(); checkDisableClearButton();
...@@ -1346,7 +1347,7 @@ void KonqMainWindow::slotCreateNewWindow( const KUrl &url, ...@@ -1346,7 +1347,7 @@ void KonqMainWindow::slotCreateNewWindow( const KUrl &url,
// Make the window open properties configurable. This is equivalent to // Make the window open properties configurable. This is equivalent to
// Firefox's "dom.disable_window_open_feature.*" properties. For now // Firefox's "dom.disable_window_open_feature.*" properties. For now
// only LocationBar visiblity is configurable. // only LocationBar visiblity is configurable.
KSharedConfig::Ptr config = KGlobal::config(); KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup cfg (config, "DisableWindowOpenFeatures"); KConfigGroup cfg (config, "DisableWindowOpenFeatures");
if ( !windowArgs.isMenuBarVisible() ) if ( !windowArgs.isMenuBarVisible() )
...@@ -1574,7 +1575,7 @@ void KonqMainWindow::slotOpenFile() ...@@ -1574,7 +1575,7 @@ void KonqMainWindow::slotOpenFile()
if (m_currentView && m_currentView->url().isLocalFile()) if (m_currentView && m_currentView->url().isLocalFile())
currentUrl = m_currentView->url(); currentUrl = m_currentView->url();
else else
currentUrl = KUrl::fromPath(QDir::homePath()); currentUrl = QUrl::fromLocalFile(QDir::homePath());
KUrl url = KFileDialog::getOpenUrl(currentUrl, QString(), this); KUrl url = KFileDialog::getOpenUrl(currentUrl, QString(), this);
if (!url.isEmpty()) if (!url.isEmpty())
...@@ -1652,7 +1653,7 @@ void KonqMainWindow::showHTML( KonqView * _view, bool b, bool _activateView ) ...@@ -1652,7 +1653,7 @@ void KonqMainWindow::showHTML( KonqView * _view, bool b, bool _activateView )
// Save this setting // Save this setting
// This has to be done before calling openView since it relies on it // This has to be done before calling openView since it relies on it
KonqSettings::setHtmlAllowed( b ); KonqSettings::setHtmlAllowed( b );
KonqSettings::self()->writeConfig(); KonqSettings::self()->save();
if ( _activateView ) if ( _activateView )
m_bHTMLAllowed = b; m_bHTMLAllowed = b;
...@@ -1913,7 +1914,7 @@ void KonqMainWindow::slotConfigureSpellChecking() ...@@ -1913,7 +1914,7 @@ void KonqMainWindow::slotConfigureSpellChecking()
{ {
#pragma message("TODO KF5: Port Sonnet::ConfigDialog usage somehow") #pragma message("TODO KF5: Port Sonnet::ConfigDialog usage somehow")
#if 0 // KF5 TODO #if 0 // KF5 TODO
Sonnet::ConfigDialog dialog( KGlobal::config().data(), this); Sonnet::ConfigDialog dialog( KSharedConfig::openConfig().data(), this);
dialog.setWindowIcon( KIcon( "konqueror" )); dialog.setWindowIcon( KIcon( "konqueror" ));
dialog.exec(); dialog.exec();
#endif #endif
...@@ -1938,7 +1939,7 @@ void KonqMainWindow::slotNewToolbarConfig() // This is called when OK or Apply i ...@@ -1938,7 +1939,7 @@ void KonqMainWindow::slotNewToolbarConfig() // This is called when OK or Apply i
plugViewModeActions(); plugViewModeActions();
KConfigGroup cg = KGlobal::config()->group( "KonqMainWindow" ); KConfigGroup cg = KSharedConfig::openConfig()->group( "KonqMainWindow" );
applyMainWindowSettings( cg ); applyMainWindowSettings( cg );
} }
...@@ -3110,7 +3111,7 @@ void KonqMainWindow::slotCompletionModeChanged( KCompletion::CompletionMode m ) ...@@ -3110,7 +3111,7 @@ void KonqMainWindow::slotCompletionModeChanged( KCompletion::CompletionMode m )
s_pCompletion->setCompletionMode( m ); s_pCompletion->setCompletionMode( m );
KonqSettings::setSettingsCompletionMode( int(m_combo->completionMode()) ); KonqSettings::setSettingsCompletionMode( int(m_combo->completionMode()) );
KonqSettings::self()->writeConfig(); KonqSettings::self()->save();
// tell the other windows too (only this instance currently) // tell the other windows too (only this instance currently)
foreach ( KonqMainWindow* window, *s_lstViews ) { foreach ( KonqMainWindow* window, *s_lstViews ) {
...@@ -4896,14 +4897,14 @@ void KonqMainWindow::reparseConfiguration() ...@@ -4896,14 +4897,14 @@ void KonqMainWindow::reparseConfiguration()
{ {
kDebug(); kDebug();
KonqSettings::self()->readConfig(); KonqSettings::self()->load();
m_pViewManager->applyConfiguration(); m_pViewManager->applyConfiguration();
KonqRmbEventFilter::self()->reparseConfiguration(); KonqRmbEventFilter::self()->reparseConfiguration();
m_bHTMLAllowed = KonqSettings::htmlAllowed(); m_bHTMLAllowed = KonqSettings::htmlAllowed();
if (m_combo) if (m_combo)
m_combo->setFont( KGlobalSettings::generalFont() ); m_combo->setFont( QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
MapViews::ConstIterator it = m_mapViews.constBegin(); MapViews::ConstIterator it = m_mapViews.constBegin();
MapViews::ConstIterator end = m_mapViews.constEnd(); MapViews::ConstIterator end = m_mapViews.constEnd();
...@@ -5132,7 +5133,7 @@ void KonqMainWindow::closeEvent( QCloseEvent *e ) ...@@ -5132,7 +5133,7 @@ void KonqMainWindow::closeEvent( QCloseEvent *e )
KonqFrameTabs* tabContainer = m_pViewManager->tabContainer(); KonqFrameTabs* tabContainer = m_pViewManager->tabContainer();
if ( tabContainer->count() > 1 ) if ( tabContainer->count() > 1 )
{ {
KSharedConfig::Ptr config = KGlobal::config(); KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup cs( config, QLatin1String("Notification Messages") ); KConfigGroup cs( config, QLatin1String("Notification Messages") );
if ( !cs.hasKey( "MultipleTabConfirm" ) ) if ( !cs.hasKey( "MultipleTabConfirm" ) )
......
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
#include <QTreeWidget> #include <QTreeWidget>
#include <QScrollArea> #include <QScrollArea>
#include <QScrollBar> #include <QScrollBar>
#include <QApplication>
#include <QDesktopWidget>
class KonqSessionManagerPrivate class KonqSessionManagerPrivate
...@@ -149,7 +151,7 @@ SessionRestoreDialog::SessionRestoreDialog(const QStringList& sessionFilePaths, ...@@ -149,7 +151,7 @@ SessionRestoreDialog::SessionRestoreDialog(const QStringList& sessionFilePaths,
styleOption.initFrom(treeWidget); styleOption.initFrom(treeWidget);
QFontMetrics fm(styleOption.font); QFontMetrics fm(styleOption.font);
int w = treeWidget->width(); int w = treeWidget->width();
const QRect desktop = KGlobalSettings::desktopGeometry(this); const QRect desktop = QApplication::desktop()->screenGeometry(this);
// Collect info from the sessions to restore // Collect info from the sessions to restore
Q_FOREACH(const QString& sessionFile, sessionFilePaths) { Q_FOREACH(const QString& sessionFile, sessionFilePaths) {
...@@ -326,7 +328,7 @@ void SessionRestoreDialog::saveDontShow(const QString& dontShowAgainName, int re ...@@ -326,7 +328,7 @@ void SessionRestoreDialog::saveDontShow(const QString& dontShowAgainName, int re
flags |= KConfigGroup::Global; flags |= KConfigGroup::Global;
} }
KConfigGroup cg(KGlobal::config().data(), "Notification Messages"); KConfigGroup cg(KSharedConfig::openConfig().data(), "Notification Messages");
cg.writeEntry( dontShowAgainName, result==Yes, flags ); cg.writeEntry( dontShowAgainName, result==Yes, flags );
cg.sync(); cg.sync();
} }
...@@ -337,7 +339,7 @@ bool SessionRestoreDialog::shouldBeShown(const QString& dontShowAgainName, int* ...@@ -337,7 +339,7 @@ bool SessionRestoreDialog::shouldBeShown(const QString& dontShowAgainName, int*
return true; return true;
} }
KConfigGroup cg(KGlobal::config().data(), "Notification Messages"); KConfigGroup cg(KSharedConfig::openConfig().data(), "Notification Messages");
const QString dontAsk = cg.readEntry(dontShowAgainName, QString()).toLower(); const QString dontAsk = cg.readEntry(dontShowAgainName, QString()).toLower();
if (dontAsk == "yes" || dontAsk == "true") { if (dontAsk == "yes" || dontAsk == "true") {
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
/** /**
* Reparse the configuration to update the already-created instances * Reparse the configuration to update the already-created instances
* *
* Warning : you need to call KGlobal::config()->reparseConfiguration() * Warning : you need to call KSharedConfig::openConfig()->reparseConfiguration()
* first (This is not done here so that the caller can avoid too much * first (This is not done here so that the caller can avoid too much
* reparsing if having several classes from the same config file) * reparsing if having several classes from the same config file)
*/ */
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#include <KParts/OpenUrlArguments> #include <KParts/OpenUrlArguments>
#include <KParts/BrowserExtension> #include <KParts/BrowserExtension>
#include <KParts/WindowArgs> #include <KParts/WindowArgs>
#include <KComponentData>
//#define DEBUG_HISTORY //#define DEBUG_HISTORY
...@@ -1229,9 +1230,9 @@ void KonqView::setActiveComponent() ...@@ -1229,9 +1230,9 @@ void KonqView::setActiveComponent()
#if 0 // Removed with the port to KF5. The concept no longer exists, the about dialog and bug report #if 0 // Removed with the port to KF5. The concept no longer exists, the about dialog and bug report
// dialog just use the application information rather than the one of the current part. // dialog just use the application information rather than the one of the current part.
if (m_bBuiltinView) if (m_bBuiltinView)
KGlobal::setActiveComponent( KGlobal::mainComponent() ); KComponentData::setActiveComponent( KGlobal::mainComponent() );
else else
KGlobal::setActiveComponent(KComponentData(m_pPart->componentData())); KComponentData::setActiveComponent(KComponentData(m_pPart->componentData()));
#endif #endif
#ifdef KActivities_FOUND #ifdef KActivities_FOUND
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
#include <ktoolbarpopupaction.h> #include <ktoolbarpopupaction.h>
#include <kmenu.h> #include <kmenu.h>
#include <kdeversion.h> #include <kdeversion.h>
#include <QApplication>
#include <QDesktopWidget>
//#define DEBUG_VIEWMGR //#define DEBUG_VIEWMGR
...@@ -1112,7 +1114,7 @@ QSize KonqViewManager::readDefaultSize(const KConfigGroup &cfg, QWidget *widget) ...@@ -1112,7 +1114,7 @@ QSize KonqViewManager::readDefaultSize(const KConfigGroup &cfg, QWidget *widget)
QString heightStr = cfg.readEntry("Height"); QString heightStr = cfg.readEntry("Height");
int width = -1; int width = -1;
int height = -1; int height = -1;
const QRect geom = KGlobalSettings::desktopGeometry(widget); const QRect geom = QApplication::desktop()->screenGeometry(widget);
bool ok; bool ok;