Rename KStandard for enhanced compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 9a22ee8ba6
commit 949de81936

@ -284,7 +284,7 @@ void KHangMan::loadLevels()
{ {
//build the Level combobox menu dynamically depending of the data for each language //build the Level combobox menu dynamically depending of the data for each language
levels.clear();//initialize TQStringList levels levels.clear();//initialize TQStringList levels
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQStringList mfiles = dirs->findAllResources("data","khangman/data/" + Prefs::selectedLanguage() + "/*.kvtml"); TQStringList mfiles = dirs->findAllResources("data","khangman/data/" + Prefs::selectedLanguage() + "/*.kvtml");
bool levelBool = false; bool levelBool = false;
if (!mfiles.isEmpty()) if (!mfiles.isEmpty())

@ -46,9 +46,9 @@ bool KHNewStuff::install( const TQString &fileName )
if ( !archive.open( IO_ReadOnly ) ) if ( !archive.open( IO_ReadOnly ) )
return false; return false;
const KArchiveDirectory *archiveDir = archive.directory(); const KArchiveDirectory *archiveDir = archive.directory();
KStandardDirs myStdDir; TDEStandardDirs myStdDir;
const TQString destDir =myStdDir.saveLocation("data", kapp->instanceName() + "/data/", true); const TQString destDir =myStdDir.saveLocation("data", kapp->instanceName() + "/data/", true);
KStandardDirs::makeDir( destDir ); TDEStandardDirs::makeDir( destDir );
archiveDir->copyTo(destDir); archiveDir->copyTo(destDir);
archive.close(); archive.close();
//look for languages dirs installed //look for languages dirs installed

@ -59,7 +59,7 @@ Dict::Index *Asyndeta::retrieveIndex()
void Asyndeta::readKitenConfiguration() void Asyndeta::readKitenConfiguration()
{ {
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TDEConfig config(dirs->findResource("config", "kitenrc")); TDEConfig config(dirs->findResource("config", "kitenrc"));
TQString globaledict = dirs->findResource("data", "kiten/edict"); TQString globaledict = dirs->findResource("data", "kiten/edict");

@ -37,7 +37,7 @@ void Deinf::Index::load()
if (loaded) if (loaded)
return; return;
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQString vconj = dirs->findResource("data", "kiten/vconj"); TQString vconj = dirs->findResource("data", "kiten/vconj");
if (vconj.isNull()) if (vconj.isNull())
{ {

@ -105,7 +105,7 @@ File::File(TQString path, TQString n)
//kdDebug() << "creating " << indexFile.name() << endl; //kdDebug() << "creating " << indexFile.name() << endl;
// find the index generator executable // find the index generator executable
TDEProcess proc; TDEProcess proc;
proc << KStandardDirs::findExe("kitengen") << path << indexFile.name(); proc << TDEStandardDirs::findExe("kitengen") << path << indexFile.name();
// TODO: put up a status dialog and event loop instead of blocking // TODO: put up a status dialog and event loop instead of blocking
proc.start(TDEProcess::Block, TDEProcess::NoCommunication); proc.start(TDEProcess::Block, TDEProcess::NoCommunication);
} }

@ -33,7 +33,7 @@ KRomajiEdit::KRomajiEdit(TQWidget *parent, const char *name)
{ {
kana = "unset"; kana = "unset";
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQString romkana = dirs->findResource("data", "kiten/romkana.cnv"); TQString romkana = dirs->findResource("data", "kiten/romkana.cnv");
if (romkana.isNull()) if (romkana.isNull())
{ {

@ -51,7 +51,7 @@ void Rad::load()
if (loaded) if (loaded)
return; return;
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
TQString radtdefile = dirs->findResource("data", "kiten/radtdefile"); TQString radtdefile = dirs->findResource("data", "kiten/radtdefile");
if (radtdefile.isNull()) if (radtdefile.isNull())
{ {

@ -404,7 +404,7 @@ void eEdit::save()
// find the index generator executable // find the index generator executable
TDEProcess proc; TDEProcess proc;
proc << KStandardDirs::findExe("kitengen") << filename << TDEGlobal::dirs()->saveLocation("data", "kiten/xjdx/", true) + TQFileInfo(filename).baseName() + ".xjdx"; proc << TDEStandardDirs::findExe("kitengen") << filename << TDEGlobal::dirs()->saveLocation("data", "kiten/xjdx/", true) + TQFileInfo(filename).baseName() + ".xjdx";
// TODO: put up a status dialog and event loop instead of blocking // TODO: put up a status dialog and event loop instead of blocking
proc.start(TDEProcess::Block, TDEProcess::NoCommunication); proc.start(TDEProcess::Block, TDEProcess::NoCommunication);

@ -39,9 +39,9 @@ bool KLNewStuff::install( const TQString &fileName )
if ( !archive.open( IO_ReadOnly ) ) if ( !archive.open( IO_ReadOnly ) )
return false; return false;
const KArchiveDirectory *archiveDir = archive.directory(); const KArchiveDirectory *archiveDir = archive.directory();
KStandardDirs myStdDir; TDEStandardDirs myStdDir;
const TQString destDir =myStdDir.saveLocation("data", kapp->instanceName() + "/", true); const TQString destDir =myStdDir.saveLocation("data", kapp->instanceName() + "/", true);
KStandardDirs::makeDir( destDir ); TDEStandardDirs::makeDir( destDir );
archiveDir->copyTo(destDir); archiveDir->copyTo(destDir);
archive.close(); archive.close();
//look for languages dirs installed //look for languages dirs installed

@ -249,7 +249,7 @@ void KmPlot::fileOpen(const KURL &url)
// says that it should open a new window if the document is _not_ // says that it should open a new window if the document is _not_
// in its initial state. This is what we do here.. // in its initial state. This is what we do here..
if ( m_part->url().isEmpty() && !isModified() ) if ( m_part->url().isEmpty() && !isModified() )
load( KStandardDirs::realFilePath(url.url())); // we open the file in this window... load( TDEStandardDirs::realFilePath(url.url())); // we open the file in this window...
else else
openFileInNewWindow(url); // we open the file in a new window... openFileInNewWindow(url); // we open the file in a new window...
} }

@ -55,7 +55,7 @@ bool KSNewStuff::install( const TQString &fileName )
const KArchiveDirectory *archiveDir = archive.directory(); const KArchiveDirectory *archiveDir = archive.directory();
const TQString destDir = TDEGlobal::dirs()->saveLocation("data", kapp->instanceName(), true); const TQString destDir = TDEGlobal::dirs()->saveLocation("data", kapp->instanceName(), true);
KStandardDirs::makeDir( destDir ); TDEStandardDirs::makeDir( destDir );
//monitor destDir for changes; inform updateData when files are created. //monitor destDir for changes; inform updateData when files are created.
connect( kdw, TQT_SIGNAL( dirty( const TQString & ) ), this, TQT_SLOT( updateData( const TQString & ) ) ); connect( kdw, TQT_SIGNAL( dirty( const TQString & ) ), this, TQT_SLOT( updateData( const TQString & ) ) );

@ -345,7 +345,7 @@ void KStars::slotGeoLocator() {
} }
void KStars::slotViewOps() { void KStars::slotViewOps() {
KStandardDirs stdDirs; TDEStandardDirs stdDirs;
//An instance of your dialog could be already created and could be cached, //An instance of your dialog could be already created and could be cached,
//in which case you want to display the cached dialog instead of creating //in which case you want to display the cached dialog instead of creating

@ -70,7 +70,7 @@ KStarsData::KStarsData() : stdDirs(0), locale(0),
objects++; objects++;
//standard directories and locale objects //standard directories and locale objects
stdDirs = new KStandardDirs(); stdDirs = new TDEStandardDirs();
locale = new KLocale( "kstars" ); locale = new KLocale( "kstars" );
//Check to see if config file already exists. If not, set //Check to see if config file already exists. If not, set

@ -53,7 +53,7 @@ class TQDataPump;
class TQFile; class TQFile;
class TQTimer; class TQTimer;
class KStandardDirs; class TDEStandardDirs;
class dms; class dms;
class SkyMap; class SkyMap;
@ -735,7 +735,7 @@ private:
bool TimeRunsForward, temporaryTrail, snapToFocus; bool TimeRunsForward, temporaryTrail, snapToFocus;
TQString cnameFile; TQString cnameFile;
KStandardDirs *stdDirs; TDEStandardDirs *stdDirs;
KLocale *locale; KLocale *locale;
dms *LST, *HourAngle; dms *LST, *HourAngle;

@ -747,7 +747,7 @@ void KTouch::updateFontFromLecture() {
// This function populates the file lists with the installed training, keyboard and // This function populates the file lists with the installed training, keyboard and
// examination files. // examination files.
void KTouch::updateFileLists() { void KTouch::updateFileLists() {
KStandardDirs *dirs = TDEGlobal::dirs(); TDEStandardDirs *dirs = TDEGlobal::dirs();
// first search for all installed keyboard files // first search for all installed keyboard files
// TODO : search in i18n() directories // TODO : search in i18n() directories

@ -22,7 +22,7 @@
KFeederControl::KFeederControl(int ID, bool splash, bool automatic) KFeederControl::KFeederControl(int ID, bool splash, bool automatic)
{ {
TQString f = KStandardDirs::findExe("kfeeder"); TQString f = TDEStandardDirs::findExe("kfeeder");
TQString s; TQString s;
s.setNum(ID); s.setNum(ID);
childFeeder << f; childFeeder << f;

@ -57,7 +57,7 @@ TQString KVTNewStuff::destinationPath(KNS::Entry * entry)
else else
{ {
file = TQDir::home().path() + "/" + path + "/"; file = TQDir::home().path() + "/" + path + "/";
KStandardDirs::makeDir(file); //ensure the directory exists TDEStandardDirs::makeDir(file); //ensure the directory exists
file += fileName; file += fileName;
} }
return file; return file;
@ -71,7 +71,7 @@ TQString KVTNewStuff::downloadDestination(KNS::Entry * entry)
{ {
TQString file = destinationPath(entry); TQString file = destinationPath(entry);
if (KStandardDirs::exists(file)) if (TDEStandardDirs::exists(file))
{ {
int result = KMessageBox::warningContinueCancel(parentWidget(), int result = KMessageBox::warningContinueCancel(parentWidget(),
i18n("The file '%1' already exists. Do you want to overwrite it?") i18n("The file '%1' already exists. Do you want to overwrite it?")

@ -1084,7 +1084,7 @@ TQString KWordQuizApp::charIcon(const TQChar & c)
TQString s = locateLocal("icon", "char" + TQString::number(c.unicode()) + ".png"); TQString s = locateLocal("icon", "char" + TQString::number(c.unicode()) + ".png");
///No need to redraw if it already exists ///No need to redraw if it already exists
if (KStandardDirs::exists(s)) if (TDEStandardDirs::exists(s))
return s; return s;
TQRect r(4, 4, 120, 120); TQRect r(4, 4, 120, 120);

@ -61,7 +61,7 @@ TQString KWQNewStuff::destinationPath(KNS::Entry * entry)
else else
{ {
file = TQDir::home().path() + "/" + path + "/"; file = TQDir::home().path() + "/" + path + "/";
KStandardDirs::makeDir(file); //ensure the directory exists TDEStandardDirs::makeDir(file); //ensure the directory exists
file += fileName; file += fileName;
} }
return file; return file;
@ -75,7 +75,7 @@ TQString KWQNewStuff::downloadDestination(KNS::Entry * entry)
{ {
TQString file = destinationPath(entry); TQString file = destinationPath(entry);
if (KStandardDirs::exists(file)) if (TDEStandardDirs::exists(file))
{ {
int result = KMessageBox::questionYesNo(parentWidget(), int result = KMessageBox::questionYesNo(parentWidget(),
i18n("The file '%1' already exists. Do you want to overwrite it?") i18n("The file '%1' already exists. Do you want to overwrite it?")

Loading…
Cancel
Save