summaryrefslogtreecommitdiffstats
path: root/kcontrol/clock/tzone.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/clock/tzone.cpp
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/clock/tzone.cpp')
-rw-r--r--kcontrol/clock/tzone.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kcontrol/clock/tzone.cpp b/kcontrol/clock/tzone.cpp
index fad22152a..506bde5b6 100644
--- a/kcontrol/clock/tzone.cpp
+++ b/kcontrol/clock/tzone.cpp
@@ -25,8 +25,8 @@
#include <time.h>
#include <config.h>
-#include <qlabel.h>
-#include <qfile.h>
+#include <tqlabel.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
@@ -46,15 +46,15 @@
#include <sys/stat.h>
#endif
-Tzone::Tzone(QWidget * parent, const char *name)
- : QVGroupBox(parent, name)
+Tzone::Tzone(TQWidget * parent, const char *name)
+ : TQVGroupBox(parent, name)
{
setTitle(i18n("To change the timezone, select your area from the list below"));
tzonelist = new KTimezoneWidget(this, "ComboBox_1", &m_zoneDb);
- connect( tzonelist, SIGNAL(selectionChanged()), SLOT(handleZoneChange()) );
+ connect( tzonelist, TQT_SIGNAL(selectionChanged()), TQT_SLOT(handleZoneChange()) );
- m_local = new QLabel(this);
+ m_local = new TQLabel(this);
load();
@@ -71,8 +71,8 @@ void Tzone::load()
void Tzone::currentZone()
{
- QString localZone(i18n("Current local timezone: %1 (%2)"));
- QCString result(100);
+ TQString localZone(i18n("Current local timezone: %1 (%2)"));
+ TQCString result(100);
time_t now = time(0);
tzset();
@@ -84,33 +84,33 @@ void Tzone::currentZone()
// on non-Solaris systems which do not use /etc/timezone?
void Tzone::save()
{
- QStringList selectedZones(tzonelist->selection());
+ TQStringList selectedZones(tzonelist->selection());
if (selectedZones.count() > 0)
{
// Find untranslated selected zone
- QString selectedzone(selectedZones[0]);
+ TQString selectedzone(selectedZones[0]);
#if defined(USE_SOLARIS) // MARCO
KTempFile tf( locateLocal( "tmp", "kde-tzone" ) );
tf.setAutoDelete( true );
- QTextStream *ts = tf.textStream();
+ TQTextStream *ts = tf.textStream();
# ifndef INITFILE
# define INITFILE "/etc/default/init"
# endif
- QFile fTimezoneFile(INITFILE);
+ TQFile fTimezoneFile(INITFILE);
bool updatedFile = false;
if (tf.status() == 0 && fTimezoneFile.open(IO_ReadOnly))
{
bool found = false;
- QTextStream is(&fTimezoneFile);
+ TQTextStream is(&fTimezoneFile);
- for (QString line = is.readLine(); !line.isNull();
+ for (TQString line = is.readLine(); !line.isNull();
line = is.readLine())
{
if (line.find("TZ=") == 0)
@@ -140,9 +140,9 @@ void Tzone::save()
if (fTimezoneFile.open(IO_WriteOnly | IO_Truncate))
{
- QTextStream os(&fTimezoneFile);
+ TQTextStream os(&fTimezoneFile);
- for (QString line = ts->readLine(); !line.isNull();
+ for (TQString line = ts->readLine(); !line.isNull();
line = ts->readLine())
{
os << line << endl;
@@ -156,22 +156,22 @@ void Tzone::save()
}
- QString val = selectedzone;
+ TQString val = selectedzone;
#else
- QFile fTimezoneFile("/etc/timezone");
+ TQFile fTimezoneFile("/etc/timezone");
if (fTimezoneFile.open(IO_WriteOnly | IO_Truncate) )
{
- QTextStream t(&fTimezoneFile);
+ TQTextStream t(&fTimezoneFile);
t << selectedzone;
fTimezoneFile.close();
}
- QString tz = "/usr/share/zoneinfo/" + selectedzone;
+ TQString tz = "/usr/share/zoneinfo/" + selectedzone;
kdDebug() << "Set time zone " << tz << endl;
- if (!QFile::remove("/etc/localtime"))
+ if (!TQFile::remove("/etc/localtime"))
{
//After the KDE 3.2 release, need to add an error message
}
@@ -180,7 +180,7 @@ void Tzone::save()
KMessageBox::error( 0, i18n("Error setting new timezone."),
i18n("Timezone Error"));
- QString val = ":" + tz;
+ TQString val = ":" + tz;
#endif // !USE_SOLARIS
setenv("TZ", val.ascii(), 1);