Rename KStandard for enhanced compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 8d6fecdf83
commit 82fc754f7c

@ -317,7 +317,7 @@
* Added a ruby DCOP service project template
* Improved the kapp Korundum application framework. It configures, builds and installs
a C++ top level stub, that starts the ruby app. The ruby scripts are located via the
KStandardDirs/TDEInstance mechanism, in directory ..share/apps/<appname>
TDEStandardDirs/TDEInstance mechanism, in directory ..share/apps/<appname>
* k_dcop and k_dcop_signals declarations are shown as slot and signal declarations in
the class parser.
* =begin to =end comments are ignored

@ -1074,8 +1074,8 @@ TQString AutoProjectPart::updateAdminDirectoryCommand() const
bool process;
// Find the admin tarball
KStandardDirs dirs;
dirs.addResourceType("apptemplates", KStandardDirs::kde_default("data") + "kdevappwizard/template-common/");
TDEStandardDirs dirs;
dirs.addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "kdevappwizard/template-common/");
source = dirs.findResource("apptemplates", "admin.tar.gz");
if (source != "") {
TQString cmdline = "rm -rf admin && tar -xzvf ";

@ -47,10 +47,10 @@
void %{APPNAME}::setupActions()
{
KStandardAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
KStandardAction::quit(tqApp, TQT_SLOT(quit()), actionCollection());
TDEStandardAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
TDEStandardAction::quit(tqApp, TQT_SLOT(quit()), actionCollection());
KStandardAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
TDEStandardAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
// custom menu and menu item - the slot is in the class %{APPNAME}View
KAction *custom = new KAction(KIcon("colorize"), i18n("Swi&tch Colors"), this);

@ -232,7 +232,7 @@ void CCConfigWidget::slotRemovePCS()
TQString db = advancedOptions->selectedItem() ->text( 0 );
TQString question = i18n( "Are you sure you want to delete the \"%1\" database?" ).arg( db );
KStandardDirs *dirs = m_pPart->instance() ->dirs();
TDEStandardDirs *dirs = m_pPart->instance() ->dirs();
TQString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + KURL::encode_string_no_slash( db ) + ".db";
if ( KMessageBox::Continue == KMessageBox::warningContinueCancel( 0, question, i18n( "Delete Database" ), KStdGuiItem::del() ) )

@ -165,7 +165,7 @@ void ClassGeneratorConfig::readConfig()
reformat_box->setChecked( config->readBoolEntry( "Reformat Source", 0 ) );
KStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
TDEStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
cppHeaderText = templateText( dirs->findResource( "newclasstemplates", "cpp_header" ) );
cppSourceText = templateText( dirs->findResource( "newclasstemplates", "cpp_source" ) );
@ -211,7 +211,7 @@ void ClassGeneratorConfig::storeConfig()
config->writeEntry( "Reformat Source", reformat_box->isChecked() );
KStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
TDEStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
saveTemplateText( dirs->saveLocation( "newclasstemplates" ) + "cpp_header", cppHeader() );
saveTemplateText( dirs->saveLocation( "newclasstemplates" ) + "cpp_source", cppSource() );

@ -26,9 +26,9 @@ CppSupportFactory::CppSupportFactory()
TDEInstance *CppSupportFactory::createInstance()
{
TDEInstance *instance = KDevGenericFactory<CppSupportPart>::createInstance();
KStandardDirs *dirs = instance->dirs();
dirs->addResourceType( "newclasstemplates", KStandardDirs::kde_default("data") + "kdevcppsupport/newclass/" );
dirs->addResourceType( "pcs", KStandardDirs::kde_default( "data" ) + "kdevcppsupport/pcs/" );
TDEStandardDirs *dirs = instance->dirs();
dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "kdevcppsupport/newclass/" );
dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "kdevcppsupport/pcs/" );
return instance;
}

