diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/gui/urlfieldwidget.cpp | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/urlfieldwidget.cpp')
-rw-r--r-- | src/gui/urlfieldwidget.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/urlfieldwidget.cpp b/src/gui/urlfieldwidget.cpp index f3c2afd..3c7c720 100644 --- a/src/gui/urlfieldwidget.cpp +++ b/src/gui/urlfieldwidget.cpp @@ -25,26 +25,26 @@ using Tellico::GUI::URLFieldWidget; // subclass of KURLCompletion is needed so the KURLLabel // can open relative links. I don't want to have to have to update // the base directory of the completion every time a new document is opened -QString URLFieldWidget::URLCompletion::makeCompletion(const QString& text_) { +TQString URLFieldWidget::URLCompletion::makeCompletion(const TQString& text_) { // KURLCompletion::makeCompletion() uses an internal variable instead // of calling KURLCompletion::dir() so need to set the base dir before completing setDir(Kernel::self()->URL().directory()); return KURLCompletion::makeCompletion(text_); } -URLFieldWidget::URLFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/) - : FieldWidget(field_, parent_, name_), m_run(0) { +URLFieldWidget::URLFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/) + : FieldWidget(field_, tqparent_, name_), m_run(0) { m_requester = new KURLRequester(this); m_requester->lineEdit()->setCompletionObject(new URLCompletion()); m_requester->lineEdit()->setAutoDeleteCompletionObject(true); - connect(m_requester, SIGNAL(textChanged(const QString&)), SIGNAL(modified())); - connect(m_requester, SIGNAL(textChanged(const QString&)), label(), SLOT(setURL(const QString&))); - connect(label(), SIGNAL(leftClickedURL(const QString&)), SLOT(slotOpenURL(const QString&))); + connect(m_requester, TQT_SIGNAL(textChanged(const TQString&)), TQT_SIGNAL(modified())); + connect(m_requester, TQT_SIGNAL(textChanged(const TQString&)), label(), TQT_SLOT(setURL(const TQString&))); + connect(label(), TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(slotOpenURL(const TQString&))); registerWidget(); // special case, remember if it's a relative url - m_isRelative = field_->property(QString::fromLatin1("relative")) == Latin1Literal("true"); + m_isRelative = field_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true"); } URLFieldWidget::~URLFieldWidget() { @@ -53,7 +53,7 @@ URLFieldWidget::~URLFieldWidget() { } } -QString URLFieldWidget::text() const { +TQString URLFieldWidget::text() const { if(m_isRelative) { return KURL::relativeURL(Kernel::self()->URL(), m_requester->url()); } @@ -63,7 +63,7 @@ QString URLFieldWidget::text() const { return KURL(m_requester->url()).url(); } -void URLFieldWidget::setText(const QString& text_) { +void URLFieldWidget::setText(const TQString& text_) { blockSignals(true); m_requester->blockSignals(true); @@ -80,10 +80,10 @@ void URLFieldWidget::clear() { } void URLFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) { - m_isRelative = newField_->property(QString::fromLatin1("relative")) == Latin1Literal("true"); + m_isRelative = newField_->property(TQString::tqfromLatin1("relative")) == Latin1Literal("true"); } -void URLFieldWidget::slotOpenURL(const QString& url_) { +void URLFieldWidget::slotOpenURL(const TQString& url_) { if(url_.isEmpty()) { return; } @@ -91,7 +91,7 @@ void URLFieldWidget::slotOpenURL(const QString& url_) { m_run = new KRun(KURL(Kernel::self()->URL(), url_)); } -QWidget* URLFieldWidget::widget() { +TQWidget* URLFieldWidget::widget() { return m_requester; } |