Initial TQt conversion

pull/1/head
Slávek Banko 11 years ago
parent 9be78eabff
commit 979e7a713a

@ -1060,7 +1060,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes="" x_includes=""
x_libraries="" x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then elif test "$kde_use_qt_mac" = "yes"; then
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1092,19 +1092,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT]) AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <ntqglobal.h>
#include <qapplication.h> #include <ntqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <ntqevent.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstyle.h> #include <ntqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -1113,8 +1113,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <ntqcursor.h>
#include <qstylefactory.h> #include <ntqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -1201,22 +1201,22 @@ fi
if test -z "$3"; then if test -z "$3"; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi fi
else else
kde_qt_verstring="$3" kde_qt_verstring="$3"
@ -1231,8 +1231,8 @@ if test $kde_qtver = 3; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi fi
if test "$PKG_CONFIG" != "no" ; then if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then if $PKG_CONFIG --exists tqt-mt ; then
kde_qt_dirs="$kde_qt_dirs `$PKG_CONFIG --variable=prefix qt-mt`" kde_qt_dirs="$kde_qt_dirs `$PKG_CONFIG --variable=prefix tqt-mt`"
fi fi
fi fi
fi fi
@ -1333,7 +1333,7 @@ AC_ARG_ENABLE(
USING_QT_MT="" USING_QT_MT=""
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host. dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS= KDE_MT_LDFLAGS=
@ -1391,7 +1391,7 @@ dnl ------------------------------------------------------------
fi fi
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host. dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then if test "x$kde_use_qt_mt" = "xyes"; then
@ -1455,8 +1455,8 @@ if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi fi
if test "$PKG_CONFIG" != "no" ; then if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then if $PKG_CONFIG --exists tqt-mt ; then
qt_incdirs="$qt_incdirs `$PKG_CONFIG --variable=includedir qt-mt`" qt_incdirs="$qt_incdirs `$PKG_CONFIG --variable=includedir tqt-mt`"
fi fi
fi fi
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes" qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
@ -1465,9 +1465,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=ntqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=ntqglobal.h
fi fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -1481,8 +1481,8 @@ if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi fi
if test "$PKG_CONFIG" != "no" ; then if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then if $PKG_CONFIG --exists tqt-mt ; then
qt_libdirs="$qt_incdirs `$PKG_CONFIG --variable=libdir qt-mt`" qt_libdirs="$qt_incdirs `$PKG_CONFIG --variable=libdir tqt-mt`"
fi fi
fi fi
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries" qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
@ -2058,7 +2058,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <qdom.h> #include <ntqdom.h>
], ],
[ [
QDomDocument doc; QDomDocument doc;
@ -2619,7 +2619,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK( AC_TRY_LINK(
[#include <qapplication.h>], [#include <ntqapplication.h>],
[ [
int argc; int argc;
char** argv; char** argv;
@ -3464,7 +3464,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE( AC_TRY_COMPILE(
[ [
#include <qglobal.h> #include <ntqglobal.h>
#if Q_EXPORT - 0 != 0 #if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */ /* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */ /* if Q_EXPORT is nonempty, this will break compilation */
@ -4714,7 +4714,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl AC_TRY_RUN(dnl
[ [
#include <qimageio.h> #include <qimageio.h>
#include <qstring.h> #include <ntqstring.h>
int main() { int main() {
QString t = "hallo"; QString t = "hallo";
t.fill('t'); t.fill('t');
@ -5559,7 +5559,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir" kde_qtdir="$with_qt_dir"
fi fi
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR) AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR) AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR) AC_SUBST(QTDOCDIR)
@ -5580,7 +5580,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER) AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no KDE_HAS_DOXYGEN=no
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes KDE_HAS_DOXYGEN=yes
fi fi
AC_SUBST(KDE_HAS_DOXYGEN) AC_SUBST(KDE_HAS_DOXYGEN)

@ -7,8 +7,8 @@
*/ */
#include "kbiff.h" #include "kbiff.h"
#include "kbiff.moc" #include "kbiff.moc"
#include <qmovie.h> #include <ntqmovie.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <kaudioplayer.h> #include <kaudioplayer.h>
#include <kconfig.h> #include <kconfig.h>
@ -30,9 +30,9 @@
#include <dcopclient.h> #include <dcopclient.h>
KBiff::KBiff(DCOPClient *client_, QWidget *parent_) KBiff::KBiff(DCOPClient *client_, TQWidget *parent_)
: DCOPObjectProxy(client_), : DCOPObjectProxy(client_),
QLabel(parent_), TQLabel(parent_),
statusTimer(0), statusTimer(0),
status(0), status(0),
statusChanged(true), statusChanged(true),
@ -67,13 +67,13 @@ KBiff::~KBiff()
// we no longer want to be registered // we no longer want to be registered
DCOPClient *client = kapp->dcopClient(); DCOPClient *client = kapp->dcopClient();
QCString proxy = QCString("kbiff-") + QCString().setNum(getpid()); TQCString proxy = TQCString("kbiff-") + TQCString().setNum(getpid());
if (client->isApplicationRegistered(proxy) == true) if (client->isApplicationRegistered(proxy) == true)
{ {
QByteArray params; TQByteArray params;
QDataStream ds(params, IO_WriteOnly); TQDataStream ds(params, IO_WriteOnly);
ds << proxy; ds << proxy;
client->send("kbiff", "kbiff", "proxyDeregister(QString)", params); client->send("kbiff", "kbiff", "proxyDeregister(TQString)", params);
} }
client->detach(); client->detach();
} }
@ -106,9 +106,9 @@ void KBiff::processSetup(const KBiffSetup* setup_, bool run_)
// if we aren't going the status route, we should at least // if we aren't going the status route, we should at least
// provide a tooltip! // provide a tooltip!
if (dostatus == false) if (dostatus == false)
QToolTip::add(this, profile); TQToolTip::add(this, profile);
else else
QToolTip::remove(this); TQToolTip::remove(this);
// set all the new mailboxes // set all the new mailboxes
setMailboxList(setup_->getMailboxList(), setup_->getPoll()); setMailboxList(setup_->getMailboxList(), setup_->getPoll());
@ -152,9 +152,9 @@ void KBiff::processSetup(const KBiffSetup* setup_, bool run_)
delete setup_; delete setup_;
} }
void KBiff::setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int poll) void KBiff::setMailboxList(const TQList<KBiffMailbox>& mailbox_list, unsigned int poll)
{ {
QList<KBiffMailbox> tmp_list = mailbox_list; TQList<KBiffMailbox> tmp_list = mailbox_list;
myMUTEX = true; myMUTEX = true;
if (isRunning()) if (isRunning())
@ -169,10 +169,10 @@ void KBiff::setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int
monitor->setMailbox(*url); monitor->setMailbox(*url);
monitor->setPollInterval(poll); monitor->setPollInterval(poll);
monitor->setMailboxKey(mbox->key); monitor->setMailboxKey(mbox->key);
connect(monitor, SIGNAL(signal_newMail(const int, const QString&)), connect(monitor, SIGNAL(signal_newMail(const int, const TQString&)),
this, SLOT(haveNewMail(const int, const QString&))); this, SLOT(haveNewMail(const int, const TQString&)));
connect(monitor, SIGNAL(signal_currentStatus(const int, const QString&, const KBiffMailState)), connect(monitor, SIGNAL(signal_currentStatus(const int, const TQString&, const KBiffMailState)),
this, SLOT(currentStatus(const int, const QString&, const KBiffMailState))); this, SLOT(currentStatus(const int, const TQString&, const KBiffMailState)));
connect(monitor, SIGNAL(signal_noMail()), this, SLOT(displayPixmap())); connect(monitor, SIGNAL(signal_noMail()), this, SLOT(displayPixmap()));
connect(monitor, SIGNAL(signal_noMail()), connect(monitor, SIGNAL(signal_noMail()),
this, SLOT(haveNoNewMail())); this, SLOT(haveNoNewMail()));
@ -182,10 +182,10 @@ void KBiff::setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int
connect(monitor, SIGNAL(signal_noConn()), this, SLOT(displayPixmap())); connect(monitor, SIGNAL(signal_noConn()), this, SLOT(displayPixmap()));
connect(monitor, SIGNAL(signal_noConn()), connect(monitor, SIGNAL(signal_noConn()),
this, SLOT(haveNoNewMail())); this, SLOT(haveNoNewMail()));
connect(monitor, SIGNAL(signal_invalidLogin(const QString&)), connect(monitor, SIGNAL(signal_invalidLogin(const TQString&)),
this, SLOT(invalidLogin(const QString&))); this, SLOT(invalidLogin(const TQString&)));
connect(monitor, SIGNAL(signal_fetchMail(const QString&)), connect(monitor, SIGNAL(signal_fetchMail(const TQString&)),
this, SLOT(slotLaunchFetchClient(const QString&))); this, SLOT(slotLaunchFetchClient(const TQString&)));
monitorList.append(monitor); monitorList.append(monitor);
} }
myMUTEX = false; myMUTEX = false;
@ -213,7 +213,7 @@ void KBiff::readSessionConfig()
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// Protected Virtuals // Protected Virtuals
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void KBiff::mousePressEvent(QMouseEvent *e) void KBiff::mousePressEvent(TQMouseEvent *e)
{ {
// regardless of which button, get rid of the status box // regardless of which button, get rid of the status box
if (status) if (status)
@ -242,9 +242,9 @@ void KBiff::mousePressEvent(QMouseEvent *e)
} }
} }
void KBiff::enterEvent(QEvent *e) void KBiff::enterEvent(TQEvent *e)
{ {
QLabel::enterEvent(e); TQLabel::enterEvent(e);
// return now if the user doesn't want this feature. // return now if the user doesn't want this feature.
// *sniff*.. the ingrate.. I worked so hard on this, too... *sob* // *sniff*.. the ingrate.. I worked so hard on this, too... *sob*
@ -256,15 +256,15 @@ void KBiff::enterEvent(QEvent *e)
return; return;
// popup the status in one second // popup the status in one second
statusTimer = new QTimer(this); statusTimer = new TQTimer(this);
connect(statusTimer, SIGNAL(timeout()), this, SLOT(popupStatus())); connect(statusTimer, SIGNAL(timeout()), this, SLOT(popupStatus()));
statusTimer->start(1000, true); statusTimer->start(1000, true);
} }
void KBiff::leaveEvent(QEvent *e) void KBiff::leaveEvent(TQEvent *e)
{ {
QLabel::leaveEvent(e); TQLabel::leaveEvent(e);
// stop the timer if it is going // stop the timer if it is going
if (statusTimer) if (statusTimer)
@ -303,14 +303,14 @@ void KBiff::popupStatus()
} }
status->updateListView(statusList); status->updateListView(statusList);
status->popup(QCursor::pos()); status->popup(TQCursor::pos());
} }
bool KBiff::isGIF8x(const QString& file_name) bool KBiff::isGIF8x(const TQString& file_name)
{ {
/* The first test checks if we can open the file */ /* The first test checks if we can open the file */
QFile gif8x(file_name); TQFile gif8x(file_name);
if (gif8x.open(IO_ReadOnly) == false) if (gif8x.open(IO_ReadOnly) == false)
return false; return false;
@ -378,7 +378,7 @@ void KBiff::displayPixmap()
// we will try to deduce the pixmap (or gif) name now. it will // we will try to deduce the pixmap (or gif) name now. it will
// vary depending on the dock and mail state // vary depending on the dock and mail state
QString pixmap_name; TQString pixmap_name;
bool has_new = false, has_old = false, has_no = true, has_noconn = false; bool has_new = false, has_old = false, has_no = true, has_noconn = false;
KBiffMonitor *monitor; KBiffMonitor *monitor;
for (monitor = monitorList.first(); for (monitor = monitorList.first();
@ -435,7 +435,7 @@ void KBiff::displayPixmap()
if (docked) if (docked)
{ {
// we need to check if this has path info encoded into it // we need to check if this has path info encoded into it
QFileInfo info(pixmap_name); TQFileInfo info(pixmap_name);
// if info.fileName() returns pixmap_name, then we no there // if info.fileName() returns pixmap_name, then we no there
// isn't any paths attached and we can just prepend our 'mini' // isn't any paths attached and we can just prepend our 'mini'
@ -446,7 +446,7 @@ void KBiff::displayPixmap()
// so we have some path junk on it. we get the filename // so we have some path junk on it. we get the filename
// by itself, prepend our 'mini' and tack it onto the end // by itself, prepend our 'mini' and tack it onto the end
// of the original dirpath. simple // of the original dirpath. simple
QString filename(info.fileName()); TQString filename(info.fileName());
filename.prepend("mini-"); filename.prepend("mini-");
// we aren't guaranteed that the dirpath will end in a / // we aren't guaranteed that the dirpath will end in a /
@ -454,18 +454,18 @@ void KBiff::displayPixmap()
pixmap_name = info.dirPath() + "/" + filename; pixmap_name = info.dirPath() + "/" + filename;
} }
} }
QString filename = KGlobal::iconLoader()->iconPath( pixmap_name, KIcon::User ); TQString filename = KGlobal::iconLoader()->iconPath( pixmap_name, KIcon::User );
QFileInfo file(filename); TQFileInfo file(filename);
// at this point, we have the file to display. so display it // at this point, we have the file to display. so display it
if (isGIF8x(file.absFilePath())) if (isGIF8x(file.absFilePath()))
setMovie(QMovie(file.absFilePath())); setMovie(TQMovie(file.absFilePath()));
else else
setPixmap(QPixmap(file.absFilePath())); setPixmap(TQPixmap(file.absFilePath()));
adjustSize(); adjustSize();
} }
void KBiff::currentStatus(const int num, const QString& the_mailbox, const KBiffMailState the_state) void KBiff::currentStatus(const int num, const TQString& the_mailbox, const KBiffMailState the_state)
{ {
statusChanged = true; statusChanged = true;
// iterate through all saved notify dialogs to see if "our" one is // iterate through all saved notify dialogs to see if "our" one is
@ -508,7 +508,7 @@ void KBiff::currentStatus(const int num, const QString& the_mailbox, const KBiff
} }
} }
void KBiff::haveNewMail(const int num, const QString& the_mailbox) void KBiff::haveNewMail(const int num, const TQString& the_mailbox)
{ {
displayPixmap(); displayPixmap();
@ -563,7 +563,7 @@ void KBiff::haveNoNewMail()
} }
} }
QString KBiff::getURLWithNewMail() TQString KBiff::getURLWithNewMail()
{ {
KBiffMonitor *monitor; KBiffMonitor *monitor;
for (monitor = monitorList.first(); for (monitor = monitorList.first();
@ -577,9 +577,9 @@ QString KBiff::getURLWithNewMail()
return monitorList.first()->getMailbox(); return monitorList.first()->getMailbox();
} }
QString KBiff::getMailBoxWithNewMail() TQString KBiff::getMailBoxWithNewMail()
{ {
QString url(getURLWithNewMail()); TQString url(getURLWithNewMail());
int slashPos = url.find('/'); int slashPos = url.find('/');
if(slashPos == -1) if(slashPos == -1)
@ -588,7 +588,7 @@ QString KBiff::getMailBoxWithNewMail()
return url.mid(url.find(':') + 1); return url.mid(url.find(':') + 1);
} }
QString KBiff::replaceCommandArgs(QString cmdStr) TQString KBiff::replaceCommandArgs(TQString cmdStr)
{ {
bool expand = false; bool expand = false;
for(unsigned int i = 0; i < cmdStr.length(); i++) for(unsigned int i = 0; i < cmdStr.length(); i++)
@ -628,7 +628,7 @@ void KBiff::dock()
if (docked) if (docked)
kapp->setTopWidget(this); kapp->setTopWidget(this);
else else
kapp->setTopWidget(new QWidget); kapp->setTopWidget(new TQWidget);
} }
if (docked == false) if (docked == false)
@ -643,7 +643,7 @@ void KBiff::dock()
// (un)dock it! // (un)dock it!
this->show(); this->show();
QTimer::singleShot(1000, this, SLOT(displayPixmap())); TQTimer::singleShot(1000, this, SLOT(displayPixmap()));
} }
void KBiff::setup() void KBiff::setup()
@ -757,7 +757,7 @@ void KBiff::popupMenu()
popup->insertItem(i18n("E&xit"), kapp, SLOT(quit())); popup->insertItem(i18n("E&xit"), kapp, SLOT(quit()));
popup->popup(QCursor::pos()); popup->popup(TQCursor::pos());
} }
void KBiff::reset() void KBiff::reset()
@ -802,12 +802,12 @@ bool KBiff::isRunning()
return is_running; return is_running;
} }
void KBiff::executeCommand(const QString& command) void KBiff::executeCommand(const TQString& command)
{ {
KRun::runCommand(command); KRun::runCommand(command);
} }
void KBiff::slotLaunchFetchClient(const QString& fetchClient) void KBiff::slotLaunchFetchClient(const TQString& fetchClient)
{ {
if (!fetchClient.isEmpty()) if (!fetchClient.isEmpty())
executeCommand(fetchClient); executeCommand(fetchClient);
@ -819,21 +819,21 @@ void KBiff::slotLaunchMailClient()
executeCommand(replaceCommandArgs(mailClient)); executeCommand(replaceCommandArgs(mailClient));
} }
void KBiff::slotPlaySound(const QString& play_sound) void KBiff::slotPlaySound(const TQString& play_sound)
{ {
// make sure something is specified // make sure something is specified
if (!play_sound.isNull()) if (!play_sound.isNull())
KAudioPlayer::play(play_sound); KAudioPlayer::play(play_sound);
} }
bool KBiff::process(const QCString&, const QCString& function, bool KBiff::process(const TQCString&, const TQCString& function,
const QByteArray& data, QCString& replyType, const TQByteArray& data, TQCString& replyType,
QByteArray &replyData) TQByteArray &replyData)
{ {
QDataStream args(data, IO_ReadOnly); TQDataStream args(data, IO_ReadOnly);
QDataStream reply(replyData, IO_WriteOnly); TQDataStream reply(replyData, IO_WriteOnly);
QString proxy; TQString proxy;
if (function == "proxyRegister(QString)") if (function == "proxyRegister(TQString)")
{ {
args >> proxy; args >> proxy;
proxyList.append(proxy); proxyList.append(proxy);
@ -841,7 +841,7 @@ bool KBiff::process(const QCString&, const QCString& function,
return true; return true;
} }
else if (function == "proxyDeregister(QString)") else if (function == "proxyDeregister(TQString)")
{ {
args >> proxy; args >> proxy;
proxyList.remove(proxy); proxyList.remove(proxy);
@ -849,9 +849,9 @@ bool KBiff::process(const QCString&, const QCString& function,
return true; return true;
} }
else if (function == "hasMailbox(QString)") else if (function == "hasMailbox(TQString)")
{ {
QString mailbox; TQString mailbox;
args >> mailbox; args >> mailbox;
reply << (bool) findMailbox(mailbox, proxy); reply << (bool) findMailbox(mailbox, proxy);
@ -859,16 +859,16 @@ bool KBiff::process(const QCString&, const QCString& function,
return true; return true;
} }
else if (function == "mailCount(QString)") else if (function == "mailCount(TQString)")
{ {
reply << -1; reply << -1;
replyType = "int"; replyType = "int";
return true; return true;
} }
else if (function == "newMailCount(QString)") else if (function == "newMailCount(TQString)")
{ {
QString mailbox; TQString mailbox;
args >> mailbox; args >> mailbox;
reply << newMailCount(mailbox); reply << newMailCount(mailbox);
@ -880,26 +880,26 @@ bool KBiff::process(const QCString&, const QCString& function,
return false; return false;
} }
int KBiff::newMailCount(const QString& url) int KBiff::newMailCount(const TQString& url)
{ {
int newmail = -1; int newmail = -1;
QString proxy; TQString proxy;
if (findMailbox(url, proxy) == true) if (findMailbox(url, proxy) == true)
{ {
if (proxy != QString::null) if (proxy != TQString::null)
{ {
QByteArray data; TQByteArray data;
QDataStream ds(data, IO_WriteOnly); TQDataStream ds(data, IO_WriteOnly);
ds << url; ds << url;
QByteArray reply_data; TQByteArray reply_data;
QCString reply_type; TQCString reply_type;
QDataStream reply(reply_data, IO_ReadOnly); TQDataStream reply(reply_data, IO_ReadOnly);
DCOPClient *dcc = kapp->dcopClient(); DCOPClient *dcc = kapp->dcopClient();
if (dcc->call(proxy.ascii(), "kbiff", if (dcc->call(proxy.ascii(), "kbiff",
"newMailCount(QString)", data, reply_type, "newMailCount(TQString)", data, reply_type,
reply_data) == true) reply_data) == true)
{ {
reply >> newmail; reply >> newmail;
@ -923,7 +923,7 @@ int KBiff::newMailCount(const QString& url)
return newmail; return newmail;
} }
bool KBiff::findMailbox(const QString& url, QString& proxy) bool KBiff::findMailbox(const TQString& url, TQString& proxy)
{ {
bool has_mailbox = false; bool has_mailbox = false;
KBiffMonitor *monitor; KBiffMonitor *monitor;
@ -937,17 +937,17 @@ bool KBiff::findMailbox(const QString& url, QString& proxy)
} }
if (has_mailbox == false) if (has_mailbox == false)
{ {
QByteArray data, replyData; TQByteArray data, replyData;
QCString replyType; TQCString replyType;
QDataStream ds(data, IO_WriteOnly); TQDataStream ds(data, IO_WriteOnly);
ds << url; ds << url;
// okay, now try to iterate through our proxies // okay, now try to iterate through our proxies
QStringList::Iterator it = proxyList.begin(); TQStringList::Iterator it = proxyList.begin();
for ( ; it != proxyList.end(); it++) for ( ; it != proxyList.end(); it++)
{ {
DCOPClient *dcc = kapp->dcopClient(); DCOPClient *dcc = kapp->dcopClient();
if (dcc->call(QCString((*it).ascii()), "kbiff", if (dcc->call(TQCString((*it).ascii()), "kbiff",
"hasMailbox(QString)", data, replyType, "hasMailbox(TQString)", data, replyType,
replyData) == true) replyData) == true)
{ {
has_mailbox = true; has_mailbox = true;
@ -973,19 +973,19 @@ void KBiff::registerMe(DCOPClient *client)
{ {
// okay, there is a running kbiff already. we will let it // okay, there is a running kbiff already. we will let it
// know that we are active and let it feed us requests // know that we are active and let it feed us requests
QCString proxy = QCString("kbiff-") + QCString().setNum(getpid()); TQCString proxy = TQCString("kbiff-") + TQCString().setNum(getpid());
QByteArray params, reply; TQByteArray params, reply;
QCString reply_type; TQCString reply_type;
QDataStream ds(params, IO_WriteOnly); TQDataStream ds(params, IO_WriteOnly);
ds << proxy; ds << proxy;
client->send("kbiff", "kbiff", "proxyRegister(QString)", params); client->send("kbiff", "kbiff", "proxyRegister(TQString)", params);
client->registerAs(QCString(proxy)); client->registerAs(TQCString(proxy));
} }
} }
void KBiff::invalidLogin(const QString& mailbox) void KBiff::invalidLogin(const TQString& mailbox)
{ {
QString title(i18n("Invalid Login to %1").arg(mailbox)); TQString title(i18n("Invalid Login to %1").arg(mailbox));
KMessageBox::sorry(0, KMessageBox::sorry(0,
i18n("I was not able to login to the remote server.\n" i18n("I was not able to login to the remote server.\n"
"This means that either the server is down or you have " "This means that either the server is down or you have "

@ -14,7 +14,7 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qlist.h> #include <ntqlist.h>
#include <kbiffmonitor.h> #include <kbiffmonitor.h>
#include <setupdlg.h> #include <setupdlg.h>
@ -22,8 +22,8 @@
#include <kbiffurl.h> #include <kbiffurl.h>
#include <kapp.h> #include <kapp.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qtimer.h> #include <ntqtimer.h>
#include <notify.h> #include <notify.h>
#include <status.h> #include <status.h>
@ -33,11 +33,11 @@
class Led; class Led;
class KBiff : public QLabel, virtual public DCOPObjectProxy class KBiff : public TQLabel, virtual public DCOPObjectProxy
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiff(DCOPClient *client_, QWidget *parent_ = 0); KBiff(DCOPClient *client_, TQWidget *parent_ = 0);
virtual ~KBiff(); virtual ~KBiff();
bool isDocked() const; bool isDocked() const;
@ -45,37 +45,37 @@ public:
void processSetup(const KBiffSetup* setup, bool start); void processSetup(const KBiffSetup* setup, bool start);
void readSessionConfig(); void readSessionConfig();
void setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int poll = 60); void setMailboxList(const TQList<KBiffMailbox>& mailbox_list, unsigned int poll = 60);
virtual bool process(const QCString& obj, const QCString& function, virtual bool process(const TQCString& obj, const TQCString& function,
const QByteArray& data, QCString& replyType, const TQByteArray& data, TQCString& replyType,
QByteArray &replyData ); TQByteArray &replyData );
public slots: public slots:
void slotPlaySound(const QString&); void slotPlaySound(const TQString&);
void slotLaunchFetchClient(const QString&); void slotLaunchFetchClient(const TQString&);
void slotLaunchMailClient(); void slotLaunchMailClient();
protected: protected:
void mousePressEvent(QMouseEvent *); void mousePressEvent(TQMouseEvent *);
void enterEvent(QEvent *); void enterEvent(TQEvent *);
void leaveEvent(QEvent *); void leaveEvent(TQEvent *);
protected: protected:
void popupMenu(); void popupMenu();
void reset(); void reset();
bool isRunning(); bool isRunning();
bool isGIF8x(const QString & file); bool isGIF8x(const TQString & file);
void executeCommand(const QString& command); void executeCommand(const TQString& command);
void registerMe(DCOPClient *client); void registerMe(DCOPClient *client);
protected slots: protected slots:
void saveYourself(); void saveYourself();
void invokeHelp(); void invokeHelp();
void displayPixmap(); void displayPixmap();
void haveNewMail(const int, const QString &); void haveNewMail(const int, const TQString &);
void haveNoNewMail(); void haveNoNewMail();
void currentStatus(const int, const QString &, const KBiffMailState); void currentStatus(const int, const TQString &, const KBiffMailState);
void dock(); void dock();
void setup(); void setup();
void checkMailNow(); void checkMailNow();
@ -84,38 +84,38 @@ protected slots:
void stop(); void stop();
void start(); void start();
void popupStatus(); void popupStatus();
void invalidLogin(const QString& mailbox); void invalidLogin(const TQString& mailbox);
private: private:
bool findMailbox(const QString& url, QString& proxy); bool findMailbox(const TQString& url, TQString& proxy);
int newMailCount(const QString& url); int newMailCount(const TQString& url);
QString getURLWithNewMail(); TQString getURLWithNewMail();
QString getMailBoxWithNewMail(); TQString getMailBoxWithNewMail();
QString replaceCommandArgs(QString cmdStr); TQString replaceCommandArgs(TQString cmdStr);
protected: protected:
bool myMUTEX; bool myMUTEX;
QList<KBiffMonitor> monitorList; TQList<KBiffMonitor> monitorList;
QList<KBiffNotify> notifyList; TQList<KBiffNotify> notifyList;
KBiffStatusList statusList; KBiffStatusList statusList;
QStringList proxyList; TQStringList proxyList;
// Capability // Capability
QTimer *statusTimer; TQTimer *statusTimer;
// General settings // General settings
QString profile; TQString profile;
QString mailClient; TQString mailClient;
// New mail // New mail
bool systemBeep; bool systemBeep;
bool runCommand; bool runCommand;
QString runCommandPath; TQString runCommandPath;
bool runResetCommand; bool runResetCommand;
QString runResetCommandPath; TQString runResetCommandPath;
bool playSound; bool playSound;
QString playSoundPath; TQString playSoundPath;
bool notify; bool notify;
bool dostatus; bool dostatus;
@ -125,11 +125,11 @@ protected:
bool isSecure; bool isSecure;
QString noMailIcon; TQString noMailIcon;
QString newMailIcon; TQString newMailIcon;
QString oldMailIcon; TQString oldMailIcon;
QString noConnIcon; TQString noConnIcon;
QString stoppedIcon; TQString stoppedIcon;
KBiffStatus *status; KBiffStatus *status;
bool statusChanged; bool statusChanged;

@ -43,7 +43,7 @@ public:
static char Base64EncMap[64]; static char Base64EncMap[64];
static char Base64DecMap[128]; static char Base64DecMap[128];
static void base64Encode( const QByteArray& in, QByteArray& out) static void base64Encode( const TQByteArray& in, TQByteArray& out)
{ {
bool insertLFs(false); bool insertLFs(false);
@ -109,7 +109,7 @@ static void base64Encode( const QByteArray& in, QByteArray& out)
} }
} }
static void base64Decode( const QByteArray& in, QByteArray& out ) static void base64Decode( const TQByteArray& in, TQByteArray& out )
{ {
out.resize(0); out.resize(0);
if ( in.isEmpty() ) if ( in.isEmpty() )
@ -217,27 +217,27 @@ char CodecPrivate::Base64DecMap[128] = {
}; };
/***************************************************************************/ /***************************************************************************/
QString KBiffCodecs::base64Encode( const QString& str ) TQString KBiffCodecs::base64Encode( const TQString& str )
{ {
if ( str.isEmpty() ) if ( str.isEmpty() )
return QString::fromLatin1(""); return TQString::fromLatin1("");
QByteArray in, out; TQByteArray in, out;
const unsigned int len = str.length(); const unsigned int len = str.length();
in.resize( len ); in.resize( len );
memcpy( in.data(), str.latin1(), len ); memcpy( in.data(), str.latin1(), len );
CodecPrivate::base64Encode( in, out ); CodecPrivate::base64Encode( in, out );
return QString( out ); return TQString( out );
} }
QString KBiffCodecs::base64Decode( const QString& str ) TQString KBiffCodecs::base64Decode( const TQString& str )
{ {
if ( str.isEmpty() ) if ( str.isEmpty() )
return QString::fromLatin1(""); return TQString::fromLatin1("");
QByteArray in, out; TQByteArray in, out;
const unsigned int len = str.length(); const unsigned int len = str.length();
in.resize( str.length() ); in.resize( str.length() );
memcpy( in.data(), str.latin1(), len ); memcpy( in.data(), str.latin1(), len );
CodecPrivate::base64Decode( in, out ); CodecPrivate::base64Decode( in, out );
return QString( out ); return TQString( out );
} }

@ -36,7 +36,7 @@
#ifndef _KBIFFCODEC_H #ifndef _KBIFFCODEC_H
#define _KBIFFCODEC_H #define _KBIFFCODEC_H
#include <qstring.h> #include <ntqstring.h>
class KBiffCodecs class KBiffCodecs
{ {
@ -48,7 +48,7 @@ public:
* @param str the string to be encoded. * @param str the string to be encoded.
* @return the decoded string. * @return the decoded string.
*/ */
static QString base64Encode( const QString& str ); static TQString base64Encode( const TQString& str );
/** /**
* Decodes the given data that was encoded using the * Decodes the given data that was encoded using the
@ -57,7 +57,7 @@ public:
* @param in the base64-encoded data to be decoded. * @param in the base64-encoded data to be decoded.
* @return the decoded data. * @return the decoded data.
*/ */
static QString base64Decode( const QString& in ); static TQString base64Decode( const TQString& in );
private: private:
KBiffCodecs(); KBiffCodecs();

@ -10,28 +10,28 @@
#include "kbiffcrypt.h" #include "kbiffcrypt.h"
#include <kmdcodec.h> #include <kmdcodec.h>
#include <qcstring.h> #include <ntqcstring.h>
QString KBiffCrypt::hmac_md5(const QString& text, const QString& k) TQString KBiffCrypt::hmac_md5(const TQString& text, const TQString& k)
{ {
// If the original key is too long, the new key will be a hash of // If the original key is too long, the new key will be a hash of
// the original key. Then the new key might have NULL bytes in it, // the original key. Then the new key might have NULL bytes in it,
// so we can't use QCString // so we can't use TQCString
QByteArray key = (QByteArray)k.utf8(); TQByteArray key = (TQByteArray)k.utf8();
KMD5 context; // for calculating MD5 sums KMD5 context; // for calculating MD5 sums
KMD5::Digest digest; // intermediate storage for MD5 sums KMD5::Digest digest; // intermediate storage for MD5 sums
// inner and outer padding (key XORd with ipad and opad, respectively) // inner and outer padding (key XORd with ipad and opad, respectively)
QByteArray k_ipad(64); TQByteArray k_ipad(64);
QByteArray k_opad(64); TQByteArray k_opad(64);
// if key is longer than 64 bytes reset it to key=MD5(key) // if key is longer than 64 bytes reset it to key=MD5(key)
if (key.size() > 64) { if (key.size() > 64) {
// cast to a QCString because we don't want to hash the // cast to a TQCString because we don't want to hash the
// trailing NULL byte // trailing NULL byte
KMD5 tctx((QCString)key); KMD5 tctx((TQCString)key);
key.duplicate((char*)tctx.rawDigest(), 16); key.duplicate((char*)tctx.rawDigest(), 16);
} }

@ -8,13 +8,13 @@
#ifndef KBIFFCRYPT_H #ifndef KBIFFCRYPT_H
#define KBIFFCRYPT_H #define KBIFFCRYPT_H
#include <qstring.h> #include <ntqstring.h>
/** /**
* @brief Useful cryptographic functions for secure authentication * @brief Useful cryptographic functions for secure authentication
* *
* Until QCA * Until TQCA
* (<a href='http://delta.affinix.com/qca/'>Qt Cryptographic Architecture</a>) * (<a href='http://delta.affinix.com/qca/'>TQt Cryptographic Architecture</a>)
* becomes more widely available, * becomes more widely available,
* this will be the place for our custom-written, cryptography functions. * this will be the place for our custom-written, cryptography functions.
* These are mostly needed to implement various forms of secure authentication * These are mostly needed to implement various forms of secure authentication
@ -43,7 +43,7 @@ namespace KBiffCrypt
* @param key the key used when calculating the HMAC * @param key the key used when calculating the HMAC
* @return the HMAC-MD5 value as a string of lower-case, hexadecimal digits * @return the HMAC-MD5 value as a string of lower-case, hexadecimal digits
*/ */
QString hmac_md5(const QString& text, const QString& key); TQString hmac_md5(const TQString& text, const TQString& key);
} }
#endif // KBIFFCRYPT_H #endif // KBIFFCRYPT_H

@ -35,11 +35,11 @@
#include <kbiffurl.h> #include <kbiffurl.h>
#include <kdebug.h> #include <kdebug.h>
#include <qapplication.h> #include <ntqapplication.h>
#include <qstring.h> #include <ntqstring.h>
#include <qregexp.h> #include <ntqregexp.h>
#include <qdir.h> #include <ntqdir.h>
#include <qdatetime.h> #include <ntqdatetime.h>
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
// Needed for CRAM-MD5 and APOP // Needed for CRAM-MD5 and APOP
@ -54,11 +54,11 @@
extern int h_errno; extern int h_errno;
#endif #endif
static bool real_from(const QString& buffer); static bool real_from(const TQString& buffer);
static const char* compare_header(const char* header, const char* field); static const char* compare_header(const char* header, const char* field);
KBiffMonitor::KBiffMonitor() KBiffMonitor::KBiffMonitor()
: QObject(), : TQObject(),
poll(60), poll(60),
oldTimer(0), oldTimer(0),
started(false), started(false),
@ -114,25 +114,25 @@ void KBiffMonitor::readConfig()
KSimpleConfig *config = new KSimpleConfig(MAIL_STATE_FILE); KSimpleConfig *config = new KSimpleConfig(MAIL_STATE_FILE);
config->setDollarExpansion(false); config->setDollarExpansion(false);
QString group; TQString group;
group = mailbox + "(" + key + ")"; group = mailbox + "(" + key + ")";
config->setGroup(group); config->setGroup(group);
QStrList list; TQStrList list;
mailState = (KBiffMailState)config->readNumEntry("mailState", UnknownState); mailState = (KBiffMailState)config->readNumEntry("mailState", UnknownState);
lastSize = config->readNumEntry("lastSize"); lastSize = config->readNumEntry("lastSize");
config->readListEntry("lastRead", list); config->readListEntry("lastRead", list);
if (list.count()==6) if (list.count()==6)
{ {
lastRead.setDate(QDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2)))); lastRead.setDate(TQDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2))));
lastRead.setTime(QTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5)))); lastRead.setTime(TQTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5))));
} }
config->readListEntry("lastModified", list); config->readListEntry("lastModified", list);
if (list.count()==6) if (list.count()==6)
{ {
lastModified.setDate(QDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2)))); lastModified.setDate(TQDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2))));
lastModified.setTime(QTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5)))); lastModified.setTime(TQTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5))));
} }
config->readListEntry("uidlList", list); config->readListEntry("uidlList", list);
@ -140,7 +140,7 @@ void KBiffMonitor::readConfig()
uidlList.clear(); uidlList.clear();
for (UIDL = list.first(); UIDL != 0; UIDL = list.next()) for (UIDL = list.first(); UIDL != 0; UIDL = list.next())
{ {
uidlList.append( new QString(UIDL) ); uidlList.append( new TQString(UIDL) );
} }
newCount = config->readNumEntry("newCount", 0); newCount = config->readNumEntry("newCount", 0);
@ -155,12 +155,12 @@ void KBiffMonitor::saveConfig()
KSimpleConfig *config = new KSimpleConfig(MAIL_STATE_FILE); KSimpleConfig *config = new KSimpleConfig(MAIL_STATE_FILE);
config->setDollarExpansion(false); config->setDollarExpansion(false);
QString group; TQString group;
group = mailbox + "(" + key + ")"; group = mailbox + "(" + key + ")";
config->setGroup(group); config->setGroup(group);
QStringList uidlist; TQStringList uidlist;
QString *UIDL; TQString *UIDL;
for (UIDL = uidlList.first(); UIDL != 0; UIDL = uidlList.next()) for (UIDL = uidlList.first(); UIDL != 0; UIDL = uidlList.next())
{ {
uidlist.append(*UIDL); uidlist.append(*UIDL);
@ -224,7 +224,7 @@ void KBiffMonitor::setPollInterval(const int interval)
} }
} }
void KBiffMonitor::setMailbox(const QString& url) void KBiffMonitor::setMailbox(const TQString& url)
{ {
KBiffURL kurl(url); KBiffURL kurl(url);
setMailbox(kurl); setMailbox(kurl);
@ -420,7 +420,7 @@ void KBiffMonitor::setMailbox(KBiffURL& url)
void KBiffMonitor::setMailboxIsRead() void KBiffMonitor::setMailboxIsRead()
{ {
lastRead = QDateTime::currentDateTime(); lastRead = TQDateTime::currentDateTime();
if (mailState == NewMail) if (mailState == NewMail)
{ {
if (b_new_lastSize) lastSize = new_lastSize; if (b_new_lastSize) lastSize = new_lastSize;
@ -444,17 +444,17 @@ void KBiffMonitor::checkMailNow()
emit(signal_checkMail()); emit(signal_checkMail());
} }
void KBiffMonitor::setPassword(const QString& pass) void KBiffMonitor::setPassword(const TQString& pass)
{ {
password = pass; password = pass;
} }
void KBiffMonitor::setMailboxKey(const QString& k) void KBiffMonitor::setMailboxKey(const TQString& k)
{ {
key = k; key = k;
} }
void KBiffMonitor::timerEvent(QTimerEvent *) void KBiffMonitor::timerEvent(TQTimerEvent *)
{ {
emit(signal_checkMail()); emit(signal_checkMail());
} }
@ -462,7 +462,7 @@ void KBiffMonitor::timerEvent(QTimerEvent *)
void KBiffMonitor::checkLocal() void KBiffMonitor::checkLocal()
{ {
// get the information about this local mailbox // get the information about this local mailbox
QFileInfo mbox(mailbox); TQFileInfo mbox(mailbox);
// run external fetch client // run external fetch client
if (!fetchCommand.isEmpty()) if (!fetchCommand.isEmpty())
@ -477,7 +477,7 @@ void KBiffMonitor::checkLocal()
void KBiffMonitor::checkMbox() void KBiffMonitor::checkMbox()
{ {
// get the information about this local mailbox // get the information about this local mailbox
QFileInfo mbox(mailbox); TQFileInfo mbox(mailbox);
// run external fetch client // run external fetch client
if (!fetchCommand.isEmpty()) if (!fetchCommand.isEmpty())
@ -501,7 +501,7 @@ void KBiffMonitor::checkMbox()
utimbuf buf; utimbuf buf;
buf.actime = mbox.lastRead().toTime_t(); buf.actime = mbox.lastRead().toTime_t();
buf.modtime = mbox.lastModified().toTime_t(); buf.modtime = mbox.lastModified().toTime_t();
utime(QFile::encodeName(mailbox), &buf); utime(TQFile::encodeName(mailbox), &buf);
} }
// if there are any new messages, consider the state New // if there are any new messages, consider the state New
@ -537,7 +537,7 @@ void KBiffMonitor::checkPop()
{ {
firstRun = false; firstRun = false;
QString command; TQString command;
// connect to the server unless it is active already // connect to the server unless it is active already
if (pop->active() == false) if (pop->active() == false)
@ -598,7 +598,7 @@ void KBiffMonitor::checkImap()
{ {
firstRun = false; firstRun = false;
QString command; TQString command;
int seq = 1000; int seq = 1000;
bool do_login = false; bool do_login = false;
@ -622,7 +622,7 @@ void KBiffMonitor::checkImap()
do_login = true; do_login = true;
// check the server's capabilities (see RFC 3050, 6.1.1) // check the server's capabilities (see RFC 3050, 6.1.1)
command = QString().setNum(seq) + " CAPABILITY\r\n"; command = TQString().setNum(seq) + " CAPABILITY\r\n";
if (imap->command(command, seq) == false) if (imap->command(command, seq) == false)
{ {
invalidLogin(); invalidLogin();
@ -646,7 +646,7 @@ void KBiffMonitor::checkImap()
imap->resetNumbers(); imap->resetNumbers();
// The STATUS COMMAND is documented in RFC2060, 6.3.10 // The STATUS COMMAND is documented in RFC2060, 6.3.10
command = QString().setNum(seq) + " STATUS " + mailbox + " (UNSEEN MESSAGES)\r\n"; command = TQString().setNum(seq) + " STATUS " + mailbox + " (UNSEEN MESSAGES)\r\n";
if ( ! imap->command(command, seq)) { if ( ! imap->command(command, seq)) {
return; return;
} }
@ -655,7 +655,7 @@ void KBiffMonitor::checkImap()
// lets not logout if we want to keep the session alive // lets not logout if we want to keep the session alive
if (keepalive == false) if (keepalive == false)
{ {
command = QString().setNum(seq) + " LOGOUT\r\n"; command = TQString().setNum(seq) + " LOGOUT\r\n";
if (imap->command(command, seq) == false) if (imap->command(command, seq) == false)
return; return;
imap->close(); imap->close();
@ -683,7 +683,7 @@ void KBiffMonitor::checkMaildir()
firstRun = false; firstRun = false;
// get the information about this local mailbox // get the information about this local mailbox
QDir mbox(mailbox); TQDir mbox(mailbox);
// run external fetch client // run external fetch client
if (!fetchCommand.isEmpty()) if (!fetchCommand.isEmpty())
@ -693,15 +693,15 @@ void KBiffMonitor::checkMaildir()
if (mbox.exists()) if (mbox.exists())
{ {
// maildir stores its mail in MAILDIR/new and MAILDIR/cur // maildir stores its mail in MAILDIR/new and MAILDIR/cur
QDir new_mailbox(mailbox + "/new"); TQDir new_mailbox(mailbox + "/new");
QDir cur_mailbox(mailbox + "/cur"); TQDir cur_mailbox(mailbox + "/cur");
// make sure both exist // make sure both exist
if (new_mailbox.exists() && cur_mailbox.exists()) if (new_mailbox.exists() && cur_mailbox.exists())
{ {
// check only files // check only files
new_mailbox.setFilter(QDir::Files); new_mailbox.setFilter(TQDir::Files);
cur_mailbox.setFilter(QDir::Files); cur_mailbox.setFilter(TQDir::Files);
// determining "new" (or "unread") mail in maildir folders // determining "new" (or "unread") mail in maildir folders
// is a *little* tricky. all mail in the 'new' folder are // is a *little* tricky. all mail in the 'new' folder are
@ -710,11 +710,11 @@ void KBiffMonitor::checkMaildir()
newCount = new_mailbox.count(); newCount = new_mailbox.count();
curCount = cur_mailbox.count(); curCount = cur_mailbox.count();
const QFileInfoList *cur_list = cur_mailbox.entryInfoList(); const TQFileInfoList *cur_list = cur_mailbox.entryInfoList();
QFileInfoListIterator it(*cur_list); TQFileInfoListIterator it(*cur_list);
QFileInfo *info; TQFileInfo *info;
static QRegExp suffix(":2,?F?R?S?T?$"); static TQRegExp suffix(":2,?F?R?S?T?$");
while ((info = it.current())) while ((info = it.current()))
{ {
if (info->fileName().findRev(suffix) == -1) if (info->fileName().findRev(suffix) == -1)
@ -746,7 +746,7 @@ void KBiffMonitor::checkNntp()
{ {
firstRun = false; firstRun = false;
QString command; TQString command;
bool do_login = false; bool do_login = false;
// connect to the server // connect to the server
@ -792,9 +792,9 @@ void KBiffMonitor::checkNntp()
} }
// now, we process the .newsrc file // now, we process the .newsrc file
QString home(getenv("HOME")); TQString home(getenv("HOME"));
QString newsrc_path(home + "/.newsrc"); TQString newsrc_path(home + "/.newsrc");
QFile newsrc(newsrc_path); TQFile newsrc(newsrc_path);
if (newsrc.open(IO_ReadOnly) == false) if (newsrc.open(IO_ReadOnly) == false)
{ {
return; return;
@ -804,7 +804,7 @@ void KBiffMonitor::checkNntp()
while(newsrc.readLine(c_buffer, MAXSTR) > 0) while(newsrc.readLine(c_buffer, MAXSTR) > 0)
{ {
// search for our mailbox name // search for our mailbox name
QString str_buffer(c_buffer); TQString str_buffer(c_buffer);
if (str_buffer.left(mailbox.length()) != mailbox) if (str_buffer.left(mailbox.length()) != mailbox)
continue; continue;
@ -886,7 +886,7 @@ void KBiffMonitor::checkMHdir()
firstRun = false; firstRun = false;
// get the information about this local mailbox // get the information about this local mailbox
QDir mbox(mailbox); TQDir mbox(mailbox);
char the_buffer[MAXSTR]; char the_buffer[MAXSTR];
char *buffer = the_buffer; char *buffer = the_buffer;
@ -898,7 +898,7 @@ void KBiffMonitor::checkMHdir()
// make sure the mailbox exists // make sure the mailbox exists
if (mbox.exists()) if (mbox.exists())
{ {
QFile mhseq(mailbox+"/.mh_sequences"); TQFile mhseq(mailbox+"/.mh_sequences");
if (mhseq.open(IO_ReadOnly) == true) if (mhseq.open(IO_ReadOnly) == true)
{ {
// Check the .mh_sequences file for 'unseen:' // Check the .mh_sequences file for 'unseen:'
@ -980,9 +980,9 @@ void KBiffMonitor::checkMHdir()
// OK. No new messages listed in .mh_sequences. Check if // OK. No new messages listed in .mh_sequences. Check if
// there are any old ones. // there are any old ones.
//mbox.setFilter(QDir::Files); //mbox.setFilter(TQDir::Files);
QStringList mails = mbox.entryList(QDir::Files); TQStringList mails = mbox.entryList(TQDir::Files);
QStringList::Iterator str; TQStringList::Iterator str;
for (str = mails.begin(); str != mails.end(); str++) for (str = mails.begin(); str != mails.end(); str++)
{ {
@ -1079,7 +1079,7 @@ void KBiffMonitor::determineState(unsigned int size)
void KBiffMonitor::determineState(KBiffUidlList uidl_list) void KBiffMonitor::determineState(KBiffUidlList uidl_list)
{ {
QString *UIDL; TQString *UIDL;
unsigned int messages = 0; unsigned int messages = 0;
// if the uidl_list is empty then the number of messages = 0 // if the uidl_list is empty then the number of messages = 0
@ -1186,7 +1186,7 @@ void KBiffMonitor::determineState(KBiffMailState state)
emit(signal_currentStatus(newCount, key, mailState)); emit(signal_currentStatus(newCount, key, mailState));
} }
void KBiffMonitor::determineState(unsigned int size, const QDateTime& last_read, const QDateTime& last_modified) void KBiffMonitor::determineState(unsigned int size, const TQDateTime& last_read, const TQDateTime& last_modified)
{ {
// Check for NoMail // Check for NoMail
if (size == 0) if (size == 0)
@ -1253,7 +1253,7 @@ void KBiffMonitor::determineState(unsigned int size, const QDateTime& last_read,
*/ */
int KBiffMonitor::mboxMessages() int KBiffMonitor::mboxMessages()
{ {
QFile mbox(mailbox); TQFile mbox(mailbox);
char buffer[MAXSTR]; char buffer[MAXSTR];
int count = 0; int count = 0;
int msg_count = 0; int msg_count = 0;
@ -1357,7 +1357,7 @@ int KBiffMonitor::mboxMessages()
if(++msg_count >= 100 ) if(++msg_count >= 100 )
{ {
qApp->processEvents(); tqApp->processEvents();
msg_count = 0; msg_count = 0;
} }
}//while }//while
@ -1433,7 +1433,7 @@ void KBiffSocket::close()
FD_ZERO(&socketFDS); FD_ZERO(&socketFDS);
} }
bool KBiffSocket::connectSocket(const QString& host, unsigned short int port) bool KBiffSocket::connectSocket(const TQString& host, unsigned short int port)
{ {
sockaddr_in sin; sockaddr_in sin;
hostent *hent; hostent *hent;
@ -1546,7 +1546,7 @@ bool KBiffSocket::connectSocket(const QString& host, unsigned short int port)
#endif // USE_SSL #endif // USE_SSL
// we're connected! see if the connection is good // we're connected! see if the connection is good
QString line(readLine()); TQString line(readLine());
if (line.isNull() || ((line.find("200") == -1 ) && (line.find("OK") == -1) && (line.find("PREAUTH") == -1))) if (line.isNull() || ((line.find("200") == -1 ) && (line.find("OK") == -1) && (line.find("PREAUTH") == -1)))
{ {
if (line.isNull()) if (line.isNull())
@ -1637,7 +1637,7 @@ void KBiffSocket::setSSL(bool on)
} }
#endif // USE_SSL #endif // USE_SSL
int KBiffSocket::writeLine(const QString& line) int KBiffSocket::writeLine(const TQString& line)
{ {
int bytes = 0; int bytes = 0;
@ -1659,9 +1659,9 @@ int KBiffSocket::writeLine(const QString& line)
return bytes; return bytes;
} }
QString KBiffSocket::readLine() TQString KBiffSocket::readLine()
{ {
QString fault, response; TQString fault, response;
char buffer; char buffer;
ssize_t bytes = -1; ssize_t bytes = -1;
@ -1719,10 +1719,10 @@ KBiffImap::~KBiffImap()
close(); close();
} }
bool KBiffImap::command(const QString& line, unsigned int seq) bool KBiffImap::command(const TQString& line, unsigned int seq)
{ {
QString messagesListString; TQString messagesListString;
QStringList messagesList; TQStringList messagesList;
bool tried_cram_md5; // are we trying CRAM-MD5 ? bool tried_cram_md5; // are we trying CRAM-MD5 ?
if (writeLine(line) <= 0) if (writeLine(line) <= 0)
@ -1731,19 +1731,19 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
return false; return false;
} }
QString ok, bad, no, response; TQString ok, bad, no, response;
ok.sprintf("%d OK", seq); ok.sprintf("%d OK", seq);
bad.sprintf("%d BAD", seq); bad.sprintf("%d BAD", seq);
no.sprintf("%d NO", seq); no.sprintf("%d NO", seq);
// must be case insensitive // must be case insensitive
QRegExp status("\\* STATUS", FALSE); TQRegExp status("\\* STATUS", FALSE);
QRegExp capability("\\* CAPABILITY", FALSE); TQRegExp capability("\\* CAPABILITY", FALSE);
QRegExp cram_md5("AUTHENTICATE CRAM-MD5", FALSE); TQRegExp cram_md5("AUTHENTICATE CRAM-MD5", FALSE);
// are we trying CRAM-MD5 ? // are we trying CRAM-MD5 ?
tried_cram_md5 = cram_md5.search(line)>=0; tried_cram_md5 = cram_md5.search(line)>=0;
cram_md5 = QRegExp("\\+ ([A-Za-z0-9+/=]+)"); cram_md5 = TQRegExp("\\+ ([A-Za-z0-9+/=]+)");
while (!(response = readLine()).isNull()) while (!(response = readLine()).isNull())
{ {
@ -1766,15 +1766,15 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
* S: . OK STATUS Completed * S: . OK STATUS Completed
*/ */
if (status.search(response) >= 0) { if (status.search(response) >= 0) {
QRegExp unseen("UNSEEN ([0-9]*)", FALSE); TQRegExp unseen("UNSEEN ([0-9]*)", FALSE);
if (unseen.search(response) >= 0) { if (unseen.search(response) >= 0) {
QString num = unseen.cap(1); TQString num = unseen.cap(1);
newMessages = num.toInt(); newMessages = num.toInt();
} }
QRegExp number("MESSAGES ([0-9]*)", FALSE); TQRegExp number("MESSAGES ([0-9]*)", FALSE);
if (number.search(response) >= 0) { if (number.search(response) >= 0) {
QString num = number.cap(1); TQString num = number.cap(1);
messages = num.toInt(); messages = num.toInt();
} }
} }
@ -1787,7 +1787,7 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
* S: . OK CAPABILITY completed. * S: . OK CAPABILITY completed.
*/ */
if (capability.search(response) >= 0) { if (capability.search(response) >= 0) {
QRegExp cram_md5_cap("AUTH=CRAM-MD5", FALSE); TQRegExp cram_md5_cap("AUTH=CRAM-MD5", FALSE);
if (cram_md5_cap.search(response) >= 0) { if (cram_md5_cap.search(response) >= 0) {
auth_cram_md5 = true; auth_cram_md5 = true;
} }
@ -1809,9 +1809,9 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
return false; return false;
} }
QString KBiffImap::mungeUserPass(const QString& old_user) TQString KBiffImap::mungeUserPass(const TQString& old_user)
{ {
QString new_user(old_user); TQString new_user(old_user);
if (new_user.left(1) != "\"") if (new_user.left(1) != "\"")
new_user.prepend("\""); new_user.prepend("\"");
@ -1827,23 +1827,23 @@ void KBiffImap::resetNumbers()
newMessages = 0; newMessages = 0;
} }
bool KBiffImap::authenticate(int *pseq, const QString& user, const QString& pass) bool KBiffImap::authenticate(int *pseq, const TQString& user, const TQString& pass)
{ {
QString cmd, username, password; TQString cmd, username, password;
// If CRAM-MD5 is available, use it. It's the best we know. // If CRAM-MD5 is available, use it. It's the best we know.
// RFC 2195 defines the CRAM-MD5 authentication method // RFC 2195 defines the CRAM-MD5 authentication method
// also see RFC 3501 section 6.2.2 for the AUTHENTICATE command // also see RFC 3501 section 6.2.2 for the AUTHENTICATE command
if( auth_cram_md5 ) if( auth_cram_md5 )
{ {
cmd = QString("%1 AUTHENTICATE CRAM-MD5\r\n").arg(*pseq); cmd = TQString("%1 AUTHENTICATE CRAM-MD5\r\n").arg(*pseq);
if (command(cmd, *pseq) == false) if (command(cmd, *pseq) == false)
{ {
return false; return false;
} }
// calculate the real response to the challenge // calculate the real response to the challenge
QString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass); TQString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass);
response = KCodecs::base64Encode(response.latin1()); response = KCodecs::base64Encode(response.latin1());
// send the response // send the response
@ -1863,7 +1863,7 @@ bool KBiffImap::authenticate(int *pseq, const QString& user, const QString& pass
// to _always_ munge the user and the password. // to _always_ munge the user and the password.
password = mungeUserPass(pass); password = mungeUserPass(pass);
cmd = QString().setNum(*pseq) + " LOGIN " cmd = TQString().setNum(*pseq) + " LOGIN "
+ username + " " + username + " "
+ password + "\r\n"; + password + "\r\n";
if (command(cmd, *pseq) == false) if (command(cmd, *pseq) == false)
@ -1899,12 +1899,12 @@ void KBiffPop::setApop( bool enabled )
use_apop = enabled; use_apop = enabled;
} }
bool KBiffPop::command(const QString& line) bool KBiffPop::command(const TQString& line)
{ {
if (writeLine(line) <= 0) if (writeLine(line) <= 0)
return false; return false;
QString response; TQString response;
response = readLine(); response = readLine();
// check if the response was bad. if so, return now // check if the response was bad. if so, return now
@ -1925,7 +1925,7 @@ bool KBiffPop::command(const QString& line)
!response.isNull() && response.left(1) != "."; !response.isNull() && response.left(1) != ".";
response = readLine()) response = readLine())
{ {
uidlList.append(new QString(response.right(response.length() - uidlList.append(new TQString(response.right(response.length() -
response.find(" ") - 1))); response.find(" ") - 1)));
} }
} }
@ -1948,7 +1948,7 @@ bool KBiffPop::command(const QString& line)
// find out what the server is capable of // find out what the server is capable of
if (line == "CAPA\r\n") if (line == "CAPA\r\n")
{ {
QRegExp rx("\\bCRAM-MD5\\b"); TQRegExp rx("\\bCRAM-MD5\\b");
auth_cram_md5 = false; // assume no support auth_cram_md5 = false; // assume no support
@ -1964,7 +1964,7 @@ bool KBiffPop::command(const QString& line)
// look for the CRAM-MD5 challenge // look for the CRAM-MD5 challenge
if (line == "AUTH CRAM-MD5\r\n") if (line == "AUTH CRAM-MD5\r\n")
{ {
QRegExp challenge("\\+ ([A-Za-z0-9+/=]+)"); TQRegExp challenge("\\+ ([A-Za-z0-9+/=]+)");
if (challenge.search(response) == -1 ) if (challenge.search(response) == -1 )
{ {
return false; return false;
@ -1996,7 +1996,7 @@ bool KBiffPop::parseBanner(void)
} }
// Look for the banner part that indicates APOP support // Look for the banner part that indicates APOP support
QRegExp rx("(<[a-zA-Z0-9_+.-]+@[a-zA-Z0-9_+.-]+>)"); TQRegExp rx("(<[a-zA-Z0-9_+.-]+@[a-zA-Z0-9_+.-]+>)");
if( rx.search(banner) == -1 || !use_apop ) { if( rx.search(banner) == -1 || !use_apop ) {
auth_apop = false; auth_apop = false;
} else { } else {
@ -2010,11 +2010,11 @@ bool KBiffPop::parseBanner(void)
/*! /*!
This method authenticates using the most secure This method authenticates using the most secure
technique available. technique available.
\fn KBiffPop::authenticate(const QString& user, const QString& pass) \fn KBiffPop::authenticate(const TQString& user, const TQString& pass)
*/ */
bool KBiffPop::authenticate(const QString& user, const QString& pass) bool KBiffPop::authenticate(const TQString& user, const TQString& pass)
{ {
QString popcommand; TQString popcommand;
// CRAM-MD5 authentication is the most secure we can handle // CRAM-MD5 authentication is the most secure we can handle
// the use of the AUTH command is documented in RFC 1734 // the use of the AUTH command is documented in RFC 1734
@ -2026,7 +2026,7 @@ bool KBiffPop::authenticate(const QString& user, const QString& pass)
} }
// calculate the real response to the challenge // calculate the real response to the challenge
QString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass); TQString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass);
response = KCodecs::base64Encode(response.latin1()); response = KCodecs::base64Encode(response.latin1());
// send the response // send the response
@ -2042,14 +2042,14 @@ bool KBiffPop::authenticate(const QString& user, const QString& pass)
// than sending the password in the clear // than sending the password in the clear
if( auth_apop ) if( auth_apop )
{ {
QCString digest; TQCString digest;
KMD5 md5(chall_apop); KMD5 md5(chall_apop);
md5.update(pass); md5.update(pass);
digest = md5.hexDigest(); digest = md5.hexDigest();
popcommand = QString("APOP %1 %2\r\n").arg(user, digest.data()); popcommand = TQString("APOP %1 %2\r\n").arg(user, digest.data());
if (this->command(popcommand) == false) if (this->command(popcommand) == false)
{ {
return false; return false;
@ -2082,14 +2082,14 @@ KBiffNntp::~KBiffNntp()
close(); close();
} }
bool KBiffNntp::command(const QString& line) bool KBiffNntp::command(const TQString& line)
{ {
int bogus; int bogus;
if (writeLine(line) <= 0) if (writeLine(line) <= 0)
return false; return false;
QString response; TQString response;
while (!(response = readLine()).isNull()) while (!(response = readLine()).isNull())
{ {
// return if the response is bad // return if the response is bad
@ -2100,7 +2100,7 @@ bool KBiffNntp::command(const QString& line)
} }
// find return codes for tcp, user, pass // find return codes for tcp, user, pass
QString code(response.left(3)); TQString code(response.left(3));
if ((code == "200") || (code == "281") || (code == "381")) if ((code == "200") || (code == "281") || (code == "381"))
return true; return true;
@ -2148,7 +2148,7 @@ static const char *day_name[8] = {
"sun", "mon", "tue", "wed", "thu", "fri", "sat", 0 "sun", "mon", "tue", "wed", "thu", "fri", "sat", 0
}; };
static bool real_from(const QString& orig_buffer) static bool real_from(const TQString& orig_buffer)
{ {
/* /*
A valid from line will be in the following format: A valid from line will be in the following format:
@ -2181,7 +2181,7 @@ static bool real_from(const QString& orig_buffer)
/* <weekday> */ /* <weekday> */
found = 0; found = 0;
for (i = 0; day_name[i] != NULL; i++) for (i = 0; day_name[i] != NULL; i++)
found = found || (qstrnicmp(day_name[i], buffer, 3) == 0); found = found || (tqstrnicmp(day_name[i], buffer, 3) == 0);
if (!found) if (!found)
return false; return false;
@ -2191,7 +2191,7 @@ static bool real_from(const QString& orig_buffer)
/* <month> */ /* <month> */
found = 0; found = 0;
for (i = 0; month_name[i] != NULL; i++) for (i = 0; month_name[i] != NULL; i++)
found = found || (qstrnicmp(month_name[i], buffer, 3) == 0); found = found || (tqstrnicmp(month_name[i], buffer, 3) == 0);
if (!found) if (!found)
return false; return false;
@ -2208,7 +2208,7 @@ static const char* compare_header(const char* header, const char* field)
{ {
int len = strlen(field); int len = strlen(field);
if (qstrnicmp(header, field, len)) if (tqstrnicmp(header, field, len))
return NULL; return NULL;
header += len; header += len;

@ -17,29 +17,29 @@
#include <sys/time.h> #include <sys/time.h>
#include <qobject.h> #include <ntqobject.h>
#include <qlist.h> #include <ntqlist.h>
#include <qfileinfo.h> #include <ntqfileinfo.h>
#ifdef USE_SSL #ifdef USE_SSL
#include <kssl.h> #include <kssl.h>
#endif #endif
class KBiffURL; class KBiffURL;
class QString; class TQString;
/** /**
* @internal * @internal
* Internal class to store UIDL list * Internal class to store UIDL list
*/ */
class KBiffUidlList : public QList<QString> class KBiffUidlList : public TQList<TQString>
{ {
protected: protected:
int compareItems(Item s1, Item s2) int compareItems(Item s1, Item s2)
{ {
QString *str1, *str2; TQString *str1, *str2;
str1 = (QString *)s1; str1 = (TQString *)s1;
str2 = (QString *)s2; str2 = (TQString *)s2;
if((*str1) == (*str2)) if((*str1) == (*str2))
return 0; return 0;
else else
@ -59,7 +59,7 @@ public:
KBiffSocket(); KBiffSocket();
virtual ~KBiffSocket(); virtual ~KBiffSocket();
bool connectSocket(const QString& host, unsigned short int port); bool connectSocket(const TQString& host, unsigned short int port);
bool active(); bool active();
bool isAsync(); bool isAsync();
@ -76,8 +76,8 @@ public:
void close(); void close();
protected: protected:
QString readLine(); TQString readLine();
int writeLine(const QString& line); int writeLine(const TQString& line);
bool async; bool async;
@ -87,7 +87,7 @@ protected:
fd_set socketFDS; fd_set socketFDS;
int messages; int messages;
int newMessages; int newMessages;
QString banner; // the first line read from a new connection TQString banner; // the first line read from a new connection
#ifdef USE_SSL #ifdef USE_SSL
bool usessl; bool usessl;
@ -104,8 +104,8 @@ public:
KBiffImap(); KBiffImap();
virtual ~KBiffImap(); virtual ~KBiffImap();
bool command(const QString& line, unsigned int seq); bool command(const TQString& line, unsigned int seq);
QString mungeUserPass(const QString& old_user); TQString mungeUserPass(const TQString& old_user);
void resetNumbers(); void resetNumbers();
/** /**
* @internal * @internal
@ -123,7 +123,7 @@ public:
* @param user the user name required for authentication * @param user the user name required for authentication
* @param pass the password required for authentication * @param pass the password required for authentication
*/ */
bool authenticate(int *pseq, const QString& user, const QString& pass); bool authenticate(int *pseq, const TQString& user, const TQString& pass);
protected: protected:
/** /**
@ -138,7 +138,7 @@ protected:
* *
* @brief the CRAM-MD5 challenge (base64 decoded) as issued by the server * @brief the CRAM-MD5 challenge (base64 decoded) as issued by the server
*/ */
QString chall_cram_md5; TQString chall_cram_md5;
}; };
/** /**
@ -150,7 +150,7 @@ public:
KBiffPop(); KBiffPop();
virtual ~KBiffPop(); virtual ~KBiffPop();
bool command(const QString& line); bool command(const TQString& line);
KBiffUidlList getUidlList() const; KBiffUidlList getUidlList() const;
void close(); void close();
@ -172,7 +172,7 @@ public:
* @param user the user name required for authentication * @param user the user name required for authentication
* @param pass the password required for authentication * @param pass the password required for authentication
*/ */
bool authenticate(const QString& user, const QString& pass); bool authenticate(const TQString& user, const TQString& pass);
protected: protected:
KBiffUidlList uidlList; KBiffUidlList uidlList;
@ -185,7 +185,7 @@ protected:
* @internal * @internal
* @brief the APOP challenge from the server * @brief the APOP challenge from the server
*/ */
QCString chall_apop; TQCString chall_apop;
/** /**
* @internal * @internal
* @brief does the server support CRAM-MD5 authentication ? * @brief does the server support CRAM-MD5 authentication ?
@ -195,7 +195,7 @@ protected:
* @internal * @internal
* @brief the CRAM-MD5 challenge (base64 decoded) * @brief the CRAM-MD5 challenge (base64 decoded)
*/ */
QString chall_cram_md5; // the CRAM-MD5 challenge (base64 decoded) TQString chall_cram_md5; // the CRAM-MD5 challenge (base64 decoded)
/** /**
* @internal * @internal
* @brief does the user want APOP authentication * @brief does the user want APOP authentication
@ -211,7 +211,7 @@ class KBiffNntp : public KBiffSocket
public: public:
virtual ~KBiffNntp(); virtual ~KBiffNntp();
bool command(const QString& line); bool command(const TQString& line);
int first() const; int first() const;
int last() const; int last() const;
protected: protected:
@ -262,7 +262,7 @@ typedef enum
* @author Kurt Granroth <granroth@kde.org> * @author Kurt Granroth <granroth@kde.org>
* @version $Id$ * @version $Id$
*/ */
class KBiffMonitor : public QObject class KBiffMonitor : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -287,17 +287,17 @@ public:
/** /**
* Returns the simpleURL of current mailbox being monitored * Returns the simpleURL of current mailbox being monitored
*/ */
const QString getMailbox() const { return simpleURL; } const TQString getMailbox() const { return simpleURL; }
/** /**
* Sets or Returns the key of current mailbox being monitored * Sets or Returns the key of current mailbox being monitored
*/ */
const QString getMailboxKey() const { return key; } const TQString getMailboxKey() const { return key; }
/** /**
* Returns the type of mailbox being monitored * Returns the type of mailbox being monitored
*/ */
const QString getProtocol() const { return protocol; } const TQString getProtocol() const { return protocol; }
/** /**
* Returns <CODE>true</CODE> is KBiffMonitor is currently monitoring * Returns <CODE>true</CODE> is KBiffMonitor is currently monitoring
* a mailbox. * a mailbox.
@ -361,13 +361,13 @@ public slots:
/** /**
* Overloaded for convenience * Overloaded for convenience
*/ */
void setMailbox(const QString& url); void setMailbox(const TQString& url);
void setMailboxKey(const QString& k); void setMailboxKey(const TQString& k);
/** /**
* Sets the password for the POP3 and IMAP4 protocols. * Sets the password for the POP3 and IMAP4 protocols.
*/ */
void setPassword(const QString& password); void setPassword(const TQString& password);
/** /**
* Set the interval between mailbox reads. This is in seconds. * Set the interval between mailbox reads. This is in seconds.
@ -403,7 +403,7 @@ signals:
/** /**
* This will get <CODE>emit</CODE>ed when new mail arrives * This will get <CODE>emit</CODE>ed when new mail arrives
*/ */
void signal_newMail(const int num_new, const QString& mailbox); void signal_newMail(const int num_new, const TQString& mailbox);
/** /**
* This will get <CODE>emit</CODE>ed when no mail exists * This will get <CODE>emit</CODE>ed when no mail exists
@ -413,7 +413,7 @@ signals:
/** /**
* This will get <CODE>emit</CODE>ed when no mail exists * This will get <CODE>emit</CODE>ed when no mail exists
*/ */
void signal_noMail(const QString& mailbox); void signal_noMail(const TQString& mailbox);
/** /**
* This will get <CODE>emit</CODE>ed when the mailbox is read * This will get <CODE>emit</CODE>ed when the mailbox is read
@ -423,7 +423,7 @@ signals:
/** /**
* This will get <CODE>emit</CODE>ed when the mailbox is read * This will get <CODE>emit</CODE>ed when the mailbox is read
*/ */
void signal_oldMail(const QString& mailbox); void signal_oldMail(const TQString& mailbox);
/** /**
* This will get <CODE>emit</CODE>ed when no connection can be * This will get <CODE>emit</CODE>ed when no connection can be
@ -435,13 +435,13 @@ signals:
* This will get <CODE>emit</CODE>ed when no connection can * This will get <CODE>emit</CODE>ed when no connection can
* be established * be established
*/ */
void signal_noConn(const QString& mailbox); void signal_noConn(const TQString& mailbox);
/** /**
* This will get <CODE>emit</CODE>ed everytime mail will be * This will get <CODE>emit</CODE>ed everytime mail will be
* fetched externally * fetched externally
*/ */
void signal_fetchMail(const QString& fetchClient); void signal_fetchMail(const TQString& fetchClient);
/** /**
* This will get <CODE>emit</CODE>ed everytime the mailbox * This will get <CODE>emit</CODE>ed everytime the mailbox
@ -454,16 +454,16 @@ signals:
* checked. It contains the current mailbox name, state, and number * checked. It contains the current mailbox name, state, and number
* of new messages * of new messages
*/ */
void signal_currentStatus(const int, const QString& , const KBiffMailState); void signal_currentStatus(const int, const TQString& , const KBiffMailState);
/** /**
* This will get <CODE>emit</CODE>ed everytime there was an * This will get <CODE>emit</CODE>ed everytime there was an
* invalid login or incomplete connection to a remote server. * invalid login or incomplete connection to a remote server.
*/ */
void signal_invalidLogin(const QString& mailbox); void signal_invalidLogin(const TQString& mailbox);
protected: protected:
void timerEvent(QTimerEvent *); void timerEvent(TQTimerEvent *);
protected slots: protected slots:
void checkLocal(); void checkLocal();
@ -476,8 +476,8 @@ protected slots:
protected: protected:
// protected (non-slot) functions // protected (non-slot) functions
void determineState(unsigned int size, const QDateTime& last_read, void determineState(unsigned int size, const TQDateTime& last_read,
const QDateTime& last_modified); const TQDateTime& last_modified);
void determineState(unsigned int size); void determineState(unsigned int size);
void determineState(KBiffUidlList uidl_list); void determineState(KBiffUidlList uidl_list);
@ -498,22 +498,22 @@ private:
bool firstRun; bool firstRun;
// Mailbox stuff // Mailbox stuff
QString key; TQString key;
QString simpleURL; TQString simpleURL;
QString protocol; TQString protocol;
QString mailbox; TQString mailbox;
QString server; TQString server;
QString user; TQString user;
QString password; TQString password;
QString fetchCommand; TQString fetchCommand;
unsigned short int port; unsigned short int port;
bool preauth; bool preauth;
bool keepalive; bool keepalive;
// New state cache // New state cache
unsigned int new_lastSize; unsigned int new_lastSize;
QDateTime new_lastRead; TQDateTime new_lastRead;
QDateTime new_lastModified; TQDateTime new_lastModified;
KBiffUidlList new_uidlList; KBiffUidlList new_uidlList;
bool b_new_lastSize; bool b_new_lastSize;
bool b_new_lastRead; bool b_new_lastRead;
@ -522,8 +522,8 @@ private:
// State variables // State variables
KBiffMailState mailState; KBiffMailState mailState;
unsigned int lastSize; unsigned int lastSize;
QDateTime lastRead; TQDateTime lastRead;
QDateTime lastModified; TQDateTime lastModified;
KBiffUidlList uidlList; KBiffUidlList uidlList;
// Socket protocols // Socket protocols

@ -14,7 +14,7 @@ KBiffURL::KBiffURL()
{ {
} }
KBiffURL::KBiffURL(const QString& _url) KBiffURL::KBiffURL(const TQString& _url)
: KURL(_url) : KURL(_url)
{ {
/** /**
@ -22,7 +22,7 @@ KBiffURL::KBiffURL(const QString& _url)
*/ */
if (protocol() == "nntp") if (protocol() == "nntp")
{ {
QString urlStr(_url); TQString urlStr(_url);
urlStr.replace(0,4, "imap4"); urlStr.replace(0,4, "imap4");
*this = KBiffURL(urlStr); *this = KBiffURL(urlStr);
setProtocol("nntp"); setProtocol("nntp");
@ -38,7 +38,7 @@ KBiffURL::KBiffURL(const QString& _url)
* hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ] * hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
* search = *[ uchar | ";" | ":" | "@" | "&" | "=" ] * search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
*/ */
QString KBiffURL::searchPar( const QString & _parName ) const TQString KBiffURL::searchPar( const TQString & _parName ) const
{ {
const char *_searchPart, *_searchPos, *_parVal; const char *_searchPart, *_searchPos, *_parVal;
int n; int n;
@ -48,14 +48,14 @@ QString KBiffURL::searchPar( const QString & _parName ) const
_parVal = NULL; _parVal = NULL;
// Get the search part of the URL, i.e. the stuff after "?" // Get the search part of the URL, i.e. the stuff after "?"
QString query_str(query()); TQString query_str(query());
if (!query_str.isNull()) if (!query_str.isNull())
query_str = query_str.remove(0,1); query_str = query_str.remove(0,1);
_searchPart = query_str.ascii(); _searchPart = query_str.ascii();
// Try to find the given parameter in the search part string // Try to find the given parameter in the search part string
if ((n = findPos( _searchPart, _parName )) < 0) if ((n = findPos( _searchPart, _parName )) < 0)
return QString::null; return TQString::null;
/* /*
* Now, we know that the parameter name is found * Now, we know that the parameter name is found
@ -63,7 +63,7 @@ QString KBiffURL::searchPar( const QString & _parName ) const
// If no value is assigned, an empty string is returned // If no value is assigned, an empty string is returned
if (_searchPart[n] != '=') if (_searchPart[n] != '=')
return QString::null; return TQString::null;
// Set the beginning of the parameter value string // Set the beginning of the parameter value string
_parVal = &(_searchPart[n+1]); _parVal = &(_searchPart[n+1]);
@ -73,19 +73,19 @@ QString KBiffURL::searchPar( const QString & _parName ) const
// Return the assigned parameter value // Return the assigned parameter value
if (_searchPos == NULL) if (_searchPos == NULL)
return QString( _parVal ); return TQString( _parVal );
else else
return QString( _parVal ).left(_searchPos - _parVal); return TQString( _parVal ).left(_searchPos - _parVal);
} }
void KBiffURL::setSearchPar( const QString & _parName, const QString & _newParVal ) void KBiffURL::setSearchPar( const TQString & _parName, const TQString & _newParVal )
{ {
QString _newSearchPart; TQString _newSearchPart;
const char *_searchPart, *_searchPos, *_parVal; const char *_searchPart, *_searchPos, *_parVal;
int index, len; int index, len;
// Get the search part of the URL, i.e. the stuff after "?" // Get the search part of the URL, i.e. the stuff after "?"
QString query_str(query()); TQString query_str(query());
if (!query_str.isNull()) if (!query_str.isNull())
query_str = query_str.remove(0,1); query_str = query_str.remove(0,1);
@ -141,7 +141,7 @@ void KBiffURL::setSearchPar( const QString & _parName, const QString & _newParVa
setQuery( _newSearchPart ); setQuery( _newSearchPart );
} }
int KBiffURL::findPos( const QString & _searchPart, const QString & _parName ) const int KBiffURL::findPos( const TQString & _searchPart, const TQString & _parName ) const
{ {
const char *_searchPos; const char *_searchPos;
int n = -1; int n = -1;
@ -169,7 +169,7 @@ int KBiffURL::findPos( const QString & _searchPart, const QString & _parName ) c
return -1; return -1;
} }
QString KBiffURL::pass() const TQString KBiffURL::pass() const
{ {
return KURL::decode_string(KURL::pass()); return KURL::decode_string(KURL::pass());
} }

@ -25,24 +25,24 @@ public:
/** /**
* Construct a KBiffURL object from _url * Construct a KBiffURL object from _url
*/ */
KBiffURL(const QString& _url); KBiffURL(const TQString& _url);
/** /**
* Returns the parameter value found in the search part of the URL * Returns the parameter value found in the search part of the URL
*/ */
QString searchPar( const QString & _parName ) const; TQString searchPar( const TQString & _parName ) const;
/** /**
* Sets a parameter value in the search part of the URL * Sets a parameter value in the search part of the URL
*/ */
void setSearchPar( const QString & _parName, const QString & _newParVal ); void setSearchPar( const TQString & _parName, const TQString & _newParVal );
QString pass() const; TQString pass() const;
private: private:
/** /**
* Returns the position of a parameter within the search part * Returns the position of a parameter within the search part
*/ */
int findPos( const QString & _searchPart, const QString & _parName ) const; int findPos( const TQString & _searchPart, const TQString & _parName ) const;
}; };
#endif // KBIFFURL_H #endif // KBIFFURL_H

@ -32,7 +32,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
KBiffSetup* setup = 0; KBiffSetup* setup = 0;
bool is_secure = false; bool is_secure = false;
bool have_profile = false; bool have_profile = false;
QString profile; TQString profile;
app.setMainWidget(&kbiff); app.setMainWidget(&kbiff);
@ -75,7 +75,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
// check if we are docked (only if restored) // check if we are docked (only if restored)
if (kbiff.isDocked()) if (kbiff.isDocked())
{ {
kapp->setTopWidget(new QWidget); kapp->setTopWidget(new TQWidget);
KWin::setSystemTrayWindowFor(kbiff.winId(), 0); KWin::setSystemTrayWindowFor(kbiff.winId(), 0);
} }
else else

@ -8,10 +8,10 @@
#include "notify.h" #include "notify.h"
#include "notify.moc" #include "notify.moc"
#include <qlayout.h> #include <ntqlayout.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qpixmap.h> #include <ntqpixmap.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <kapp.h> #include <kapp.h>
#include <kglobal.h> #include <kglobal.h>
@ -20,33 +20,33 @@
#include <kprocess.h> #include <kprocess.h>
#include <kwin.h> #include <kwin.h>
KBiffNotify::KBiffNotify(QWidget *parent_, const int num_new, KBiffNotify::KBiffNotify(TQWidget *parent_, const int num_new,
const QString& mailbx) const TQString& mailbx)
: QDialog(parent_, 0, false, 0) : TQDialog(parent_, 0, false, 0)
{ {
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
setCaption(i18n("You have new mail!")); setCaption(i18n("You have new mail!"));
QLabel *pixmap = new QLabel(this); TQLabel *pixmap = new TQLabel(this);
pixmap->setPixmap(kapp->icon()); pixmap->setPixmap(kapp->icon());
pixmap->setFixedSize(pixmap->sizeHint()); pixmap->setFixedSize(pixmap->sizeHint());
QLabel *congrats = new QLabel(i18n("You have new mail!"), this); TQLabel *congrats = new TQLabel(i18n("You have new mail!"), this);
QFont the_font(congrats->font()); TQFont the_font(congrats->font());
the_font.setBold(true); the_font.setBold(true);
congrats->setFont(the_font); congrats->setFont(the_font);
QString msg; TQString msg;
msg = i18n("New Messages: %1").arg(num_new); msg = i18n("New Messages: %1").arg(num_new);
msgLabel = new QLabel(msg, this); msgLabel = new TQLabel(msg, this);
msg = i18n("Mailbox: %1").arg(mailbx); msg = i18n("Mailbox: %1").arg(mailbx);
QLabel *which_one = new QLabel(msg, this); TQLabel *which_one = new TQLabel(msg, this);
QPushButton *ok = new QPushButton(i18n("OK"), this); TQPushButton *ok = new TQPushButton(i18n("OK"), this);
ok->setDefault(true); ok->setDefault(true);
QPushButton *launch = new QPushButton(i18n("Mailer"), this); TQPushButton *launch = new TQPushButton(i18n("Mailer"), this);
// connect the signals to slots // connect the signals to slots
connect(ok, SIGNAL(clicked()), SLOT(accept())); connect(ok, SIGNAL(clicked()), SLOT(accept()));
@ -54,22 +54,22 @@ KBiffNotify::KBiffNotify(QWidget *parent_, const int num_new,
connect(launch, SIGNAL(clicked()), this, SLOT(accept())); connect(launch, SIGNAL(clicked()), this, SLOT(accept()));
// Now do the layout // Now do the layout
QVBoxLayout *info_layout = new QVBoxLayout(12); TQVBoxLayout *info_layout = new TQVBoxLayout(12);
info_layout->addWidget(congrats); info_layout->addWidget(congrats);
info_layout->addWidget(msgLabel); info_layout->addWidget(msgLabel);
info_layout->addWidget(which_one); info_layout->addWidget(which_one);
QHBoxLayout *upper_layout = new QHBoxLayout; TQHBoxLayout *upper_layout = new TQHBoxLayout;
upper_layout->addWidget(pixmap); upper_layout->addWidget(pixmap);
upper_layout->addLayout(info_layout, 1); upper_layout->addLayout(info_layout, 1);
QHBoxLayout *button_layout = new QHBoxLayout; TQHBoxLayout *button_layout = new TQHBoxLayout;
button_layout->addStretch(1); button_layout->addStretch(1);
button_layout->addWidget(launch); button_layout->addWidget(launch);
button_layout->addWidget(ok); button_layout->addWidget(ok);
button_layout->addStretch(1); button_layout->addStretch(1);
QVBoxLayout *top_layout = new QVBoxLayout(this, 12); TQVBoxLayout *top_layout = new TQVBoxLayout(this, 12);
top_layout->addLayout(upper_layout); top_layout->addLayout(upper_layout);
top_layout->addLayout(button_layout); top_layout->addLayout(button_layout);
@ -83,7 +83,7 @@ KBiffNotify::~KBiffNotify()
void KBiffNotify::setNew(const int num_new) void KBiffNotify::setNew(const int num_new)
{ {
QString msg; TQString msg;
msg = i18n("New Messages: %1").arg(num_new); msg = i18n("New Messages: %1").arg(num_new);
msgLabel->setText(msg); msgLabel->setText(msg);
messages = num_new; messages = num_new;

@ -14,19 +14,19 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qdialog.h> #include <ntqdialog.h>
#include <qstring.h> #include <ntqstring.h>
class QLabel; class TQLabel;
class KBiffNotify : public QDialog class KBiffNotify : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffNotify(QWidget *parent, const int num_new, const QString& mailbx); KBiffNotify(TQWidget *parent, const int num_new, const TQString& mailbx);
virtual ~KBiffNotify(); virtual ~KBiffNotify();
const QString getMailbox() { return mailbox; } const TQString getMailbox() { return mailbox; }
int newMessages() { return messages; } int newMessages() { return messages; }
void setNew(const int num_new); void setNew(const int num_new);
@ -38,8 +38,8 @@ protected slots:
void slotLaunchMailClient(); void slotLaunchMailClient();
protected: protected:
QString mailbox; TQString mailbox;
QLabel* msgLabel; TQLabel* msgLabel;
int messages; int messages;
}; };

File diff suppressed because it is too large Load Diff

@ -16,17 +16,17 @@
#include <kbiffurl.h> #include <kbiffurl.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qwidget.h> #include <ntqwidget.h>
#include <kdialog.h> #include <kdialog.h>
#include <qdict.h> #include <ntqdict.h>
#include <qlineedit.h> #include <ntqlineedit.h>
class QLineEdit; class TQLineEdit;
class QCheckBox; class TQCheckBox;
class QPushButton; class TQPushButton;
class QComboBox; class TQComboBox;
#include <kicondialog.h> #include <kicondialog.h>
@ -34,7 +34,7 @@ struct KBiffMailbox
{ {
KBiffURL url; KBiffURL url;
bool store; bool store;
QString key; TQString key;
}; };
class KBiffGeneralTab; class KBiffGeneralTab;
@ -47,22 +47,22 @@ class KBiffSetup : public KDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffSetup(const QString& name = QString::null, bool secure = false); KBiffSetup(const TQString& name = TQString::null, bool secure = false);
virtual ~KBiffSetup(); virtual ~KBiffSetup();
const QString getProfile() const; const TQString getProfile() const;
const KBiffURL getCurrentMailbox() const; const KBiffURL getCurrentMailbox() const;
const QList<KBiffMailbox> getMailboxList() const; const TQList<KBiffMailbox> getMailboxList() const;
const QString getMailClient() const; const TQString getMailClient() const;
const QString getRunCommandPath() const; const TQString getRunCommandPath() const;
const QString getRunResetCommandPath() const; const TQString getRunResetCommandPath() const;
const QString getPlaySoundPath() const; const TQString getPlaySoundPath() const;
const QString getNoMailIcon() const; const TQString getNoMailIcon() const;
const QString getNewMailIcon() const; const TQString getNewMailIcon() const;
const QString getOldMailIcon() const; const TQString getOldMailIcon() const;
const QString getNoConnIcon() const; const TQString getNoConnIcon() const;
const QString getStoppedIcon() const; const TQString getStoppedIcon() const;
bool getSystemBeep() const; bool getSystemBeep() const;
bool getRunCommand() const; bool getRunCommand() const;
bool getRunResetCommand() const; bool getRunResetCommand() const;
@ -78,11 +78,11 @@ public:
public slots: public slots:
void invokeHelp(); void invokeHelp();
void readConfig(const QString& profile); void readConfig(const TQString& profile);
void saveConfig(); void saveConfig();
protected: protected:
QString getSomeProfile() const; TQString getSomeProfile() const;
protected slots: protected slots:
void slotDone(); void slotDone();
@ -94,7 +94,7 @@ private:
bool isSecure; bool isSecure;
// "outer" dialog // "outer" dialog
QComboBox *comboProfile; TQComboBox *comboProfile;
// tabs // tabs
KBiffGeneralTab *generalTab; KBiffGeneralTab *generalTab;
@ -103,34 +103,34 @@ private:
KBiffAboutTab *aboutTab; KBiffAboutTab *aboutTab;
}; };
class KBiffGeneralTab : public QWidget class KBiffGeneralTab : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffGeneralTab(const QString& profile = QString::null, QWidget *parent=0); KBiffGeneralTab(const TQString& profile = TQString::null, TQWidget *parent=0);
virtual ~KBiffGeneralTab(); virtual ~KBiffGeneralTab();
const QString getButtonNewMail() const; const TQString getButtonNewMail() const;
const QString getButtonOldMail() const; const TQString getButtonOldMail() const;
const QString getButtonNoMail() const; const TQString getButtonNoMail() const;
const QString getButtonNoConn() const; const TQString getButtonNoConn() const;
const QString getButtonStopped() const; const TQString getButtonStopped() const;
const QString getMailClient() const; const TQString getMailClient() const;
int getPoll() const; int getPoll() const;
bool getDock() const; bool getDock() const;
bool getSessionManagement() const; bool getSessionManagement() const;
bool getCheckStartup() const; bool getCheckStartup() const;
public slots: public slots:
void readConfig(const QString& profile); void readConfig(const TQString& profile);
void saveConfig(const QString& profile); void saveConfig(const TQString& profile);
private: private:
QLineEdit* editPoll; TQLineEdit* editPoll;
QLineEdit* editCommand; TQLineEdit* editCommand;
QCheckBox* checkDock; TQCheckBox* checkDock;
QCheckBox* checkNoSession; TQCheckBox* checkNoSession;
QCheckBox* checkNoStartup; TQCheckBox* checkNoStartup;
KIconButton *buttonNoMail; KIconButton *buttonNoMail;
KIconButton *buttonOldMail; KIconButton *buttonOldMail;
@ -139,26 +139,26 @@ private:
KIconButton *buttonStopped; KIconButton *buttonStopped;
}; };
class KBiffNewMailTab : public QWidget class KBiffNewMailTab : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffNewMailTab(const QString& profile = QString::null, QWidget *parent=0); KBiffNewMailTab(const TQString& profile = TQString::null, TQWidget *parent=0);
virtual ~KBiffNewMailTab(); virtual ~KBiffNewMailTab();
bool getRunCommand() const; bool getRunCommand() const;
const QString getRunCommandPath() const; const TQString getRunCommandPath() const;
bool getRunResetCommand() const; bool getRunResetCommand() const;
const QString getRunResetCommandPath() const; const TQString getRunResetCommandPath() const;
bool getPlaySound() const; bool getPlaySound() const;
const QString getPlaySoundPath() const; const TQString getPlaySoundPath() const;
bool getSystemBeep() const; bool getSystemBeep() const;
bool getNotify() const; bool getNotify() const;
bool getStatus() const; bool getStatus() const;
public slots: public slots:
void readConfig(const QString& profile); void readConfig(const TQString& profile);
void saveConfig(const QString& profile); void saveConfig(const TQString& profile);
protected slots: protected slots:
void enableRunCommand(bool); void enableRunCommand(bool);
@ -170,21 +170,21 @@ protected slots:
void testPlaySound(); void testPlaySound();
private: private:
QLineEdit *editRunCommand; TQLineEdit *editRunCommand;
QLineEdit *editRunResetCommand; TQLineEdit *editRunResetCommand;
QLineEdit *editPlaySound; TQLineEdit *editPlaySound;
QCheckBox *checkRunCommand; TQCheckBox *checkRunCommand;
QCheckBox *checkRunResetCommand; TQCheckBox *checkRunResetCommand;
QCheckBox *checkPlaySound; TQCheckBox *checkPlaySound;
QCheckBox *checkBeep; TQCheckBox *checkBeep;
QCheckBox *checkNotify; TQCheckBox *checkNotify;
QCheckBox *checkStatus; TQCheckBox *checkStatus;
QPushButton *buttonBrowsePlaySound; TQPushButton *buttonBrowsePlaySound;
QPushButton *buttonTestPlaySound; TQPushButton *buttonTestPlaySound;
QPushButton *buttonBrowseRunCommand; TQPushButton *buttonBrowseRunCommand;
QPushButton *buttonBrowseRunResetCommand; TQPushButton *buttonBrowseRunResetCommand;
}; };
class KBiffMailboxAdvanced : public KDialog class KBiffMailboxAdvanced : public KDialog
@ -207,44 +207,44 @@ public:
void setDisableApop(bool on); void setDisableApop(bool on);
protected slots: protected slots:
void portModified(const QString& text); void portModified(const TQString& text);
void timeoutModified(const QString& text); void timeoutModified(const TQString& text);
void preauthModified(bool toggled); void preauthModified(bool toggled);
void keepaliveModified(bool toggled); void keepaliveModified(bool toggled);
void asyncModified(bool toggled); void asyncModified(bool toggled);
void apopModified(bool toggled); void apopModified(bool toggled);
private: private:
QString password; TQString password;
QLineEdit *mailbox; TQLineEdit *mailbox;
QLineEdit *port; TQLineEdit *port;
QLineEdit *timeout; TQLineEdit *timeout;
QCheckBox *preauth; TQCheckBox *preauth;
QCheckBox *keepalive; TQCheckBox *keepalive;
QCheckBox *async; TQCheckBox *async;
QCheckBox *apop; TQCheckBox *apop;
}; };
class KBiffMailboxTab : public QWidget class KBiffMailboxTab : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffMailboxTab(const QString& profile = QString::null, QWidget *parent=0); KBiffMailboxTab(const TQString& profile = TQString::null, TQWidget *parent=0);
virtual ~KBiffMailboxTab(); virtual ~KBiffMailboxTab();
void setMailbox(const KBiffURL& url); void setMailbox(const KBiffURL& url);
const KBiffURL getMailbox() const; const KBiffURL getMailbox() const;
const QList<KBiffMailbox> getMailboxList() const; const TQList<KBiffMailbox> getMailboxList() const;
public slots: public slots:
void readConfig(const QString& profile); void readConfig(const TQString& profile);
void saveConfig(const QString& profile); void saveConfig(const TQString& profile);
protected slots: protected slots:
void slotDeleteMailbox(); void slotDeleteMailbox();
void slotNewMailbox(); void slotNewMailbox();
void slotMailboxSelected(QListViewItem *item); void slotMailboxSelected(TQListViewItem *item);
void protocolSelected(int protocol); void protocolSelected(int protocol);
void browse(); void browse();
@ -257,8 +257,8 @@ protected:
const KBiffURL defaultMailbox() const; const KBiffURL defaultMailbox() const;
private: private:
QDict<KBiffMailbox> *mailboxHash; TQDict<KBiffMailbox> *mailboxHash;
QListViewItem *oldItem; TQListViewItem *oldItem;
unsigned int port; unsigned int port;
unsigned int timeout; unsigned int timeout;
@ -266,43 +266,43 @@ private:
bool keepalive; bool keepalive;
bool async; bool async;
bool useApop; bool useApop;
QComboBox *comboProtocol; TQComboBox *comboProtocol;
QLineEdit *editMailbox; TQLineEdit *editMailbox;
QLineEdit *editServer; TQLineEdit *editServer;
QLineEdit *editUser; TQLineEdit *editUser;
QLineEdit *editPassword; TQLineEdit *editPassword;
QLineEdit *editFetchCommand; TQLineEdit *editFetchCommand;
QCheckBox *checkFetchCommand; TQCheckBox *checkFetchCommand;
QCheckBox *checkStorePassword; TQCheckBox *checkStorePassword;
QPushButton *buttonBrowse; TQPushButton *buttonBrowse;
QListView *mailboxes; TQListView *mailboxes;
QPushButton *buttonBrowseFetchCommand; TQPushButton *buttonBrowseFetchCommand;
}; };
class KBiffAboutTab : public QWidget class KBiffAboutTab : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffAboutTab(QWidget *parent=0); KBiffAboutTab(TQWidget *parent=0);
virtual ~KBiffAboutTab(); virtual ~KBiffAboutTab();
protected slots: protected slots:
void mailTo(const QString&); void mailTo(const TQString&);
void homepage(const QString&); void homepage(const TQString&);
}; };
class KBiffNewDlg : public KDialog class KBiffNewDlg : public KDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffNewDlg(QWidget* parent = 0, const char * name = 0); KBiffNewDlg(TQWidget* parent = 0, const char * name = 0);
const QString getName() const const TQString getName() const
{ return editName->text(); } { return editName->text(); }
private: private:
QLineEdit *editName; TQLineEdit *editName;
}; };
#endif // SETUPDLG_H #endif // SETUPDLG_H

@ -11,23 +11,23 @@
#include <kapp.h> #include <kapp.h>
#include <klocale.h> #include <klocale.h>
#include <qdesktopwidget.h> #include <ntqdesktopwidget.h>
#include <qpoint.h> #include <ntqpoint.h>
#include <qrect.h> #include <ntqrect.h>
#include <qheader.h> #include <ntqheader.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qlistview.h> #include <ntqlistview.h>
#include <qpoint.h> #include <ntqpoint.h>
KBiffStatus::KBiffStatus(QWidget *parent_, const QString& profile, const KBiffStatusList& list) KBiffStatus::KBiffStatus(TQWidget *parent_, const TQString& profile, const KBiffStatusList& list)
: QFrame(parent_, 0, WType_Popup), : TQFrame(parent_, 0, WType_Popup),
_listView(new QListView(this)) _listView(new TQListView(this))
{ {
setFrameStyle(WinPanel|Raised); setFrameStyle(WinPanel|Raised);
QLabel *profile_label = new QLabel(profile, this); TQLabel *profile_label = new TQLabel(profile, this);
profile_label->setFrameStyle(QFrame::Box | QFrame::Raised); profile_label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
profile_label->setAlignment(AlignCenter); profile_label->setAlignment(AlignCenter);
_listView->addColumn(i18n("Mailbox")); _listView->addColumn(i18n("Mailbox"));
@ -36,9 +36,9 @@ KBiffStatus::KBiffStatus(QWidget *parent_, const QString& profile, const KBiffSt
_listView->setColumnAlignment(1, AlignRight); _listView->setColumnAlignment(1, AlignRight);
_listView->setColumnAlignment(2, AlignRight); _listView->setColumnAlignment(2, AlignRight);
_listView->setSorting(1, FALSE); _listView->setSorting(1, FALSE);
_listView->setFrameStyle(QFrame::WinPanel | QFrame::Raised); _listView->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
_listView->setVScrollBarMode(QScrollView::AlwaysOff); _listView->setVScrollBarMode(TQScrollView::AlwaysOff);
_listView->setHScrollBarMode(QScrollView::AlwaysOff); _listView->setHScrollBarMode(TQScrollView::AlwaysOff);
_listView->header()->hide(); _listView->header()->hide();
updateListView(list); updateListView(list);
@ -47,7 +47,7 @@ KBiffStatus::KBiffStatus(QWidget *parent_, const QString& profile, const KBiffSt
_listView->setFixedSize(_listView->sizeHint().width() + 5, list_height); _listView->setFixedSize(_listView->sizeHint().width() + 5, list_height);
resize(_listView->size()); resize(_listView->size());
QVBoxLayout *blayout = new QVBoxLayout(this, 0, 0); TQVBoxLayout *blayout = new TQVBoxLayout(this, 0, 0);
blayout->addWidget(profile_label); blayout->addWidget(profile_label);
blayout->addWidget(_listView); blayout->addWidget(_listView);
} }
@ -64,20 +64,20 @@ void KBiffStatus::updateListView(const KBiffStatusList& list)
{ {
if (it.current()->newMessages() == "-1") if (it.current()->newMessages() == "-1")
{ {
new QListViewItem(_listView, it.current()->mailbox(), new TQListViewItem(_listView, it.current()->mailbox(),
i18n("Disabled")); i18n("Disabled"));
} }
else else
{ {
new QListViewItem(_listView, it.current()->mailbox(), new TQListViewItem(_listView, it.current()->mailbox(),
it.current()->newMessages(),it.current()->curMessages()); it.current()->newMessages(),it.current()->curMessages());
} }
} }
} }
void KBiffStatus::popup(const QPoint& pos_) void KBiffStatus::popup(const TQPoint& pos_)
{ {
QDesktopWidget *desktop = KApplication::desktop(); TQDesktopWidget *desktop = KApplication::desktop();
int cx = pos_.x(), cy = pos_.y(); int cx = pos_.x(), cy = pos_.y();
// for some reason, the width and height are incorrect until // for some reason, the width and height are incorrect until
@ -88,7 +88,7 @@ void KBiffStatus::popup(const QPoint& pos_)
// verify that the width is within the desktop // verify that the width is within the desktop
if (desktop->isVirtualDesktop()) if (desktop->isVirtualDesktop())
{ {
QRect scn = desktop->screenGeometry(QPoint(cx, cy)); TQRect scn = desktop->screenGeometry(TQPoint(cx, cy));
if ((pos_.x() + width()) > (scn.x() + scn.width())) if ((pos_.x() + width()) > (scn.x() + scn.width()))
{ {
@ -116,18 +116,18 @@ void KBiffStatus::popup(const QPoint& pos_)
move(cx, cy+1); move(cx, cy+1);
} }
KBiffStatusItem::KBiffStatusItem(const QString& mailbox_, const int num_new,const int num_cur) KBiffStatusItem::KBiffStatusItem(const TQString& mailbox_, const int num_new,const int num_cur)
: QObject(), : TQObject(),
_mailbox(mailbox_), _mailbox(mailbox_),
_newMessages(QString().setNum(num_new)), _newMessages(TQString().setNum(num_new)),
_curMessages((num_cur==-1)?QString("?"):QString().setNum(num_cur)) _curMessages((num_cur==-1)?TQString("?"):TQString().setNum(num_cur))
{ {
} }
KBiffStatusItem::KBiffStatusItem(const QString& mailbox_, const int num_new) KBiffStatusItem::KBiffStatusItem(const TQString& mailbox_, const int num_new)
: QObject(), : TQObject(),
_mailbox(mailbox_), _mailbox(mailbox_),
_newMessages(QString().setNum(num_new)), _newMessages(TQString().setNum(num_new)),
_curMessages(QString("?")) _curMessages(TQString("?"))
{ {
} }

@ -14,46 +14,46 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qframe.h> #include <ntqframe.h>
#include <qlist.h> #include <ntqlist.h>
#include <qstring.h> #include <ntqstring.h>
class QListView; class TQListView;
class QPoint; class TQPoint;
class KBiffStatusItem : QObject class KBiffStatusItem : TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffStatusItem(const QString& mailbox, const int num_new); KBiffStatusItem(const TQString& mailbox, const int num_new);
KBiffStatusItem(const QString& mailbox, const int num_new,const int num_cur); KBiffStatusItem(const TQString& mailbox, const int num_new,const int num_cur);
virtual ~KBiffStatusItem(); virtual ~KBiffStatusItem();
QString mailbox() const { return _mailbox; } TQString mailbox() const { return _mailbox; }
QString newMessages() const { return _newMessages; } TQString newMessages() const { return _newMessages; }
QString curMessages() const { return _curMessages; } TQString curMessages() const { return _curMessages; }
protected: protected:
QString _mailbox; TQString _mailbox;
QString _newMessages; TQString _newMessages;
QString _curMessages; TQString _curMessages;
}; };
typedef QList<KBiffStatusItem> KBiffStatusList; typedef TQList<KBiffStatusItem> KBiffStatusList;
typedef QListIterator<KBiffStatusItem> KBiffStatusListIterator; typedef TQListIterator<KBiffStatusItem> KBiffStatusListIterator;
class KBiffStatus : public QFrame class KBiffStatus : public TQFrame
{ {
Q_OBJECT Q_OBJECT
public: public:
KBiffStatus(QWidget *parent, const QString& profile, const KBiffStatusList& list); KBiffStatus(TQWidget *parent, const TQString& profile, const KBiffStatusList& list);
virtual ~KBiffStatus(); virtual ~KBiffStatus();
void updateListView(const KBiffStatusList& list); void updateListView(const KBiffStatusList& list);
void popup(const QPoint& pos); void popup(const TQPoint& pos);
protected: protected:
QListView *_listView; TQListView *_listView;
}; };
#endif // KBIFFSTATUS_H #endif // KBIFFSTATUS_H

Loading…
Cancel
Save