summaryrefslogtreecommitdiffstats
path: root/quanta/src/quantadoc.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/src/quantadoc.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/src/quantadoc.cpp')
-rw-r--r--quanta/src/quantadoc.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp
index 31fb795b..51729fb6 100644
--- a/quanta/src/quantadoc.cpp
+++ b/quanta/src/quantadoc.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-// include files for Qt
+// include files for TQt
#include <tqdir.h>
#include <tqfileinfo.h>
#include <tqwidget.h>
@@ -76,7 +76,7 @@
#include "tagactionmanager.h"
#include "tagactionset.h"
-QuantaDoc::QuantaDoc(TQWidget *parent, const char *name) : TQObject(parent, name)
+QuantaDoc::QuantaDoc(TQWidget *tqparent, const char *name) : TQObject(tqparent, name)
{
fileWatcher = new KDirWatch(this);
@@ -132,7 +132,7 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting )
else // select opened
if (switchToExisting)
{
- view->document()->checkDirtyStatus();
+ view->document()->checkDirtytqStatus();
if (view != ViewManager::ref()->activeView())
{
view->activate();
@@ -147,7 +147,7 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting )
void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding,
bool switchToExisting, bool readOnly)
{
- bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
+ bool idleTimertqStatus = quantaApp->slotEnableIdleTimer(false);
KURL url = urlToOpen;
if (url.isLocalFile())
{
@@ -158,7 +158,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding,
TQString encoding = a_encoding;
if (!newDocument(url, switchToExisting))
{
- quantaApp->slotEnableIdleTimer(idleTimerStatus);
+ quantaApp->slotEnableIdleTimer(idleTimertqStatus);
return;
}
Document *w = ViewManager::ref()->activeDocument();
@@ -171,7 +171,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding,
}
if (!url.isEmpty())
{
- if (QExtFileInfo::exists(url, true, quantaApp))
+ if (TQExtFileInfo::exists(url, true, quantaApp))
{
if (encoding.isEmpty())
encoding = quantaApp->defaultEncoding();
@@ -211,23 +211,23 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding,
highlightIf->setHlMode(htmlIdx);
}
}
- emit newStatus();
+ emit newtqStatus();
}
- quantaApp->slotEnableIdleTimer(idleTimerStatus);
+ quantaApp->slotEnableIdleTimer(idleTimertqStatus);
}
void QuantaDoc::slotOpeningFailed(const KURL &url)
{
Q_UNUSED(url);
- bool signalStatus = signalsBlocked();
+ bool signaltqStatus = signalsBlocked();
blockSignals(false);
emit hideSplash();
//Seems to be not needed anymore since KDE 3.2, but keep until it's completely verified
/*
- KMessageBox::error(quantaApp, i18n("<qt>Cannot open document <b>%1</b>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)));
+ KMessageBox::error(quantaApp, i18n("<qt>Cannot open document <b>%1</b>.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol)));
*/
ViewManager::ref()->removeActiveView();
- blockSignals(signalStatus);
+ blockSignals(signaltqStatus);
}
void QuantaDoc::slotOpeningCompleted(const KURL &url)
@@ -240,10 +240,10 @@ void QuantaDoc::slotOpeningCompleted(const KURL &url)
quantaApp->reparse(true);
if (url.isLocalFile())
quantaApp->debugger()->fileOpened(url.prettyURL(0, KURL::StripFileProtocol));
- quantaApp->slotNewStatus();
+ quantaApp->slotNewtqStatus();
quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
Project::ref()->loadCursorPosition(w->url(), dynamic_cast<KTextEditor::ViewCursorInterface*>(w->view()));
- emit eventHappened("after_open", url.url(), TQString::null);
+ emit eventHappened("after_open", url.url(), TQString());
bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name);
quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag);
@@ -272,7 +272,7 @@ void QuantaDoc::slotAttribPopup()
if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) )
{
- TQString caption = i18n("Attributes of <%1>").arg(tagName);
+ TQString caption = i18n("Attributes of <%1>").tqarg(tagName);
attribMenu->insertTitle( caption );
AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName );
@@ -281,23 +281,23 @@ void QuantaDoc::slotAttribPopup()
{
name = list->at(i)->name;
attribMenu->insertItem( name , i);//list->findIndex(*item) );
- if (attrList.contains(name.ascii()))
+ if (attrList.tqcontains(name.ascii()))
{
attribMenu->setItemEnabled( i , false );
}
menuId++;
}
- QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
+ TQTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
TQPopupMenu* popUpMenu = new TQPopupMenu(attribMenu, (*it).latin1());
- AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
+ AttributeList *attrs = qtag->tqparentDTD->commonAttrs->tqfind(*it);
for (uint j = 0; j < attrs->count(); j++)
{
name = attrs->at(j)->name;
popUpMenu->insertItem(name, ++menuId);
- if (attrList.contains(name.ascii()))
+ if (attrList.tqcontains(name.ascii()))
{
popUpMenu->setItemEnabled( menuId , false );
}
@@ -317,7 +317,7 @@ void QuantaDoc::slotAttribPopup()
}
}
else {
- TQString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").tqarg(tagName);
quantaApp->slotStatusMsg( message );
}
}
@@ -345,10 +345,10 @@ void QuantaDoc::slotInsertAttrib( int id )
attrStr = list->at(id)->name;
} else
{
- QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
+ TQTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
- AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
+ AttributeList *attrs = qtag->tqparentDTD->commonAttrs->tqfind(*it);
menuId += attrs->count();
if (id <= menuId)
{