diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kaddressbook/xxport/gnokii_xxport.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/xxport/gnokii_xxport.cpp')
-rw-r--r-- | kaddressbook/xxport/gnokii_xxport.cpp | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp index faf527073..343831a90 100644 --- a/kaddressbook/xxport/gnokii_xxport.cpp +++ b/kaddressbook/xxport/gnokii_xxport.cpp @@ -16,8 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ /* Description: @@ -77,8 +77,8 @@ static KProgressDialog *m_progressDlg; K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_gnokii_xxport, GNOKIIXXPort ) -GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) - : KAB::XXPort( ab, parent, name ) +GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, TQWidget *tqparent, const char *name ) + : KAB::XXPort( ab, tqparent, name ) { this_filter = this; m_progressDlg = NULL; @@ -94,7 +94,7 @@ static TQString makeValidPhone( const TQString &number ) TQString num = number.simplifyWhiteSpace(); TQString allowed("0123456789*+#pw"); for (unsigned int i=num.length(); i>=1; i--) - if (allowed.find(num[i-1])==-1) + if (allowed.tqfind(num[i-1])==-1) num.remove(i-1,1); if (num.isEmpty()) num = "0"; @@ -154,7 +154,7 @@ static TQString businit(void) GNOKII_DEBUG( TQString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n") .arg(manufacturer, model, revision, imei) ); - return TQString::null; + return TQString(); } @@ -242,7 +242,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.find(',') == -1) { + if (s.tqfind(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -548,9 +548,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const m_progressDlg->show(); processEvents(); -#if (QT_VERSION >= 0x030300) - m_progressDlg->setCursor( Qt::BusyCursor ); -#endif + m_progressDlg->setCursor( TQt::BusyCursor ); TQString errStr = businit(); m_progressDlg->unsetCursor(); @@ -605,9 +603,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri gn_error error; bool deleteLabelInitialized = false; -#if (QT_VERSION >= 0x030300) - m_progressDlg->setCursor( Qt::BusyCursor ); -#endif + m_progressDlg->setCursor( TQt::BusyCursor ); TQString errStr = businit(); m_progressDlg->unsetCursor(); @@ -645,7 +641,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri i18n("<qt>Do you want the selected contacts to be <b>appended</b> to " "the current mobile phonebook or should they <b>tqreplace</b> all " "currently existing phonebook entries ?<br><br>" - "Please note, that in case you choose to tqreplace the phonebook " + "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " "the newly exported contacts will be available from inside your phone.</qt>"), i18n("Export to Mobile Phone"), @@ -805,7 +801,7 @@ static gn_data data; static void busterminate(void) { gn_sm_functions(GN_OP_Terminate, NULL, &state); - if (lockfile) gn_device_unlock(lockfile); + if (lockfile) gn_tqdevice_unlock(lockfile); } static TQString businit(void) @@ -834,7 +830,7 @@ static TQString businit(void) aux = gn_cfg_get(gn_cfg_info, "global", "use_locking"); // Defaults to 'no' if (aux && !strcmp(aux, "yes")) { - lockfile = gn_device_lock(state.config.port_device); + lockfile = gn_tqdevice_lock(state.config.port_tqdevice); if (lockfile == NULL) { return i18n("Gnokii reports a 'Lock File Error'.\n " "Please exit all other running instances of gnokii, check if you have " @@ -872,7 +868,7 @@ static TQString businit(void) qstrncpy(imei, unknown, sizeof(imei)-1); if (m_progressDlg->wasCancelled()) - return TQString::null; + return TQString(); else error = gn_sm_functions(GN_OP_Identify, &data, &state); GNOKII_CHECK_ERROR(error); @@ -882,7 +878,7 @@ static TQString businit(void) PhoneProductId = TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei); - return TQString::null; + return TQString(); } @@ -895,7 +891,7 @@ static gn_error read_phone_memstat( const gn_memory_type memtype, gn_memory_stat memset(memstat, 0, sizeof(*memstat)); memstat->memory_type = memtype; data.memory_status = memstat; - error = gn_sm_functions(GN_OP_GetMemoryStatus, &data, &state); + error = gn_sm_functions(GN_OP_GetMemorytqStatus, &data, &state); GNOKII_CHECK_ERROR(error); if (error != GN_ERR_NONE) { switch (memtype) { @@ -1019,7 +1015,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(entry.name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.find(',') == -1) { + if (s.tqfind(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -1343,9 +1339,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const m_progressDlg->show(); processEvents(); -#if (QT_VERSION >= 0x030300) - m_progressDlg->setCursor( Qt::BusyCursor ); -#endif + m_progressDlg->setCursor( TQt::BusyCursor ); TQString errStr = businit(); m_progressDlg->unsetCursor(); @@ -1400,9 +1394,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri gn_error error; bool deleteLabelInitialized = false; -#if (QT_VERSION >= 0x030300) - m_progressDlg->setCursor( Qt::BusyCursor ); -#endif + m_progressDlg->setCursor( TQt::BusyCursor ); TQString errStr = businit(); m_progressDlg->unsetCursor(); @@ -1440,7 +1432,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri i18n("<qt>Do you want the selected contacts to be <b>appended</b> to " "the current mobile phonebook or should they <b>tqreplace</b> all " "currently existing phonebook entries ?<br><br>" - "Please note, that in case you choose to tqreplace the phonebook " + "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " "the newly exported contacts will be available from inside your phone.</qt>"), i18n("Export to Mobile Phone"), |