Commit c383d7aa authored by Robert Knight's avatar Robert Knight
Browse files

Adapt to KInstance changes in kdelibs

svn path=/branches/work/konsole-split-view/; revision=628407
parent ed6c1057
......@@ -168,7 +168,7 @@ QString SessionInfo::defaultWorkingDirectory() const
SessionManager::SessionManager()
{
//locate default session
KConfig* appConfig = KGlobal::config();
KSharedConfigPtr appConfig = KGlobal::config();
appConfig->setDesktopGroup();
QString defaultSessionFilename = appConfig->readEntry("DefaultSession","shell.desktop");
......
......@@ -19,48 +19,53 @@
*/
#include "konsole_part.h"
#include "KeyTrans.h"
#include "schema.h"
#include "TESession.h"
#include "TEWidget.h"
// System
#include <assert.h>
// Qt
#include <QCheckBox>
#include <QFile>
#include <QFrame>
#include <QHBoxLayout>
#include <QLabel>
#include <QLayout>
#include <QMatrix>
#include <QPixmap>
#include <QPushButton>
#include <QSpinBox>
#include <QStringList>
#include <QFrame>
#include <QHBoxLayout>
#include <kaboutdata.h>
#include <kcharsets.h>
// KDE
#include <KAboutData>
#include <KCharsets>
#include <KFontDialog>
#include <KGlobalSettings>
#include <KIcon>
#include <KIconLoader>
#include <KInputDialog>
#include <KLocale>
#include <KMessageBox>
#include <KRun>
#include <KStandardAction>
#include <KMenu>
#include <KConfig>
#include <KActionCollection>
#include <KActionMenu>
#include <KSelectAction>
#include <KToggleAction>
#include <KAuthorized>
#include <KInstance>
#include <kdebug.h>
#include <kfontdialog.h>
#include <kglobalsettings.h>
#include <kicon.h>
#include <kiconloader.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <krun.h>
#include <kstandardaction.h>
#include <QLabel>
#include <QCheckBox>
#include <QSpinBox>
#include <QPushButton>
#include <kmenu.h>
#include <kconfig.h>
#include <kactioncollection.h>
#include <kactionmenu.h>
#include <kselectaction.h>
#include <ktoggleaction.h>
#include <kauthorized.h>
#include <kinstance.h>
// Konsole
#include "konsole_part.h"
#include "KeyTrans.h"
#include "schema.h"
#include "TESession.h"
#include "TEWidget.h"
// True transparency is not available in the embedded Konsole
bool true_transparency = false;
......@@ -81,8 +86,8 @@ extern "C"
/**
* We need one static instance of the factory for our C 'main' function
*/
KInstance *konsoleFactory::s_instance = 0L;
KAboutData *konsoleFactory::s_aboutData = 0;
KComponentData* konsoleFactory::s_instance = 0L;
KAboutData* konsoleFactory::s_aboutData = 0;
konsoleFactory::konsoleFactory()
{
......@@ -109,14 +114,14 @@ KParts::Part *konsoleFactory::createPartObject(QWidget *parentWidget,
return obj;
}
KInstance *konsoleFactory::instance()
const KComponentData& konsoleFactory::componentData()
{
if ( !s_instance )
{
s_aboutData = new KAboutData("konsole", I18N_NOOP("Konsole"), "1.5");
s_instance = new KInstance( s_aboutData );
s_instance = new KComponentData( s_aboutData );
}
return s_instance;
return *s_instance;
}
#define DEFAULT_HISTORY_SIZE 1000
......@@ -142,7 +147,7 @@ konsolePart::konsolePart(QWidget *_parentWidget, QObject *parent, const char *cl
,m_runningShell( false )
{
parentWidget=_parentWidget;
setInstance(konsoleFactory::instance());
setComponentData(konsoleFactory::componentData());
m_extension = new konsoleBrowserExtension(this);
......
......@@ -34,7 +34,7 @@
#include "schema.h"
#include "TESession.h"
class KInstance;
class KComponentData;
class konsoleBrowserExtension;
class QPushButton;
class QSpinBox;
......@@ -58,10 +58,10 @@ public:
const char* classname = "KParts::Part",
const QStringList &args = QStringList());
static KInstance *instance();
static const KComponentData& componentData();
private:
static KInstance *s_instance;
static KComponentData *s_instance;
static KAboutData *s_aboutData;
};
......
......@@ -46,23 +46,27 @@
** a particular m_number, but remember that find may return NULL.
*/
// System
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include "schema.h"
#include "kapplication.h"
// Qt
#include <QDir>
#include <QDateTime>
//Added by qt3to4:
#include <Q3PtrList>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kconfig.h>
// KDE
#include <KApplication>
#include <KStandardDirs>
#include <KLocale>
#include <KConfig>
#include <KRandom>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <krandom.h>
// Konsole
#include "schema.h"
typedef Q3PtrListIterator<ColorSchema> ColorSchemaListIterator;
......
......@@ -44,7 +44,7 @@ typedef KGenericFactory<KCMKonsole, QWidget> ModuleFactory;
K_EXPORT_COMPONENT_FACTORY( konsole, ModuleFactory("kcmkonsole") )
KCMKonsole::KCMKonsole(QWidget * parent, const QStringList&)
:KCModule(ModuleFactory::instance(), parent)
:KCModule(ModuleFactory::componentData(), parent)
{
setQuickHelp( i18n("<h1>Konsole</h1> With this module you can configure Konsole, the KDE terminal"
......
......@@ -305,7 +305,7 @@ void SchemaEditor::removeCurrent()
int code = KMessageBox::warningContinueCancel(this,
i18n("You are trying to remove a system schema. Are you sure?"),
i18n("Removing System Schema"),
KStdGuiItem::del());
KStandardGuiItem::del());
if (code != KMessageBox::Continue)
return;
}
......@@ -493,8 +493,8 @@ void SchemaEditor::querySave()
i18n("The schema has been modified.\n"
"Do you want to save the changes?"),
i18n("Schema Modified"),
KStdGuiItem::save(),
KStdGuiItem::discard());
KStandardGuiItem::save(),
KStandardGuiItem::discard());
if (result == KMessageBox::Yes)
{
saveCurrent();
......
......@@ -57,7 +57,9 @@ SessionEditor::SessionEditor(QWidget * parent)
loaded=false;
KGlobal::locale()->insertCatalog("konsole"); // For schema and keytab translations
KGlobal::iconLoader()->addAppDir( "konsole" );
//TODO - Look at this later
//KGlobal::iconLoader()->addAppDir( "konsole" );
directoryLine->setMode(KFile::Directory);
connect(sessionList, SIGNAL(highlighted(int)), this, SLOT(readSession(int)));
......@@ -255,8 +257,8 @@ void SessionEditor::querySave()
i18n("The session has been modified.\n"
"Do you want to save the changes?"),
i18n("Session Modified"),
KStdGuiItem::save(),
KStdGuiItem::discard());
KStandardGuiItem::save(),
KStandardGuiItem::discard());
if (result == KMessageBox::Yes)
{
saveCurrent();
......@@ -305,7 +307,7 @@ void SessionEditor::saveCurrent()
i18n( "The Execute entry is not a valid command.\n"
"You can still save this session, but it will not show up in Konsole's Session list." ),
i18n( "Invalid Execute Entry" ),
KStdGuiItem::save() );
KStandardGuiItem::save() );
if ( result != KMessageBox::Continue )
{
return;
......@@ -362,7 +364,7 @@ void SessionEditor::removeCurrent()
int code = KMessageBox::warningContinueCancel(this,
i18n("You are trying to remove a system session. Are you sure?"),
i18n("Removing System Session"),
KStdGuiItem::del());
KStandardGuiItem::del());
if (code != KMessageBox::Continue)
return;
}
......
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