Rename KStandard for enhanced compatibility with KDE4

pull/21/head
Timothy Pearson 11 years ago
parent 0922423eb8
commit f2225fc1f9

@ -334,7 +334,7 @@ void CertManager::createActions() {
TQT_TQOBJECT(this), TQT_SLOT(slotDownloadCertificate()), actionCollection(),
"download_certificate" );
const TQString dirmngr = KStandardDirs::findExe( "gpgsm" );
const TQString dirmngr = TDEStandardDirs::findExe( "gpgsm" );
mDirMngrFound = !dirmngr.isEmpty();
action = new KAction( i18n("Dump CRL Cache..."), 0,
@ -350,7 +350,7 @@ void CertManager::createActions() {
action = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
// disable action if no kwatchgnupg binary is around
if (KStandardDirs::findExe("kwatchgnupg").isEmpty()) action->setEnabled(false);
if (TDEStandardDirs::findExe("kwatchgnupg").isEmpty()) action->setEnabled(false);
(void)new LabelAction( i18n("Search:"), actionCollection(), "label_action" );

@ -73,7 +73,7 @@ TQString Kleo::QGpgMEBackend::displayName() const {
Kleo::CryptoConfig * Kleo::QGpgMEBackend::config() const {
if ( !mCryptoConfig ) {
static bool hasGpgConf = !KStandardDirs::findExe( "gpgconf" ).isEmpty();
static bool hasGpgConf = !TDEStandardDirs::findExe( "gpgconf" ).isEmpty();
if ( hasGpgConf )
mCryptoConfig = new QGpgMECryptoConfig();
}

@ -279,7 +279,7 @@ char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*d
msg = msg.arg( TQString::fromUtf8( useridHint ) ) + "<br/><br/>";
msg.prepend( "<qt>" );
msg += i18n( "This dialog will reappear every time the passphrase is needed. For a more secure solution that also allows caching the passphrase, use gpg-agent." ) + "<br/>";
const TQString gpgAgent = KStandardDirs::findExe( "gpg-agent" );
const TQString gpgAgent = TDEStandardDirs::findExe( "gpg-agent" );
if ( !gpgAgent.isEmpty() ) {
msg += i18n( "gpg-agent was found in %1, but does not appear to be running." )
.arg( gpgAgent );

@ -465,7 +465,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent)
if (local)
{
filename = url.path();
if (!KStandardDirs::exists(filename))
if (!TDEStandardDirs::exists(filename))
{
kdDebug(5950) << "AlarmCalendar::importAlarms(): File '" << url.prettyURL() << "' not found" << endl;
KMessageBox::error(parent, i18n("Could not load calendar '%1'.").arg(url.prettyURL()));

@ -140,7 +140,7 @@ KAlarmApp::KAlarmApp()
kdDebug(5950) << "KAlarmApp::KAlarmApp(): speech synthesis disabled (KTTSD not found)" << endl;
// Check if KOrganizer is installed
TQString korg = TQString::fromLatin1("korganizer");
mKOrganizerEnabled = !locate("exe", korg).isNull() || !KStandardDirs::findExe(korg).isNull();
mKOrganizerEnabled = !locate("exe", korg).isNull() || !TDEStandardDirs::findExe(korg).isNull();
if (!mKOrganizerEnabled)
kdDebug(5950) << "KAlarmApp::KAlarmApp(): KOrganizer options disabled (KOrganizer not found)" << endl;
}

@ -63,7 +63,7 @@ void ADConfigData::readConfig()
// Verify the configuration
bool ok = false;
if (client.isEmpty() || KStandardDirs::findExe(client).isNull())
if (client.isEmpty() || TDEStandardDirs::findExe(client).isNull())
kdError(5900) << "ADConfigData::readConfig(): group '" << *cl << "' deleted (client app not found)\n";
else if (calendar.isEmpty())
kdError(5900) << "ADConfigData::readConfig(): no calendar specified for '" << client << "'\n";

@ -233,7 +233,7 @@ void AlarmDaemon::registerApp(const TQCString& appName, const TQString& appTitle
KAlarmd::RegisterResult result;
if (appName.isEmpty())
result = KAlarmd::FAILURE;
else if (startClient && KStandardDirs::findExe(appName).isNull())
else if (startClient && TDEStandardDirs::findExe(appName).isNull())
{
kdError() << "AlarmDaemon::registerApp(): app not found" << endl;
result = KAlarmd::NOT_FOUND;
@ -287,7 +287,7 @@ void AlarmDaemon::registerChange(const TQCString& appName, bool startClient)
ClientInfo* client = ClientInfo::get(appName);
if (!client)
return; // can't access client to tell it the result
if (startClient && KStandardDirs::findExe(appName).isNull())
if (startClient && TDEStandardDirs::findExe(appName).isNull())
{
kdError() << "AlarmDaemon::registerChange(): app not found" << endl;
result = KAlarmd::NOT_FOUND;

@ -153,7 +153,7 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
{
// Use sendmail to send the message
TQString textComplete;
TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"),
TQString command = TDEStandardDirs::findExe(TQString::fromLatin1("sendmail"),
TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
if (!command.isNull())
{
@ -164,7 +164,7 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
}
else
{
command = KStandardDirs::findExe(TQString::fromLatin1("mail"));
command = TDEStandardDirs::findExe(TQString::fromLatin1("mail"));
if (command.isNull())
{
errmsgs = errors(i18n("%1 not found").arg(TQString::fromLatin1("sendmail"))); // give up

@ -392,7 +392,7 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame)
{
TQString cmd = xtermCommands[mXtermCount];
TQStringList args = KShell::splitArgs(cmd);
if (args.isEmpty() || KStandardDirs::findExe(args[0]).isEmpty())
if (args.isEmpty() || TDEStandardDirs::findExe(args[0]).isEmpty())
continue;
TQRadioButton* radio = new TQRadioButton(args[0], group);
radio->setMinimumSize(radio->sizeHint());
@ -467,7 +467,7 @@ void MiscPrefTab::apply(bool syncToDisc)
{
TQStringList args = KShell::splitArgs(cmd);
cmd = args.isEmpty() ? TQString() : args[0];
if (KStandardDirs::findExe(cmd).isEmpty())
if (TDEStandardDirs::findExe(cmd).isEmpty())
{
mXtermCommand->setFocus();
if (KMessageBox::warningContinueCancel(this, i18n("Command to invoke terminal window not found:\n%1").arg(cmd))

@ -2706,22 +2706,22 @@ void KMMainWidget::setupActions()
if (parent()->inherits("KMMainWin")) {
act = new KAction( i18n("&Address Book..."), "contents", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotAddrBook()), actionCollection(), "addressbook" );
if (KStandardDirs::findExe("kaddressbook").isEmpty()) act->setEnabled(false);
if (TDEStandardDirs::findExe("kaddressbook").isEmpty()) act->setEnabled(false);
}
act = new KAction( i18n("Certificate Manager..."), "pgp-keys", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotStartCertManager()), actionCollection(), "tools_start_certman");
// disable action if no certman binary is around
if (KStandardDirs::findExe("kleopatra").isEmpty()) act->setEnabled(false);
if (TDEStandardDirs::findExe("kleopatra").isEmpty()) act->setEnabled(false);
act = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
// disable action if no kwatchgnupg binary is around
if (KStandardDirs::findExe("kwatchgnupg").isEmpty()) act->setEnabled(false);
if (TDEStandardDirs::findExe("kwatchgnupg").isEmpty()) act->setEnabled(false);
act = new KAction( i18n("&Import Messages..."), "fileopen", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotImport()), actionCollection(), "import" );
if (KStandardDirs::findExe("kmailcvt").isEmpty()) act->setEnabled(false);
if (TDEStandardDirs::findExe("kmailcvt").isEmpty()) act->setEnabled(false);
#if !defined(NDEBUG)
(void) new KAction( i18n("&Debug Sieve..."),

@ -327,8 +327,8 @@ ChangeLog for KNotes
* fixed #72657: Show note in taskbar did not work properly due to
KWin not preserving NET::SkipTaskbar for hidden windows
* fixed a bug that changes in the note default configuration will
never be used (use KStandardDirs::saveLocation() instead of
KStandardDirs::findResource())
never be used (use TDEStandardDirs::saveLocation() instead of
TDEStandardDirs::findResource())
2004/03/16 Tobias Koenig <tokoe@kde.org>

@ -870,7 +870,7 @@ bool ActionManager::openURL( const KURL &url,bool merge )
if ( url.isLocalFile() ) {
mURL = url;
mFile = url.path();
if ( !KStandardDirs::exists( mFile ) ) {
if ( !TDEStandardDirs::exists( mFile ) ) {
mMainWindow->showStatusMessage( i18n("New calendar '%1'.")
.arg( url.prettyURL() ) );
mCalendarView->setModified();

@ -188,11 +188,11 @@ bool KOMailClient::send(const TQString &from,const TQString &_to,const TQString
if (KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail) {
bool needHeaders = true;
TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"),
TQString command = TDEStandardDirs::findExe(TQString::fromLatin1("sendmail"),
TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
if (!command.isNull()) command += TQString::fromLatin1(" -oi -t");
else {
command = KStandardDirs::findExe(TQString::fromLatin1("mail"));
command = TDEStandardDirs::findExe(TQString::fromLatin1("mail"));
if (command.isNull()) return false; // give up
command.append(TQString::fromLatin1(" -s "));

@ -70,7 +70,7 @@ KTNEFMain::KTNEFMain(TQWidget *parent, const char *name)
lastdir_ = defaultdir_;
// create personale temo extract dir
KStandardDirs::makeDir(TDEGlobal::dirs()->localtdedir() + "/share/apps/ktnef/tmp");
TDEStandardDirs::makeDir(TDEGlobal::dirs()->localtdedir() + "/share/apps/ktnef/tmp");
resize(430,350);
setAutoSaveSettings( "MainWindow" );

@ -304,7 +304,7 @@ void ResourceCached::loadCache()
setIdMapperIdentifier();
mIdMapper.load();
if ( KStandardDirs::exists( cacheFile() ) ) {
if ( TDEStandardDirs::exists( cacheFile() ) ) {
mCalendar.load( cacheFile() );
if ( readOnly() ) {
Incidence::List incidences( rawIncidences() );
@ -355,7 +355,7 @@ void ResourceCached::cleanUpEventCache( const Event::List &eventList )
{
CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( cacheFile() ) )
if ( TDEStandardDirs::exists( cacheFile() ) )
calendar.load( cacheFile() );
else
return;
@ -384,7 +384,7 @@ void ResourceCached::cleanUpTodoCache( const Todo::List &todoList )
{
CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( cacheFile() ) )
if ( TDEStandardDirs::exists( cacheFile() ) )
calendar.load( cacheFile() );
else
return;
@ -457,7 +457,7 @@ void ResourceCached::loadChangesCache( TQMap<Incidence*, bool> &map, const TQStr
{
CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( changesCacheFile( type ) ) )
if ( TDEStandardDirs::exists( changesCacheFile( type ) ) )
calendar.load( changesCacheFile( type ) );
else
return;

@ -146,7 +146,7 @@ bool ResourceLocal::doLoad()
{
bool success;
if ( !KStandardDirs::exists( mURL.path() ) ) {
if ( !TDEStandardDirs::exists( mURL.path() ) ) {
kdDebug(5800) << "ResourceLocal::load(): File doesn't exist yet." << endl;
// Save the empty calendar, so the calendar file will be created.
success = doSave();

@ -80,7 +80,7 @@ void ResourceLocalConfig::saveSettings( KRES::Resource *resource )
TQString url = mURL->url();
if( url.isEmpty() ) {
KStandardDirs dirs;
TDEStandardDirs dirs;
TQString saveFolder = dirs.saveLocation( "data", "korganizer" );
TQFile file( saveFolder + "/std.ics" );

@ -127,13 +127,13 @@ bool ResourceLocalDir::doLoad()
mCalendar.close();
TQString dirName = mURL.path();
if ( !( KStandardDirs::exists( dirName ) || KStandardDirs::exists( dirName + "/") ) ) {
if ( !( TDEStandardDirs::exists( dirName ) || TDEStandardDirs::exists( dirName + "/") ) ) {
kdDebug(5800) << "ResourceLocalDir::load(): Directory '" << dirName
<< "' doesn't exist yet. Creating it..." << endl;
// Create the directory. Use 0775 to allow group-writable if the umask
// allows it (permissions will be 0775 & ~umask). This is desired e.g. for
// group-shared directories!
return KStandardDirs::makeDir( dirName, 0775 );
return TDEStandardDirs::makeDir( dirName, 0775 );
}
// The directory exists. Now try to open (the files in) it.

@ -163,7 +163,7 @@ void KCMDesignerFields::delayedInit()
// Install a dirwatcher that will detect newly created or removed designer files
KDirWatch *dw = new KDirWatch( TQT_TQOBJECT(this) );
KStandardDirs::makeDir(localUiDir());
TDEStandardDirs::makeDir(localUiDir());
dw->addDir( localUiDir(), true );
connect( dw, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( rebuildList() ) );
connect( dw, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( rebuildList() ) );
@ -264,7 +264,7 @@ void KCMDesignerFields::initGUI()
TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
bool noDesigner = KStandardDirs::findExe("designer").isEmpty();
bool noDesigner = TDEStandardDirs::findExe("designer").isEmpty();
if ( noDesigner )
{

@ -47,7 +47,7 @@ namespace KPIM {
* <dt>T_config::path</dt><dd>The search pattern for <tt>.desktop</tt> files
* containing the plugin descriptions. This is the string passed as
* the @p filter argument to
* <code>KStandardDirs::findAllResources</code>.</dd>
* <code>TDEStandardDirs::findAllResources</code>.</dd>
* </dl>
*
* The last two parameters being strings, they are passed via an

Loading…
Cancel
Save