From 7af884d886e2428d5b28e9cf7d81c97d7e378123 Mon Sep 17 00:00:00 2001 From: samelian Date: Sun, 16 Jan 2011 14:35:51 +0000 Subject: [kdewebdev/quanta] fix deprecation warnings; make compatible with QT_NO_ASCII_CAST flag git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1214823 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/treeviews/basetreeview.cpp | 2 +- quanta/treeviews/projecttreeview.cpp | 4 ++-- quanta/treeviews/projecttreeview.h | 1 - quanta/treeviews/scripttreeview.cpp | 3 +-- quanta/treeviews/tagattributetree.cpp | 6 +++--- quanta/treeviews/templatestreeview.cpp | 8 ++++---- 6 files changed, 11 insertions(+), 13 deletions(-) (limited to 'quanta/treeviews') diff --git a/quanta/treeviews/basetreeview.cpp b/quanta/treeviews/basetreeview.cpp index c7f65b22..952badbe 100644 --- a/quanta/treeviews/basetreeview.cpp +++ b/quanta/treeviews/basetreeview.cpp @@ -437,7 +437,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg) TQFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info")); TQVBoxLayout *topLayout = new TQVBoxLayout( quantaFilePage); - quantaFileProperties = new FileInfoDlg( quantaFilePage, i18n("Quanta") ); + quantaFileProperties = new FileInfoDlg( quantaFilePage, i18n("Quanta").ascii() ); int fsize,fimgsize=0; int ct=0,imgct=0,position=0; diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp index 0b28e246..205e5bf0 100644 --- a/quanta/treeviews/projecttreeview.cpp +++ b/quanta/treeviews/projecttreeview.cpp @@ -188,7 +188,7 @@ ProjectTreeView::~ProjectTreeView(){ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url) { TQString m_projectNameStr = m_projectName+" "; - if (m_projectName) + if (!m_projectName.isEmpty()) { if (url.protocol() == "file") { @@ -212,7 +212,7 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url) this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*))); addBranch(m_projectDir); m_projectDir->urlList = m_projectFiles; // set list for filter - if (m_projectName) + if (!m_projectName.isEmpty()) m_projectDir->populate(m_projectDir->rootUrl(), m_projectDir->root()); else m_projectDir->root()->setEnabled(false); diff --git a/quanta/treeviews/projecttreeview.h b/quanta/treeviews/projecttreeview.h index e0235d30..463f660c 100644 --- a/quanta/treeviews/projecttreeview.h +++ b/quanta/treeviews/projecttreeview.h @@ -22,7 +22,6 @@ #include "basetreeview.h" //#include "projecturl.h" -class KIO::Job; class FileInfoDlg; class ProjectList; diff --git a/quanta/treeviews/scripttreeview.cpp b/quanta/treeviews/scripttreeview.cpp index 896ed243..2e7959bf 100644 --- a/quanta/treeviews/scripttreeview.cpp +++ b/quanta/treeviews/scripttreeview.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -270,7 +269,7 @@ void ScriptTreeView::slotSendScriptInMail() TQStringList attachmentFile; attachmentFile += createScriptTarball(); - TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send script in email")); + TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send script in email").ascii() ); TQString toStr; TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n"); TQString titleStr; diff --git a/quanta/treeviews/tagattributetree.cpp b/quanta/treeviews/tagattributetree.cpp index 565c5a4c..9ea6fc40 100644 --- a/quanta/treeviews/tagattributetree.cpp +++ b/quanta/treeviews/tagattributetree.cpp @@ -461,17 +461,17 @@ EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char attrTree->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 ); - nodeName = new TQLabel(this, i18n( "Node Name" )); + nodeName = new TQLabel(this, i18n( "Node Name" ).ascii()); nodeName->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) ); widgetLayout->addWidget( nodeName, 0, 0 ); - deleteTag = new KPushButton(this, i18n( "Delete Tag" )); + deleteTag = new KPushButton(this, i18n( "Delete Tag" ).ascii()); deleteTag->setPixmap(SmallIcon("editdelete")); deleteTag->setMaximumHeight(32); deleteTag->setMaximumWidth(32); TQToolTip::add(deleteTag, i18n("Delete the current tag only.")); - deleteAll = new KPushButton(this, i18n( "Delete All" )); + deleteAll = new KPushButton(this, i18n( "Delete All" ).ascii()); deleteAll->setPixmap(SmallIcon("editdelete")); deleteAll->setMaximumHeight(32); deleteAll->setMaximumWidth(32); diff --git a/quanta/treeviews/templatestreeview.cpp b/quanta/treeviews/templatestreeview.cpp index 0b9973e8..f1eaca73 100644 --- a/quanta/treeviews/templatestreeview.cpp +++ b/quanta/treeviews/templatestreeview.cpp @@ -259,7 +259,7 @@ void TemplatesTreeView::slotMenu(KListView*, TQListViewItem *item, const TQPoint return; } setSelected(item, true); - bool hasProject = m_projectName; + bool hasProject = !m_projectName.isEmpty(); m_folderMenu->setItemVisible(m_insertFolderInProject, hasProject); m_fileMenu->setItemVisible(m_insertFileInProject, hasProject); @@ -373,7 +373,7 @@ void TemplatesTreeView::slotOpen() /** No descriptions */ void TemplatesTreeView::slotNewDir() { - NewTemplateDirDlg *createDirDlg = new NewTemplateDirDlg(this,i18n("Create New Template Folder")); + NewTemplateDirDlg *createDirDlg = new NewTemplateDirDlg(this,i18n("Create New Template Folder").ascii()); createDirDlg->typesCombo->insertItem(typeToi18n["text/all"]); createDirDlg->typesCombo->insertItem(typeToi18n["file/all"]); createDirDlg->typesCombo->insertItem(typeToi18n["template/all"]); @@ -564,7 +564,7 @@ void TemplatesTreeView::slotProperties() //Always add the Quanta directory page TQFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template")); TQVBoxLayout *topLayout = new TQVBoxLayout( quantaDirPage); - m_quantaProperties = new QuantaPropertiesPage( quantaDirPage, i18n("Quanta") ); + m_quantaProperties = new QuantaPropertiesPage( quantaDirPage, i18n("Quanta").ascii() ); m_quantaProperties->typesCombo->insertItem(typeToi18n["text/all"]); m_quantaProperties->typesCombo->insertItem(typeToi18n["file/all"]); @@ -982,7 +982,7 @@ void TemplatesTreeView::slotSendInMail() TQStringList attachmentFile; attachmentFile += createTemplateTarball(); - TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send template in email")); + TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send template in email").ascii() ); TQString toStr; TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n"); TQString titleStr; -- cgit v1.2.1