@ -1935,7 +1935,7 @@ void CppSupportPart::setupCatalog( )
{
kdDebug( 9007 ) << "CppSupportPart::setupCatalog()" << endl;
KStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
TDEStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
TQStringList pcsList = dirs->findAllResources( "pcs", "*.db", false, true );
TQStringList pcsIdxList = dirs->findAllResources( "pcs", "*.idx", false, true );
@ -3039,7 +3039,7 @@ void CppSupportPart::buildSafeFileSet() {
void CppSupportPart::addToRepository( ParsedFilePointer file ) {
TQString catalogString( "automatic_" + KURL::encode_string_no_slash(m_projectDirectory) );
KStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
TDEStandardDirs *dirs = CppSupportFactory::instance() ->dirs();
TQString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + catalogString + ".db";

@ -299,7 +299,7 @@ void CreatePCSDialog::slotSelected( const TQString & )
progressBar->setTotalSteps( fileList.size() );
progressBar->setPercentageVisible( true );
KStandardDirs *dirs = m_part->instance() ->dirs();
TDEStandardDirs *dirs = m_part->instance() ->dirs();
TQString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + KURL::encode_string_no_slash(filename_edit->text()) + ".db";
kdDebug( 9007 ) << "================================> dbName = " << dbName << endl;

@ -285,7 +285,7 @@ bool STTY::findExternalTTY(const TQString &termApp)
{
TQString appName(termApp.isEmpty() ? TQString("xterm") : termApp);
if ( KStandardDirs::findExe( termApp ).isEmpty() )
if ( TDEStandardDirs::findExe( termApp ).isEmpty() )
{
return false;
}

@ -1728,7 +1728,7 @@
<entry name="listings, KSpellDemo (spell-checking application), tdespelldemo.cpp class declaration" url="ch10lev1sec3.html"/>
<entry name="listings, KSpellDemo (spell-checking application), tdespelldemo.h class definition" url="ch10lev1sec3.html"/>
<entry name="listings, KSpellDemo (spell-checking application), main() method" url="ch10lev1sec3.html"/>
<entry name="listings, KStandardDialogs main.cpp" url="ch05lev1sec3.html"/>
<entry name="listings, TDEStandardDialogs main.cpp" url="ch05lev1sec3.html"/>
<entry name="listings, KStatusBarDemo widget, kstatusbardemo.cpp class definition" url="ch05.html"/>
<entry name="listings, KStatusBarDemo widget, kstatusbardemo.h class declaration" url="ch05.html"/>
<entry name="listings, KStatusBarDemo widget, main() function" url="ch05.html"/>

@ -194,7 +194,7 @@ void parseDirectory( Driver& driver, TQDir& dir, bool rec, bool parseAllFiles )
int main( int argc, char* argv[] )
{
KStandardDirs stddir;
TDEStandardDirs stddir;
if ( argc < 3 )
{
@ -205,8 +205,8 @@ int main( int argc, char* argv[] )
bool rec = false;
bool parseAllFiles = false;
TQString datadir = stddir.localtdedir() + "/" + KStandardDirs::kde_default( "data" );
if ( ! KStandardDirs::makeDir( datadir + "/kdevcppsupport/pcs/" ) )
TQString datadir = stddir.localtdedir() + "/" + TDEStandardDirs::kde_default( "data" );
if ( ! TDEStandardDirs::makeDir( datadir + "/kdevcppsupport/pcs/" ) )
{
kdWarning() << "*error* " << "could not create " << datadir + "/kdevcppsupport/pcs/" << endl << endl;
return -1;

@ -25,9 +25,9 @@ JavaSupportFactory::JavaSupportFactory()
TDEInstance *JavaSupportFactory::createInstance()
{
TDEInstance *instance = KDevGenericFactory<JavaSupportPart>::createInstance();
KStandardDirs *dirs = instance->dirs();
dirs->addResourceType( "newclasstemplates", KStandardDirs::kde_default("data") + "kdevjavasupport/newclass/" );
dirs->addResourceType( "pcs", KStandardDirs::kde_default( "data" ) + "kdevjavasupport/pcs/" );
TDEStandardDirs *dirs = instance->dirs();
dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "kdevjavasupport/newclass/" );
dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "kdevjavasupport/pcs/" );
return instance;
}

@ -704,7 +704,7 @@ void JavaSupportPart::setupCatalog( )
TQStringList indexList = TQStringList() << "kind" << "name" << "scope" << "fileName";
KStandardDirs *dirs = JavaSupportFactory::instance()->dirs();
TDEStandardDirs *dirs = JavaSupportFactory::instance()->dirs();
TQStringList pcsList = dirs->findAllResources( "pcs", "*.db", false, true );
TQStringList pcsIdxList = dirs->findAllResources( "pcs", "*.idx", false, true );

@ -51,7 +51,7 @@ PHPCodeCompletion::~PHPCodeCompletion(){
}
void PHPCodeCompletion::readGlobalPHPFunctionsFile(){
KStandardDirs *dirs = PHPSupportFactory::instance()->dirs();
TDEStandardDirs *dirs = PHPSupportFactory::instance()->dirs();
TQString phpFuncFile = dirs->findResource("data","kdevphpsupport/phpfunctions");
TQRegExp lineReg(":([0-9A-Za-z_]+) ([0-9A-Za-z_]+)\\((.*)\\)");
FunctionCompletionEntry e;

@ -23,7 +23,7 @@
#include <iostream>
PHPConfigData::PHPConfigData(TQDomDocument* dom) {
TQString file = KStandardDirs::findExe("php");
TQString file = TDEStandardDirs::findExe("php");
if (file.isEmpty())
file = "/usr/local/bin/php";

@ -42,7 +42,7 @@ PHPConfigWidget::PHPConfigWidget(PHPConfigData* data,TQWidget* parent, const ch
// page shell
TQString exepath = configData->getPHPExecPath();
if (exepath.isEmpty()) {
TQString fiexepath = KStandardDirs::findExe("php");
TQString fiexepath = TDEStandardDirs::findExe("php");
if (exepath.isEmpty())
exepath = "/usr/local/bin/php";

@ -53,11 +53,11 @@ public:
virtual TDEInstance *createInstance()
{
TDEInstance *instance = KDevGenericFactory<AbbrevPart>::createInstance();
KStandardDirs *dirs = instance->dirs();
TDEStandardDirs *dirs = instance->dirs();
dirs->addResourceType( "codetemplates",
KStandardDirs::kde_default( "data" ) + "kdevabbrev/templates/" );
TDEStandardDirs::kde_default( "data" ) + "kdevabbrev/templates/" );
dirs->addResourceType( "sources",
KStandardDirs::kde_default( "data" ) + "kdevabbrev/sources" );
TDEStandardDirs::kde_default( "data" ) + "kdevabbrev/sources" );
return instance;
}
@ -152,7 +152,7 @@ void AbbrevPart::setAutoWordCompletionEnabled( bool enabled )
}
void AbbrevPart::load()
{
KStandardDirs *dirs = AbbrevFactory::instance()->dirs();
TDEStandardDirs *dirs = AbbrevFactory::instance()->dirs();
TQString localTemplatesFile = locateLocal("codetemplates", "templates", AbbrevFactory::instance());
TQStringList files;
if (TQFileInfo(localTemplatesFile).exists())

@ -124,7 +124,7 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, TQWidget *parent, const ch
config->setGroup("General Options");
TQString defaultProjectsDir = config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/");
KStandardDirs *dirs = AppWizardFactory::instance()->dirs();
TDEStandardDirs *dirs = AppWizardFactory::instance()->dirs();
TQStringList m_templateNames = dirs->findAllResources("apptemplates", TQString(), false, true);
kdDebug(9010) << "Templates: " << endl;
@ -1281,8 +1281,8 @@ TQDict<KDevLicense> AppWizardDialog::licenses()
void AppWizardDialog::loadLicenses()
{
// kdDebug(9010) << "======================== Entering loadLicenses" << endl;
KStandardDirs* dirs = TDEGlobal::dirs();
dirs->addResourceType( "licenses", KStandardDirs::kde_default( "data" ) + "tdevelop/licenses/" );
TDEStandardDirs* dirs = TDEGlobal::dirs();
dirs->addResourceType( "licenses", TDEStandardDirs::kde_default( "data" ) + "tdevelop/licenses/" );
TQStringList licNames = dirs->findAllResources( "licenses", TQString(), false, true );
TQStringList::Iterator it;

@ -26,10 +26,10 @@ AppWizardFactory::AppWizardFactory()
TDEInstance *AppWizardFactory::createInstance()
{
TDEInstance *instance = KDevGenericFactory<AppWizardPart>::createInstance();
KStandardDirs *dirs = instance->dirs();
dirs->addResourceType("apptemplates", KStandardDirs::kde_default("data") + "kdevappwizard/templates/");
dirs->addResourceType("appimports", KStandardDirs::kde_default("data") + "kdevappwizard/imports/");
dirs->addResourceType("appimportfiles", KStandardDirs::kde_default("data") + "kdevappwizard/importfiles/");
TDEStandardDirs *dirs = instance->dirs();
dirs->addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "kdevappwizard/templates/");
dirs->addResourceType("appimports", TDEStandardDirs::kde_default("data") + "kdevappwizard/imports/");
dirs->addResourceType("appimportfiles", TDEStandardDirs::kde_default("data") + "kdevappwizard/importfiles/");
return instance;
}

@ -61,7 +61,7 @@ ImportDialog::ImportDialog(AppWizardPart *part, TQWidget *parent, const char *na
TQToolTip::add( urlinput_edit->button(), i18n("Choose directory to import") );
urlinput_edit->setMode(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly);
KStandardDirs *dirs = AppWizardFactory::instance()->dirs();
TDEStandardDirs *dirs = AppWizardFactory::instance()->dirs();
importNames = dirs->findAllResources("appimports", TQString(), false, true);
importNames.sort();

@ -74,7 +74,7 @@ void ValgrindDialog::setValExecutable( const TQString& ve )
{
TQString vUrl = ve;
if ( vUrl.isEmpty() ) {
vUrl = KStandardDirs::findExe( "valgrind" );
vUrl = TDEStandardDirs::findExe( "valgrind" );
}
if ( vUrl.isEmpty() ) {
KMessageBox::sorry( this, i18n( "Could not find valgrind in your $PATH. Please make "
@ -134,7 +134,7 @@ void ValgrindDialog::setCtExecutable( const TQString& ce )
{
TQString vUrl = ce;
if ( vUrl.isEmpty() ) {
vUrl = KStandardDirs::findExe( "valgrind" );
vUrl = TDEStandardDirs::findExe( "valgrind" );
}
if ( vUrl.isEmpty() ) {
KMessageBox::sorry( this, i18n( "Could not find valgrind in your $PATH. Please make "
@ -179,7 +179,7 @@ void ValgrindDialog::setKcExecutable( const TQString& ke )
{
TQString vUrl = ke;
if ( vUrl.isEmpty() ) {
vUrl = KStandardDirs::findExe( "tdecachegrind" );
vUrl = TDEStandardDirs::findExe( "tdecachegrind" );
}
if ( vUrl.isEmpty() ) {
KMessageBox::sorry( this, i18n( "Could not find tdecachegrind in your $PATH. Please make "

@ -81,7 +81,7 @@ PluginController::PluginController()
{
/* m_defaultProfile = TQString::fromLatin1( "FullIDE" );
m_defaultProfilePath = kapp->dirs()->localtdedir() + "/" +
KStandardDirs::kde_default( "data" ) +
TDEStandardDirs::kde_default( "data" ) +
TQString::fromLatin1("/tdevelop/profiles/FullIDE");*/
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();

@ -164,8 +164,8 @@ void subversionCore::diff( const KURL::List& list, const TQString& where){
TDEIO::NetAccess::synchronousRun( job, 0 );
if ( diffresult.count() > 0 ) {
//check kompare is available
if ( !KStandardDirs::findExe( "kompare" ).isNull() ) {
if (!KStandardDirs::findExe("patch").isNull()){
if ( !TDEStandardDirs::findExe( "kompare" ).isNull() ) {
if (!TDEStandardDirs::findExe("patch").isNull()){
// we have patch - so can merge
KTempDir tmpDir = KTempDir(diffTmpDir->name());
KTempFile tmpPatch = KTempFile(tmpDir.name());
@ -686,7 +686,7 @@ void subversionCore::slotDiffResult( TDEIO::Job * job )
if ( diffList.count() > 0 ) {
//check kompare is available
if ( !KStandardDirs::findExe( "kompare" ).isNull() ) {
if ( !TDEStandardDirs::findExe( "kompare" ).isNull() ) {
KTempFile *tmp = new KTempFile;
tmp->setAutoDelete(true);
TQTextStream *stream = tmp->textStream();

Loading…
Cancel
Save