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/kexi.cpp | |
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/kexi.cpp')
-rw-r--r-- | kexi/core/kexi.cpp | 66 |
1 files changed, 33 insertions, 33 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); |