diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kexi/core | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'kexi/core')
-rw-r--r-- | kexi/core/kexi.cpp | 66 | ||||
-rw-r--r-- | kexi/core/kexi.h | 26 | ||||
-rw-r--r-- | kexi/core/kexiactionproxy.cpp | 6 | ||||
-rw-r--r-- | kexi/core/kexiactionproxy.h | 2 | ||||
-rw-r--r-- | kexi/core/kexiblobbuffer.cpp | 2 | ||||
-rw-r--r-- | kexi/core/kexicontexthelp.cpp | 2 | ||||
-rw-r--r-- | kexi/core/kexidbshortcutfile.cpp | 6 | ||||
-rw-r--r-- | kexi/core/kexidialogbase.cpp | 26 | ||||
-rw-r--r-- | kexi/core/kexidialogbase.h | 6 | ||||
-rw-r--r-- | kexi/core/kexiguimsghandler.cpp | 6 | ||||
-rw-r--r-- | kexi/core/kexiguimsghandler.h | 4 | ||||
-rw-r--r-- | kexi/core/kexiinternalpart.cpp | 6 | ||||
-rw-r--r-- | kexi/core/kexipart.cpp | 24 | ||||
-rw-r--r-- | kexi/core/kexipart.h | 4 | ||||
-rw-r--r-- | kexi/core/kexipartmanager.cpp | 4 | ||||
-rw-r--r-- | kexi/core/kexiproject.cpp | 30 | ||||
-rw-r--r-- | kexi/core/kexiprojectdata.cpp | 6 | ||||
-rw-r--r-- | kexi/core/kexisharedactionhost.cpp | 8 | ||||
-rw-r--r-- | kexi/core/kexisharedactionhost.h | 2 | ||||
-rw-r--r-- | kexi/core/kexiviewbase.cpp | 22 | ||||
-rw-r--r-- | kexi/core/kexiviewbase.h | 4 |
21 files changed, 131 insertions, 131 deletions
diff --git a/kexi/core/kexi.cpp b/kexi/core/kexi.cpp index e297ee52..24cd08e8 100644 --- a/kexi/core/kexi.cpp +++ b/kexi/core/kexi.cpp @@ -172,47 +172,47 @@ TQString Kexi::msgYouCanImproveData() { //-------------------------------------------------------------------------------- -ObjectStatus::ObjectStatus() +ObjecttqStatus::ObjecttqStatus() : msgHandler(0) { } -ObjectStatus::ObjectStatus(const TQString& message, const TQString& description) +ObjecttqStatus::ObjecttqStatus(const TQString& message, const TQString& description) : msgHandler(0) { - setStatus(message, description); + settqStatus(message, description); } -ObjectStatus::ObjectStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) +ObjecttqStatus::ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) : msgHandler(0) { - setStatus(dbObject, message, description); + settqStatus(dbObject, message, description); } -ObjectStatus::~ObjectStatus() +ObjecttqStatus::~ObjecttqStatus() { delete msgHandler; } -const ObjectStatus& ObjectStatus::status() const +const ObjecttqStatus& ObjecttqStatus::status() const { return *this; } -bool ObjectStatus::error() const +bool ObjecttqStatus::error() const { return !message.isEmpty() || (dynamic_cast<KexiDB::Object*>((TQObject*)dbObj) && dynamic_cast<KexiDB::Object*>((TQObject*)dbObj)->error()); } -void ObjectStatus::setStatus(const TQString& message, const TQString& description) +void ObjecttqStatus::settqStatus(const TQString& message, const TQString& description) { this->dbObj=0; this->message=message; this->description=description; } -void ObjectStatus::setStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) +void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) { if (dynamic_cast<TQObject*>(dbObject)) { dbObj = dynamic_cast<TQObject*>(dbObject); @@ -221,7 +221,7 @@ void ObjectStatus::setStatus(KexiDB::Object* dbObject, const TQString& message, this->description=description; } -void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description) +void ObjecttqStatus::settqStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description) { if (result) { if (message.isEmpty()) @@ -235,41 +235,41 @@ void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const TQString& message this->description = description + " " + result->desc; } else - clearStatus(); + cleartqStatus(); } -void ObjectStatus::setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, +void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, const TQString& message, const TQString& description) { if (!dbObject) - setStatus(result, message, description); + settqStatus(result, message, description); else if (!result) - setStatus(dbObject, message, description); + settqStatus(dbObject, message, description); else { - setStatus(dbObject, message, description); - setStatus(result, this->message, this->description); + settqStatus(dbObject, message, description); + settqStatus(result, this->message, this->description); } } -void ObjectStatus::clearStatus() +void ObjecttqStatus::cleartqStatus() { message=TQString(); description=TQString(); } -TQString ObjectStatus::singleStatusString() const { +TQString ObjecttqStatus::singleStatusString() const { if (message.isEmpty() || description.isEmpty()) return message; return message + " " + description; } -void ObjectStatus::append( const ObjectStatus& otherStatus ) { +void ObjecttqStatus::append( const ObjecttqStatus& othertqStatus ) { if (message.isEmpty()) { - message = otherStatus.message; - description = otherStatus.description; + message = othertqStatus.message; + description = othertqStatus.description; return; } - const TQString s( otherStatus.singleStatusString() ); + const TQString s( othertqStatus.singleStatusString() ); if (s.isEmpty()) return; if (description.isEmpty()) { @@ -283,7 +283,7 @@ void ObjectStatus::append( const ObjectStatus& otherStatus ) { class ObjectStatusMessageHandler : public KexiDB::MessageHandler { public: - ObjectStatusMessageHandler(ObjectStatus *status) + ObjectStatusMessageHandler(ObjecttqStatus *status) : KexiDB::MessageHandler() , m_status(status) { @@ -295,18 +295,18 @@ class ObjectStatusMessageHandler : public KexiDB::MessageHandler virtual void showErrorMessage(const TQString &title, const TQString &details = TQString()) { - m_status->setStatus(title, details); + m_status->settqStatus(title, details); } virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString()) { - m_status->setStatus(obj, msg); + m_status->settqStatus(obj, msg); } - ObjectStatus *m_status; + ObjecttqStatus *m_status; }; -ObjectStatus::operator KexiDB::MessageHandler*() +ObjecttqStatus::operator KexiDB::MessageHandler*() { if (!msgHandler) msgHandler = new ObjectStatusMessageHandler(this); @@ -330,14 +330,14 @@ void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text) TQString msg; if (feature_name.isEmpty()) msg = i18n("This function is not available for version %1 of %2 application.") - .arg(KEXI_VERSION_STRING) - .arg(KEXI_APP_NAME); + .tqarg(KEXI_VERSION_STRING) + .tqarg(KEXI_APP_NAME); else { TQString feature_name_(feature_name); msg = i18n("\"%1\" function is not available for version %2 of %3 application.") - .arg(feature_name_.replace("&","")) - .arg(KEXI_VERSION_STRING) - .arg(KEXI_APP_NAME); + .tqarg(feature_name_.replace("&","")) + .tqarg(KEXI_VERSION_STRING) + .tqarg(KEXI_APP_NAME); } TQString extra_text_(extra_text); diff --git a/kexi/core/kexi.h b/kexi/core/kexi.h index 5a6804a5..426854e6 100644 --- a/kexi/core/kexi.h +++ b/kexi/core/kexi.h @@ -87,43 +87,43 @@ namespace Kexi KEXICORE_EXPORT TQFont smallFont(TQWidget *init = 0); /*! Helper class for storing object status. */ - class KEXICORE_EXPORT ObjectStatus + class KEXICORE_EXPORT ObjecttqStatus { public: - ObjectStatus(); + ObjecttqStatus(); - ObjectStatus(const TQString& message, const TQString& description); + ObjecttqStatus(const TQString& message, const TQString& description); - ObjectStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description); + ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description); - ~ObjectStatus(); + ~ObjecttqStatus(); - const ObjectStatus& status() const; + const ObjecttqStatus& status() const; bool error() const; - void setStatus(const TQString& message, const TQString& description); + void settqStatus(const TQString& message, const TQString& description); //! Note: for safety, \a dbObject needs to be derived from TQObject, //! otherwise it won't be assigned - void setStatus(KexiDB::Object* dbObject, + void settqStatus(KexiDB::Object* dbObject, const TQString& message = TQString(), const TQString& description = TQString()); - void setStatus(KexiDB::ResultInfo* result, + void settqStatus(KexiDB::ResultInfo* result, const TQString& message = TQString(), const TQString& description = TQString()); - void setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, + void settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, const TQString& message = TQString(), const TQString& description = TQString()); - void clearStatus(); + void cleartqStatus(); TQString singleStatusString() const; - void append( const ObjectStatus& otherStatus ); + void append( const ObjecttqStatus& othertqStatus ); KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((TQObject*)dbObj); } - //! Helper returning pseudo handler that just updates this ObjectStatus object + //! Helper returning pseudo handler that just updates this ObjecttqStatus object //! by receiving a message operator KexiDB::MessageHandler*(); diff --git a/kexi/core/kexiactionproxy.cpp b/kexi/core/kexiactionproxy.cpp index 851a4d3a..49cbeb3b 100644 --- a/kexi/core/kexiactionproxy.cpp +++ b/kexi/core/kexiactionproxy.cpp @@ -193,7 +193,7 @@ bool KexiActionProxy::activateSharedAction(const char *action_name, bool alsoChe { TQPair<TQSignal*,bool> *p = m_signals[action_name]; if (!p || !p->second) { - //try in children... + //try in tqchildren... if (alsoCheckInChildren) { TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren ); for( ; it.current(); ++it ) { @@ -217,7 +217,7 @@ bool KexiActionProxy::isSupported(const char* action_name) const { TQPair<TQSignal*,bool> *p = m_signals[action_name]; if (!p) { - //not supported explicitly - try in children... + //not supported explicitly - try in tqchildren... if (m_focusedChild) return m_focusedChild->isSupported(action_name); TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren ); @@ -234,7 +234,7 @@ bool KexiActionProxy::isAvailable(const char* action_name, bool alsoCheckInChild { TQPair<TQSignal*,bool> *p = m_signals[action_name]; if (!p) { - //not supported explicitly - try in children... + //not supported explicitly - try in tqchildren... if (alsoCheckInChildren) { if (m_focusedChild) return m_focusedChild->isAvailable(action_name, alsoCheckInChildren); diff --git a/kexi/core/kexiactionproxy.h b/kexi/core/kexiactionproxy.h index 163efced..facb09b3 100644 --- a/kexi/core/kexiactionproxy.h +++ b/kexi/core/kexiactionproxy.h @@ -150,7 +150,7 @@ class KEXICORE_EXPORT KexiActionProxy /*! Adds \a child of this proxy. Children will receive activateSharedAction() event, If activateSharedAction() "event" is not consumed by the main proxy, - we start to iterate over proxy children (in unspecified order) to and call + we start to iterate over proxy tqchildren (in unspecified order) to and call activateSharedAction() on every child until one of them accept the "event". If proxy child is destroyed, it is automatically detached from its parent proxy. diff --git a/kexi/core/kexiblobbuffer.cpp b/kexi/core/kexiblobbuffer.cpp index aeb621c4..a4c57791 100644 --- a/kexi/core/kexiblobbuffer.cpp +++ b/kexi/core/kexiblobbuffer.cpp @@ -289,7 +289,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored) KexiDB::RowData rowData; tristate res = d->conn->querySingleRecord( schema, -// TQString::fromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=") +// TQString::tqfromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=") // +TQString::number(id), rowData); if (res!=true || rowData.size()<4) { diff --git a/kexi/core/kexicontexthelp.cpp b/kexi/core/kexicontexthelp.cpp index 4ec99e53..e806aaaf 100644 --- a/kexi/core/kexicontexthelp.cpp +++ b/kexi/core/kexicontexthelp.cpp @@ -23,7 +23,7 @@ #include <kapplication.h> #include <klocale.h> #include <kaction.h> -#include <layout.h> +#include <tqlayout.h> #include <kdebug.h> #include <kiconloader.h> diff --git a/kexi/core/kexidbshortcutfile.cpp b/kexi/core/kexidbshortcutfile.cpp index 01f0adb3..451eb66a 100644 --- a/kexi/core/kexidbshortcutfile.cpp +++ b/kexi/core/kexidbshortcutfile.cpp @@ -97,7 +97,7 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, TQString* _group d->isDatabaseShortcut = false; } else { - //ERR: i18n("No valid "type" field specified for section \"%1\": unknown value \"%2\".").arg(group).arg(type) + //ERR: i18n("No valid "type" field specified for section \"%1\": unknown value \"%2\".").tqarg(group).tqarg(type) return false; } @@ -194,9 +194,9 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data, groupPrefix = "Database%1"; //do not i18n! int number = 1; - while (config.hasGroup(groupPrefix.arg(number))) //a new group key couldn't exist + while (config.hasGroup(groupPrefix.tqarg(number))) //a new group key couldn't exist number++; - groupKey = groupPrefix.arg(number); + groupKey = groupPrefix.tqarg(number); } if (_groupKey) //return this one (generated or found) *_groupKey = groupKey; diff --git a/kexi/core/kexidialogbase.cpp b/kexi/core/kexidialogbase.cpp index 67e81a5d..ff642741 100644 --- a/kexi/core/kexidialogbase.cpp +++ b/kexi/core/kexidialogbase.cpp @@ -117,20 +117,20 @@ void KexiDialogBase::removeView(int mode) m_openedViewModes ^= mode; } -TQSize KexiDialogBase::minimumSizeHint() const +TQSize KexiDialogBase::tqminimumSizeHint() const { KexiViewBase *v = selectedView(); if (!v) - return KMdiChildView::minimumSizeHint(); - return v->minimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0); + return KMdiChildView::tqminimumSizeHint(); + return v->tqminimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0); } -TQSize KexiDialogBase::sizeHint() const +TQSize KexiDialogBase::tqsizeHint() const { KexiViewBase *v = selectedView(); if (!v) - return KMdiChildView::sizeHint(); - return v->preferredSizeHint( v->sizeHint() ); + return KMdiChildView::tqsizeHint(); + return v->preferredSizeHint( v->tqsizeHint() ); } /* @@ -377,9 +377,9 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, TQMap<TQString,TQStr delete newView; kdDebug() << "Switching to mode " << newViewMode << " failed. Previous mode " << prevViewMode << " restored." << endl; - const Kexi::ObjectStatus status(*this); - setStatus(mainWin()->project()->dbConnection(), - i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(newViewMode)),""); + const Kexi::ObjecttqStatus status(*this); + settqStatus(mainWin()->project()->dbConnection(), + i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(newViewMode)),""); append( status ); m_currentViewMode = prevViewMode; return false; @@ -517,7 +517,7 @@ tristate KexiDialogBase::storeNewData() if (cancel) return cancelled; if (!m_schemaData) { - setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),""); + settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),""); return false; } @@ -594,7 +594,7 @@ tristate KexiDialogBase::storeData(bool dontAsk) return false; #define storeData_ERR \ - setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),""); + settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),""); //save changes using transaction KexiDB::Transaction transaction = m_parentWindow->project()->dbConnection()->beginTransaction(); @@ -624,8 +624,8 @@ tristate KexiDialogBase::storeData(bool dontAsk) void KexiDialogBase::activate() { KexiViewBase *v = selectedView(); - //kdDebug() << "focusWidget(): " << focusWidget()->name() << endl; - if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//focusWidget())) + //kdDebug() << "tqfocusWidget(): " << tqfocusWidget()->name() << endl; + if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//tqfocusWidget())) KMdiChildView::activate(); else {//ah, focused widget is not in this view, move focus: if (v) diff --git a/kexi/core/kexidialogbase.h b/kexi/core/kexidialogbase.h index d98e9d04..6449004b 100644 --- a/kexi/core/kexidialogbase.h +++ b/kexi/core/kexidialogbase.h @@ -75,7 +75,7 @@ class KEXICORE_EXPORT KexiDialogTempData : public TQObject class KEXICORE_EXPORT KexiDialogBase : public KMdiChildView, public KexiActionProxy, - public Kexi::ObjectStatus + public Kexi::ObjecttqStatus { Q_OBJECT TQ_OBJECT @@ -101,10 +101,10 @@ class KEXICORE_EXPORT KexiDialogBase : // virtual TQWidget* mainWidget() = 0; /*! reimplemented: minimum size hint is inherited from currently visible view. */ - virtual TQSize minimumSizeHint() const; + virtual TQSize tqminimumSizeHint() const; /*! reimplemented: size hint is inherited from currently visible view. */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; KexiMainWindow *mainWin() const { return m_parentWindow; } diff --git a/kexi/core/kexiguimsghandler.cpp b/kexi/core/kexiguimsghandler.cpp index 5b2b2791..4121543e 100644 --- a/kexi/core/kexiguimsghandler.cpp +++ b/kexi/core/kexiguimsghandler.cpp @@ -77,13 +77,13 @@ void KexiGUIMessageHandler::showErrorMessage(const TQString &msg, const TQString } void -KexiGUIMessageHandler::showErrorMessage(Kexi::ObjectStatus *status) +KexiGUIMessageHandler::showErrorMessage(Kexi::ObjecttqStatus *status) { showErrorMessage("", status); } void -KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjectStatus *status) +KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status) { if (status && status->error()) { TQString msg(message); @@ -106,7 +106,7 @@ KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjectSta else { showErrorMessage(message); } - status->clearStatus(); + status->cleartqStatus(); } void diff --git a/kexi/core/kexiguimsghandler.h b/kexi/core/kexiguimsghandler.h index 362884dc..af407ab1 100644 --- a/kexi/core/kexiguimsghandler.h +++ b/kexi/core/kexiguimsghandler.h @@ -32,8 +32,8 @@ class KEXICORE_EXPORT KexiGUIMessageHandler : public KexiDB::MessageHandler virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString()); void showErrorMessage(const TQString&,const TQString&,KexiDB::Object *obj); - void showErrorMessage(Kexi::ObjectStatus *status); - void showErrorMessage(const TQString &message, Kexi::ObjectStatus *status); + void showErrorMessage(Kexi::ObjecttqStatus *status); + void showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status); /*! Displays a "Sorry" message with \a title text and optional \a details. */ void showSorryMessage(const TQString &title, const TQString &details = TQString()); diff --git a/kexi/core/kexiinternalpart.cpp b/kexi/core/kexiinternalpart.cpp index 49b3c46d..93d73cac 100644 --- a/kexi/core/kexiinternalpart.cpp +++ b/kexi/core/kexiinternalpart.cpp @@ -54,7 +54,7 @@ class KexiInternalPartManager fullname, 0, fullname); if (!part) { if (msgHdr) - msgHdr->showErrorMessage(i18n("Could not load \"%1\" plugin.").arg(partName)); + msgHdr->showErrorMessage(i18n("Could not load \"%1\" plugin.").tqarg(partName)); } else m_parts.insert(partName, part); @@ -118,8 +118,8 @@ KexiDialogBase* KexiInternalPart::findOrCreateKexiDialog( dlg->addView(view); dlg->setCaption( view->caption() ); dlg->setTabCaption( view->caption() ); - dlg->resize(view->sizeHint()); - dlg->setMinimumSize(view->minimumSizeHint().width(),view->minimumSizeHint().height()); + dlg->resize(view->tqsizeHint()); + dlg->setMinimumSize(view->tqminimumSizeHint().width(),view->tqminimumSizeHint().height()); dlg->setId( mainWin->generatePrivateID() ); dlg->registerDialog(); return dlg; diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp index 49f1aeab..ba54fea7 100644 --- a/kexi/core/kexipart.cpp +++ b/kexi/core/kexipart.cpp @@ -66,7 +66,7 @@ public: singleStatusString.prepend(TQString("\n\n")+i18n("Details:")+" "); if (KMessageBox::No==KMessageBox::questionYesNo(0, ((viewMode == Kexi::DesignViewMode) - ? i18n("Object \"%1\" could not be opened in Design View.").arg(item.name()) + ? i18n("Object \"%1\" could not be opened in Design View.").tqarg(item.name()) : i18n("Object could not be opened in Data View."))+"\n" + i18n("Do you want to open it in Text View?") + singleStatusString, 0, KStdGuiItem::open(), KStdGuiItem::cancel())) @@ -242,11 +242,11 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in d->instanceActionsInitialized = true; } - m_status.clearStatus(); + m_status.cleartqStatus(); // KexiDialogBase *dlg = createInstance(win,item,viewMode); // if (!dlg) // return 0; -// TQString capt = TQString("%1 : %2").arg(item.name()).arg(instanceName()); +// TQString capt = TQString("%1 : %2").tqarg(item.name()).tqarg(instanceName()); KexiDialogBase *dlg = new KexiDialogBase(win); dlg->m_supportedViewModes = m_supportedViewModes; // dlg->m_neverSaved = item.neverSaved(); @@ -289,11 +289,11 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in } if (!dlg->m_schemaData) { if (!m_status.error()) - m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(), + m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(), i18n("Could not load object's definition."), i18n("Object design may be corrupted.")); m_status.append( - Kexi::ObjectStatus(i18n("You can delete \"%1\" object and create it again.") - .arg(item.name()), TQString()) ); + Kexi::ObjecttqStatus(i18n("You can delete \"%1\" object and create it again.") + .tqarg(item.name()), TQString()) ); dlg->close(); delete dlg; @@ -339,9 +339,9 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in dlg->show(); if (dlg->mdiParent() && dlg->mdiParent()->state()==KMdiChildFrm::Normal) //only resize dialog if it is in normal state - dlg->resize(dlg->sizeHint()); + dlg->resize(dlg->tqsizeHint()); - dlg->setMinimumSize(dlg->minimumSizeHint().width(),dlg->minimumSizeHint().height()); + dlg->setMinimumSize(dlg->tqminimumSizeHint().width(),dlg->tqminimumSizeHint().height()); //dirty only if it's a new object if (dlg->selectedView()) @@ -366,8 +366,8 @@ KexiDB::SchemaData* Part::loadSchemaData(KexiDialogBase * /*dlg*/, const KexiDB: bool Part::loadDataBlock( KexiDialogBase *dlg, TQString &dataString, const TQString& dataID) { if (!dlg->mainWin()->project()->dbConnection()->loadDataBlock( dlg->id(), dataString, dataID )) { - m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(), - i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").arg(dataID) ); + m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(), + i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").tqarg(dataID) ); m_status.append( *dlg ); return false; } @@ -431,11 +431,11 @@ tristate Part::rename(KexiMainWindow *win, KexiPart::Item &item, const TQString& GUIClient::GUIClient(KexiMainWindow *win, Part* part, bool partInstanceClient, const char* nameSuffix) : TQObject(part, (part->info()->objectName() - + (nameSuffix ? TQString(":%1").arg(nameSuffix) : TQString())).latin1() ) + + (nameSuffix ? TQString(":%1").tqarg(nameSuffix) : TQString())).latin1() ) , KXMLGUIClient(win) { if(!win->project()->data()->userMode()) - setXMLFile(TQString::fromLatin1("kexi")+part->info()->objectName() + setXMLFile(TQString::tqfromLatin1("kexi")+part->info()->objectName() +"part"+(partInstanceClient?"inst":"")+"ui.rc"); // new KAction(part->m_names["new"], part->info()->itemIcon(), 0, this, diff --git a/kexi/core/kexipart.h b/kexi/core/kexipart.h index c448b8bf..f1168fd4 100644 --- a/kexi/core/kexipart.h +++ b/kexi/core/kexipart.h @@ -186,7 +186,7 @@ class KEXICORE_EXPORT Part : public TQObject /*! \return action collection for mode \a viewMode. */ KActionCollection* actionCollectionForMode(int viewMode) const; - const Kexi::ObjectStatus& lastOperationStatus() const { return m_status; } + const Kexi::ObjecttqStatus& lastOperationtqStatus() const { return m_status; } /*! \return i18n'd message translated from \a englishMessage. This method is useful for messages like: @@ -309,7 +309,7 @@ class KEXICORE_EXPORT Part : public TQObject GUIClient *m_guiClient; TQIntDict<GUIClient> m_instanceGuiClients; KexiMainWindow* m_mainWin; - Kexi::ObjectStatus m_status; + Kexi::ObjecttqStatus m_status; /*! If you're implementing a new part, set this to value >0 in your ctor if you have well known (ie registered ID) for your part. diff --git a/kexi/core/kexipartmanager.cpp b/kexi/core/kexipartmanager.cpp index d651f8d0..f6fcd7d8 100644 --- a/kexi/core/kexipartmanager.cpp +++ b/kexi/core/kexipartmanager.cpp @@ -131,7 +131,7 @@ Manager::part(Info *i) if(!p) { kdDebug() << "Manager::part(): failed :( (ERROR #" << error << ")" << endl; kdDebug() << " " << KLibLoader::self()->lastErrorMessage() << endl; - i->setBroken(true, i18n("Error while loading plugin \"%1\"").arg(i->objectName())); + i->setBroken(true, i18n("Error while loading plugin \"%1\"").tqarg(i->objectName())); setError(i->errorMessage()); return 0; } @@ -198,7 +198,7 @@ Manager::infoForMimeType(const TQString &mimeType) Info *i = mimeType.isEmpty() ? 0 : m_partsByMime[mimeType.latin1()]; if (i) return i; - setError(i18n("No plugin for mime type \"%1\"").arg(mimeType)); + setError(i18n("No plugin for mime type \"%1\"").tqarg(mimeType)); return 0; } diff --git a/kexi/core/kexiproject.cpp b/kexi/core/kexiproject.cpp index 1dbe4eef..159de750 100644 --- a/kexi/core/kexiproject.cpp +++ b/kexi/core/kexiproject.cpp @@ -180,7 +180,7 @@ KexiProject::openInternal(bool *incompatibleWithKexi) *incompatibleWithKexi = false; kdDebug() << "KexiProject::open(): " << d->data->databaseName() <<" "<< d->data->connectionData()->driverName << endl; KexiDB::MessageTitle et(this, - i18n("Could not open project \"%1\".").arg(d->data->databaseName())); + i18n("Could not open project \"%1\".").tqarg(d->data->databaseName())); if (!createConnection()) { kdDebug() << "KexiProject::open(): !createConnection()" << endl; @@ -225,7 +225,7 @@ tristate KexiProject::create(bool forceOverwrite) { KexiDB::MessageTitle et(this, - i18n("Could not create project \"%1\".").arg(d->data->databaseName())); + i18n("Could not create project \"%1\".").tqarg(d->data->databaseName())); if (!createConnection()) return false; @@ -381,10 +381,10 @@ bool KexiProject::createInternalStructures(bool insideTransaction) } // 2.1 copy data (insert 0's into o_folder_id column) if (!d->connection->executeSQL( - TQString::fromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) " + TQString::tqfromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) " "SELECT o_data, o_name, o_caption, o_mime, 0 FROM kexi__blobs") ) // 2.2 remove the original kexi__blobs - || !d->connection->executeSQL(TQString::fromLatin1("DROP TABLE kexi__blobs")) //lowlevel + || !d->connection->executeSQL(TQString::tqfromLatin1("DROP TABLE kexi__blobs")) //lowlevel // 2.3 rename the copy back into kexi__blobs || !d->connection->drv_alterTableName(*kexi__blobsCopy, "kexi__blobs") ) @@ -529,9 +529,9 @@ KexiProject::initProject() d->data->setDescription( str ); /* KexiDB::RowData data; TQString sql = "select db_value from kexi__db where db_property='%1'"; - if (d->connection->querySingleRecord( sql.arg("project_caption"), data ) && !data[0].toString().isEmpty()) + if (d->connection->querySingleRecord( sql.tqarg("project_caption"), data ) && !data[0].toString().isEmpty()) d->data->setCaption(data[0].toString()); - if (d->connection->querySingleRecord( sql.arg("project_desc"), data) && !data[0].toString().isEmpty()) + if (d->connection->querySingleRecord( sql.tqarg("project_desc"), data) && !data[0].toString().isEmpty()) d->data->setDescription(data[0].toString());*/ return true; @@ -735,10 +735,10 @@ KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, KexiPart::Item& ite return 0; KexiDialogBase *dlg = part->openInstance(wnd, item, viewMode, staticObjectArgs); if (!dlg) { - if (part->lastOperationStatus().error()) - setError(i18n("Opening object \"%1\" failed.").arg(item.name())+"<br>" - +part->lastOperationStatus().message, - part->lastOperationStatus().description); + if (part->lastOperationtqStatus().error()) + setError(i18n("Opening object \"%1\" failed.").tqarg(item.name())+"<br>" + +part->lastOperationtqStatus().message, + part->lastOperationtqStatus().description); return 0; } return dlg; @@ -817,13 +817,13 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const } if (this->itemForMimeType(item.mimeType(), newName)!=0) { setError( i18n("Could not use this name. Object with name \"%1\" already exists.") - .arg(newName) ); + .tqarg(newName) ); return false; } } KexiDB::MessageTitle et(this, - i18n("Could not rename object \"%1\".").arg(item.name()) ); + i18n("Could not rename object \"%1\".").tqarg(item.name()) ); if (!checkWritable()) return false; KexiPart::Part *part = findPartFor(item); @@ -835,7 +835,7 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const return false; } if (!part->rename(wnd, item, newName)) { - setError(part->lastOperationStatus().message, part->lastOperationStatus().description); + setError(part->lastOperationtqStatus().message, part->lastOperationtqStatus().description); return false; } if (!d->connection->executeSQL( "update kexi__objects set o_name=" @@ -960,7 +960,7 @@ KexiProject::createBlankProject(bool &cancelled, KexiProjectData* data, if (KMessageBox::Yes != KMessageBox::warningYesNo(0, "<qt>"+i18n( "The project %1 already exists.\n" "Do you want to replace it with a new, blank one?") - .arg(prj->data()->infoString())+"\n"+warningNoUndo+"</qt>", + .tqarg(prj->data()->infoString())+"\n"+warningNoUndo+"</qt>", TQString(), KGuiItem(i18n("Replace")), KStdGuiItem::cancel() )) //todo add serverInfoString() for server-based prj { @@ -985,7 +985,7 @@ tristate KexiProject::dropProject(KexiProjectData* data, KexiDB::MessageHandler* handler, bool dontAsk) { if (!dontAsk && KMessageBox::Yes != KMessageBox::warningYesNo(0, - i18n("Do you want to drop the project \"%1\"?").arg(data->KexiDB::SchemaData::objectName())+"\n"+warningNoUndo )) + i18n("Do you want to drop the project \"%1\"?").tqarg(data->KexiDB::SchemaData::objectName())+"\n"+warningNoUndo )) return cancelled; KexiProject prj( new KexiProjectData(*data), handler ); diff --git a/kexi/core/kexiprojectdata.cpp b/kexi/core/kexiprojectdata.cpp index 9b9203c8..9f0106bc 100644 --- a/kexi/core/kexiprojectdata.cpp +++ b/kexi/core/kexiprojectdata.cpp @@ -155,13 +155,13 @@ TQString KexiProjectData::infoString(bool nobr) const { if (constConnectionData()->fileName().isEmpty()) { //server-based - return TQString(nobr ? "<nobr>" : "") + TQString("\"%1\"").arg(databaseName()) + (nobr ? "</nobr>" : "") + return TQString(nobr ? "<nobr>" : "") + TQString("\"%1\"").tqarg(databaseName()) + (nobr ? "</nobr>" : "") + (nobr ? " <nobr>" : " ") + i18n("database connection", "(connection %1)") - .arg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : ""); + .tqarg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : ""); } //file-based return TQString(nobr ? "<nobr>" : "") - + TQString("\"%1\"").arg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : ""); + + TQString("\"%1\"").tqarg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : ""); } void KexiProjectData::setReadOnly(bool set) diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp index 1ba85265..6a696461 100644 --- a/kexi/core/kexisharedactionhost.cpp +++ b/kexi/core/kexisharedactionhost.cpp @@ -42,7 +42,7 @@ KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h void KexiSharedActionHostPrivate::slotAction(const TQString& act_id) { - TQWidget *w = host->focusWindow(); //focusWidget(); + TQWidget *w = host->focusWindow(); //tqfocusWidget(); // while (w && !w->inherits("KexiDialogBase") && !w->inherits("KexiDockBase")) // w = w->parentWidget(); @@ -111,7 +111,7 @@ void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool a }*/ if (!d) return; //sanity - TQWidget *fw = d->mainWin->focusWidget(); + TQWidget *fw = d->mainWin->tqfocusWidget(); while (fw && TQT_BASE_OBJECT(obj)!=TQT_BASE_OBJECT(fw)) fw = fw->parentWidget(); if (!fw) @@ -149,7 +149,7 @@ void KexiSharedActionHost::invalidateSharedActions(TQObject *o) KAction *a = *it; if (!insideDialogBase && d->mainWin->actionCollection()!=a->parentCollection()) { //o is not KexiDialogBase or its child: - // only invalidate action if it comes from mainwindow's KActionCollection + // only tqinvalidate action if it comes from mainwindow's KActionCollection // (thus part-actions are untouched when the focus is e.g. in the Property Editor) continue; } @@ -205,7 +205,7 @@ TQWidget* KexiSharedActionHost::focusWindow() TQWidget *aw = TQT_TQWIDGET(tqApp->activeWindow()); if (!aw) aw = d->mainWin; - fw = aw->focusWidget(); + fw = aw->tqfocusWidget(); } while (fw && !acceptsSharedActions(TQT_TQOBJECT(fw))) fw = fw->parentWidget(); diff --git a/kexi/core/kexisharedactionhost.h b/kexi/core/kexisharedactionhost.h index c7fcb181..91cc09f4 100644 --- a/kexi/core/kexisharedactionhost.h +++ b/kexi/core/kexisharedactionhost.h @@ -69,7 +69,7 @@ class KEXICORE_EXPORT KexiSharedActionHost */ virtual bool acceptsSharedActions(TQObject *o); - /*! \return window widget that is currently focused (using TQWidget::focusWidget()) + /*! \return window widget that is currently focused (using TQWidget::tqfocusWidget()) and matches acceptsSharedActions(). If focused widget does not match, it's parent, grandparent, and so on is checked. If all this fails, or no widget has focus, NULL is returned. diff --git a/kexi/core/kexiviewbase.cpp b/kexi/core/kexiviewbase.cpp index 65f2e68f..e89f4a4e 100644 --- a/kexi/core/kexiviewbase.cpp +++ b/kexi/core/kexiviewbase.cpp @@ -214,26 +214,26 @@ bool KexiViewBase::eventFilter( TQObject *o, TQEvent *e ) { if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) {// && o->inherits(TQWIDGET_OBJECT_NAME_STRING)) { // //hp==true if currently focused widget is a child of this table view -// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), focusWidget()); +// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), tqfocusWidget()); // kexidbg << "KexiViewBase::eventFilter(): " << o->name() << " " << e->type() << endl; if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(o))) { - if (e->type()==TQEvent::FocusOut && focusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(focusWidget()))) { + if (e->type()==TQEvent::FocusOut && tqfocusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) { //focus out: when currently focused widget is not a parent of this view emit focus(false); } else if (e->type()==TQEvent::FocusIn) { emit focus(true); } - if (e->type()==TQEvent::FocusOut) { // && focusWidget() && Kexi::hasParent( this, focusWidget())) { // && focusWidget()->inherits("KexiViewBase")) { -// kdDebug() << focusWidget()->className() << " " << focusWidget()->name()<< endl; + if (e->type()==TQEvent::FocusOut) { // && tqfocusWidget() && Kexi::hasParent( this, tqfocusWidget())) { // && tqfocusWidget()->inherits("KexiViewBase")) { +// kdDebug() << tqfocusWidget()->className() << " " << tqfocusWidget()->name()<< endl; // kdDebug() << o->className() << " " << o->name()<< endl; KexiViewBase *v = KexiUtils::findParent<KexiViewBase>(o, "KexiViewBase") ; -// TQWidget *www=v->focusWidget(); +// TQWidget *www=v->tqfocusWidget(); if (v) { while (v->m_parentView) v = v->m_parentView; - if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(v->focusWidget()) )) - v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(v->focusWidget()); -// v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(o); //focusWidget(); + if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(v->tqfocusWidget()) )) + v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(v->tqfocusWidget()); +// v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(o); //tqfocusWidget(); } } @@ -263,7 +263,7 @@ void KexiViewBase::setViewWidget(TQWidget* w, bool focusProxy) void KexiViewBase::addChildView( KexiViewBase* childView ) { - m_children.append( childView ); + m_tqchildren.append( childView ); addActionProxyChild( childView ); childView->m_parentView = this; // if (m_parentView) @@ -318,8 +318,8 @@ void KexiViewBase::setAvailable(const char* action_name, bool set) void KexiViewBase::updateActions(bool activated) { //do nothing here - //do the same for children :) - for (TQPtrListIterator<KexiViewBase> it(m_children); it.current(); ++it) { + //do the same for tqchildren :) + for (TQPtrListIterator<KexiViewBase> it(m_tqchildren); it.current(); ++it) { it.current()->updateActions(activated); } } diff --git a/kexi/core/kexiviewbase.h b/kexi/core/kexiviewbase.h index 564f5a20..139f0b2d 100644 --- a/kexi/core/kexiviewbase.h +++ b/kexi/core/kexiviewbase.h @@ -71,7 +71,7 @@ class KEXICORE_EXPORT KexiViewBase : public TQWidget, public KexiActionProxy /*! \return preferred size hint, that can be used to resize the view. It is computed using maximum of (a) \a otherSize and (b) current KMDI dock area's size, - so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::sizeHint(). + so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::tqsizeHint(). If you reimplement this method, do not forget to return value of yoursize.boundedTo( KexiViewBase::preferredSizeHint(otherSize) ). */ virtual TQSize preferredSizeHint(const TQSize& otherSize); @@ -270,7 +270,7 @@ class KEXICORE_EXPORT KexiViewBase : public TQWidget, public KexiActionProxy Can be useful when single class is used for more than one view (e.g. KexiDBForm). */ int m_viewMode; - TQPtrList<KexiViewBase> m_children; + TQPtrList<KexiViewBase> m_tqchildren; bool m_dirty : 1; |