diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:23:24 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:23:24 -0600 |
commit | 5b8ab149469c8e186ee8b05d90c0103ae722dd85 (patch) | |
tree | fb31321c80b12ee8e2237bdcf8c228fe44e67772 /kexi/main | |
parent | fe33d391dd7c9da0f83e779344a17e2e445b70a8 (diff) | |
download | koffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.tar.gz koffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'kexi/main')
-rw-r--r-- | kexi/main/keximainwindowimpl.cpp | 24 | ||||
-rw-r--r-- | kexi/main/kexinewstuff.cpp | 2 | ||||
-rw-r--r-- | kexi/main/printing/kexisimpleprintingengine.cpp | 10 | ||||
-rw-r--r-- | kexi/main/printing/kexisimpleprintingpagesetup.cpp | 2 | ||||
-rw-r--r-- | kexi/main/startup/KexiConnSelector.cpp | 2 | ||||
-rw-r--r-- | kexi/main/startup/KexiNewProjectWizard.cpp | 12 | ||||
-rw-r--r-- | kexi/main/startup/KexiProjectSelector.cpp | 2 | ||||
-rw-r--r-- | kexi/main/startup/KexiStartupDialog.cpp | 18 | ||||
-rw-r--r-- | kexi/main/startup/KexiStartupFileDialog_win.cpp | 12 | ||||
-rw-r--r-- | kexi/main/startup/KexiStartup_p.cpp | 14 | ||||
-rw-r--r-- | kexi/main/startup/KexiStartup_p.h | 8 |
11 files changed, 53 insertions, 53 deletions
diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index d5d77cd9..f924bc60 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -154,11 +154,11 @@ int KexiMainWindowImpl::create(int argc, char *argv[], TDEAboutData* aboutdata) TDEApplication* app = new TDEApplication(true, GUIenabled); #ifdef KEXI_STANDALONE - KGlobal::locale()->removeCatalogue("kexi"); - KGlobal::locale()->insertCatalogue("standalone_kexi"); + TDEGlobal::locale()->removeCatalogue("kexi"); + TDEGlobal::locale()->insertCatalogue("standalone_kexi"); #endif - KGlobal::locale()->insertCatalogue("koffice"); - KGlobal::locale()->insertCatalogue("koproperty"); + TDEGlobal::locale()->insertCatalogue("koffice"); + TDEGlobal::locale()->insertCatalogue("koproperty"); #ifdef CUSTOM_VERSION # include "custom_exec.h" @@ -255,8 +255,8 @@ KexiMainWindowImpl::KexiMainWindowImpl() manager()->setSplitterKeepSize(true); setStandardMDIMenuEnabled(false); setAsDefaultHost(); //this is default host now. - KGlobal::iconLoader()->addAppDir("kexi"); - KGlobal::iconLoader()->addAppDir("koffice"); + TDEGlobal::iconLoader()->addAppDir("kexi"); + TDEGlobal::iconLoader()->addAppDir("koffice"); //get informed connect(&Kexi::partManager(),TQT_SIGNAL(partLoaded(KexiPart::Part*)),this,TQT_SLOT(slotPartLoaded(KexiPart::Part*))); @@ -1360,7 +1360,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr while (true) { #ifdef TQ_WS_WIN //! @todo remove - TQString recentDir = KGlobalSettings::documentPath(); + TQString recentDir = TDEGlobalSettings::documentPath(); if (fname.isEmpty() && !projectData.constConnectionData()->dbFileName().isEmpty()) //propose filename from db template name fname = KFileDialog::getStartURL(startDir, recentDir).path() + '/' + projectData.constConnectionData()->dbFileName(); @@ -2073,8 +2073,8 @@ KexiMainWindowImpl::restoreSettings() int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); //#if KDE_IS_VERSION(3,1,90) -// restoredWidth = KGlobalSettings::screenGeometry(scnum).width(); - // restoredHeight = KGlobalSettings::screenGeometry(scnum).height(); +// restoredWidth = TDEGlobalSettings::screenGeometry(scnum).width(); + // restoredHeight = TDEGlobalSettings::screenGeometry(scnum).height(); //#else // restoredWidth = TQApplication::desktop()->width(); // restoredHeight = TQApplication::desktop()->height(); @@ -2563,7 +2563,7 @@ KexiMainWindowImpl::slotProjectNew() } //todo: pass new_data->caption() //start new instance -//! @todo use KProcess? +//! @todo use TDEProcess? TQProcess proc(args, TQT_TQOBJECT(this), "process"); proc.setCommunication((TQProcess::Communication)0); // proc.setWorkingDirectory( TQFileInfo(new_data->connectionData()->fileName()).dir(true) ); @@ -3989,7 +3989,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/) if (!d->config->hasKey("RunOnStart")) d->config->writeEntry("RunOnStart",true); - TQString lang = KGlobal::locale()->language(); + TQString lang = TDEGlobal::locale()->language(); TQString fname = locate("data", TQString("kexi/readme_")+lang); if (fname.isEmpty())//back to default fname = locate("data", "kexi/readme_en"); @@ -4002,7 +4002,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/) TQFile f(fname); if ( f.open( IO_ReadOnly ) ) { TQTextStream ts(&f); - ts.setCodec( KGlobal::locale()->codecForEncoding() ); + ts.setCodec( TDEGlobal::locale()->codecForEncoding() ); TQTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser"); if (tb) { tb->setText( TQString("<qt>%1</qt>").arg(ts.read()) ); diff --git a/kexi/main/kexinewstuff.cpp b/kexi/main/kexinewstuff.cpp index 1218df23..99ec8a31 100644 --- a/kexi/main/kexinewstuff.cpp +++ b/kexi/main/kexinewstuff.cpp @@ -41,7 +41,7 @@ KexiNewStuff::KexiNewStuff(TQWidget *parent) // fails to download something, it still marks the thing as // successfully downloaded and therefore we arn't able to // download it again :-/ - KGlobal::config()->deleteGroup("KNewStuffStatus"); + TDEGlobal::config()->deleteGroup("KNewStuffStatus"); } KexiNewStuff::~KexiNewStuff() diff --git a/kexi/main/printing/kexisimpleprintingengine.cpp b/kexi/main/printing/kexisimpleprintingengine.cpp index 3e6f8a97..b8ad5ebd 100644 --- a/kexi/main/printing/kexisimpleprintingengine.cpp +++ b/kexi/main/printing/kexisimpleprintingengine.cpp @@ -278,7 +278,7 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, TQPainter& painter, boo } painter.setFont(m_mainFont); - m_dateTimeText = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime(), + m_dateTimeText = TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime(), true, false); m_dateTimeWidth = painter.fontMetrics().width(m_dateTimeText+" "); m_mainLineSpacing = painter.fontMetrics().lineSpacing(); @@ -432,23 +432,23 @@ void KexiSimplePrintingEngine::paintRecord(TQPainter& painter, KexiTableItem *it else if (ftype==KexiDB::Field::DateTime) { TQDateTime dt(v.toDateTime()); if (dt.isValid()) - text = KGlobal::locale()->formatDateTime(dt); + text = TDEGlobal::locale()->formatDateTime(dt); } //! todo inherit format else if (ftype==KexiDB::Field::Date) { TQDate date(v.toDate()); if (date.isValid()) - text = KGlobal::locale()->formatDate(date, true/*short*/); + text = TDEGlobal::locale()->formatDate(date, true/*short*/); } //! todo inherit format else if (ftype==KexiDB::Field::Time) { TQTime time(v.toTime()); if (time.isValid()) - text = KGlobal::locale()->formatTime(time); + text = TDEGlobal::locale()->formatTime(time); } //! todo currency, decimal... else if (ci->field->isFPNumericType()) - text = KGlobal::locale()->formatNumber(v.toDouble()); + text = TDEGlobal::locale()->formatNumber(v.toDouble()); else if (ftype==KexiDB::Field::Boolean) text = v.toBool() ? i18n("Boolean Yes (true)","Yes") : i18n("Boolean No (false)", "No"); diff --git a/kexi/main/printing/kexisimpleprintingpagesetup.cpp b/kexi/main/printing/kexisimpleprintingpagesetup.cpp index c536f676..158c3ffc 100644 --- a/kexi/main/printing/kexisimpleprintingpagesetup.cpp +++ b/kexi/main/printing/kexisimpleprintingpagesetup.cpp @@ -324,7 +324,7 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi // settings //! @todo default? - m_unit = KLocale::Metric == KGlobal::locale()->measureSystem() ? KoUnit::U_CM : KoUnit::U_INCH; + m_unit = KLocale::Metric == TDEGlobal::locale()->measureSystem() ? KoUnit::U_CM : KoUnit::U_INCH; // GUI TQVBoxLayout *lyr = new TQVBoxLayout(this); diff --git a/kexi/main/startup/KexiConnSelector.cpp b/kexi/main/startup/KexiConnSelector.cpp index 6e104659..abbfac21 100644 --- a/kexi/main/startup/KexiConnSelector.cpp +++ b/kexi/main/startup/KexiConnSelector.cpp @@ -108,7 +108,7 @@ KexiConnSelectorWidget::KexiConnSelectorWidget( KexiDBConnectionSet& conn_set, d->conn_set = &conn_set; d->startDirOrVariable = startDirOrVariable; TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0); - const TQPixmap &icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); + const TQPixmap &icon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); setIcon( icon ); TQVBoxLayout* globalLyr = new TQVBoxLayout( this ); diff --git a/kexi/main/startup/KexiNewProjectWizard.cpp b/kexi/main/startup/KexiNewProjectWizard.cpp index c8d36aab..414fcfcd 100644 --- a/kexi/main/startup/KexiNewProjectWizard.cpp +++ b/kexi/main/startup/KexiNewProjectWizard.cpp @@ -107,7 +107,7 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set, TQString none; d->lvi_file = new KListViewItem( m_prjtype_sel->lv_types, i18n("New Project Stored in File") ); d->lvi_file->setPixmap(0, - KGlobal::iconLoader()->loadIcon( KMimeType::mimeType( + TDEGlobal::iconLoader()->loadIcon( KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0), KIcon::Desktop ) ); @@ -357,15 +357,15 @@ void KexiNewProjectWizard::accept() void KexiNewProjectWizard::done(int r) { /* //save state (always, no matter if dialog is accepted or not) - KGlobal::config()->setGroup("Startup"); + TDEGlobal::config()->setGroup("Startup"); if (!m_prjtype_sel->chk_always->isChecked()) - KGlobal::config()->deleteEntry("DefaultStorageForNewProjects"); + TDEGlobal::config()->deleteEntry("DefaultStorageForNewProjects"); else if (m_prjtype_sel->lv_types->currentItem()==d->lvi_file) - KGlobal::config()->writeEntry("DefaultStorageForNewProjects","File"); + TDEGlobal::config()->writeEntry("DefaultStorageForNewProjects","File"); else - KGlobal::config()->writeEntry("DefaultStorageForNewProjects","Server");*/ + TDEGlobal::config()->writeEntry("DefaultStorageForNewProjects","Server");*/ - KGlobal::config()->sync(); + TDEGlobal::config()->sync(); KWizard::done(r); } diff --git a/kexi/main/startup/KexiProjectSelector.cpp b/kexi/main/startup/KexiProjectSelector.cpp index 878e0273..eeb46da6 100644 --- a/kexi/main/startup/KexiProjectSelector.cpp +++ b/kexi/main/startup/KexiProjectSelector.cpp @@ -105,7 +105,7 @@ KexiProjectSelectorWidget::KexiProjectSelectorWidget( d->showProjectNameColumn = showProjectNameColumn; d->showConnectionColumns = showConnectionColumns; TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0); - d->fileicon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); + d->fileicon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); setIcon( d->fileicon ); d->dbicon = SmallIcon("database"); // list->setHScrollBarMode( TQScrollView::AlwaysOn ); diff --git a/kexi/main/startup/KexiStartupDialog.cpp b/kexi/main/startup/KexiStartupDialog.cpp index 688bc7d9..f6ded39a 100644 --- a/kexi/main/startup/KexiStartupDialog.cpp +++ b/kexi/main/startup/KexiStartupDialog.cpp @@ -69,9 +69,9 @@ public: result = 0; TQString none, iconname; iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0); - kexi_sqlite_icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); + kexi_sqlite_icon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); iconname = KMimeType::mimeType("application/x-kexiproject-shortcut")->icon(none,0); - kexi_shortcut_icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); + kexi_shortcut_icon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); prj_selector = 0; chkDoNotShow = 0; openExistingConnWidget = 0; @@ -208,8 +208,8 @@ KexiStartupDialog::~KexiStartupDialog() bool KexiStartupDialog::shouldBeShown() { - KGlobal::config()->setGroup("Startup"); - return KGlobal::config()->readBoolEntry("ShowStartupDialog",true); + TDEGlobal::config()->setGroup("Startup"); + return TDEGlobal::config()->readBoolEntry("ShowStartupDialog",true); } void KexiStartupDialog::show() @@ -272,15 +272,15 @@ void KexiStartupDialog::done(int r) } //save settings - KGlobal::config()->setGroup("Startup"); + TDEGlobal::config()->setGroup("Startup"); if (d->openExistingConnWidget) - KGlobal::config()->writeEntry("OpenExistingType", + TDEGlobal::config()->writeEntry("OpenExistingType", (d->openExistingConnWidget->selectedConnectionType() == KexiConnSelectorWidget::FileBased) ? "File" : "Server"); if (d->chkDoNotShow) - KGlobal::config()->writeEntry("ShowStartupDialog",!d->chkDoNotShow->isChecked()); + TDEGlobal::config()->writeEntry("ShowStartupDialog",!d->chkDoNotShow->isChecked()); - KGlobal::config()->sync(); + TDEGlobal::config()->sync(); KDialogBase::done(r); } @@ -552,7 +552,7 @@ void KexiStartupDialog::setupPageOpenExisting() d->pageOpenExisting, "KexiConnSelectorWidget"); d->openExistingConnWidget->hideConnectonIcon(); lyr->addWidget( d->openExistingConnWidget ); - if (KGlobal::config()->readEntry("OpenExistingType","File")=="File") + if (TDEGlobal::config()->readEntry("OpenExistingType","File")=="File") d->openExistingConnWidget->showSimpleConn(); else { d->openExistingConnWidget->showSimpleConn(); diff --git a/kexi/main/startup/KexiStartupFileDialog_win.cpp b/kexi/main/startup/KexiStartupFileDialog_win.cpp index 5550cf9f..dfeaedd3 100644 --- a/kexi/main/startup/KexiStartupFileDialog_win.cpp +++ b/kexi/main/startup/KexiStartupFileDialog_win.cpp @@ -56,7 +56,7 @@ KexiStartupFileDialogBase::KexiStartupFileDialogBase( //make default 'My Documents' folder //TODO: store changes in the app's config file? if (_dirName.isEmpty()) - _dirName = KGlobalSettings::documentPath(); + _dirName = TDEGlobalSettings::documentPath(); init(_dirName, filter, parent); @@ -84,7 +84,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f //TODO d->keepLocation = false; //TODO d->operationMode = Opening; setMode(KFile::File | KFile::ExistingOnly); //(js) default: open action - setIcon( KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Desktop) ); + setIcon( TDEGlobal::iconLoader()->loadIcon("fileopen", KIcon::Desktop) ); setDir(TQDir(startDir)); //TODO d->hasDefaultFilter = false; //TODO d->hasView = false; @@ -99,7 +99,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f //(js) d->autoSelectExtCheckBox = 0; // delayed loading //TODO d->autoSelectExtChecked = false; //(js) d->urlBar = 0; // delayed loading -//TODO KConfig *config = KGlobal::config(); +//TODO KConfig *config = TDEGlobal::config(); //TODO KConfigGroupSaver cs( config, ConfigGroup ); //TODO d->initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults", //TODO true ); @@ -131,7 +131,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f text ); KURL docPath; - docPath.setPath( KGlobalSettings::documentPath() ); + docPath.setPath( TDEGlobalSettings::documentPath() ); if ( u.path(+1) != docPath.path(+1) ) { text = i18n("Documents: %1").arg( docPath.path( +1 ) ); d->pathCombo->addDefaultURL( u, @@ -139,7 +139,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f text ); } - u.setPath( KGlobalSettings::desktopPath() ); + u.setPath( TDEGlobalSettings::desktopPath() ); text = i18n("Desktop: %1").arg( u.path( +1 ) ); d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), @@ -387,7 +387,7 @@ void KexiStartupFileDialogBase::setOperationMode( KFileDialog::OperationMode mod // d->keepLocation = (mode == Saving); if (mode == KFileDialog::Saving) { setMode( KFile::File ); - setIcon( KGlobal::iconLoader()->loadIcon("filesave", KIcon::Desktop) ); + setIcon( TDEGlobal::iconLoader()->loadIcon("filesave", KIcon::Desktop) ); } //(js) filterWidget->setEditable( !d->hasDefaultFilter || mode != Saving ); //(js) d->okButton->setGuiItem( (mode == Saving) ? KStdGuiItem::save() : KStdGuiItem::ok() ); diff --git a/kexi/main/startup/KexiStartup_p.cpp b/kexi/main/startup/KexiStartup_p.cpp index e959ccdc..287bd846 100644 --- a/kexi/main/startup/KexiStartup_p.cpp +++ b/kexi/main/startup/KexiStartup_p.cpp @@ -62,13 +62,13 @@ tristate SQLite2ToSQLite3Migration::run() //remember permissions of m_filePath m_restoreStat = (0==stat(TQFile::encodeName(m_filePath), &m_st)); - m_process = new KProcess(this, "process"); + m_process = new TDEProcess(this, "process"); *m_process << ksqlite2to3_app << m_filePath; m_process->setWorkingDirectory( fi.dir(true).absPath() ); - connect( m_process, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), - this, TQT_SLOT(receivedStderr(KProcess*,char*,int))); - connect( m_process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(processExited(KProcess*)) ); - if (!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr)) + connect( m_process, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + this, TQT_SLOT(receivedStderr(TDEProcess*,char*,int))); + connect( m_process, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(processExited(TDEProcess*)) ); + if (!m_process->start(TDEProcess::NotifyOnExit, TDEProcess::Stderr)) return false; m_dlg = new KProgressDialog(0, 0, TQString(), @@ -91,12 +91,12 @@ tristate SQLite2ToSQLite3Migration::run() extern void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen); -void SQLite2ToSQLite3Migration::receivedStderr(KProcess *, char *buffer, int buflen) +void SQLite2ToSQLite3Migration::receivedStderr(TDEProcess *, char *buffer, int buflen) { updateProgressBar(m_dlg, buffer, buflen); } -void SQLite2ToSQLite3Migration::processExited(KProcess* process) +void SQLite2ToSQLite3Migration::processExited(TDEProcess* process) { kdDebug() << "EXIT " << process->name() << endl; diff --git a/kexi/main/startup/KexiStartup_p.h b/kexi/main/startup/KexiStartup_p.h index dce0fb3a..246922be 100644 --- a/kexi/main/startup/KexiStartup_p.h +++ b/kexi/main/startup/KexiStartup_p.h @@ -27,7 +27,7 @@ #include <kexiutils/tristate.h> -class KProcess; +class TDEProcess; class KProgressDialog; class SQLite2ToSQLite3Migration : public TQObject @@ -41,13 +41,13 @@ class SQLite2ToSQLite3Migration : public TQObject tristate run(); public slots: - void processExited(KProcess*); - void receivedStderr(KProcess*,char*,int); + void processExited(TDEProcess*); + void receivedStderr(TDEProcess*,char*,int); void cancelClicked(); protected: TQString m_filePath; - KProcess *m_process; + TDEProcess *m_process; KProgressDialog* m_dlg; struct stat m_st; |