summaryrefslogtreecommitdiffstats
path: root/knewsticker/newssourcedlgimpl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /knewsticker/newssourcedlgimpl.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knewsticker/newssourcedlgimpl.cpp')
-rw-r--r--knewsticker/newssourcedlgimpl.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/knewsticker/newssourcedlgimpl.cpp b/knewsticker/newssourcedlgimpl.cpp
index 03704155..3c8df5e9 100644
--- a/knewsticker/newssourcedlgimpl.cpp
+++ b/knewsticker/newssourcedlgimpl.cpp
@@ -25,8 +25,8 @@
#include <tqtimer.h>
#include <tqvbox.h>
-SuggestProgressDlg::SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name)
- : KDialogBase(parent, name, true, i18n("Downloading Data"), Cancel, Cancel),
+SuggestProgressDlg::SuggestProgressDlg(const KURL &url, TQWidget *tqparent, const char *name)
+ : KDialogBase(tqparent, name, true, i18n("Downloading Data"), Cancel, Cancel),
m_gotSourceFile(false),
m_gotIcon(false)
{
@@ -54,9 +54,9 @@ SuggestProgressDlg::SuggestProgressDlg(const KURL &url, TQWidget *parent, const
this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
KURL u = url;
if (url.isLocalFile())
- u = TQString::null;
+ u = TQString();
else
- u.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico"));
+ u.setEncodedPathAndQuery(TQString::tqfromLatin1("/favicon.ico"));
NewsIconMgr::self()->getIcon(u);
}
@@ -95,8 +95,8 @@ void SuggestProgressDlg::slotGotIcon(const KURL &url, const TQPixmap &pixmap)
done(m_succeeded ? TQDialog::Accepted : TQDialog::Rejected);
}
-NewsSourceDlgImpl::NewsSourceDlgImpl(TQWidget *parent, const char *name, bool modal, WFlags fl)
- : NewsSourceDlg(parent, name, modal, fl),
+NewsSourceDlgImpl::NewsSourceDlgImpl(TQWidget *tqparent, const char *name, bool modal, WFlags fl)
+ : NewsSourceDlg(tqparent, name, modal, fl),
m_modified(false)
{
connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
@@ -138,12 +138,12 @@ void NewsSourceDlgImpl::slotOkClicked()
KURL iconURL ( leIcon->text() );
if (iconURL.protocol().isEmpty())
- if (iconURL.host().startsWith(TQString::fromLatin1("ftp.")))
- iconURL.setProtocol(TQString::fromLatin1("ftp"));
- else if (iconURL.host().startsWith(TQString::fromLatin1("www.")))
- iconURL.setProtocol(TQString::fromLatin1("http"));
+ if (iconURL.host().startsWith(TQString::tqfromLatin1("ftp.")))
+ iconURL.setProtocol(TQString::tqfromLatin1("ftp"));
+ else if (iconURL.host().startsWith(TQString::tqfromLatin1("www.")))
+ iconURL.setProtocol(TQString::tqfromLatin1("http"));
else
- iconURL.setProtocol(TQString::fromLatin1("file"));
+ iconURL.setProtocol(TQString::tqfromLatin1("file"));
NewsSourceBase::Data nsd(leName->text(), url.url(), iconURL.url(), subject,
sbMaxArticles->value(), true, cbProgram->isChecked());
@@ -191,8 +191,8 @@ void NewsSourceDlgImpl::setup(const NewsSourceBase::Data &nsd, bool modify)
comboCategory->setCurrentItem(nsd.subject);
sbMaxArticles->setValue(nsd.maxArticles);
KURL iconURL ( nsd.icon );
- if (iconURL.protocol() == TQString::fromLatin1("file"))
- iconURL.setProtocol(TQString::null);
+ if (iconURL.protocol() == TQString::tqfromLatin1("file"))
+ iconURL.setProtocol(TQString());
leIcon->setText(iconURL.url());
NewsIconMgr::self()->getIcon(iconURL);
if (modify == true) {
@@ -205,10 +205,10 @@ KURL NewsSourceDlgImpl::polishedURL(const KURL &url) const
KURL newURL = url;
if (url.protocol().isEmpty())
- if (url.url().startsWith(TQString::fromLatin1("ftp")))
- newURL = TQString::fromLatin1("ftp://") + url.url();
+ if (url.url().startsWith(TQString::tqfromLatin1("ftp")))
+ newURL = TQString::tqfromLatin1("ftp://") + url.url();
else
- newURL = TQString::fromLatin1("http://") + url.url();
+ newURL = TQString::tqfromLatin1("http://") + url.url();
return newURL;
}
@@ -222,7 +222,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url)
return false;
}
- if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == TQString::fromLatin1("/")) {
+ if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == TQString::tqfromLatin1("/")) {
KMessageBox::error(this, i18n("KNewsTicker needs a valid RDF or RSS file to"
" suggest sensible values. The specified source file is invalid."),
i18n("Invalid Source File"));