diff options
Diffstat (limited to 'klinkstatus/src/ui/klshistorycombo.cpp')
-rw-r--r-- | klinkstatus/src/ui/klshistorycombo.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp index 36deb385..10fc7900 100644 --- a/klinkstatus/src/ui/klshistorycombo.cpp +++ b/klinkstatus/src/ui/klshistorycombo.cpp @@ -24,7 +24,7 @@ bool KLSHistoryCombo::items_saved_ = false; -KLSHistoryCombo::KLSHistoryCombo(QWidget *parent, const char *name) +KLSHistoryCombo::KLSHistoryCombo(TQWidget *parent, const char *name) : KHistoryCombo(parent, name) { setMaxCount(KLSConfig::maxCountComboUrl()); @@ -32,8 +32,8 @@ KLSHistoryCombo::KLSHistoryCombo(QWidget *parent, const char *name) setDuplicatesEnabled(false); setAutoCompletion(false); - connect(this, SIGNAL(activated(const QString& )), - this, SLOT(addToHistory(const QString& ))); + connect(this, TQT_SIGNAL(activated(const TQString& )), + this, TQT_SLOT(addToHistory(const TQString& ))); } KLSHistoryCombo::~KLSHistoryCombo() @@ -49,7 +49,7 @@ void KLSHistoryCombo::saveItems() if(items_saved_) return; - QStringList items = historyItems(); + TQStringList items = historyItems(); KLSConfig::setComboUrlHistory(items); KLSConfig::writeConfig(); @@ -61,7 +61,7 @@ void KLSHistoryCombo::loadItems() { clear(); - QStringList items = KLSConfig::comboUrlHistory(); + TQStringList items = KLSConfig::comboUrlHistory(); bool block = signalsBlocked(); blockSignals( true ); @@ -74,17 +74,17 @@ void KLSHistoryCombo::loadItems() setCompletionMode(KGlobalSettings::completionMode()); } -bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev ) +bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev ) { // Handle Ctrl+Del/Backspace etc better than the Qt widget, which always // jumps to the next whitespace. - QLineEdit *edit = lineEdit(); + TQLineEdit *edit = lineEdit(); if ( o == edit ) { int type = ev->type(); - if ( type == QEvent::KeyPress ) + if ( type == TQEvent::KeyPress ) { - QKeyEvent *e = static_cast<QKeyEvent *>( ev ); + TQKeyEvent *e = static_cast<TQKeyEvent *>( ev ); if ( e->key() == Key_Return || e->key() == Key_Enter ) { @@ -106,7 +106,7 @@ bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev ) } } - else if ( type == QEvent::MouseButtonDblClick ) + else if ( type == TQEvent::MouseButtonDblClick ) { edit->selectAll(); return true; @@ -121,17 +121,17 @@ bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev ) the next [/#?:], which makes more sense for URLs. The list of chars that will stop the cursor are '/', '.', '?', '#', ':'. */ -void KLSHistoryCombo::selectWord(QKeyEvent *e) +void KLSHistoryCombo::selectWord(TQKeyEvent *e) { - QLineEdit* edit = lineEdit(); - QString text = edit->text(); + TQLineEdit* edit = lineEdit(); + TQString text = edit->text(); int pos = edit->cursorPosition(); int pos_old = pos; int count = 0; // TODO: make these a parameter when in kdelibs/kdeui... - QValueList<QChar> chars; - chars << QChar('/') << QChar('.') << QChar('?') << QChar('#') << QChar(':'); + TQValueList<TQChar> chars; + chars << TQChar('/') << TQChar('.') << TQChar('?') << TQChar('#') << TQChar(':'); bool allow_space_break = true; if( e->key() == Key_Left || e->key() == Key_Backspace ) @@ -152,9 +152,9 @@ void KLSHistoryCombo::selectWord(QKeyEvent *e) else if( e->key() == Key_Backspace ) { edit->cursorForward(false, 1-count); - QString text = edit->text(); + TQString text = edit->text(); int pos_to_right = edit->text().length() - pos_old; - QString cut = text.left(edit->cursorPosition()) + text.right(pos_to_right); + TQString cut = text.left(edit->cursorPosition()) + text.right(pos_to_right); edit->setText(cut); edit->setCursorPosition(pos_old-count+1); } @@ -181,10 +181,10 @@ void KLSHistoryCombo::selectWord(QKeyEvent *e) else if( e->key() == Key_Delete ) { edit->cursorForward(false, -count-1); - QString text = edit->text(); + TQString text = edit->text(); int pos_to_right = text.length() - pos - 1; - QString cut = text.left(pos_old) + - (pos_to_right > 0 ? text.right(pos_to_right) : QString() ); + TQString cut = text.left(pos_old) + + (pos_to_right > 0 ? text.right(pos_to_right) : TQString() ); edit->setText(cut); edit->setCursorPosition(pos_old); } |