summaryrefslogtreecommitdiffstats
path: root/kalarm
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:37:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:37:21 -0600
commit86d8364ac704bdc8ad2dfcf52307d9626cfac567 (patch)
tree97d3ac2c2f60780d9a1de4f82caac7cb27534501 /kalarm
parenta9bde819f2b421dcc44741156e75eca4bb5fb4f4 (diff)
downloadtdepim-86d8364ac704bdc8ad2dfcf52307d9626cfac567.tar.gz
tdepim-86d8364ac704bdc8ad2dfcf52307d9626cfac567.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kalarm')
-rw-r--r--kalarm/alarmcalendar.cpp28
-rw-r--r--kalarm/alarmcalendar.h4
-rw-r--r--kalarm/birthdaydlg.cpp4
-rw-r--r--kalarm/daemon.cpp4
-rw-r--r--kalarm/editdlg.cpp4
-rw-r--r--kalarm/functions.cpp4
-rw-r--r--kalarm/kalarmapp.cpp4
-rw-r--r--kalarm/kalarmd/adcalendar.cpp6
-rw-r--r--kalarm/kalarmd/adcalendar.h4
-rw-r--r--kalarm/kalarmd/adconfigdata.cpp10
-rw-r--r--kalarm/kalarmd/alarmdaemon.cpp4
-rw-r--r--kalarm/kamail.cpp10
-rw-r--r--kalarm/lib/messagebox.cpp6
-rw-r--r--kalarm/lib/messagebox.h6
-rw-r--r--kalarm/mainwindow.cpp14
-rw-r--r--kalarm/mainwindow.h4
-rw-r--r--kalarm/messagewin.cpp16
-rw-r--r--kalarm/messagewin.h4
-rw-r--r--kalarm/preferences.cpp14
-rw-r--r--kalarm/sounddlg.cpp12
20 files changed, 81 insertions, 81 deletions
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp
index f17cd7495..1e64b046b 100644
--- a/kalarm/alarmcalendar.cpp
+++ b/kalarm/alarmcalendar.cpp
@@ -90,7 +90,7 @@ AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { 0, 0, 0, 0 };
*/
bool AlarmCalendar::initialiseCalendars()
{
- KConfig* config = kapp->config();
+ TDEConfig* config = kapp->config();
config->setGroup(TQString::fromLatin1("General"));
TQString activeKey = TQString::fromLatin1("Calendar");
TQString expiredKey = TQString::fromLatin1("ExpiredCalendar");
@@ -150,7 +150,7 @@ bool AlarmCalendar::initialiseCalendars()
* Create an alarm calendar instance.
* If 'configKey' is non-null, the calendar will be converted to ICal format.
*/
-AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQString& writePath, const TQString& configKey)
+AlarmCalendar* AlarmCalendar::createCalendar(CalID type, TDEConfig* config, TQString& writePath, const TQString& configKey)
{
static TQRegExp vcsRegExp(TQString::fromLatin1("\\.vcs$"));
static TQString ical = TQString::fromLatin1(".ics");
@@ -266,7 +266,7 @@ bool AlarmCalendar::open()
// Check for file's existence, assuming that it does exist when uncertain,
// to avoid overwriting it.
- if (!KIO::NetAccess::exists(mUrl, true, MainWindow::mainMainWindow()))
+ if (!TDEIO::NetAccess::exists(mUrl, true, MainWindow::mainMainWindow()))
{
// The calendar file doesn't yet exist, so create it
if (create())
@@ -318,7 +318,7 @@ int AlarmCalendar::load()
kdDebug(5950) << "AlarmCalendar::load(): " << mUrl.prettyURL() << endl;
TQString tmpFile;
- if (!KIO::NetAccess::download(mUrl, tmpFile, MainWindow::mainMainWindow()))
+ if (!TDEIO::NetAccess::download(mUrl, tmpFile, MainWindow::mainMainWindow()))
{
kdError(5950) << "AlarmCalendar::load(): Load failure" << endl;
KMessageBox::error(0, i18n("Cannot open calendar:\n%1").arg(mUrl.prettyURL()));
@@ -331,9 +331,9 @@ int AlarmCalendar::load()
if (!loaded)
{
// Check if the file is zero length
- KIO::NetAccess::removeTempFile(tmpFile);
- KIO::UDSEntry uds;
- KIO::NetAccess::stat(mUrl, uds, MainWindow::mainMainWindow());
+ TDEIO::NetAccess::removeTempFile(tmpFile);
+ TDEIO::UDSEntry uds;
+ TDEIO::NetAccess::stat(mUrl, uds, MainWindow::mainMainWindow());
KFileItem fi(uds, mUrl);
if (!fi.size())
return 0; // file is zero length
@@ -346,7 +346,7 @@ int AlarmCalendar::load()
return -1;
}
if (!mLocalFile.isEmpty())
- KIO::NetAccess::removeTempFile(mLocalFile); // removes it only if it IS a temporary file
+ TDEIO::NetAccess::removeTempFile(mLocalFile); // removes it only if it IS a temporary file
mLocalFile = tmpFile;
CalendarCompat::fix(*mCalendar, mLocalFile); // convert events to current KAlarm format for when calendar is saved
@@ -389,7 +389,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile)
if (!mICalUrl.isLocalFile())
{
- if (!KIO::NetAccess::upload(saveFilename, mICalUrl, MainWindow::mainMainWindow()))
+ if (!TDEIO::NetAccess::upload(saveFilename, mICalUrl, MainWindow::mainMainWindow()))
{
kdError(5950) << "AlarmCalendar::saveCal(" << saveFilename << "): upload failed.\n";
KMessageBox::error(0, i18n("Cannot upload calendar to\n'%1'").arg(mICalUrl.prettyURL()));
@@ -403,7 +403,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile)
// Save the change in the config file.
if (!mConfigKey.isNull())
{
- KConfig* config = kapp->config();
+ TDEConfig* config = kapp->config();
config->setGroup(TQString::fromLatin1("General"));
config->writePathEntry(mConfigKey, mICalUrl.path());
config->sync();
@@ -424,7 +424,7 @@ void AlarmCalendar::close()
{
if (!mLocalFile.isEmpty())
{
- KIO::NetAccess::removeTempFile(mLocalFile); // removes it only if it IS a temporary file
+ TDEIO::NetAccess::removeTempFile(mLocalFile); // removes it only if it IS a temporary file
mLocalFile = "";
}
if (mCalendar)
@@ -474,7 +474,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent)
}
else
{
- if (!KIO::NetAccess::download(url, filename, MainWindow::mainMainWindow()))
+ if (!TDEIO::NetAccess::download(url, filename, MainWindow::mainMainWindow()))
{
kdError(5950) << "AlarmCalendar::importAlarms(): Download failure" << endl;
KMessageBox::error(parent, i18n("Cannot download calendar:\n%1").arg(url.prettyURL()));
@@ -561,7 +561,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent)
templat->saveCal();
}
if (!local)
- KIO::NetAccess::removeTempFile(filename);
+ TDEIO::NetAccess::removeTempFile(filename);
return success;
}
@@ -615,7 +615,7 @@ void AlarmCalendar::convertToICal()
{
if (!mConfigKey.isNull())
{
- KConfig* config = kapp->config();
+ TDEConfig* config = kapp->config();
config->setGroup(TQString::fromLatin1("General"));
config->writePathEntry(mConfigKey, mICalUrl.path());
config->sync();
diff --git a/kalarm/alarmcalendar.h b/kalarm/alarmcalendar.h
index cebd64605..91977ea97 100644
--- a/kalarm/alarmcalendar.h
+++ b/kalarm/alarmcalendar.h
@@ -26,7 +26,7 @@
#include <libkcal/calendarlocal.h>
#include "alarmevent.h"
-class KConfig;
+class TDEConfig;
/** Provides read and write access to calendar files.
@@ -93,7 +93,7 @@ class AlarmCalendar : public TQObject
bool saveCal(const TQString& newFile = TQString());
void purge(int daysToKeep);
void startPurgeTimer();
- static AlarmCalendar* createCalendar(CalID, KConfig*, TQString& writePath, const TQString& configKey = TQString());
+ static AlarmCalendar* createCalendar(CalID, TDEConfig*, TQString& writePath, const TQString& configKey = TQString());
static AlarmCalendar* calendarOpen(CalID);
static AlarmCalendar* mCalendars[NCALS]; // the calendars
diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp
index b12a41cfb..0727507f2 100644
--- a/kalarm/birthdaydlg.cpp
+++ b/kalarm/birthdaydlg.cpp
@@ -80,7 +80,7 @@ BirthdayDlg::BirthdayDlg(TQWidget* parent)
// Prefix and suffix to the name in the alarm text
// Get default prefix and suffix texts from config file
- KConfig* config = kapp->config();
+ TDEConfig* config = kapp->config();
config->setGroup(TQString::fromLatin1("General"));
mPrefixText = config->readEntry(TQString::fromLatin1("BirthdayPrefix"), i18n("Birthday: "));
mSuffixText = config->readEntry(TQString::fromLatin1("BirthdaySuffix"));
@@ -343,7 +343,7 @@ TQValueList<KAEvent> BirthdayDlg::events() const
void BirthdayDlg::slotOk()
{
// Save prefix and suffix texts to use as future defaults
- KConfig* config = kapp->config();
+ TDEConfig* config = kapp->config();
config->setGroup(TQString::fromLatin1("General"));
config->writeEntry(TQString::fromLatin1("BirthdayPrefix"), mPrefix->text());
config->writeEntry(TQString::fromLatin1("BirthdaySuffix"), mSuffix->text());
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp
index 29ac67d4a..707865f87 100644
--- a/kalarm/daemon.cpp
+++ b/kalarm/daemon.cpp
@@ -413,7 +413,7 @@ void Daemon::enableAutoStart(bool enable)
// The return status doesn't report failure even if the daemon isn't running,
// so in case of failure, rewrite the config file in any case.
- KConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
+ TDEConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
adconfig.writeEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), enable);
adconfig.sync();
@@ -436,7 +436,7 @@ void Daemon::notifyTimeChanged()
*/
bool Daemon::autoStart()
{
- KConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
+ TDEConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
return adconfig.readBoolEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), true);
}
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index b0da44714..62c445ad1 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -1954,8 +1954,8 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const
url = alarmtext;
url.cleanPath();
alarmtext = url.prettyURL();
- KIO::UDSEntry uds;
- if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow()))
+ TDEIO::UDSEntry uds;
+ if (!TDEIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow()))
err = NONEXISTENT;
else
{
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp
index da43fdad6..4723c342a 100644
--- a/kalarm/functions.cpp
+++ b/kalarm/functions.cpp
@@ -745,7 +745,7 @@ bool runProgram(const TQCString& program, const TQCString& windowName, TQCString
*/
bool readConfigWindowSize(const char* window, TQSize& result)
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(TQString::fromLatin1(window));
TQWidget* desktop = TQT_TQWIDGET(TDEApplication::desktop());
TQSize s = TQSize(config->readNumEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), 0),
@@ -762,7 +762,7 @@ bool readConfigWindowSize(const char* window, TQSize& result)
*/
void writeConfigWindowSize(const char* window, const TQSize& size)
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(TQString::fromLatin1(window));
TQWidget* desktop = TQT_TQWIDGET(TDEApplication::desktop());
config->writeEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), size.width());
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index 1d315e342..29f498fc9 100644
--- a/kalarm/kalarmapp.cpp
+++ b/kalarm/kalarmapp.cpp
@@ -120,7 +120,7 @@ KAlarmApp::KAlarmApp()
{
connect(AlarmCalendar::expiredCalendar(), TQT_SIGNAL(purged()), TQT_SLOT(slotExpiredPurged()));
- KConfig* config = kapp->config();
+ TDEConfig* config = kapp->config();
config->setGroup(TQString::fromLatin1("General"));
mNoSystemTray = config->readBoolEntry(TQString::fromLatin1("NoSystemTray"), false);
mSavedNoSystemTray = mNoSystemTray;
@@ -1042,7 +1042,7 @@ bool KAlarmApp::checkSystemTray()
// daemon with the correct NOTIFY type. If that happened when there was no system
// tray and alarms are disabled when KAlarm is not running, registering with
// NO_START_NOTIFY could result in alarms never being seen.
- KConfig* config = kapp->config();
+ TDEConfig* config = kapp->config();
config->setGroup(TQString::fromLatin1("General"));
config->writeEntry(TQString::fromLatin1("NoSystemTray"), mNoSystemTray);
config->sync();
diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp
index 3b9c9f55a..db2e4e3d7 100644
--- a/kalarm/kalarmd/adcalendar.cpp
+++ b/kalarm/kalarmd/adcalendar.cpp
@@ -95,13 +95,13 @@ bool ADCalendar::loadFile(bool reset)
mTempFileName = tempFile.name();
KURL dest;
dest.setPath(mTempFileName);
- KIO::FileCopyJob* job = KIO::file_copy(url, dest, -1, true);
- connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotDownloadJobResult(KIO::Job*)));
+ TDEIO::FileCopyJob* job = TDEIO::file_copy(url, dest, -1, true);
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotDownloadJobResult(TDEIO::Job*)));
}
return true;
}
-void ADCalendar::slotDownloadJobResult(KIO::Job *job)
+void ADCalendar::slotDownloadJobResult(TDEIO::Job *job)
{
if (job->error())
{
diff --git a/kalarm/kalarmd/adcalendar.h b/kalarm/kalarmd/adcalendar.h
index 965be1051..bbc962140 100644
--- a/kalarm/kalarmd/adcalendar.h
+++ b/kalarm/kalarmd/adcalendar.h
@@ -22,7 +22,7 @@
#define ADCALENDAR_H
#include <libkcal/calendarlocal.h>
-namespace KIO { class Job; }
+namespace TDEIO { class Job; }
class ADCalendar;
@@ -72,7 +72,7 @@ class ADCalendar : public KCal::CalendarLocal
ADCalendar(const TQString& url, const TQCString& appname);
private slots:
- void slotDownloadJobResult(KIO::Job*);
+ void slotDownloadJobResult(TDEIO::Job*);
private:
struct EventKey
diff --git a/kalarm/kalarmd/adconfigdata.cpp b/kalarm/kalarmd/adconfigdata.cpp
index e6211076e..0253e320a 100644
--- a/kalarm/kalarmd/adconfigdata.cpp
+++ b/kalarm/kalarmd/adconfigdata.cpp
@@ -48,7 +48,7 @@ void ADConfigData::readConfig()
{
kdDebug(5900) << "ADConfigData::readConfig()" << endl;
ClientInfo::clear();
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
TQStringList clients = config->groupList().grep(CLIENT_GROUP_SEARCH);
for (TQStringList::Iterator cl = clients.begin(); cl != clients.end(); ++cl)
{
@@ -101,7 +101,7 @@ void ADConfigData::readConfig()
*/
void ADConfigData::writeClient(const TQCString& appName, const ClientInfo* cinfo)
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->writeEntry(TITLE_KEY, cinfo->title());
config->writeEntry(DCOP_OBJECT_KEY, TQString(TQString::fromLocal8Bit(cinfo->dcopObject())));
@@ -115,7 +115,7 @@ void ADConfigData::writeClient(const TQCString& appName, const ClientInfo* cinfo
*/
void ADConfigData::removeClient(const TQCString& appName)
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->deleteGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->sync();
}
@@ -125,7 +125,7 @@ void ADConfigData::removeClient(const TQCString& appName)
*/
void ADConfigData::setCalendar(const TQCString& appName, ADCalendar* cal)
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->writePathEntry(CALENDAR_KEY, cal->urlString());
config->sync();
@@ -137,7 +137,7 @@ void ADConfigData::setCalendar(const TQCString& appName, ADCalendar* cal)
void ADConfigData::enableAutoStart(bool on)
{
kdDebug(5900) << "ADConfigData::enableAutoStart(" << on << ")\n";
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->reparseConfiguration();
config->setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
config->writeEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), on);
diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp
index 8fd34b114..75bb4d2df 100644
--- a/kalarm/kalarmd/alarmdaemon.cpp
+++ b/kalarm/kalarmd/alarmdaemon.cpp
@@ -83,7 +83,7 @@ AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name)
* come in the wrong order, KAlarm won't know that it is supposed to restore
* itself and instead will simply open a new window.
*/
- KConfig kaconfig(locate("config", "kalarmrc"));
+ TDEConfig kaconfig(locate("config", "kalarmrc"));
kaconfig.setGroup(TQString::fromLatin1("General"));
autostart = kaconfig.readBoolEntry(AUTOSTART_TRAY, false);
if (autostart)
@@ -594,7 +594,7 @@ void AlarmDaemon::notifyCalStatus(const ADCalendar* cal)
*/
void AlarmDaemon::readKAlarmConfig()
{
- KConfig config(locate("config", "kalarmrc"));
+ TDEConfig config(locate("config", "kalarmrc"));
config.setGroup(TQString::fromLatin1("General"));
TQDateTime defTime(TQDate(1900,1,1), TQTime());
mStartOfDay = config.readDateTimeEntry(START_OF_DAY, &defTime).time();
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp
index a9eabaf49..e0c50d3cf 100644
--- a/kalarm/kamail.cpp
+++ b/kalarm/kamail.cpp
@@ -443,8 +443,8 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
TQString attachment = (*at).local8Bit();
KURL url(attachment);
url.cleanPath();
- KIO::UDSEntry uds;
- if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow())) {
+ TDEIO::UDSEntry uds;
+ if (!TDEIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow())) {
kdError(5950) << "KAMail::appendBodyAttachments(): not found: " << attachment << endl;
return i18n("Attachment not found:\n%1").arg(attachment);
}
@@ -470,7 +470,7 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
// Read the file contents
TQString tmpFile;
- if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) {
+ if (!TDEIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) {
kdError(5950) << "KAMail::appendBodyAttachments(): load failure: " << attachment << endl;
return attachError.arg(attachment);
}
@@ -831,8 +831,8 @@ int KAMail::checkAttachment(TQString& attachment, KURL* url)
*/
bool KAMail::checkAttachment(const KURL& url)
{
- KIO::UDSEntry uds;
- if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow()))
+ TDEIO::UDSEntry uds;
+ if (!TDEIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow()))
return false; // doesn't exist
KFileItem fi(uds, url);
if (fi.isDir() || !fi.isReadable())
diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp
index c58287bec..721ee5ea0 100644
--- a/kalarm/lib/messagebox.cpp
+++ b/kalarm/lib/messagebox.cpp
@@ -23,7 +23,7 @@
#include "messagebox.h"
-KConfig* MessageBox::mConfig = 0;
+TDEConfig* MessageBox::mConfig = 0;
TQMap<TQString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
@@ -108,7 +108,7 @@ bool MessageBox::setDefaultShouldBeShownContinue(const TQString& dontShowAgainNa
if (dontShowAgainName.isEmpty())
return false;
// First check whether there is an existing setting
- KConfig* config = mConfig ? mConfig : TDEGlobal::config();
+ TDEConfig* config = mConfig ? mConfig : TDEGlobal::config();
config->setGroup(TQString::fromLatin1("Notification Messages"));
if (config->hasKey(dontShowAgainName))
return false;
@@ -167,7 +167,7 @@ void MessageBox::saveDontShowAgain(const TQString& dontShowAgainName, bool yesno
{
if (dontShowAgainName.isEmpty())
return;
- KConfig* config = mConfig ? mConfig : TDEGlobal::config();
+ TDEConfig* config = mConfig ? mConfig : TDEGlobal::config();
config->setGroup(TQString::fromLatin1("Notification Messages"));
bool global = (dontShowAgainName[0] == ':');
if (yesno)
diff --git a/kalarm/lib/messagebox.h b/kalarm/lib/messagebox.h
index 7a84cf202..b0cae2939 100644
--- a/kalarm/lib/messagebox.h
+++ b/kalarm/lib/messagebox.h
@@ -113,12 +113,12 @@ class MessageBox : public KMessageBox
* @param dontShow If true, the message box will be suppressed and will return Continue.
*/
static void saveDontShowAgainContinue(const TQString& dontShowAgainName, bool dontShow = true);
- /** Sets the KConfig object to be used by the MessageBox class. */
- static void setDontShowAskAgainConfig(KConfig* cfg) { mConfig = cfg; }
+ /** Sets the TDEConfig object to be used by the MessageBox class. */
+ static void setDontShowAskAgainConfig(TDEConfig* cfg) { mConfig = cfg; }
private:
static void saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult = 0);
- static KConfig* mConfig;
+ static TDEConfig* mConfig;
static TQMap<TQString, ButtonCode> mContinueDefaults;
};
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp
index e4462db5c..765678c60 100644
--- a/kalarm/mainwindow.cpp
+++ b/kalarm/mainwindow.cpp
@@ -125,7 +125,7 @@ MainWindow::MainWindow(bool restored)
kdDebug(5950) << "MainWindow::MainWindow()\n";
setAutoSaveSettings(TQString::fromLatin1(WINDOW_NAME)); // save window sizes etc.
setPlainCaption(kapp->aboutData()->programName());
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(VIEW_GROUP);
mShowExpired = config->readBoolEntry(SHOW_ARCHIVED_KEY, false);
mShowTime = config->readBoolEntry(SHOW_TIME_KEY, true);
@@ -199,7 +199,7 @@ MainWindow::~MainWindow()
* Save settings to the session managed config file, for restoration
* when the program is restored.
*/
-void MainWindow::saveProperties(KConfig* config)
+void MainWindow::saveProperties(TDEConfig* config)
{
config->writeEntry(TQString::fromLatin1("HiddenTrayParent"), isTrayParent() && isHidden());
config->writeEntry(TQString::fromLatin1("ShowExpired"), mShowExpired);
@@ -212,7 +212,7 @@ void MainWindow::saveProperties(KConfig* config)
* This function is automatically called whenever the app is being
* restored. Read in whatever was saved in saveProperties().
*/
-void MainWindow::readProperties(KConfig* config)
+void MainWindow::readProperties(TDEConfig* config)
{
mHiddenTrayParent = config->readBoolEntry(TQString::fromLatin1("HiddenTrayParent"));
mShowExpired = config->readBoolEntry(TQString::fromLatin1("ShowExpired"));
@@ -314,7 +314,7 @@ void MainWindow::hideEvent(TQHideEvent* he)
*/
void MainWindow::columnsReordered()
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(TQString::fromLatin1(WINDOW_NAME));
config->writeEntry(TQString::fromLatin1("ColumnOrder"), mListView->columnOrder());
config->sync();
@@ -792,7 +792,7 @@ void MainWindow::slotShowTime()
else
{
mListView->selectTimeColumns(mShowTime, mShowTimeTo);
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(VIEW_GROUP);
config->writeEntry(SHOW_TIME_KEY, mShowTime);
config->writeEntry(SHOW_TIME_TO_KEY, mShowTimeTo);
@@ -811,7 +811,7 @@ void MainWindow::slotShowTimeTo()
else
{
mListView->selectTimeColumns(mShowTime, mShowTimeTo);
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(VIEW_GROUP);
config->writeEntry(SHOW_TIME_KEY, mShowTime);
config->writeEntry(SHOW_TIME_TO_KEY, mShowTimeTo);
@@ -829,7 +829,7 @@ void MainWindow::slotShowExpired()
mActionShowExpired->setToolTip(mShowExpired ? i18n_HideExpiredAlarms() : i18n_ShowExpiredAlarms());
mListView->showExpired(mShowExpired);
mListView->refresh();
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(VIEW_GROUP);
config->writeEntry(SHOW_ARCHIVED_KEY, mShowExpired);
}
diff --git a/kalarm/mainwindow.h b/kalarm/mainwindow.h
index d8ca5181c..47a02447d 100644
--- a/kalarm/mainwindow.h
+++ b/kalarm/mainwindow.h
@@ -87,8 +87,8 @@ class MainWindow : public MainWindowBase
virtual void closeEvent(TQCloseEvent*);
virtual void dragEnterEvent(TQDragEnterEvent*);
virtual void dropEvent(TQDropEvent*);
- virtual void saveProperties(KConfig*);
- virtual void readProperties(KConfig*);
+ virtual void saveProperties(TDEConfig*);
+ virtual void readProperties(TDEConfig*);
private slots:
void slotNew();
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp
index 3e63853ea..0315b8f44 100644
--- a/kalarm/messagewin.cpp
+++ b/kalarm/messagewin.cpp
@@ -348,7 +348,7 @@ void MessageWin::initView()
bool dir = false;
TQString tmpFile;
KURL url(mMessage);
- if (KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow()))
+ if (TDEIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow()))
{
TQFile qfile(tmpFile);
TQFileInfo info(qfile);
@@ -368,12 +368,12 @@ void MessageWin::initView()
view->resize(TQSize(h, h).expandedTo(view->sizeHint()));
TQWhatsThis::add(view, i18n("The contents of the file to be displayed"));
}
- KIO::NetAccess::removeTempFile(tmpFile);
+ TDEIO::NetAccess::removeTempFile(tmpFile);
}
if (!opened)
{
// File couldn't be opened
- bool exists = KIO::NetAccess::exists(url, true, MainWindow::mainMainWindow());
+ bool exists = TDEIO::NetAccess::exists(url, true, MainWindow::mainMainWindow());
mErrorMsgs += dir ? i18n("File is a folder") : exists ? i18n("Failed to open file") : i18n("File not found");
}
break;
@@ -658,7 +658,7 @@ void MessageWin::setRemainingTextMinute()
* Save settings to the session managed config file, for restoration
* when the program is restored.
*/
-void MessageWin::saveProperties(KConfig* config)
+void MessageWin::saveProperties(TDEConfig* config)
{
if (mShown && !mErrorWindow)
{
@@ -701,7 +701,7 @@ void MessageWin::saveProperties(KConfig* config)
* This function is automatically called whenever the app is being restored.
* Read in whatever was saved in saveProperties().
*/
-void MessageWin::readProperties(KConfig* config)
+void MessageWin::readProperties(TDEConfig* config)
{
mInvalid = config->readBoolEntry(TQString::fromLatin1("Invalid"), false);
mEventID = config->readEntry(TQString::fromLatin1("EventID"));
@@ -853,8 +853,8 @@ void MessageWin::slotPlayAudio()
// First check that it exists, to avoid possible crashes if the filename is badly specified
MainWindow* mmw = MainWindow::mainMainWindow();
KURL url(mAudioFile);
- if (!url.isValid() || !KIO::NetAccess::exists(url, true, mmw)
- || !KIO::NetAccess::download(url, mLocalAudioFile, mmw))
+ if (!url.isValid() || !TDEIO::NetAccess::exists(url, true, mmw)
+ || !TDEIO::NetAccess::download(url, mLocalAudioFile, mmw))
{
kdError(5950) << "MessageWin::playAudio(): Open failure: " << mAudioFile << endl;
if (!haveErrorMessage(ErrMsg_AudioFile))
@@ -1057,7 +1057,7 @@ void MessageWin::stopPlay()
delete mArtsDispatcher; mArtsDispatcher = 0;
if (!mLocalAudioFile.isEmpty())
{
- KIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
+ TDEIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
mLocalAudioFile = TQString();
}
if (mSilenceButton)
diff --git a/kalarm/messagewin.h b/kalarm/messagewin.h
index 03deea6b7..96f8b1f98 100644
--- a/kalarm/messagewin.h
+++ b/kalarm/messagewin.h
@@ -66,8 +66,8 @@ class MessageWin : public MainWindowBase
virtual void moveEvent(TQMoveEvent*);
virtual void resizeEvent(TQResizeEvent*);
virtual void closeEvent(TQCloseEvent*);
- virtual void saveProperties(KConfig*);
- virtual void readProperties(KConfig*);
+ virtual void saveProperties(TDEConfig*);
+ virtual void readProperties(TDEConfig*);
private slots:
void slotEdit();
diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp
index c77c72f1c..24669fbe5 100644
--- a/kalarm/preferences.cpp
+++ b/kalarm/preferences.cpp
@@ -37,7 +37,7 @@
#include "preferences.moc"
-static TQString translateXTermPath(KConfig*, const TQString& cmdline, bool write);
+static TQString translateXTermPath(TDEConfig*, const TQString& cmdline, bool write);
Preferences* Preferences::mInstance = 0;
@@ -252,7 +252,7 @@ void Preferences::read()
{
initialise();
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(GENERAL_SECTION);
TQStringList cols = config->readListEntry(MESSAGE_COLOURS);
if (!cols.count())
@@ -358,7 +358,7 @@ void Preferences::read()
*/
void Preferences::save(bool syncToDisc)
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(GENERAL_SECTION);
config->writeEntry(VERSION_NUM, KALARM_VERSION);
TQStringList colours;
@@ -433,7 +433,7 @@ void Preferences::syncToDisc()
void Preferences::updateStartOfDayCheck()
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(GENERAL_SECTION);
config->writeEntry(START_OF_DAY_CHECK, startOfDayCheck());
config->sync();
@@ -549,7 +549,7 @@ bool Preferences::notifying(const TQString& messageID)
*/
void Preferences::convertOldPrefs()
{
- KConfig* config = TDEGlobal::config();
+ TDEConfig* config = TDEGlobal::config();
config->setGroup(GENERAL_SECTION);
int version = KAlarm::getVersionNumber(config->readEntry(VERSION_NUM));
if (version >= KAlarm::Version(1,4,22))
@@ -647,11 +647,11 @@ void Preferences::convertOldPrefs()
* Note that only a home directory specification at the start of the path is
* translated, so there's no need to worry about missing out some of the
* executable's path due to quotes etc.
-* N.B. Calling KConfig::read/writePathEntry() on the entire command line
+* N.B. Calling TDEConfig::read/writePathEntry() on the entire command line
* causes a crash on some systems, so it's necessary to extract the
* executable path first before processing.
*/
-TQString translateXTermPath(KConfig* config, const TQString& cmdline, bool write)
+TQString translateXTermPath(TDEConfig* config, const TQString& cmdline, bool write)
{
TQString params;
TQString cmd = cmdline;
diff --git a/kalarm/sounddlg.cpp b/kalarm/sounddlg.cpp
index bb89711a3..1f386f30e 100644
--- a/kalarm/sounddlg.cpp
+++ b/kalarm/sounddlg.cpp
@@ -295,8 +295,8 @@ void SoundDlg::playSound()
return;
KURL url(mFileName);
MainWindow* mmw = MainWindow::mainMainWindow();
- if (!url.isValid() || !KIO::NetAccess::exists(url, true, mmw)
- || !KIO::NetAccess::download(url, mLocalAudioFile, mmw))
+ if (!url.isValid() || !TDEIO::NetAccess::exists(url, true, mmw)
+ || !TDEIO::NetAccess::download(url, mLocalAudioFile, mmw))
{
kdError(5950) << "SoundDlg::playAudio(): Open failure: " << mFileName << endl;
KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mFileName));
@@ -369,7 +369,7 @@ void SoundDlg::stopPlay()
delete mPlayTimer; mPlayTimer = 0;
if (!mLocalAudioFile.isEmpty())
{
- KIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
+ TDEIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
mLocalAudioFile = TQString();
}
mFilePlay->setPixmap(SmallIcon("player_play"));
@@ -400,7 +400,7 @@ bool SoundDlg::checkFile()
{
// It's an absolute path or URL.
// Only allow local files for KAudioPlayer.
- if (url.isLocalFile() && KIO::NetAccess::exists(url, true, this))
+ if (url.isLocalFile() && TDEIO::NetAccess::exists(url, true, this))
{
mFileName = url.path();
return true;
@@ -425,7 +425,7 @@ bool SoundDlg::checkFile()
{
url.setPath(*it);
url.addPath(mFileName);
- if (KIO::NetAccess::exists(url, true, this))
+ if (TDEIO::NetAccess::exists(url, true, this))
{
mFileName = url.path();
return true;
@@ -435,7 +435,7 @@ bool SoundDlg::checkFile()
}
url.setPath(TQDir::homeDirPath());
url.addPath(mFileName);
- if (KIO::NetAccess::exists(url, true, this))
+ if (TDEIO::NetAccess::exists(url, true, this))
{
mFileName = url.path();
return true;