diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
commit | 94844816550ad672ccfcdc25659c625546239998 (patch) | |
tree | e35fc60fd736c645d59f6408af032774ad8023d3 /kexi/core | |
parent | 2a811c38c74c03648ecf857e566c44483cbad706 (diff) | |
download | koffice-94844816550ad672ccfcdc25659c625546239998.tar.gz koffice-94844816550ad672ccfcdc25659c625546239998.zip |
Rename a number of old tq methods that are no longer tq specific
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 24cd08e8..e297ee52 100644 --- a/kexi/core/kexi.cpp +++ b/kexi/core/kexi.cpp @@ -172,47 +172,47 @@ TQString Kexi::msgYouCanImproveData() { //-------------------------------------------------------------------------------- -ObjecttqStatus::ObjecttqStatus() +ObjectStatus::ObjectStatus() : msgHandler(0) { } -ObjecttqStatus::ObjecttqStatus(const TQString& message, const TQString& description) +ObjectStatus::ObjectStatus(const TQString& message, const TQString& description) : msgHandler(0) { - settqStatus(message, description); + setStatus(message, description); } -ObjecttqStatus::ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) +ObjectStatus::ObjectStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) : msgHandler(0) { - settqStatus(dbObject, message, description); + setStatus(dbObject, message, description); } -ObjecttqStatus::~ObjecttqStatus() +ObjectStatus::~ObjectStatus() { delete msgHandler; } -const ObjecttqStatus& ObjecttqStatus::status() const +const ObjectStatus& ObjectStatus::status() const { return *this; } -bool ObjecttqStatus::error() const +bool ObjectStatus::error() const { return !message.isEmpty() || (dynamic_cast<KexiDB::Object*>((TQObject*)dbObj) && dynamic_cast<KexiDB::Object*>((TQObject*)dbObj)->error()); } -void ObjecttqStatus::settqStatus(const TQString& message, const TQString& description) +void ObjectStatus::setStatus(const TQString& message, const TQString& description) { this->dbObj=0; this->message=message; this->description=description; } -void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) +void ObjectStatus::setStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) { if (dynamic_cast<TQObject*>(dbObject)) { dbObj = dynamic_cast<TQObject*>(dbObject); @@ -221,7 +221,7 @@ void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, const TQString& messa this->description=description; } -void ObjecttqStatus::settqStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description) +void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description) { if (result) { if (message.isEmpty()) @@ -235,41 +235,41 @@ void ObjecttqStatus::settqStatus(KexiDB::ResultInfo* result, const TQString& mes this->description = description + " " + result->desc; } else - cleartqStatus(); + clearStatus(); } -void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, +void ObjectStatus::setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, const TQString& message, const TQString& description) { if (!dbObject) - settqStatus(result, message, description); + setStatus(result, message, description); else if (!result) - settqStatus(dbObject, message, description); + setStatus(dbObject, message, description); else { - settqStatus(dbObject, message, description); - settqStatus(result, this->message, this->description); + setStatus(dbObject, message, description); + setStatus(result, this->message, this->description); } } -void ObjecttqStatus::cleartqStatus() +void ObjectStatus::clearStatus() { message=TQString(); description=TQString(); } -TQString ObjecttqStatus::singleStatusString() const { +TQString ObjectStatus::singleStatusString() const { if (message.isEmpty() || description.isEmpty()) return message; return message + " " + description; } -void ObjecttqStatus::append( const ObjecttqStatus& othertqStatus ) { +void ObjectStatus::append( const ObjectStatus& otherStatus ) { if (message.isEmpty()) { - message = othertqStatus.message; - description = othertqStatus.description; + message = otherStatus.message; + description = otherStatus.description; return; } - const TQString s( othertqStatus.singleStatusString() ); + const TQString s( otherStatus.singleStatusString() ); if (s.isEmpty()) return; if (description.isEmpty()) { @@ -283,7 +283,7 @@ void ObjecttqStatus::append( const ObjecttqStatus& othertqStatus ) { class ObjectStatusMessageHandler : public KexiDB::MessageHandler { public: - ObjectStatusMessageHandler(ObjecttqStatus *status) + ObjectStatusMessageHandler(ObjectStatus *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->settqStatus(title, details); + m_status->setStatus(title, details); } virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString()) { - m_status->settqStatus(obj, msg); + m_status->setStatus(obj, msg); } - ObjecttqStatus *m_status; + ObjectStatus *m_status; }; -ObjecttqStatus::operator KexiDB::MessageHandler*() +ObjectStatus::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.") - .tqarg(KEXI_VERSION_STRING) - .tqarg(KEXI_APP_NAME); + .arg(KEXI_VERSION_STRING) + .arg(KEXI_APP_NAME); else { TQString feature_name_(feature_name); msg = i18n("\"%1\" function is not available for version %2 of %3 application.") - .tqarg(feature_name_.replace("&","")) - .tqarg(KEXI_VERSION_STRING) - .tqarg(KEXI_APP_NAME); + .arg(feature_name_.replace("&","")) + .arg(KEXI_VERSION_STRING) + .arg(KEXI_APP_NAME); } TQString extra_text_(extra_text); diff --git a/kexi/core/kexi.h b/kexi/core/kexi.h index 426854e6..5a6804a5 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 ObjecttqStatus + class KEXICORE_EXPORT ObjectStatus { public: - ObjecttqStatus(); + ObjectStatus(); - ObjecttqStatus(const TQString& message, const TQString& description); + ObjectStatus(const TQString& message, const TQString& description); - ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description); + ObjectStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description); - ~ObjecttqStatus(); + ~ObjectStatus(); - const ObjecttqStatus& status() const; + const ObjectStatus& status() const; bool error() const; - void settqStatus(const TQString& message, const TQString& description); + void setStatus(const TQString& message, const TQString& description); //! Note: for safety, \a dbObject needs to be derived from TQObject, //! otherwise it won't be assigned - void settqStatus(KexiDB::Object* dbObject, + void setStatus(KexiDB::Object* dbObject, const TQString& message = TQString(), const TQString& description = TQString()); - void settqStatus(KexiDB::ResultInfo* result, + void setStatus(KexiDB::ResultInfo* result, const TQString& message = TQString(), const TQString& description = TQString()); - void settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, + void setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, const TQString& message = TQString(), const TQString& description = TQString()); - void cleartqStatus(); + void clearStatus(); TQString singleStatusString() const; - void append( const ObjecttqStatus& othertqStatus ); + void append( const ObjectStatus& otherStatus ); KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((TQObject*)dbObj); } - //! Helper returning pseudo handler that just updates this ObjecttqStatus object + //! Helper returning pseudo handler that just updates this ObjectStatus object //! by receiving a message operator KexiDB::MessageHandler*(); diff --git a/kexi/core/kexiactionproxy.cpp b/kexi/core/kexiactionproxy.cpp index 49cbeb3b..851a4d3a 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 tqchildren... + //try in children... 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 tqchildren... + //not supported explicitly - try in children... 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 tqchildren... + //not supported explicitly - try in children... 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 facb09b3..163efced 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 tqchildren (in unspecified order) to and call + we start to iterate over proxy children (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 a4c57791..aeb621c4 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::tqfromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=") +// TQString::fromLatin1("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 e806aaaf..4ec99e53 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 <tqlayout.h> +#include <layout.h> #include <kdebug.h> #include <kiconloader.h> diff --git a/kexi/core/kexidbshortcutfile.cpp b/kexi/core/kexidbshortcutfile.cpp index 451eb66a..01f0adb3 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\".").tqarg(group).tqarg(type) + //ERR: i18n("No valid "type" field specified for section \"%1\": unknown value \"%2\".").arg(group).arg(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.tqarg(number))) //a new group key couldn't exist + while (config.hasGroup(groupPrefix.arg(number))) //a new group key couldn't exist number++; - groupKey = groupPrefix.tqarg(number); + groupKey = groupPrefix.arg(number); } if (_groupKey) //return this one (generated or found) *_groupKey = groupKey; diff --git a/kexi/core/kexidialogbase.cpp b/kexi/core/kexidialogbase.cpp index ff642741..67e81a5d 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::tqminimumSizeHint() const +TQSize KexiDialogBase::minimumSizeHint() const { KexiViewBase *v = selectedView(); if (!v) - return KMdiChildView::tqminimumSizeHint(); - return v->tqminimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0); + return KMdiChildView::minimumSizeHint(); + return v->minimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0); } -TQSize KexiDialogBase::tqsizeHint() const +TQSize KexiDialogBase::sizeHint() const { KexiViewBase *v = selectedView(); if (!v) - return KMdiChildView::tqsizeHint(); - return v->preferredSizeHint( v->tqsizeHint() ); + return KMdiChildView::sizeHint(); + return v->preferredSizeHint( v->sizeHint() ); } /* @@ -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::ObjecttqStatus status(*this); - settqStatus(mainWin()->project()->dbConnection(), - i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(newViewMode)),""); + const Kexi::ObjectStatus status(*this); + setStatus(mainWin()->project()->dbConnection(), + i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(newViewMode)),""); append( status ); m_currentViewMode = prevViewMode; return false; @@ -517,7 +517,7 @@ tristate KexiDialogBase::storeNewData() if (cancel) return cancelled; if (!m_schemaData) { - settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),""); + setStatus(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 \ - settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),""); + setStatus(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() << "tqfocusWidget(): " << tqfocusWidget()->name() << endl; - if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//tqfocusWidget())) + //kdDebug() << "focusWidget(): " << focusWidget()->name() << endl; + if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//focusWidget())) 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 6449004b..d98e9d04 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::ObjecttqStatus + public Kexi::ObjectStatus { 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 tqminimumSizeHint() const; + virtual TQSize minimumSizeHint() const; /*! reimplemented: size hint is inherited from currently visible view. */ - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; KexiMainWindow *mainWin() const { return m_parentWindow; } diff --git a/kexi/core/kexiguimsghandler.cpp b/kexi/core/kexiguimsghandler.cpp index 4121543e..5b2b2791 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::ObjecttqStatus *status) +KexiGUIMessageHandler::showErrorMessage(Kexi::ObjectStatus *status) { showErrorMessage("", status); } void -KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status) +KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjectStatus *status) { if (status && status->error()) { TQString msg(message); @@ -106,7 +106,7 @@ KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjecttqS else { showErrorMessage(message); } - status->cleartqStatus(); + status->clearStatus(); } void diff --git a/kexi/core/kexiguimsghandler.h b/kexi/core/kexiguimsghandler.h index af407ab1..362884dc 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::ObjecttqStatus *status); - void showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status); + void showErrorMessage(Kexi::ObjectStatus *status); + void showErrorMessage(const TQString &message, Kexi::ObjectStatus *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 93d73cac..49b3c46d 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.").tqarg(partName)); + msgHdr->showErrorMessage(i18n("Could not load \"%1\" plugin.").arg(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->tqsizeHint()); - dlg->setMinimumSize(view->tqminimumSizeHint().width(),view->tqminimumSizeHint().height()); + dlg->resize(view->sizeHint()); + dlg->setMinimumSize(view->minimumSizeHint().width(),view->minimumSizeHint().height()); dlg->setId( mainWin->generatePrivateID() ); dlg->registerDialog(); return dlg; diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp index ba54fea7..49f1aeab 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.").tqarg(item.name()) + ? i18n("Object \"%1\" could not be opened in Design View.").arg(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.cleartqStatus(); + m_status.clearStatus(); // KexiDialogBase *dlg = createInstance(win,item,viewMode); // if (!dlg) // return 0; -// TQString capt = TQString("%1 : %2").tqarg(item.name()).tqarg(instanceName()); +// TQString capt = TQString("%1 : %2").arg(item.name()).arg(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::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(), + m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(), i18n("Could not load object's definition."), i18n("Object design may be corrupted.")); m_status.append( - Kexi::ObjecttqStatus(i18n("You can delete \"%1\" object and create it again.") - .tqarg(item.name()), TQString()) ); + Kexi::ObjectStatus(i18n("You can delete \"%1\" object and create it again.") + .arg(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->tqsizeHint()); + dlg->resize(dlg->sizeHint()); - dlg->setMinimumSize(dlg->tqminimumSizeHint().width(),dlg->tqminimumSizeHint().height()); + dlg->setMinimumSize(dlg->minimumSizeHint().width(),dlg->minimumSizeHint().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::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(), - i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").tqarg(dataID) ); + m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(), + i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").arg(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").tqarg(nameSuffix) : TQString())).latin1() ) + + (nameSuffix ? TQString(":%1").arg(nameSuffix) : TQString())).latin1() ) , KXMLGUIClient(win) { if(!win->project()->data()->userMode()) - setXMLFile(TQString::tqfromLatin1("kexi")+part->info()->objectName() + setXMLFile(TQString::fromLatin1("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 f1168fd4..c448b8bf 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::ObjecttqStatus& lastOperationtqStatus() const { return m_status; } + const Kexi::ObjectStatus& lastOperationStatus() 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::ObjecttqStatus m_status; + Kexi::ObjectStatus 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 f6fcd7d8..d651f8d0 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\"").tqarg(i->objectName())); + i->setBroken(true, i18n("Error while loading plugin \"%1\"").arg(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\"").tqarg(mimeType)); + setError(i18n("No plugin for mime type \"%1\"").arg(mimeType)); return 0; } diff --git a/kexi/core/kexiproject.cpp b/kexi/core/kexiproject.cpp index 159de750..1dbe4eef 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\".").tqarg(d->data->databaseName())); + i18n("Could not open project \"%1\".").arg(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\".").tqarg(d->data->databaseName())); + i18n("Could not create project \"%1\".").arg(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::tqfromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) " + TQString::fromLatin1("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::tqfromLatin1("DROP TABLE kexi__blobs")) //lowlevel + || !d->connection->executeSQL(TQString::fromLatin1("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.tqarg("project_caption"), data ) && !data[0].toString().isEmpty()) + if (d->connection->querySingleRecord( sql.arg("project_caption"), data ) && !data[0].toString().isEmpty()) d->data->setCaption(data[0].toString()); - if (d->connection->querySingleRecord( sql.tqarg("project_desc"), data) && !data[0].toString().isEmpty()) + if (d->connection->querySingleRecord( sql.arg("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->lastOperationtqStatus().error()) - setError(i18n("Opening object \"%1\" failed.").tqarg(item.name())+"<br>" - +part->lastOperationtqStatus().message, - part->lastOperationtqStatus().description); + if (part->lastOperationStatus().error()) + setError(i18n("Opening object \"%1\" failed.").arg(item.name())+"<br>" + +part->lastOperationStatus().message, + part->lastOperationStatus().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.") - .tqarg(newName) ); + .arg(newName) ); return false; } } KexiDB::MessageTitle et(this, - i18n("Could not rename object \"%1\".").tqarg(item.name()) ); + i18n("Could not rename object \"%1\".").arg(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->lastOperationtqStatus().message, part->lastOperationtqStatus().description); + setError(part->lastOperationStatus().message, part->lastOperationStatus().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?") - .tqarg(prj->data()->infoString())+"\n"+warningNoUndo+"</qt>", + .arg(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\"?").tqarg(data->KexiDB::SchemaData::objectName())+"\n"+warningNoUndo )) + i18n("Do you want to drop the project \"%1\"?").arg(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 9f0106bc..9b9203c8 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\"").tqarg(databaseName()) + (nobr ? "</nobr>" : "") + return TQString(nobr ? "<nobr>" : "") + TQString("\"%1\"").arg(databaseName()) + (nobr ? "</nobr>" : "") + (nobr ? " <nobr>" : " ") + i18n("database connection", "(connection %1)") - .tqarg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : ""); + .arg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : ""); } //file-based return TQString(nobr ? "<nobr>" : "") - + TQString("\"%1\"").tqarg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : ""); + + TQString("\"%1\"").arg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : ""); } void KexiProjectData::setReadOnly(bool set) diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp index 6a696461..1ba85265 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(); //tqfocusWidget(); + TQWidget *w = host->focusWindow(); //focusWidget(); // 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->tqfocusWidget(); + TQWidget *fw = d->mainWin->focusWidget(); 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 tqinvalidate action if it comes from mainwindow's KActionCollection + // only invalidate 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->tqfocusWidget(); + fw = aw->focusWidget(); } while (fw && !acceptsSharedActions(TQT_TQOBJECT(fw))) fw = fw->parentWidget(); diff --git a/kexi/core/kexisharedactionhost.h b/kexi/core/kexisharedactionhost.h index 91cc09f4..c7fcb181 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::tqfocusWidget()) + /*! \return window widget that is currently focused (using TQWidget::focusWidget()) 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 e89f4a4e..65f2e68f 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), tqfocusWidget()); +// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), focusWidget()); // kexidbg << "KexiViewBase::eventFilter(): " << o->name() << " " << e->type() << endl; if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(o))) { - if (e->type()==TQEvent::FocusOut && tqfocusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) { + if (e->type()==TQEvent::FocusOut && focusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(focusWidget()))) { //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) { // && tqfocusWidget() && Kexi::hasParent( this, tqfocusWidget())) { // && tqfocusWidget()->inherits("KexiViewBase")) { -// kdDebug() << tqfocusWidget()->className() << " " << tqfocusWidget()->name()<< endl; + if (e->type()==TQEvent::FocusOut) { // && focusWidget() && Kexi::hasParent( this, focusWidget())) { // && focusWidget()->inherits("KexiViewBase")) { +// kdDebug() << focusWidget()->className() << " " << focusWidget()->name()<< endl; // kdDebug() << o->className() << " " << o->name()<< endl; KexiViewBase *v = KexiUtils::findParent<KexiViewBase>(o, "KexiViewBase") ; -// TQWidget *www=v->tqfocusWidget(); +// TQWidget *www=v->focusWidget(); if (v) { while (v->m_parentView) v = v->m_parentView; - 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(); + 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(); } } @@ -263,7 +263,7 @@ void KexiViewBase::setViewWidget(TQWidget* w, bool focusProxy) void KexiViewBase::addChildView( KexiViewBase* childView ) { - m_tqchildren.append( childView ); + m_children.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 tqchildren :) - for (TQPtrListIterator<KexiViewBase> it(m_tqchildren); it.current(); ++it) { + //do the same for children :) + for (TQPtrListIterator<KexiViewBase> it(m_children); it.current(); ++it) { it.current()->updateActions(activated); } } diff --git a/kexi/core/kexiviewbase.h b/kexi/core/kexiviewbase.h index 139f0b2d..564f5a20 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::tqsizeHint(). + so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::sizeHint(). 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_tqchildren; + TQPtrList<KexiViewBase> m_children; bool m_dirty : 1; |