diff options
Diffstat (limited to 'kexi')
220 files changed, 1163 insertions, 1163 deletions
diff --git a/kexi/3rdparty/kexisql/src/btree.c b/kexi/3rdparty/kexisql/src/btree.c index edcba8c9..02e01249 100644 --- a/kexi/3rdparty/kexisql/src/btree.c +++ b/kexi/3rdparty/kexisql/src/btree.c @@ -101,7 +101,7 @@ typedef struct FreelistInfo FreelistInfo; ** This routine rounds up a number of bytes to the next multiple of 4. ** ** This might need to change for computer architectures that require -** and 8-byte tqalignment boundry for structures. +** and 8-byte alignment boundry for structures. */ #define ROUNDUP(X) ((X+3) & ~3) @@ -726,7 +726,7 @@ int sqliteBtreeOpen( } /* -** Close an open database and tqinvalidate all cursors. +** Close an open database and invalidate all cursors. */ static int fileBtreeClose(Btree *pBt){ while( pBt->pCursor ){ @@ -1998,7 +1998,7 @@ static void reparentPage(Pager *pPager, Pgno pgno, MemPage *pNewParent,int idx){ } /* -** Reparent all tqchildren of the given page to be the given page. +** Reparent all children of the given page to be the given page. ** In other words, for every child of pPage, invoke reparentPage() ** to make sure that each child knows that pPage is its parent. ** @@ -2321,7 +2321,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ ** the siblings. An attempt is made to find NN siblings on either ** side of pPage. More siblings are taken from one side, however, if ** pPage there are fewer than NN siblings on the other side. If pParent - ** has NB or fewer tqchildren then all tqchildren of pParent are taken. + ** has NB or fewer children then all children of pParent are taken. */ nxDiv = idx - NN; if( nxDiv + NB > pParent->nCell ){ @@ -2547,7 +2547,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ } /* - ** Reparent tqchildren of all cells. + ** Reparent children of all cells. */ for(i=0; i<nNew; i++){ reparentChildPages(pBt, apNew[i]); @@ -2794,7 +2794,7 @@ static int fileBtreeCreateTable(Btree *pBt, int *piTable){ } /* -** Erase the given database page and all its tqchildren. Return +** Erase the given database page and all its children. Return ** the page to the freelist. */ static int clearDatabasePage(Btree *pBt, Pgno pgno, int freePageFlag){ @@ -3274,8 +3274,8 @@ static int keyCompare( ** 3. Make sure no key is less than or equal to zLowerBound. ** 4. Make sure no key is greater than or equal to zUpperBound. ** 5. Check the integrity of overflow pages. -** 6. Recursively call checkTreePage on all tqchildren. -** 7. Verify that the depth of all tqchildren is the same. +** 6. Recursively call checkTreePage on all children. +** 7. Verify that the depth of all children is the same. ** 8. Make sure this page is at least 33% full or else it is ** the root of the tree. */ diff --git a/kexi/3rdparty/kexisql/src/btree_rb.c b/kexi/3rdparty/kexisql/src/btree_rb.c index 86feaa5b..3954fe6d 100644 --- a/kexi/3rdparty/kexisql/src/btree_rb.c +++ b/kexi/3rdparty/kexisql/src/btree_rb.c @@ -319,7 +319,7 @@ static void print_node(BtRbNode *pNode) /* * Check the following properties of the red-black tree: - * (1) - If a node is red, both of it's tqchildren are black + * (1) - If a node is red, both of it's children are black * (2) - Each path from a given node to a leaf (NULL) node passes thru the * same number of black nodes * @@ -951,10 +951,10 @@ static int memRbtreeDelete(RbtCursor* pCur) } /* First do a standard binary-tree delete (node pZ is to be deleted). How - * to do this depends on how many tqchildren pZ has: + * to do this depends on how many children pZ has: * - * If pZ has no tqchildren or one child, then splice out pZ. If pZ has two - * tqchildren, splice out the successor of pZ and replace the key and data of + * If pZ has no children or one child, then splice out pZ. If pZ has two + * children, splice out the successor of pZ and replace the key and data of * pZ with the key and data of the spliced out successor. */ if( pZ->pLeft && pZ->pRight ){ BtRbNode *pTmp; @@ -1008,7 +1008,7 @@ static int memRbtreeDelete(RbtCursor* pCur) } /* pZ now points at the spliced out node. pChild is the only child of pZ, or - * NULL if pZ has no tqchildren. If pZ is black, and not the tree root, then we + * NULL if pZ has no children. If pZ is black, and not the tree root, then we * will have violated the "same number of black nodes in every path to a * leaf" property of the red-black tree. The code in do_delete_balancing() * repairs this. */ diff --git a/kexi/3rdparty/kexisql3/src/btree.c b/kexi/3rdparty/kexisql3/src/btree.c index 4ed6c51a..212be42e 100644 --- a/kexi/3rdparty/kexisql3/src/btree.c +++ b/kexi/3rdparty/kexisql3/src/btree.c @@ -126,7 +126,7 @@ ** 8 4 Right child (the Ptr(N+1) value). Omitted on leaves. ** ** The flags define the format of this btree page. The leaf flag means that -** this page has no tqchildren. The zerodata flag means that this page carries +** this page has no children. The zerodata flag means that this page carries ** only keys and no data. The intkey flag means that the key is a integer ** which is stored in the key size entry of the cell header rather than in ** the payload area. @@ -212,7 +212,7 @@ #include <assert.h> /* Round up a number to the next larger multiple of 8. This is used -** to force 8-byte tqalignment on 64-bit architectures. +** to force 8-byte alignment on 64-bit architectures. */ #define ROUND8(x) ((x+7)&~7) @@ -1286,14 +1286,14 @@ int sqlite3BtreeOpen( #endif } pBt->usableSize = pBt->pageSize - nReserve; - assert( (pBt->pageSize & 7)==0 ); /* 8-byte tqalignment of pageSize */ + assert( (pBt->pageSize & 7)==0 ); /* 8-byte alignment of pageSize */ sqlite3pager_set_pagesize(pBt->pPager, pBt->pageSize); *ppBtree = pBt; return SQLITE_OK; } /* -** Close an open database and tqinvalidate all cursors. +** Close an open database and invalidate all cursors. */ int sqlite3BtreeClose(Btree *pBt){ while( pBt->pCursor ){ @@ -1658,7 +1658,7 @@ int sqlite3BtreeBeginTrans(Btree *pBt, int wrflag){ #ifndef SQLITE_OMIT_AUTOVACUUM /* -** Set the pointer-map entries for all tqchildren of page pPage. Also, if +** Set the pointer-map entries for all children of page pPage. Also, if ** pPage contains cells that point to overflow pages, set the pointer ** map entries for the overflow pages as well. */ @@ -3425,7 +3425,7 @@ static int reparentPage(Btree *pBt, Pgno pgno, MemPage *pNewParent, int idx){ /* -** Change the pParent pointer of all tqchildren of pPage to point back +** Change the pParent pointer of all children of pPage to point back ** to pPage. ** ** In other words, for every child of pPage, invoke reparentPage() @@ -3879,7 +3879,7 @@ static int balance_nonroot(MemPage *pPage){ ** the siblings. An attempt is made to find NN siblings on either ** side of pPage. More siblings are taken from one side, however, if ** pPage there are fewer than NN siblings on the other side. If pParent - ** has NB or fewer tqchildren then all tqchildren of pParent are taken. + ** has NB or fewer children then all children of pParent are taken. */ nxDiv = idx - NN; if( nxDiv + NB > pParent->nCell ){ @@ -3911,7 +3911,7 @@ static int balance_nonroot(MemPage *pPage){ } /* Make nMaxCells a multiple of 2 in order to preserve 8-byte - ** tqalignment */ + ** alignment */ nMaxCells = (nMaxCells + 1)&~1; /* @@ -3930,13 +3930,13 @@ static int balance_nonroot(MemPage *pPage){ } szCell = (int*)&apCell[nMaxCells]; aCopy[0] = (u8*)&szCell[nMaxCells]; - assert( ((aCopy[0] - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment required */ + assert( ((aCopy[0] - (u8*)apCell) & 7)==0 ); /* 8-byte alignment required */ for(i=1; i<NB; i++){ aCopy[i] = &aCopy[i-1][pBt->pageSize+ROUND8(sizeof(MemPage))]; - assert( ((aCopy[i] - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment required */ + assert( ((aCopy[i] - (u8*)apCell) & 7)==0 ); /* 8-byte alignment required */ } aSpace = &aCopy[NB-1][pBt->pageSize+ROUND8(sizeof(MemPage))]; - assert( ((aSpace - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment required */ + assert( ((aSpace - (u8*)apCell) & 7)==0 ); /* 8-byte alignment required */ #ifndef SQLITE_OMIT_AUTOVACUUM if( pBt->autoVacuum ){ aFrom = &aSpace[5*pBt->pageSize]; @@ -4199,7 +4199,7 @@ static int balance_nonroot(MemPage *pPage){ #ifndef SQLITE_OMIT_AUTOVACUUM /* If this is an auto-vacuum database, update the pointer map entries ** that point to the siblings that were rearranged. These can be: left - ** tqchildren of cells, the right-child of the page, or overflow pages + ** children of cells, the right-child of the page, or overflow pages ** pointed to by cells. */ if( pBt->autoVacuum ){ @@ -4284,7 +4284,7 @@ static int balance_nonroot(MemPage *pPage){ } /* - ** Reparent tqchildren of all cells. + ** Reparent children of all cells. */ for(i=0; i<nNew; i++){ rc = reparentChildPages(apNew[i]); @@ -4842,7 +4842,7 @@ int sqlite3BtreeCreateTable(Btree *pBt, int *piTable, int flags){ } /* -** Erase the given database page and all its tqchildren. Return +** Erase the given database page and all its children. Return ** the page to the freelist. */ static int clearDatabasePage( @@ -5457,8 +5457,8 @@ static void checkList( ** NO 3. Make sure no key is less than or equal to zLowerBound. ** NO 4. Make sure no key is greater than or equal to zUpperBound. ** 5. Check the integrity of overflow pages. -** 6. Recursively call checkTreePage on all tqchildren. -** 7. Verify that the depth of all tqchildren is the same. +** 6. Recursively call checkTreePage on all children. +** 7. Verify that the depth of all children is the same. ** 8. Make sure this page is at least 33% full or else it is ** the root of the tree. */ diff --git a/kexi/3rdparty/kexisql3/src/build.c b/kexi/3rdparty/kexisql3/src/build.c index 9818c954..67ed7975 100644 --- a/kexi/3rdparty/kexisql3/src/build.c +++ b/kexi/3rdparty/kexisql3/src/build.c @@ -2331,7 +2331,7 @@ void sqlite3CreateIndex( sqliteFree(zStmt); /* Fill the index with data and reparse the schema. Code an OP_Expire - ** to tqinvalidate all pre-compiled statements. + ** to invalidate all pre-compiled statements. */ if( pTblName ){ sqlite3RefillIndex(pParse, pIndex, iMem); diff --git a/kexi/3rdparty/kexisql3/src/expr.c b/kexi/3rdparty/kexisql3/src/expr.c index ac209552..8d9cfbbd 100644 --- a/kexi/3rdparty/kexisql3/src/expr.c +++ b/kexi/3rdparty/kexisql3/src/expr.c @@ -623,7 +623,7 @@ void sqlite3ExprListDelete(ExprList *pList){ ** Walk an expression tree. Call xFunc for each node visited. ** ** The return value from xFunc determines whether the tree walk continues. -** 0 means continue walking the tree. 1 means do not walk tqchildren +** 0 means continue walking the tree. 1 means do not walk children ** of the current node but continue with siblings. 2 means abandon ** the tree walk completely. ** @@ -1949,7 +1949,7 @@ void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){ */ op = ((pExpr->op+(TK_ISNULL&1))^1)-(TK_ISNULL&1); - /* Verify correct tqalignment of TK_ and OP_ constants + /* Verify correct alignment of TK_ and OP_ constants */ assert( pExpr->op!=TK_ISNULL || op==OP_NotNull ); assert( pExpr->op!=TK_NOTNULL || op==OP_IsNull ); diff --git a/kexi/3rdparty/kexisql3/src/main.c b/kexi/3rdparty/kexisql3/src/main.c index 8d6acd5c..1c1029f9 100644 --- a/kexi/3rdparty/kexisql3/src/main.c +++ b/kexi/3rdparty/kexisql3/src/main.c @@ -467,7 +467,7 @@ int sqlite3_create_function( /* Check if an existing function is being overridden or deleted. If so, ** and there are active VMs, then return SQLITE_BUSY. If a function ** is being overridden/deleted but there are no active VMs, allow the - ** operation to continue but tqinvalidate all precompiled statements. + ** operation to continue but invalidate all precompiled statements. */ p = sqlite3FindFunction(db, zFunctionName, nName, nArg, enc, 0); if( p && p->iPrefEnc==enc && p->nArg==nArg ){ @@ -934,7 +934,7 @@ int sqlite3_create_collation( /* Check if this call is removing or replacing an existing collation ** sequence. If so, and there are active VMs, return busy. If there - ** are no active VMs, tqinvalidate any pre-compiled statements. + ** are no active VMs, invalidate any pre-compiled statements. */ pColl = sqlite3FindCollSeq(db, (u8)enc, zName, strlen(zName), 0); if( pColl && pColl->xCmp ){ diff --git a/kexi/3rdparty/kexisql3/src/pager.c b/kexi/3rdparty/kexisql3/src/pager.c index 60cb43bd..4b981350 100644 --- a/kexi/3rdparty/kexisql3/src/pager.c +++ b/kexi/3rdparty/kexisql3/src/pager.c @@ -1076,7 +1076,7 @@ static int pager_playback_one_page(Pager *pPager, OsFile *jfd, int useCksum){ ** ** The master journal file contains the names of all child journals. ** To tell if a master journal can be deleted, check to each of the -** tqchildren. If all tqchildren are either missing or do not refer to +** children. If all children are either missing or do not refer to ** a different master journal, then this master journal can be deleted. */ static int pager_delmaster(const char *zMaster){ diff --git a/kexi/3rdparty/kexisql3/src/sqlite3.h b/kexi/3rdparty/kexisql3/src/sqlite3.h index be29db69..414c6cac 100644 --- a/kexi/3rdparty/kexisql3/src/sqlite3.h +++ b/kexi/3rdparty/kexisql3/src/sqlite3.h @@ -1248,7 +1248,7 @@ int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); ** is NULL pointer, then SQLite does a search for an appropriate temporary ** file directory. ** -** Once sqlite3_open() has been called, changing this variable will tqinvalidate +** Once sqlite3_open() has been called, changing this variable will invalidate ** the current temporary database, if any. */ extern char *sqlite3_temp_directory; diff --git a/kexi/3rdparty/kexisql3/src/where.c b/kexi/3rdparty/kexisql3/src/where.c index 5ab2e4e6..c0457ffc 100644 --- a/kexi/3rdparty/kexisql3/src/where.c +++ b/kexi/3rdparty/kexisql3/src/where.c @@ -85,7 +85,7 @@ struct WhereTerm { i16 leftColumn; /* Column number of X in "X <op> <expr>" */ u16 operator; /* A WO_xx value describing <op> */ u8 flags; /* Bit flags. See below */ - u8 nChild; /* Number of tqchildren that must disable us */ + u8 nChild; /* Number of children that must disable us */ WhereClause *pWC; /* The clause this term is part of */ Bitmask prereqRight; /* Bitmask of tables used by pRight */ Bitmask prereqAll; /* Bitmask of tables referenced by p */ diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp index ce6f8f3b..a1f65a90 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp @@ -60,7 +60,7 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayou else { TQString str=KoUnit::unitDescription(unit); - TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").tqarg(str), this ); + TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").arg(str), this ); grid1->addWidget( lpgUnit, 0, 0, TQt::AlignLeft ); } diff --git a/kexi/3rdparty/kolibs/koPageLayoutDia.cc b/kexi/3rdparty/kolibs/koPageLayoutDia.cc index d81d1870..5bc7f3b3 100644 --- a/kexi/3rdparty/kolibs/koPageLayoutDia.cc +++ b/kexi/3rdparty/kolibs/koPageLayoutDia.cc @@ -84,14 +84,14 @@ void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout ) m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z; m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z; - tqrepaint( true ); + repaint( true ); } /*=================== set tqlayout =================================*/ void KoPagePreview::setPageColumns( const KoColumns &_columns ) { columns = _columns.columns; - tqrepaint( true ); + repaint( true ); } /*======================== draw contents =========================*/ diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.cc b/kexi/3rdparty/kolibs/koUnitWidgets.cc index 2b4b76b7..731c38bd 100644 --- a/kexi/3rdparty/kolibs/koUnitWidgets.cc +++ b/kexi/3rdparty/kolibs/koUnitWidgets.cc @@ -89,7 +89,7 @@ KoUnitDoubleValidator::validate( TQString &s, int &pos ) const TQString KoUnitDoubleBase::getVisibleText( double value ) const { - const TQString num ( TQString( "%1%2").tqarg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); + const TQString num ( TQString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl; return num; } diff --git a/kexi/core/kexi.cpp b/kexi/core/kexi.cpp index d8be5249..e297ee52 100644 --- a/kexi/core/kexi.cpp +++ b/kexi/core/kexi.cpp @@ -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/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/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 14651f3f..67e81a5d 100644 --- a/kexi/core/kexidialogbase.cpp +++ b/kexi/core/kexidialogbase.cpp @@ -379,7 +379,7 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, TQMap<TQString,TQStr << prevViewMode << " restored." << endl; const Kexi::ObjectStatus status(*this); setStatus(mainWin()->project()->dbConnection(), - i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(newViewMode)),""); + i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(newViewMode)),""); append( status ); m_currentViewMode = prevViewMode; return false; diff --git a/kexi/core/kexiinternalpart.cpp b/kexi/core/kexiinternalpart.cpp index 669039cc..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); diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp index 6671e168..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())) @@ -246,7 +246,7 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in // 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(); @@ -293,7 +293,7 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in 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.") - .tqarg(item.name()), TQString()) ); + .arg(item.name()), TQString()) ); dlg->close(); delete dlg; @@ -367,7 +367,7 @@ bool Part::loadDataBlock( KexiDialogBase *dlg, TQString &dataString, const TQStr { 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\".").tqarg(dataID) ); + i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").arg(dataID) ); m_status.append( *dlg ); return false; } @@ -431,7 +431,7 @@ 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()) 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 5b26cb39..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; @@ -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; @@ -736,7 +736,7 @@ KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, KexiPart::Item& ite KexiDialogBase *dlg = part->openInstance(wnd, item, viewMode, staticObjectArgs); if (!dlg) { if (part->lastOperationStatus().error()) - setError(i18n("Opening object \"%1\" failed.").tqarg(item.name())+"<br>" + setError(i18n("Opening object \"%1\" failed.").arg(item.name())+"<br>" +part->lastOperationStatus().message, part->lastOperationStatus().description); return 0; @@ -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); @@ -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 04197412..1ba85265 100644 --- a/kexi/core/kexisharedactionhost.cpp +++ b/kexi/core/kexisharedactionhost.cpp @@ -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; } diff --git a/kexi/core/kexiviewbase.cpp b/kexi/core/kexiviewbase.cpp index 45df1b0d..65f2e68f 100644 --- a/kexi/core/kexiviewbase.cpp +++ b/kexi/core/kexiviewbase.cpp @@ -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 1b2b6f38..564f5a20 100644 --- a/kexi/core/kexiviewbase.h +++ b/kexi/core/kexiviewbase.h @@ -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; diff --git a/kexi/doc/dev/CHANGELOG-Kexi-js b/kexi/doc/dev/CHANGELOG-Kexi-js index faa8076a..e7470e45 100755 --- a/kexi/doc/dev/CHANGELOG-Kexi-js +++ b/kexi/doc/dev/CHANGELOG-Kexi-js @@ -5010,7 +5010,7 @@ doesn't work) 2003-12-03 - KMDI modes enabled -- KexiStatusBar introduced +- KexitStatusBar introduced 2003-11-30 - KexiDB::Field::isFPNumericType() added diff --git a/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html b/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html index bfab0a72..0de7a77a 100644 --- a/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html +++ b/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html @@ -259,7 +259,7 @@ The following example presents a form where text fields and labels were placed b Using special tool called <em>widget layouts</em> can help to automatically lay out the form widgets. Widget tqlayout is an action of grouping two or more widgets so these are well positioned and have appropriate sizes. </p> <p> -Using tqlayout in this form improves tqalignment. Moreover, its space is better developed. Text fields are closer each other, spacing is constant. +Using tqlayout in this form improves alignment. Moreover, its space is better developed. Text fields are closer each other, spacing is constant. <br> <br><img src="img/05_04_08_form_well_fit.png"> <br>Example form with tqlayout used<br><br> diff --git a/kexi/examples/Simple_Database.kexi.sql b/kexi/examples/Simple_Database.kexi.sql index b7712aa8..7ac415e1 100644 --- a/kexi/examples/Simple_Database.kexi.sql +++ b/kexi/examples/Simple_Database.kexi.sql @@ -83,7 +83,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI> <property name="text" > <string>Name</string> </property> -<property name="tqalignment" > +<property name="alignment" > <set>WordBreak|AlignBottom</set> </property> </widget> @@ -141,7 +141,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI> <property name="text" > <string>Surname</string> </property> -<property name="tqalignment" > +<property name="alignment" > <set>WordBreak|AlignBottom</set> </property> </widget> @@ -157,7 +157,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI> <height>70</height> </rect> </property> -<property name="tqalignment" > +<property name="alignment" > <set>AlignTop|AlignRight</set> </property> <property name="storedPixmapId" > diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp index 241a1291..a2cddd89 100644 --- a/kexi/formeditor/commands.cpp +++ b/kexi/formeditor/commands.cpp @@ -139,9 +139,9 @@ TQString PropertyCommand::name() const { if(m_oldvalues.count() >= 2) - return i18n("Change \"%1\" property for multiple widgets" ).tqarg(TQString(m_property)); + return i18n("Change \"%1\" property for multiple widgets" ).arg(TQString(m_property)); else - return i18n("Change \"%1\" property for widget \"%2\"" ).tqarg(TQString(m_property)).tqarg(TQString(m_oldvalues.begin().key())); + return i18n("Change \"%1\" property for widget \"%2\"" ).arg(TQString(m_property)).arg(TQString(m_oldvalues.begin().key())); } void @@ -435,7 +435,7 @@ AdjustSizeCommand::execute() { for(TQWidget *w = list.first(); w; w = list.next()) { ObjectTreeItem *item = m_form->objectTree()->lookup(w->name()); - if(item && !item->tqchildren()->isEmpty()) { // container + if(item && !item->children()->isEmpty()) { // container TQSize s; if(item->container() && item->container()->tqlayout()) s = w->sizeHint(); @@ -545,17 +545,17 @@ AdjustSizeCommand::getSizeFromChildren(ObjectTreeItem *item) { TQSize s; // get size for each container, and keep the biggest one - for(ObjectTreeItem *tree = item->tqchildren()->first(); tree; tree = item->tqchildren()->next()) + for(ObjectTreeItem *tree = item->children()->first(); tree; tree = item->children()->next()) s = s.expandedTo(getSizeFromChildren(tree)); return s; } int tmpw = 0, tmph = 0; - for(ObjectTreeItem *tree = item->tqchildren()->first(); tree; tree = item->tqchildren()->next()) { + for(ObjectTreeItem *tree = item->children()->first(); tree; tree = item->children()->next()) { if(!tree->widget()) continue; - tmpw = TQMAX(tmpw, tree->widget()->tqgeometry().right()); - tmph = TQMAX(tmph, tree->widget()->tqgeometry().bottom()); + tmpw = TQMAX(tmpw, tree->widget()->geometry().right()); + tmph = TQMAX(tmph, tree->widget()->geometry().bottom()); } return TQSize(tmpw, tmph) + TQSize(10, 10); @@ -621,9 +621,9 @@ LayoutPropertyCommand::LayoutPropertyCommand(WidgetPropertySet *buf, const TQCSt if (!titem) return; //better this than a crash Container *m_container = titem->container(); - // We save the tqgeometry of each wigdet - for(ObjectTreeItem *it = m_container->objectTree()->tqchildren()->first(); it; it = m_container->objectTree()->tqchildren()->next()) - m_geometries.insert(it->name().latin1(), it->widget()->tqgeometry()); + // We save the geometry of each wigdet + for(ObjectTreeItem *it = m_container->objectTree()->children()->first(); it; it = m_container->objectTree()->children()->next()) + m_geometries.insert(it->name().latin1(), it->widget()->geometry()); } void @@ -655,7 +655,7 @@ LayoutPropertyCommand::unexecute() TQString LayoutPropertyCommand::name() const { - return i18n("Change tqlayout of widget \"%1\"").tqarg(TQString(m_oldvalues.begin().key())); + return i18n("Change tqlayout of widget \"%1\"").arg(TQString(m_oldvalues.begin().key())); } void @@ -740,7 +740,7 @@ InsertWidgetCommand::execute() WidgetInfo *winfo = m_container->form()->library()->widgetInfoForClassName(m_class); KMessageBox::sorry(FormManager::self()->activeForm() ? FormManager::self()->activeForm()->widget() : 0, i18n("Could not insert widget of type \"%1\". A problem with widget's creation encountered.") - .tqarg(winfo ? winfo->name() : TQString())); + .arg(winfo ? winfo->name() : TQString())); kdWarning() << "InsertWidgetCommand::execute() ERROR: widget creation failed" << endl; return; } @@ -830,7 +830,7 @@ TQString InsertWidgetCommand::name() const { if(!m_name.isEmpty()) - return i18n("Insert widget \"%1\"").tqarg(TQString(m_name)); + return i18n("Insert widget \"%1\"").arg(TQString(m_name)); else return i18n("Insert widget"); } @@ -867,7 +867,7 @@ CreateLayoutCommand::CreateLayoutCommand(int layoutType, WidgetList &list, Form m_list->sort(); // we sort them now, before creating the tqlayout for(TQWidget *w = m_list->first(); w; w = m_list->next()) - m_pos.insert(w->name(), w->tqgeometry()); + m_pos.insert(w->name(), w->geometry()); ObjectTreeItem *item = form->objectTree()->lookup(m_list->first()->name()); if(item && item->parent()->container()) m_containername = item->parent()->name(); @@ -912,7 +912,7 @@ CreateLayoutCommand::execute() container->setSelectedWidget(0, false); w->move(m_pos.begin().data().topLeft()); // we move the tqlayout at the position of the topleft widget - // sizeHint of these widgets depends on tqgeometry, so give them appropriate tqgeometry + // sizeHint of these widgets depends on geometry, so give them appropriate geometry if(m_type == Container::HFlow) w->resize( TQSize(700, 20) ); else if(m_type == Container::VFlow) @@ -1019,7 +1019,7 @@ BreakLayoutCommand::BreakLayoutCommand(Container *container) m_form = container->form(); m_type = container->layoutType(); - for(ObjectTreeItem *tree = container->objectTree()->tqchildren()->first(); tree; tree = container->objectTree()->tqchildren()->next()) + for(ObjectTreeItem *tree = container->objectTree()->children()->first(); tree; tree = container->objectTree()->children()->next()) { TQRect r(container->widget()->mapTo(container->widget()->parentWidget(), tree->widget()->pos()), tree->widget()->size()); m_pos.insert(tree->widget()->name(), r); @@ -1041,7 +1041,7 @@ BreakLayoutCommand::unexecute() TQString BreakLayoutCommand::name() const { - return i18n("Break Layout: \"%1\"").tqarg(m_name); + return i18n("Break Layout: \"%1\"").arg(m_name); } void @@ -1208,7 +1208,7 @@ PasteWidgetCommand::changePos(TQDomElement &el, const TQPoint &newpos) { //TQDomElement el = widg.cloneNode(true).toElement(); TQDomElement rect; - // Find the widget tqgeometry if there is one + // Find the widget geometry if there is one for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling()) { if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "geometry")) @@ -1253,7 +1253,7 @@ PasteWidgetCommand::fixPos(TQDomElement &el, Container *container) if(!w) return; - while((w->tqgeometry() == r) && (w != 0))// there is already a widget there, with the same size + while((w->geometry() == r) && (w != 0))// there is already a widget there, with the same size { w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false); r.moveBy(10,10); @@ -1302,7 +1302,7 @@ PasteWidgetCommand::moveWidgetBy(TQDomElement &el, Container *container, const T TQWidget *w = m_form->widget()->childAt(r.x() + 6, r.y() + 6, false); - while(w && (w->tqgeometry() == r))// there is already a widget there, with the same size + while(w && (w->geometry() == r))// there is already a widget there, with the same size { w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false); r.moveBy(10,10); diff --git a/kexi/formeditor/commands.h b/kexi/formeditor/commands.h index 64e5a253..ad468261 100644 --- a/kexi/formeditor/commands.h +++ b/kexi/formeditor/commands.h @@ -105,7 +105,7 @@ class KFORMEDITOR_EXPORT GeometryPropertyCommand : public Command /*! This command is used when an item in 'Align Widgets position' is selected. You just need to give the list of widget names (the selected ones), and the - type of tqalignment (see the enum for possible values). */ + type of alignment (see the enum for possible values). */ class KFORMEDITOR_EXPORT AlignWidgetsCommand : public Command { public: diff --git a/kexi/formeditor/connectiondialog.cpp b/kexi/formeditor/connectiondialog.cpp index 38b6e08e..e1dcf1be 100644 --- a/kexi/formeditor/connectiondialog.cpp +++ b/kexi/formeditor/connectiondialog.cpp @@ -334,7 +334,7 @@ ConnectionDialog::checkConnection(KexiTableItem *item) { if( !item || (*item)[i].toString().isEmpty()) { - setStatusError( i18n("<qt>You have not selected item: <b>%1</b>.</qt>").tqarg(m_data->column(i)->captionAliasOrName()), + setStatusError( i18n("<qt>You have not selected item: <b>%1</b>.</qt>").arg(m_data->column(i)->captionAliasOrName()), item); return; } diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index d1275adc..706ef69b 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -73,7 +73,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev) } } // else if(ev->type() == TQEvent::ChildInserted) { - // widget's tqchildren have changed, we need to reinstall filter + // widget's children have changed, we need to reinstall filter // installRecursiveEventFilter(m_widget, this); // } @@ -180,7 +180,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) unSelectWidget(m_moving); else // the widget is the only selected, so it means we want to copy it { - //m_copyRect = m_moving->tqgeometry(); + //m_copyRect = m_moving->geometry(); m_state = CopyingWidget; if(m_form->formWidget()) m_form->formWidget()->initBuffer(); @@ -408,7 +408,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) ObjectTreeItem *item = form()->objectTree()->lookup(form()->selectedWidgets()->first()->name()); if(!item || !item->parent()) return true; - ObjectTreeList *list = item->parent()->tqchildren(); + ObjectTreeList *list = item->parent()->children(); if(list->count() == 1) return true; int index = list->findRef(item); @@ -639,7 +639,7 @@ Container::setLayout(LayoutType type) return; } } - m_container->setGeometry(m_container->tqgeometry()); // just update tqlayout + m_container->setGeometry(m_container->geometry()); // just update tqlayout m_layout->activate(); } @@ -656,7 +656,7 @@ Container::createBoxLayout(WidgetList *list) { TQBoxLayout *tqlayout = static_cast<TQBoxLayout*>(m_layout); - for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) + for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) list->append( tree->widget()); list->sort(); @@ -669,7 +669,7 @@ void Container::createFlowLayout() { KexiFlowLayout *flow = dynamic_cast<KexiFlowLayout*>(m_layout); - if(!flow || m_tree->tqchildren()->isEmpty()) + if(!flow || m_tree->children()->isEmpty()) return; const int offset = 15; @@ -684,7 +684,7 @@ Container::createFlowLayout() } // fill the list - for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) + for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) list->append( tree->widget()); list->sort(); @@ -741,11 +741,11 @@ Container::createGridLayout(bool testOnly) int end=-1000; bool same = false; - for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) + for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) vlist->append( tree->widget()); vlist->sort(); - for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) + for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) hlist->append( tree->widget()); hlist->sort(); @@ -759,19 +759,19 @@ Container::createGridLayout(bool testOnly) for(; it2.current() != 0; ++it2) { TQWidget *nextw = it2.current(); - if((w->y() >= nextw->y()) || (nextw->y() >= w->tqgeometry().bottom())) + if((w->y() >= nextw->y()) || (nextw->y() >= w->geometry().bottom())) break; - if(!w->tqgeometry().intersects(nextw->tqgeometry())) + if(!w->geometry().intersects(nextw->geometry())) break; // If the geometries of the two widgets intersect each other, // we move one of the widget to the rght or bottom of the other if((nextw->y() - w->y()) > abs(nextw->x() - w->x())) - nextw->move(nextw->x(), w->tqgeometry().bottom()+1); + nextw->move(nextw->x(), w->geometry().bottom()+1); else if(nextw->x() >= w->x()) - nextw->move(w->tqgeometry().right()+1, nextw->y()); + nextw->move(w->geometry().right()+1, nextw->y()); else - w->move(nextw->tqgeometry().right()+1, nextw->y()); + w->move(nextw->geometry().right()+1, nextw->y()); } } } @@ -782,7 +782,7 @@ Container::createGridLayout(bool testOnly) TQWidget *w = it.current(); WidgetListIterator it2 = it; if(!same) { // this widget will make a new row - end = w->tqgeometry().bottom(); + end = w->geometry().bottom(); rows.append(w->y()); } @@ -796,9 +796,9 @@ Container::createGridLayout(bool testOnly) if(nextw->y() >= end) same = false; else { - same = !(same && (nextw->y() >= w->tqgeometry().bottom())); + same = !(same && (nextw->y() >= w->geometry().bottom())); if(!same) - end = w->tqgeometry().bottom(); + end = w->geometry().bottom(); } } kdDebug() << "the new grid will have n rows: n == " << rows.size() << endl; @@ -811,7 +811,7 @@ Container::createGridLayout(bool testOnly) TQWidget *w = it.current(); WidgetListIterator it2 = it; if(!same) { - end = w->tqgeometry().right(); + end = w->geometry().right(); cols.append(w->x()); } @@ -823,9 +823,9 @@ Container::createGridLayout(bool testOnly) if(nextw->x() >= end) same = false; else { - same = !(same && (nextw->x() >= w->tqgeometry().right())); + same = !(same && (nextw->x() >= w->geometry().right())); if(!same) - end = w->tqgeometry().right(); + end = w->geometry().right(); } } kdDebug() << "the new grid will have n columns: n == " << cols.size() << endl; @@ -841,7 +841,7 @@ Container::createGridLayout(bool testOnly) for(WidgetListIterator it(*vlist); it.current() != 0; ++it) { TQWidget *w = it.current(); - TQRect r = w->tqgeometry(); + TQRect r = w->geometry(); uint wcol=0, wrow=0, endrow=0, endcol=0; uint i = 0; @@ -971,7 +971,7 @@ Container::drawConnection(TQMouseEvent *mev) { FormManager::self()->createdConnection()->setReceiver(m_moving->name()); FormManager::self()->createSlotMenu(m_moving); - m_container->tqrepaint(); + m_container->repaint(); return; } // the user clicked outside the menu, we cancel the connection @@ -997,12 +997,12 @@ Container::drawSelectionRect(TQMouseEvent *mev) setSelectedWidget(m_container, false); TQWidget *widgetToSelect = 0; // We check which widgets are in the rect and select them - for(ObjectTreeItem *item = m_tree->tqchildren()->first(); item; item = m_tree->tqchildren()->next()) + for(ObjectTreeItem *item = m_tree->children()->first(); item; item = m_tree->children()->next()) { TQWidget *w = item->widget(); if(!w) continue; - if(w->tqgeometry().intersects(r) && w != m_container) { + if(w->geometry().intersects(r) && w != m_container) { if (widgetToSelect) setSelectedWidget(widgetToSelect, true/*add*/, false/*raise*/, true/*moreWillBeSelected*/); widgetToSelect = w; //select later @@ -1013,7 +1013,7 @@ Container::drawSelectionRect(TQMouseEvent *mev) m_insertRect = TQRect(); m_state = DoingNothing; - m_container->tqrepaint(); + m_container->repaint(); } void @@ -1070,7 +1070,7 @@ Container::drawCopiedWidgetRect(TQMouseEvent *mev) //FormManager::self()->undo(); // undo last moving //m_moving->move(m_initialPos); if(m_form->formWidget()) { - m_container->tqrepaint(); + m_container->repaint(); m_form->formWidget()->initBuffer(); } m_state = CopyingWidget; @@ -1081,7 +1081,7 @@ Container::drawCopiedWidgetRect(TQMouseEvent *mev) if(m_form->formWidget()) { TQValueList<TQRect> rectList; for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next()) { - TQRect drawRect = w->tqgeometry(); + TQRect drawRect = w->geometry(); TQPoint p = mev->pos() - m_grab; drawRect.moveBy(p.x(), p.y()); p = m_container->mapTo(m_form->widget(), TQPoint(0, 0)); diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp index 2e30d5f4..e41e5613 100644 --- a/kexi/formeditor/factories/containerfactory.cpp +++ b/kexi/formeditor/factories/containerfactory.cpp @@ -256,7 +256,7 @@ InsertPageCommand::execute() if(classname == "KFDTabWidget") { TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(parent); - TQString n = i18n("Page %1").tqarg(tab->count() + 1); + TQString n = i18n("Page %1").arg(tab->count() + 1); tab->addTab(page, n); tab->showPage(page); @@ -455,7 +455,7 @@ ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStrin wSplitter->setName(i18n("Splitter")); wSplitter->setNamePrefix( i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "splitter")); - wSplitter->setDescription(i18n("A container that enables user to resize its tqchildren")); + wSplitter->setDescription(i18n("A container that enables user to resize its children")); addClass(wSplitter); KFormDesigner::WidgetInfo *wHFlow = new KFormDesigner::WidgetInfo(this); @@ -682,7 +682,7 @@ ContainerFactory::createMenuActions(const TQCString &classname, TQWidget *w, TQP int id = menu->insertItem(SmallIconSet("tab_new"), i18n("Add Page"), this, TQT_SLOT(addStackPage()) ); id = menu->insertItem(SmallIconSet("tab_remove"), i18n("Remove Page"), this, TQT_SLOT(removeStackPage()) ); -// if( ((TQWidgetStack*)m_widget)->tqchildren()->count() == 4) // == the stack has only one page +// if( ((TQWidgetStack*)m_widget)->children()->count() == 4) // == the stack has only one page if(stack->childrenListObject().count() == 4) // == the stack has only one page menu->setItemEnabled(id, false); @@ -872,8 +872,8 @@ void ContainerFactory::reorderTabs(int oldpos, int newpos) if(!tab) return; - KFormDesigner::ObjectTreeItem *item = tab->tqchildren()->take(oldpos); - tab->tqchildren()->insert(newpos, item); + KFormDesigner::ObjectTreeItem *item = tab->children()->take(oldpos); + tab->children()->insert(newpos, item); } void ContainerFactory::addStackPage() diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp index afc37086..2607fcca 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.cpp +++ b/kexi/formeditor/factories/stdwidgetfactory.cpp @@ -492,7 +492,7 @@ StdWidgetFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes if(classname == "KLineEdit") { KLineEdit *lineedit = static_cast<KLineEdit*>(w); - createEditor(classname, lineedit->text(), lineedit, container, lineedit->tqgeometry(), lineedit->tqalignment(), true); + createEditor(classname, lineedit->text(), lineedit, container, lineedit->geometry(), lineedit->alignment(), true); return true; } else if(classname == TQLABEL_OBJECT_NAME_STRING) @@ -505,7 +505,7 @@ StdWidgetFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes editText(); } else - createEditor(classname, label->text(), label, container, label->tqgeometry(), label->tqalignment()); + createEditor(classname, label->text(), label, container, label->geometry(), label->alignment()); return true; } else if(classname == "KPushButton") @@ -531,7 +531,7 @@ StdWidgetFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes else if(classname == TQCHECKBOX_OBJECT_NAME_STRING) { TQCheckBox *check = static_cast<TQCheckBox*>(w); - //TQRect r(check->tqgeometry()); + //TQRect r(check->geometry()); //r.setX(r.x() + 20); TQRect r = w->tqstyle().subRect(TQStyle::SR_CheckBoxContents, w); TQRect editorRect = TQRect(check->x() + r.x(), check->y() + r.y(), r.width(), r.height()); @@ -860,7 +860,7 @@ StdWidgetFactory::isPropertyVisibleInternal(const TQCString &classname, } else if(classname == "KexiPictureLabel") { - if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "tqalignment")) + if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment")) return false; } else if(classname == TQLABEL_OBJECT_NAME_STRING) diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp index 237c7ec8..6ed3e570 100644 --- a/kexi/formeditor/form.cpp +++ b/kexi/formeditor/form.cpp @@ -365,7 +365,7 @@ Form::changeName(const TQCString &oldname, const TQCString &newname) if(!d->topTree->rename(oldname, newname)) // rename failed { KMessageBox::sorry(widget()->topLevelWidget(), - i18n("Renaming widget \"%1\" to \"%2\" failed.").tqarg(TQString(oldname)).tqarg(TQString(newname))); + i18n("Renaming widget \"%1\" to \"%2\" failed.").arg(TQString(oldname)).arg(TQString(newname))); //moved to WidgetPropertySet::slotChangeProperty() // KMessageBox::sorry(widget()->topLevelWidget(), // i18n("A widget with this name already exists. " @@ -499,7 +499,7 @@ void collectContainers(ObjectTreeItem* item, TQPtrDict<char>& containers) << " " << item->container()->objectTree()->name() << endl; containers.insert( item->container(), (const char *)1 ); } - for (ObjectTreeListIterator it(*item->tqchildren()); it.current(); ++it) + for (ObjectTreeListIterator it(*item->children()); it.current(); ++it) collectContainers(it.current(), containers); } diff --git a/kexi/formeditor/form.h b/kexi/formeditor/form.h index 7df731c6..9bb68925 100644 --- a/kexi/formeditor/form.h +++ b/kexi/formeditor/form.h @@ -67,7 +67,7 @@ class KFORMEDITOR_EXPORT FormWidget /*! This function inits the buffer used for double-buffering. Called before drawing rect. */ virtual void initBuffer() = 0; - /*! Clears the form, ie pastes the whole buffer to tqrepaint the Form. */ + /*! Clears the form, ie pastes the whole buffer to repaint the Form. */ virtual void clearForm() = 0; /*! This function highlights two widgets (to is optional), which are @@ -109,7 +109,7 @@ class FormPrivate PixmapCollection *pixcollection; - //! This map is used to store cursor tqshapes before inserting (so we can restore them later) + //! This map is used to store cursor shapes before inserting (so we can restore them later) TQMap<TQObject*,TQCursor> cursors; //!This string list is used to store the widgets which hasMouseTracking() == true (eg lineedits) diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index 24347c40..9161049d 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -621,7 +621,7 @@ FormIO::writeVariant(TQDomDocument &parent, TQDomElement &parentNode, TQVariant case TQVariant::Cursor: { type = parent.createElement("cursor"); - valueE = parent.createTextNode(TQString::number(value.toCursor().tqshape())); + valueE = parent.createTextNode(TQString::number(value.toCursor().shape())); type.appendChild(valueE); break; } @@ -964,14 +964,14 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do savePropertyValue(tclass, domDoc, "name", item->widget()->property("name"), item->widget()); - // Important: save dataSource property FIRST before properties like "tqalignment" + // Important: save dataSource property FIRST before properties like "alignment" // - needed when subproperties are defined after subwidget creation, and subwidget is created after setting "dataSource" // (this is the case for KexiDBAutoField) //! @todo more properties like "dataSource" may needed here... // if (-1 != item->widget()->metaObject()->findProperty("dataSource")) // savePropertyValue(tclass, domDoc, "dataSource", item->widget()->property("dataSource"), item->widget()); - // We don't want to save the tqgeometry if the widget is inside a tqlayout (so parent.tagName() == "grid" for example) + // We don't want to save the geometry if the widget is inside a tqlayout (so parent.tagName() == "grid" for example) if(item && !item->parent()) { // save form widget size, but not its position savePropertyValue(tclass, domDoc, "geometry", @@ -992,10 +992,10 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do for(TQMap<TQString,TQVariant>::ConstIterator it = map->constBegin(); it != endIt; ++it) { const TQCString name( it.key().latin1() ); - if(name == "hAlign" || name == "vAlign" || name == "wordbreak" || name == "tqalignment") { + if(name == "hAlign" || name == "vAlign" || name == "wordbreak" || name == "alignment") { if(!savedAlignment) // not to save it twice { - savePropertyValue(tclass, domDoc, "tqalignment", item->widget()->property("tqalignment"), item->widget()); + savePropertyValue(tclass, domDoc, "alignment", item->widget()->property("alignment"), item->widget()); savedAlignment = true; } } @@ -1038,13 +1038,13 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do case Container::Grid: // grid tqlayout { tqlayout.setTagName("grid"); - for(ObjectTreeItem *objIt = item->tqchildren()->first(); objIt; objIt = item->tqchildren()->next()) + for(ObjectTreeItem *objIt = item->children()->first(); objIt; objIt = item->children()->next()) saveWidget(objIt, tqlayout, domDoc, true); break; } case Container::HBox: case Container::VBox: { - // as we don't save tqgeometry, we need to sort widgets in the right order, not creation order + // as we don't save geometry, we need to sort widgets in the right order, not creation order WidgetList *list; if(tqlayout.tagName() == "hbox") { list = new HorWidgetList(item->container()->form()->toplevelContainer()->widget()); @@ -1055,7 +1055,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do tqlayout.setTagName("vbox"); } - for(ObjectTreeItem *objTree = item->tqchildren()->first(); objTree; objTree = item->tqchildren()->next()) + for(ObjectTreeItem *objTree = item->children()->first(); objTree; objTree = item->children()->next()) list->append(objTree->widget()); list->sort(); @@ -1090,7 +1090,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do } default: { - for(ObjectTreeItem *objIt = item->tqchildren()->first(); objIt; objIt = item->tqchildren()->next()) + for(ObjectTreeItem *objIt = item->children()->first(); objIt; objIt = item->children()->next()) saveWidget(objIt, tclass, domDoc); } } @@ -1391,7 +1391,7 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl { TQVariant val( readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name) ); if(name == "geometry" && dynamic_cast<FormWidget*>(w)) { - //fix tqgeometry if needed - this is top level form widget + //fix geometry if needed - this is top level form widget TQRect r( val.toRect() ); if (r.left()<0) //negative X! r.moveLeft(0); diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp index 5fb76ca8..f75a4232 100644 --- a/kexi/formeditor/formmanager.cpp +++ b/kexi/formeditor/formmanager.cpp @@ -413,7 +413,7 @@ FormManager::resetCreatedConnection() m_active->formWidget()->clearForm(); } if (m_active && m_active->widget()) - m_active->widget()->tqrepaint(); + m_active->widget()->repaint(); } void @@ -863,14 +863,14 @@ FormManager::createContextMenu(TQWidget *w, Container *container, bool popupAtCu if(!multiple) { if(w == container->form()->widget()) - m_popup->insertTitle(SmallIcon("form"), i18n("%1 : Form").tqarg(w->name()) ); + m_popup->insertTitle(SmallIcon("form"), i18n("%1 : Form").arg(w->name()) ); else m_popup->insertTitle( SmallIcon( container->form()->library()->iconName(w->className())), TQString(w->name()) + " : " + n ); } else m_popup->insertTitle(SmallIcon("multiple_obj"), i18n("Multiple Widgets") - + TQString(" (%1)").tqarg(widgetsCount)); + + TQString(" (%1)").arg(widgetsCount)); KAction *a; #define PLUG_ACTION(_name, forceVisible) \ @@ -1380,9 +1380,9 @@ FormManager::selectAll() return; activeForm()->selectFormWidget(); - uint count = activeForm()->objectTree()->tqchildren()->count(); - for(ObjectTreeItem *it = activeForm()->objectTree()->tqchildren()->first(); it; - it = activeForm()->objectTree()->tqchildren()->next(), count--) + uint count = activeForm()->objectTree()->children()->count(); + for(ObjectTreeItem *it = activeForm()->objectTree()->children()->first(); it; + it = activeForm()->objectTree()->children()->next(), count--) { activeForm()->setSelectedWidget(it->widget(), /*add*/true, /*raise*/false, /*moreWillBeSelected*/count>1); } @@ -1550,7 +1550,7 @@ FormManager::emitFormWidgetSelected( KFormDesigner::Form* form ) enableFormActions(); const bool twoSelected = form->selectedWidgets()->count()==2; - const bool hasChildren = !form->objectTree()->tqchildren()->isEmpty(); + const bool hasChildren = !form->objectTree()->children()->isEmpty(); // Layout actions enableAction("layout_menu", hasChildren); diff --git a/kexi/formeditor/formmanager.h b/kexi/formeditor/formmanager.h index a43100ff..f5c72d73 100644 --- a/kexi/formeditor/formmanager.h +++ b/kexi/formeditor/formmanager.h @@ -221,13 +221,13 @@ class KFORMEDITOR_EXPORT FormManager : public TQObject bool isRedoing() const { return m_isRedoing; } public slots: - /*! Deletes the selected widget in active Form and all of its tqchildren. */ + /*! Deletes the selected widget in active Form and all of its children. */ void deleteWidget(); - /*! Copies the slected widget and all its tqchildren of the active Form using an XML representation. */ + /*! Copies the slected widget and all its children of the active Form using an XML representation. */ void copyWidget(); - /*! Cuts (ie Copies and deletes) the selected widget and all its tqchildren of + /*! Cuts (ie Copies and deletes) the selected widget and all its children of the active Form using an XML representation. */ void cutWidget(); diff --git a/kexi/formeditor/objecttree.cpp b/kexi/formeditor/objecttree.cpp index e2ada714..fa86e804 100644 --- a/kexi/formeditor/objecttree.cpp +++ b/kexi/formeditor/objecttree.cpp @@ -64,14 +64,14 @@ ObjectTreeItem::rename(const TQString &name) void ObjectTreeItem::addChild(ObjectTreeItem *c) { - m_tqchildren.append(c); + m_children.append(c); c->setParent(this); } void ObjectTreeItem::removeChild(ObjectTreeItem *c) { - m_tqchildren.remove(c); + m_children.remove(c); } void @@ -141,10 +141,10 @@ ObjectTree::ObjectTree(const TQString &classn, const TQString &name, TQWidget *w ObjectTree::~ObjectTree() { -// for(ObjectTreeItem *it = tqchildren()->first(); it; it = tqchildren()->next()) +// for(ObjectTreeItem *it = children()->first(); it; it = children()->next()) // removeItem(it->name()); - while (tqchildren()->first()) { - removeItem(tqchildren()->first()); + while (children()->first()) { + removeItem(children()->first()); } } @@ -216,7 +216,7 @@ ObjectTree::removeItem(ObjectTreeItem *c) if (m_container && m_container->form()) m_container->form()->emitChildRemoved(c); - for(ObjectTreeItem *it = c->tqchildren()->first(); it; it = c->tqchildren()->next()) + for(ObjectTreeItem *it = c->children()->first(); it; it = c->children()->next()) removeItem(it->name()); m_treeDict.remove(c->name()); diff --git a/kexi/formeditor/objecttree.h b/kexi/formeditor/objecttree.h index b37d7caa..eaa95a0c 100644 --- a/kexi/formeditor/objecttree.h +++ b/kexi/formeditor/objecttree.h @@ -58,7 +58,7 @@ typedef TQMapConstIterator<TQString, TQVariant> TQVariantMapConstIterator; /*! @short An item representing a widget - Holds the properties of a widget (classname, name, parent, tqchildren ..). + Holds the properties of a widget (classname, name, parent, children ..). @author Lucijan Busch <lucijan@kde.org> */ class KFORMEDITOR_EXPORT ObjectTreeItem @@ -72,7 +72,7 @@ class KFORMEDITOR_EXPORT ObjectTreeItem TQWidget* widget() const { return m_widget; } EventEater* eventEater() const { return m_eater; } ObjectTreeItem* parent() const { return m_parent; } - ObjectTreeList* tqchildren() { return &m_tqchildren; } + ObjectTreeList* children() { return &m_children; } /*! \return a TQMap<TQString, TQVariant> of all modified properties for this widget. The TQVariant is the old value (ie first value) of the property whose name is the TQString. */ @@ -121,7 +121,7 @@ class KFORMEDITOR_EXPORT ObjectTreeItem protected: TQString m_className; TQString m_name; - ObjectTreeList m_tqchildren; + ObjectTreeList m_children; TQGuardedPtr<Container> m_container; TQMap<TQString, TQVariant> m_props; TQMap<TQString, TQVariant> *m_subprops; diff --git a/kexi/formeditor/objecttreeview.cpp b/kexi/formeditor/objecttreeview.cpp index ba48214b..82cb67bb 100644 --- a/kexi/formeditor/objecttreeview.cpp +++ b/kexi/formeditor/objecttreeview.cpp @@ -367,7 +367,7 @@ ObjectTreeView::loadTree(ObjectTreeItem *item, ObjectTreeViewItem *parent) last = last->nextSibling(); treeItem->moveItem(last); - ObjectTreeList *list = item->tqchildren(); + ObjectTreeList *list = item->children(); for(ObjectTreeItem *it = list->first(); it; it = list->next()) loadTree(it, treeItem); diff --git a/kexi/formeditor/richtextdialog.cpp b/kexi/formeditor/richtextdialog.cpp index e3b73975..a8605e7b 100644 --- a/kexi/formeditor/richtextdialog.cpp +++ b/kexi/formeditor/richtextdialog.cpp @@ -168,7 +168,7 @@ RichTextDialog::cursorPositionChanged(int, int) m_toolbar->setButton(TBUnder, m_edit->underline()); int id = 0; - switch(m_edit->tqalignment()) + switch(m_edit->alignment()) { case TQt::AlignLeft: id = TBLeft; break; case TQt::AlignCenter: id = TBCenter; break; diff --git a/kexi/formeditor/richtextdialog.h b/kexi/formeditor/richtextdialog.h index 25150873..f5ae41ea 100644 --- a/kexi/formeditor/richtextdialog.h +++ b/kexi/formeditor/richtextdialog.h @@ -30,7 +30,7 @@ class KColorCombo; namespace KFormDesigner { //! A simple dialog to edit rich text -/*! It allows to change font name, style and color, tqalignment. */ +/*! It allows to change font name, style and color, alignment. */ class KFORMEDITOR_EXPORT RichTextDialog : public KDialogBase { Q_OBJECT diff --git a/kexi/formeditor/scripting/formscript.cpp b/kexi/formeditor/scripting/formscript.cpp index 1123e093..aa32bc02 100644 --- a/kexi/formeditor/scripting/formscript.cpp +++ b/kexi/formeditor/scripting/formscript.cpp @@ -71,7 +71,7 @@ FormScript::execute(const TQString &functionName) m_script->callFunction(functionName); } catch(Kross::Api::Exception& e) { - kdDebug() << TQString("EXCEPTION type='%1' description='%2'").tqarg(e.type()).tqarg(e.description()) << endl; + kdDebug() << TQString("EXCEPTION type='%1' description='%2'").arg(e.type()).arg(e.description()) << endl; return false; } return true; diff --git a/kexi/formeditor/spring.cpp b/kexi/formeditor/spring.cpp index 074b8810..3e0651b1 100644 --- a/kexi/formeditor/spring.cpp +++ b/kexi/formeditor/spring.cpp @@ -47,7 +47,7 @@ Spring::setOrientation(Qt::Orientation orient) SizeType type = sizeType(); m_orient = orient; setSizeType(type); - tqrepaint(); + repaint(); } Spring::SizeType diff --git a/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp b/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp index 09549ddc..1a7b7dda 100644 --- a/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp +++ b/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp @@ -323,7 +323,7 @@ KFormDesignerKDevPart::closeForm(Form *form) { int res = KMessageBox::warningYesNoCancel( m_workspace->topLevelWidget(), i18n( "The form \"%1\" has been modified.\n" - "Do you want to save your changes or discard them?" ).tqarg( form->objectTree()->name() ), + "Do you want to save your changes or discard them?" ).arg( form->objectTree()->name() ), i18n( "Close Form" ), KStdGuiItem::save(), KStdGuiItem::discard() ); if(res == KMessageBox::Yes) @@ -535,13 +535,13 @@ KFormDesignerKDevPart::~KFormDesignerKDevPart() ////// FormWidgetBase : helper widget to draw rects on top of widgets -//tqrepaint all tqchildren widgets +//repaint all children widgets static void repaintAll(TQWidget *w) { TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - static_cast<TQWidget*>(obj)->tqrepaint(); + static_cast<TQWidget*>(obj)->repaint(); } delete list; } @@ -639,7 +639,7 @@ FormWidgetBase::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) ); + p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); diff --git a/kexi/formeditor/test/kfd_part.cpp b/kexi/formeditor/test/kfd_part.cpp index 386bdabf..07e7edfd 100644 --- a/kexi/formeditor/test/kfd_part.cpp +++ b/kexi/formeditor/test/kfd_part.cpp @@ -344,7 +344,7 @@ KFormDesignerPart::closeForm(Form *form) { int res = KMessageBox::questionYesNoCancel( m_workspace->topLevelWidget(), i18n( "The form \"%1\" has been modified.\n" - "Do you want to save your changes or discard them?" ).tqarg( form->objectTree()->name() ), + "Do you want to save your changes or discard them?" ).arg( form->objectTree()->name() ), i18n( "Close Form" ), KStdGuiItem::save(), KStdGuiItem::discard() ); if(res == KMessageBox::Yes) @@ -451,7 +451,7 @@ KFormDesignerPart::slotFormWidgetSelected(Form *form) enableFormActions(); const bool twoSelected = form->selectedWidgets()->count()==2; - const bool hasChildren = !form->objectTree()->tqchildren()->isEmpty(); + const bool hasChildren = !form->objectTree()->children()->isEmpty(); // Layout actions ENABLE_ACTION("layout_menu", hasChildren); @@ -558,14 +558,14 @@ KFormDesignerPart::setRedoEnabled(bool enabled, const TQString &text) ////// FormWidgetBase : helper widget to draw rects on top of widgets -//tqrepaint all tqchildren widgets +//repaint all children widgets static void repaintAll(TQWidget *w) { - w->tqrepaint(); + w->repaint(); TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - static_cast<TQWidget*>(obj)->tqrepaint(); + static_cast<TQWidget*>(obj)->repaint(); } delete list; } @@ -663,7 +663,7 @@ FormWidgetBase::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) ); + p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); diff --git a/kexi/formeditor/utils.cpp b/kexi/formeditor/utils.cpp index 85e93204..53a9a15b 100644 --- a/kexi/formeditor/utils.cpp +++ b/kexi/formeditor/utils.cpp @@ -88,7 +88,7 @@ void KFormDesigner::setRecursiveCursor(TQWidget *w, Form *form) { ObjectTreeItem *tree = form->objectTree()->lookup(w->name()); - if(tree && ((tree->modifiedProperties()->contains("cursor")) || !tree->tqchildren()->isEmpty()) + if(tree && ((tree->modifiedProperties()->contains("cursor")) || !tree->children()->isEmpty()) && !w->inherits(TQLINEEDIT_OBJECT_NAME_STRING) && !w->inherits(TQTEXTEDIT_OBJECT_NAME_STRING) ) //fix weird behaviour return; // if the user has set a cursor for this widget or this is a container, don't change it @@ -108,7 +108,7 @@ KFormDesigner::getSizeFromChildren(TQWidget *w, const char *inheritClass) int tmpw = 0, tmph = 0; TQObjectList *list = w->queryList(inheritClass, 0, false, false); for(TQObject *o = list->first(); o; o = list->next()) { - TQRect r = ((TQWidget*)o)->tqgeometry(); + TQRect r = ((TQWidget*)o)->geometry(); tmpw = TQMAX(tmpw, r.right()); tmph = TQMAX(tmph, r.bottom()); } diff --git a/kexi/formeditor/utils.h b/kexi/formeditor/utils.h index 5107b45c..d6d56acb 100644 --- a/kexi/formeditor/utils.h +++ b/kexi/formeditor/utils.h @@ -94,18 +94,18 @@ class VerWidgetList : public WidgetList KFORMEDITOR_EXPORT void removeChildrenFromList(WidgetList &list); /*! This helper function install an event filter on \a object and all of its - tqchildren, directed to \a container. + children, directed to \a container. This is necessary to filter events for composed widgets. */ KFORMEDITOR_EXPORT void installRecursiveEventFilter(TQObject *object, TQObject *container); /*! This helper function removes an event filter installed before - on \a object and all of its tqchildren. + on \a object and all of its children. This is necessary to filter events for composed widgets. */ KFORMEDITOR_EXPORT void removeRecursiveEventFilter(TQObject *object, TQObject *container); KFORMEDITOR_EXPORT void setRecursiveCursor(TQWidget *w, Form *form); -/*! \return the size of \a w tqchildren. This can be used eg to get widget's sizeHint. */ +/*! \return the size of \a w children. This can be used eg to get widget's sizeHint. */ KFORMEDITOR_EXPORT TQSize getSizeFromChildren(TQWidget *widget, const char *inheritClass=TQWIDGET_OBJECT_NAME_STRING); } diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp index 61688ac6..9bec64ba 100644 --- a/kexi/formeditor/widgetfactory.cpp +++ b/kexi/formeditor/widgetfactory.cpp @@ -183,7 +183,7 @@ void WidgetFactory::hideClass(const char *classname) void WidgetFactory::createEditor(const TQCString &classname, const TQString &text, - TQWidget *w, Container *container, TQRect tqgeometry, + TQWidget *w, Container *container, TQRect geometry, int align, bool useFrame, bool multiLine, BackgroundMode background) { //#ifdef KEXI_KTEXTEDIT @@ -198,7 +198,7 @@ WidgetFactory::createEditor(const TQCString &classname, const TQString &text, textedit->setPalette(w->palette()); textedit->setFont(w->font()); textedit->setResizePolicy(TQScrollView::Manual); - textedit->setGeometry(tqgeometry); + textedit->setGeometry(geometry); if(background == TQt::NoBackground) textedit->setBackgroundMode(w->backgroundMode()); else @@ -232,7 +232,7 @@ WidgetFactory::createEditor(const TQCString &classname, const TQString &text, editor->setAlignment(align); editor->setPalette(w->palette()); editor->setFont(w->font()); - editor->setGeometry(tqgeometry); + editor->setGeometry(geometry); if(background == TQt::NoBackground) editor->setBackgroundMode(w->backgroundMode()); else @@ -317,7 +317,7 @@ WidgetFactory::editList(TQWidget *w, TQStringList &list) KDialogBase dialog(w->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); - KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(w->name()), &dialog, "editlist"); + KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(w->name()), &dialog, "editlist"); dialog.setMainWidget(edit); edit->insertStringList(list); // edit->show(); @@ -456,7 +456,7 @@ WidgetFactory::resetEditor() if(m_widget) { disconnect(m_widget, 0, this, 0); - m_widget->tqrepaint(); + m_widget->repaint(); } //js delete m_handles; diff --git a/kexi/formeditor/widgetfactory.h b/kexi/formeditor/widgetfactory.h index 9e585625..7c9c5ceb 100644 --- a/kexi/formeditor/widgetfactory.h +++ b/kexi/formeditor/widgetfactory.h @@ -384,10 +384,10 @@ class KFORMEDITOR_EXPORT WidgetFactory : public TQObject /*! This function creates a KLineEdit to input some text and edit a widget's contents. This can be used in startEditing(). \a text is the text to display by default - in the line edit, \a w is the edited widget, \a tqgeometry is the tqgeometry the new line + in the line edit, \a w is the edited widget, \a geometry is the geometry the new line edit should have, and \a align is TQt::AlignmentFlags of the new line edit. */ void createEditor(const TQCString &classname, const TQString &text, - TQWidget *w, Container *container, TQRect tqgeometry, + TQWidget *w, Container *container, TQRect geometry, int align, bool useFrame=false, bool multiLine = false, BackgroundMode background = TQt::NoBackground); @@ -403,7 +403,7 @@ class KFORMEDITOR_EXPORT WidgetFactory : public TQObject into \a list when the user presses "Ok".*/ bool editList(TQWidget *w, TQStringList &list); - /*! This function creates a little editor to modify rich text. It supports tqalignment, + /*! This function creates a little editor to modify rich text. It supports alignment, subscript and superscript and all basic formatting properties. If the user presses "Ok", the edited text is put in \a text. If he presses "Cancel", nothing happens. */ diff --git a/kexi/formeditor/widgetlibrary.cpp b/kexi/formeditor/widgetlibrary.cpp index 9a680db5..953b220b 100644 --- a/kexi/formeditor/widgetlibrary.cpp +++ b/kexi/formeditor/widgetlibrary.cpp @@ -219,8 +219,8 @@ WidgetLibrary::lookupFactories() if (KFormDesigner::version()!=factoryVersion) { kdWarning() << TQString("WidgetLibrary::lookupFactories(): factory '%1'" " has version '%2' but required Widget Factory version is '%3'\n" - " -- skipping this factory!").tqarg(ptr->library()).tqarg(factoryVersion) - .tqarg(KFormDesigner::version()) << endl; + " -- skipping this factory!").arg(ptr->library()).arg(factoryVersion) + .arg(KFormDesigner::version()) << endl; continue; } d->services.insert(ptr->library().latin1(), new KService::Ptr( ptr )); @@ -739,7 +739,7 @@ WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup( textVertical = i18n("InsertQt::Vertical Widget", "InsertQt::Vertical"); KPopupMenu* popup = new KPopupMenu(parent, "orientationSelectionPopup"); - popup->insertTitle(SmallIcon(wclass->pixmap()), i18n("Insert Widget: %1").tqarg(wclass->name())); + popup->insertTitle(SmallIcon(wclass->pixmap()), i18n("Insert Widget: %1").arg(wclass->name())); popup->insertItem(iconHorizontal, textHorizontal, 1); popup->insertItem(iconVertical, textVertical, 2); popup->insertSeparator(); diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index 5ed8f96d..8d7d7daf 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -253,7 +253,7 @@ WidgetPropertySet::addWidget(TQWidget *w) //second widget, update metainfo d->set["this:className"].setValue("special:multiple"); d->set["this:classString"].setValue( - i18n("Multiple Widgets") + TQString(" (%1)").tqarg(d->widgets.count()) ); + i18n("Multiple Widgets") + TQString(" (%1)").arg(d->widgets.count()) ); d->set["this:iconName"].setValue("multiple_obj"); //name doesn't make sense for now d->set["name"].setValue(""); @@ -328,7 +328,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) const bool oldValueExists = modifiedPropertiesIt!=modifiedProperties->constEnd(); if(meta->isEnumType()) { - if(qstrcmp(propertyName, "tqalignment") == 0) { + if(qstrcmp(propertyName, "alignment") == 0) { createAlignProperty(meta, w, subwidget); continue; } @@ -678,7 +678,7 @@ WidgetPropertySet::isNameValid(const TQString &name) KMessageBox::sorry(KFormDesigner::FormManager::self()->activeForm()->widget(), i18n("Could not rename widget \"%1\" to \"%2\" because " "\"%3\" is not a valid name (identifier) for a widget.\n") - .tqarg(w->name()).tqarg(name).tqarg(name)); + .arg(w->name()).arg(name).arg(name)); d->slotPropertyChangedEnabled = false; d->set["name"].resetValue(); d->slotPropertyChangedEnabled = true; @@ -689,7 +689,7 @@ WidgetPropertySet::isNameValid(const TQString &name) KMessageBox::sorry( KFormDesigner::FormManager::self()->activeForm()->widget(), i18n("Could not rename widget \"%1\" to \"%2\" " "because a widget with the name \"%3\" already exists.\n") - .tqarg(w->name()).tqarg(name).tqarg(name)); + .arg(w->name()).arg(name).arg(name)); d->slotPropertyChangedEnabled = false; d->set["name"].resetValue(); d->slotPropertyChangedEnabled = true; @@ -740,7 +740,7 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev) if(d->set["geometry"].value() == o->property("geometry")) // to avoid infinite recursion return false; - d->set["geometry"] = TQT_TQWIDGET(o)->tqgeometry(); + d->set["geometry"] = TQT_TQWIDGET(o)->geometry(); } } else if(d->widgets.count() > 1 && ev->type() == TQEvent::Move) // the widget is being moved, we update the property @@ -775,8 +775,8 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid TQStringList list; TQString value; - const int tqalignment = subwidget->property("tqalignment").toInt(); - const TQStringList keys( TQStringList::fromStrList( meta->valueToKeys(tqalignment) ) ); + const int alignment = subwidget->property("alignment").toInt(); + const TQStringList keys( TQStringList::fromStrList( meta->valueToKeys(alignment) ) ); TQStrList *enumKeys = new TQStrList(meta->enumKeys()); const TQStringList possibleValues( TQStringList::fromStrList(*enumKeys) ); @@ -786,7 +786,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid bool isTopLevel = KFormDesigner::FormManager::self()->isTopLevel(widget); if(possibleValues.find("AlignHCenter")!=possibleValues.constEnd()) { - // Create the horizontal tqalignment property + // Create the horizontal alignment property if(keys.find("AlignHCenter")!=keys.constEnd() || keys.find("AlignCenter")!=keys.constEnd()) value = "AlignHCenter"; else if(keys.find("AlignRight")!=keys.constEnd()) @@ -812,7 +812,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid if(possibleValues.find("AlignTop")!=possibleValues.constEnd()) { - // Create the ver tqalignment property + // Create the ver alignment property if(keys.find("AlignTop")!=keys.constEnd()) value = "AlignTop"; else if(keys.find("AlignBottom")!=keys.constEnd()) @@ -837,7 +837,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid ) { // Create the wordbreak property KoProperty::Property *p = new KoProperty::Property("wordbreak", - TQVariant(tqalignment & TQt::WordBreak, 3), i18n("Word Break"), i18n("Word Break") ); + TQVariant(alignment & TQt::WordBreak, 3), i18n("Word Break"), i18n("Word Break") ); d->set.addProperty(p); updatePropertyValue(tree, "wordbreak"); if (!KFormDesigner::FormManager::self()->activeForm()->library()->isPropertyVisible( @@ -865,9 +865,9 @@ WidgetPropertySet::saveAlignProperty(const TQString &property) WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>( (TQWidget*)d->widgets.first() ); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : (TQWidget*)d->widgets.first(); - int count = subwidget->metaObject()->findProperty("tqalignment", true); + int count = subwidget->metaObject()->findProperty("alignment", true); const TQMetaProperty *meta = subwidget->metaObject()->property(count, true); - subwidget->setProperty("tqalignment", meta->keysToValue(list)); + subwidget->setProperty("alignment", meta->keysToValue(list)); ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup( d->widgets.first()->name() ); @@ -877,11 +877,11 @@ WidgetPropertySet::saveAlignProperty(const TQString &property) if(d->isUndoing) return; - if(d->lastCommand && d->lastCommand->property() == "tqalignment") + if(d->lastCommand && d->lastCommand->property() == "alignment") d->lastCommand->setValue(meta->keysToValue(list)); else { d->lastCommand = new PropertyCommand(this, d->widgets.first()->name(), - subwidget->property("tqalignment"), meta->keysToValue(list), "tqalignment"); + subwidget->property("alignment"), meta->keysToValue(list), "alignment"); KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastCommand, false); } } diff --git a/kexi/formeditor/widgetpropertyset.h b/kexi/formeditor/widgetpropertyset.h index afb303d1..f1f96a99 100644 --- a/kexi/formeditor/widgetpropertyset.h +++ b/kexi/formeditor/widgetpropertyset.h @@ -157,15 +157,15 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public TQObject // Following functions are used to create special types of properties, different // from TQ_PROPERTY - /*! Creates the properties related to tqalignment (ie hAlign, vAlign and WordBreak) for + /*! Creates the properties related to alignment (ie hAlign, vAlign and WordBreak) for the TQWidget \a widget. \a subwidget is the same as \a widget if the widget itself handles the property and it's a child widget if the child handles the property. For example, the second case is true for KexiDBAutoField. - \a meta is the TQMetaProperty for "tqalignment" property" of subwidget. */ + \a meta is the TQMetaProperty for "alignment" property" of subwidget. */ void createAlignProperty(const TQMetaProperty *meta, TQWidget *widget, TQWidget *subwidget); - /*! Saves the properties related to tqalignment (ie hAlign, vAlign and WordBreak) - and modifies the "tqalignment" property of the widget.*/ + /*! Saves the properties related to alignment (ie hAlign, vAlign and WordBreak) + and modifies the "alignment" property of the widget.*/ void saveAlignProperty(const TQString &property); /*! Creates the "tqlayout" property, for the Container representing \a item. */ diff --git a/kexi/kexidb/alter.cpp b/kexi/kexidb/alter.cpp index 5386d3d6..f4a1346f 100644 --- a/kexi/kexidb/alter.cpp +++ b/kexi/kexidb/alter.cpp @@ -181,7 +181,7 @@ int AlterTableHandler::alteringTypeForProperty(const TQCString& propertyName) if (KexiDB::isExtendedTableFieldProperty(propertyName)) return (int)ExtendedSchemaAlteringRequired; KexiDBWarn << TQString("AlterTableHandler::alteringTypeForProperty(): property \"%1\" not found!") - .tqarg(propertyName.data()) << endl; + .arg(propertyName.data()) << endl; } return res; } @@ -214,9 +214,9 @@ void AlterTableHandler::ChangeFieldPropertyAction::updateAlteringRequirements() TQString AlterTableHandler::ChangeFieldPropertyAction::debugString(const DebugOptions& debugOptions) { TQString s = TQString("Set \"%1\" property for table field \"%2\" to \"%3\"") - .tqarg(m_propertyName).tqarg(fieldName()).tqarg(m_newValue.toString()); + .arg(m_propertyName).arg(fieldName()).arg(m_newValue.toString()); if (debugOptions.showUID) - s.append(TQString(" (UID=%1)").tqarg(m_fieldUID)); + s.append(TQString(" (UID=%1)").arg(m_fieldUID)); return s; } @@ -267,7 +267,7 @@ static void debugActionDict(AlterTableHandler::ActionDict *dict, int fieldUID, b else fieldName = "??"; TQString dbg = TQString("Action dict for field \"%1\" (%2, UID=%3):") - .tqarg(fieldName).tqarg(dict->count()).tqarg(fieldUID); + .arg(fieldName).arg(dict->count()).arg(fieldUID); KexiDBDbg << dbg << endl; #ifdef KEXI_DEBUG_GUI if (simulate) @@ -495,9 +495,9 @@ void AlterTableHandler::RemoveFieldAction::updateAlteringRequirements() TQString AlterTableHandler::RemoveFieldAction::debugString(const DebugOptions& debugOptions) { - TQString s = TQString("Remove table field \"%1\"").tqarg(fieldName()); + TQString s = TQString("Remove table field \"%1\"").arg(fieldName()); if (debugOptions.showUID) - s.append(TQString(" (UID=%1)").tqarg(uid())); + s.append(TQString(" (UID=%1)").arg(uid())); return s; } @@ -583,11 +583,11 @@ void AlterTableHandler::InsertFieldAction::updateAlteringRequirements() TQString AlterTableHandler::InsertFieldAction::debugString(const DebugOptions& debugOptions) { TQString s = TQString("Insert table field \"%1\" at position %2") - .tqarg(m_field->name()).tqarg(m_index); + .arg(m_field->name()).arg(m_index); if (debugOptions.showUID) - s.append(TQString(" (UID=%1)").tqarg(m_fieldUID)); + s.append(TQString(" (UID=%1)").arg(m_fieldUID)); if (debugOptions.showFieldDebug) - s.append(TQString(" (%1)").tqarg(m_field->debugString())); + s.append(TQString(" (%1)").arg(m_field->debugString())); return s; } @@ -710,9 +710,9 @@ void AlterTableHandler::MoveFieldPositionAction::updateAlteringRequirements() TQString AlterTableHandler::MoveFieldPositionAction::debugString(const DebugOptions& debugOptions) { TQString s = TQString("Move table field \"%1\" to position %2") - .tqarg(fieldName()).tqarg(m_index); + .arg(fieldName()).arg(m_index); if (debugOptions.showUID) - s.append(TQString(" (UID=%1)").tqarg(uid())); + s.append(TQString(" (UID=%1)").arg(uid())); return s; } @@ -878,7 +878,7 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu } } // - Debug - TQString dbg = TQString("** Overall altering requirements: %1").tqarg(args.requirements); + TQString dbg = TQString("** Overall altering requirements: %1").arg(args.requirements); KexiDBDbg << dbg << endl; if (args.onlyComputeRequirements) { @@ -892,14 +892,14 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu if (args.simulate) KexiUtils::addAlterTableActionDebug(dbg, 0); #endif - dbg = TQString("** Ordered, simplified actions (%1, was %2):").tqarg(currentActionsCount).tqarg(allActionsCount); + dbg = TQString("** Ordered, simplified actions (%1, was %2):").arg(currentActionsCount).arg(allActionsCount); KexiDBDbg << dbg << endl; #ifdef KEXI_DEBUG_GUI if (args.simulate) KexiUtils::addAlterTableActionDebug(dbg, 0); #endif for (int i=0; i<allActionsCount; i++) { - debugAction(actionsVector[i], 1, args.simulate, TQString("%1: ").tqarg(i+1), args.debugString); + debugAction(actionsVector[i], 1, args.simulate, TQString("%1: ").arg(i+1), args.debugString); } if (args.requirements == 0) {//nothing to do @@ -918,7 +918,7 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu if (recreateTable) { TQString tempDestTableName; while (true) { - tempDestTableName = TQString("%1_temp%2%3").tqarg(newTable->name()).tqarg(TQString::number(rand(), 16)).tqarg(TQString::number(rand(), 16)); + tempDestTableName = TQString("%1_temp%2%3").arg(newTable->name()).arg(TQString::number(rand(), 16)).arg(TQString::number(rand(), 16)); if (!d->conn->tableSchema(tempDestTableName)) break; } @@ -1007,7 +1007,7 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu // -Some source fields can be skipped in case when there are deleted fields. // -Some destination fields can be skipped in case when there // are new empty fields without fixed/default value. - TQString sql = TQString("INSERT INTO %1 (").tqarg(d->conn->escapeIdentifier(newTable->name())); + TQString sql = TQString("INSERT INTO %1 (").arg(d->conn->escapeIdentifier(newTable->name())); //insert list of dest. fields bool first = true; TQString sourceFields; diff --git a/kexi/kexidb/connection.cpp b/kexi/kexidb/connection.cpp index 34add49a..017e75e4 100644 --- a/kexi/kexidb/connection.cpp +++ b/kexi/kexidb/connection.cpp @@ -254,8 +254,8 @@ bool Connection::connect() d->serverVersion.clear(); if (!(d->isConnected = drv_connect(d->serverVersion))) { setError(m_driver->isFileDriver() ? - i18n("Could not open \"%1\" project file.").tqarg(TQDir::convertSeparators(d->conn_data->fileName())) - : i18n("Could not connect to \"%1\" database server.").tqarg(d->conn_data->serverInfoString()) ); + i18n("Could not open \"%1\" project file.").arg(TQDir::convertSeparators(d->conn_data->fileName())) + : i18n("Could not connect to \"%1\" database server.").arg(d->conn_data->serverInfoString()) ); } return d->isConnected; } @@ -363,7 +363,7 @@ bool Connection::drv_databaseExists( const TQString &dbName, bool ignoreErrors ) if (list.find( dbName )==list.end()) { if (!ignoreErrors) - setError(ERR_OBJECT_NOT_FOUND, i18n("The database \"%1\" does not exist.").tqarg(dbName)); + setError(ERR_OBJECT_NOT_FOUND, i18n("The database \"%1\" does not exist.").arg(dbName)); return false; } @@ -384,19 +384,19 @@ bool Connection::databaseExists( const TQString &dbName, bool ignoreErrors ) if (!file.exists() || ( !file.isFile() && !file.isSymLink()) ) { if (!ignoreErrors) setError(ERR_OBJECT_NOT_FOUND, i18n("Database file \"%1\" does not exist.") - .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) ); + .arg(TQDir::convertSeparators(d->conn_data->fileName())) ); return false; } if (!file.isReadable()) { if (!ignoreErrors) setError(ERR_ACCESS_RIGHTS, i18n("Database file \"%1\" is not readable.") - .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) ); + .arg(TQDir::convertSeparators(d->conn_data->fileName())) ); return false; } if (!file.isWritable()) { if (!ignoreErrors) setError(ERR_ACCESS_RIGHTS, i18n("Database file \"%1\" is not writable.") - .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) ); + .arg(TQDir::convertSeparators(d->conn_data->fileName())) ); return false; } return true; @@ -424,7 +424,7 @@ bool Connection::databaseExists( const TQString &dbName, bool ignoreErrors ) #define createDatabase_CLOSE \ { if (!closeDatabase()) { \ - setError(i18n("Database \"%1\" created but could not be closed after creation.").tqarg(dbName) ); \ + setError(i18n("Database \"%1\" created but could not be closed after creation.").arg(dbName) ); \ return false; \ } } @@ -438,12 +438,12 @@ bool Connection::createDatabase( const TQString &dbName ) return false; if (databaseExists( dbName )) { - setError(ERR_OBJECT_EXISTS, i18n("Database \"%1\" already exists.").tqarg(dbName) ); + setError(ERR_OBJECT_EXISTS, i18n("Database \"%1\" already exists.").arg(dbName) ); return false; } if (m_driver->isSystemDatabaseName( dbName )) { setError(ERR_SYSTEM_NAME_RESERVED, - i18n("Cannot create database \"%1\". This name is reserved for system database.").tqarg(dbName) ); + i18n("Cannot create database \"%1\". This name is reserved for system database.").arg(dbName) ); return false; } if (m_driver->isFileDriver()) { @@ -458,7 +458,7 @@ bool Connection::createDatabase( const TQString &dbName ) //low-level create if (!drv_createDatabase( dbName )) { - setError(i18n("Error creating database \"%1\" on the server.").tqarg(dbName) ); + setError(i18n("Error creating database \"%1\" on the server.").arg(dbName) ); closeDatabase();//sanity return false; } @@ -472,7 +472,7 @@ bool Connection::createDatabase( const TQString &dbName ) if (!tmpdbName.isEmpty() || !m_driver->d->isDBOpenedAfterCreate) { //db need to be opened if (!useDatabase( dbName, false/*not yet kexi compatible!*/ )) { - setError(i18n("Database \"%1\" created but could not be opened.").tqarg(dbName) ); + setError(i18n("Database \"%1\" created but could not be opened.").arg(dbName) ); return false; } } @@ -566,7 +566,7 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool if (!drv_useDatabase( my_dbName, cancelled, msgHandler )) { if (cancelled && *cancelled) return false; - TQString msg(i18n("Opening database \"%1\" failed.").tqarg( my_dbName )); + TQString msg(i18n("Opening database \"%1\" failed.").arg( my_dbName )); if (error()) setError( this, msg ); else @@ -589,7 +589,7 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool d->databaseVersion.major = num; /* if (true!=querySingleNumber( "select db_value from kexi__db where db_property=" + m_driver->escapeString(TQString("kexidb_major_ver")), num)) { - d->errorInvalidDBContents(notfound_str.tqarg("kexidb_major_ver")); + d->errorInvalidDBContents(notfound_str.arg("kexidb_major_ver")); return false; }*/ num = d->dbProperties->value("kexidb_minor_ver").toInt(&ok); @@ -598,7 +598,7 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool d->databaseVersion.minor = num; /* if (true!=querySingleNumber( "select db_value from kexi__db where db_property=" + m_driver->escapeString(TQString("kexidb_minor_ver")), num)) { - d->errorInvalidDBContents(notfound_str.tqarg("kexidb_minor_ver")); + d->errorInvalidDBContents(notfound_str.arg("kexidb_minor_ver")); return false; }*/ @@ -607,8 +607,8 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool if (m_driver->versionMajor()!=KexiDB::versionMajor()) { setError(ERR_INCOMPAT_DATABASE_VERSION, i18n("Database version (%1) does not match Kexi application's version (%2)") - .tqarg( TQString("%1.%2").tqarg(versionMajor()).tqarg(versionMinor()) ) - .tqarg( TQString("%1.%2").tqarg(KexiDB::versionMajor()).tqarg(KexiDB::versionMinor()) ) ); + .arg( TQString("%1.%2").arg(versionMajor()).arg(versionMinor()) ) + .arg( TQString("%1.%2").arg(KexiDB::versionMajor()).arg(KexiDB::versionMinor()) ) ); return false; } if (m_driver->versionMinor()!=KexiDB::versionMinor()) { @@ -686,7 +686,7 @@ bool Connection::useTemporaryDatabaseIfNeeded(TQString &tmpdbName) if (!ret) { setError(errorNum(), i18n("Error during starting temporary connection using \"%1\" database name.") - .tqarg(tmpdbName) ); + .arg(tmpdbName) ); return false; } } @@ -725,7 +725,7 @@ bool Connection::dropDatabase( const TQString &dbName ) } if (m_driver->isSystemDatabaseName( dbToDrop )) { - setError(ERR_SYSTEM_NAME_RESERVED, i18n("Cannot delete system database \"%1\".").tqarg(dbToDrop) ); + setError(ERR_SYSTEM_NAME_RESERVED, i18n("Cannot delete system database \"%1\".").arg(dbToDrop) ); return false; } @@ -765,7 +765,7 @@ TQStringList Connection::objectNames(int objType, bool* ok) if (objType==KexiDB::AnyObjectType) sql = "SELECT o_name FROM kexi__objects"; else - sql = TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType); + sql = TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").arg(objType); Cursor *c = executeQuery(sql); if (!c) { @@ -852,7 +852,7 @@ TQValueList<int> Connection::objectIds(int objType) return list; Cursor *c = executeQuery( - TQString::fromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType)); + TQString::fromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").arg(objType)); if (!c) return list; for (c->moveFirst(); !c->eof(); c->moveNext()) @@ -903,12 +903,12 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem if (field->isFPNumericType() && field->precision()>0) { if (field->scale()>0) - v += TQString::fromLatin1("(%1,%2)").tqarg(field->precision()).tqarg(field->scale()); + v += TQString::fromLatin1("(%1,%2)").arg(field->precision()).arg(field->scale()); else - v += TQString::fromLatin1("(%1)").tqarg(field->precision()); + v += TQString::fromLatin1("(%1)").arg(field->precision()); } else if (field->type()==Field::Text && field->length()>0) - v += TQString::fromLatin1("(%1)").tqarg(field->length()); + v += TQString::fromLatin1("(%1)").arg(field->length()); if (autoinc) v += (" " + @@ -1163,12 +1163,12 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, TQString internalUniqueTableAlias( TQString("__kexidb_") + lookupTable->name() + "_" + TQString::number(internalUniqueTableAliasNumber++) ); s_additional_joins += TQString("LEFT OUTER JOIN %1 AS %2 ON %3.%4=%5.%6") - .tqarg(escapeIdentifier(lookupTable->name(), options.identifierEscaping)) - .tqarg(internalUniqueTableAlias) - .tqarg(escapeIdentifier(f->table()->name(), options.identifierEscaping)) - .tqarg(escapeIdentifier(f->name(), options.identifierEscaping)) - .tqarg(internalUniqueTableAlias) - .tqarg(escapeIdentifier(boundField->name(), options.identifierEscaping)); + .arg(escapeIdentifier(lookupTable->name(), options.identifierEscaping)) + .arg(internalUniqueTableAlias) + .arg(escapeIdentifier(f->table()->name(), options.identifierEscaping)) + .arg(escapeIdentifier(f->name(), options.identifierEscaping)) + .arg(internalUniqueTableAlias) + .arg(escapeIdentifier(boundField->name(), options.identifierEscaping)); //add visibleField to the list of SELECTed fields //if it is not yet present there //not needed if (!querySchema.findTableField( visibleField->table()->name()+"."+visibleField->name() )) { @@ -1221,12 +1221,12 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, kexidb_subquery_prefix + lookupQuery->name() + "_" + TQString::number(internalUniqueQueryAliasNumber++) ); s_additional_joins += TQString("LEFT OUTER JOIN (%1) AS %2 ON %3.%4=%5.%6") - .tqarg(selectStatement( *lookupQuery, params, options )) - .tqarg(internalUniqueQueryAlias) - .tqarg(escapeIdentifier(f->table()->name(), options.identifierEscaping)) - .tqarg(escapeIdentifier(f->name(), options.identifierEscaping)) - .tqarg(internalUniqueQueryAlias) - .tqarg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping)); + .arg(selectStatement( *lookupQuery, params, options )) + .arg(internalUniqueQueryAlias) + .arg(escapeIdentifier(f->table()->name(), options.identifierEscaping)) + .arg(escapeIdentifier(f->name(), options.identifierEscaping)) + .arg(internalUniqueQueryAlias) + .arg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping)); if (!s_additional_fields.isEmpty()) s_additional_fields += TQString::fromLatin1(", "); @@ -1306,7 +1306,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, s_from += TQString::fromLatin1("("); s_from += selectStatement( *it.current(), params, options ); s_from += TQString::fromLatin1(") AS %1%2") - .tqarg(kexidb_subquery_prefix).tqarg(subqueries_for_lookup_data_counter); + .arg(kexidb_subquery_prefix).arg(subqueries_for_lookup_data_counter); } sql += s_from; } @@ -1541,7 +1541,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis if (m_driver->isSystemObjectName( tableName )) { clearError(); setError(ERR_SYSTEM_NAME_RESERVED, i18n("System name \"%1\" cannot be used as table name.") - .tqarg(tableSchema->name())); + .arg(tableSchema->name())); return false; } @@ -1550,7 +1550,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis clearError(); setError(ERR_SYSTEM_NAME_RESERVED, i18n("System name \"%1\" cannot be used as one of fields in \"%2\" table.") - .tqarg(sys_field->name()).tqarg(tableName)); + .arg(sys_field->name()).arg(tableName)); return false; } } @@ -1565,7 +1565,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis if (existingTable == tableSchema) { clearError(); setError(ERR_OBJECT_EXISTS, - i18n("Could not create the same table \"%1\" twice.").tqarg(tableSchema->name()) ); + i18n("Could not create the same table \"%1\" twice.").arg(tableSchema->name()) ); return false; } //TODO(js): update any structure (e.g. queries) that depend on this table! @@ -1579,7 +1579,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis else { if (this->tableSchema( tableSchema->name() ) != 0) { clearError(); - setError(ERR_OBJECT_EXISTS, i18n("Table \"%1\" already exists.").tqarg(tableSchema->name()) ); + setError(ERR_OBJECT_EXISTS, i18n("Table \"%1\" already exists.").arg(tableSchema->name()) ); return false; } } @@ -1707,7 +1707,7 @@ tristate Connection::dropTable( KexiDB::TableSchema* tableSchema, bool alsoRemov || this->tableSchema(tableSchema->name())!=tableSchema || this->tableSchema(tableSchema->id())!=tableSchema) { - setError(ERR_OBJECT_NOT_FOUND, errmsg.tqarg(tableSchema->name()) + setError(ERR_OBJECT_NOT_FOUND, errmsg.arg(tableSchema->name()) +i18n("Unexpected name or identifier.")); return false; } @@ -1718,7 +1718,7 @@ tristate Connection::dropTable( KexiDB::TableSchema* tableSchema, bool alsoRemov //sanity checks: if (m_driver->isSystemObjectName( tableSchema->name() )) { - setError(ERR_SYSTEM_NAME_RESERVED, errmsg.tqarg(tableSchema->name()) + d->strItIsASystemObject()); + setError(ERR_SYSTEM_NAME_RESERVED, errmsg.arg(tableSchema->name()) + d->strItIsASystemObject()); return false; } @@ -1757,7 +1757,7 @@ tristate Connection::dropTable( const TQString& table ) TableSchema* ts = tableSchema( table ); if (!ts) { setError(ERR_OBJECT_NOT_FOUND, i18n("Table \"%1\" does not exist.") - .tqarg(table)); + .arg(table)); return false; } return dropTable(ts); @@ -1772,7 +1772,7 @@ tristate Connection::alterTable( TableSchema& tableSchema, TableSchema& newTable if (&tableSchema == &newTableSchema) { setError(ERR_OBJECT_THE_SAME, i18n("Could not alter table \"%1\" using the same table.") - .tqarg(tableSchema.name())); + .arg(tableSchema.name())); return false; } //TODO(js): implement real altering @@ -1793,18 +1793,18 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam { clearError(); if (&tableSchema!=d->tables[tableSchema.id()]) { - setError(ERR_OBJECT_NOT_FOUND, i18n("Unknown table \"%1\"").tqarg(tableSchema.name())); + setError(ERR_OBJECT_NOT_FOUND, i18n("Unknown table \"%1\"").arg(tableSchema.name())); return false; } if (newName.isEmpty() || !KexiUtils::isIdentifier(newName)) { - setError(ERR_INVALID_IDENTIFIER, i18n("Invalid table name \"%1\"").tqarg(newName)); + setError(ERR_INVALID_IDENTIFIER, i18n("Invalid table name \"%1\"").arg(newName)); return false; } const TQString oldTableName = tableSchema.name(); const TQString newTableName = newName.lower().stripWhiteSpace(); if (oldTableName.lower().stripWhiteSpace() == newTableName) { setError(ERR_OBJECT_THE_SAME, i18n("Could rename table \"%1\" using the same name.") - .tqarg(newTableName)); + .arg(newTableName)); return false; } //TODO: alter table name for server DB backends! @@ -1816,7 +1816,7 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam if (!replace && destTableExists) { setError(ERR_OBJECT_EXISTS, i18n("Could not rename table \"%1\" to \"%2\". Table \"%3\" already exists.") - .tqarg(tableSchema.name()).tqarg(newName).tqarg(newName)); + .arg(tableSchema.name()).arg(newName).arg(newName)); return false; } @@ -1839,12 +1839,12 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam // the new table owns the previous table's id: if (!executeSQL(TQString::fromLatin1("UPDATE kexi__objects SET o_id=%1 WHERE o_id=%2 AND o_type=%3") - .tqarg(origID).tqarg(tableSchema.id()).tqarg((int)TableObjectType))) + .arg(origID).arg(tableSchema.id()).arg((int)TableObjectType))) { return false; } if (!executeSQL(TQString::fromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2") - .tqarg(origID).tqarg(tableSchema.id()))) + .arg(origID).arg(tableSchema.id()))) { return false; } @@ -1862,7 +1862,7 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam // Update kexi__objects //TODO if (!executeSQL(TQString::fromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2") - .tqarg(m_driver->escapeString(tableSchema.name())).tqarg(tableSchema.id()))) + .arg(m_driver->escapeString(tableSchema.name())).arg(tableSchema.id()))) { alterTableName_ERR; return false; @@ -1890,7 +1890,7 @@ bool Connection::drv_alterTableName(TableSchema& tableSchema, const TQString& ne tableSchema.setName(newName); if (!executeSQL(TQString::fromLatin1("ALTER TABLE %1 RENAME TO %2") - .tqarg(escapeIdentifier(oldTableName)).tqarg(escapeIdentifier(newName)))) + .arg(escapeIdentifier(oldTableName)).arg(escapeIdentifier(newName)))) { tableSchema.setName(oldTableName); //restore old name return false; @@ -1938,7 +1938,7 @@ bool Connection::dropQuery( const TQString& query ) QuerySchema* qs = querySchema( query ); if (!qs) { setError(ERR_OBJECT_NOT_FOUND, i18n("Query \"%1\" does not exist.") - .tqarg(query)); + .arg(query)); return false; } return dropQuery(qs); @@ -2014,7 +2014,7 @@ bool Connection::rollbackAutoCommitTransaction(const Transaction& trans) #define SET_ERR_TRANS_NOT_SUPP \ { setError(ERR_UNSUPPORTED_DRV_FEATURE, \ - i18n("Transactions are not supported for \"%1\" driver.").tqarg(m_driver->name() )); } + i18n("Transactions are not supported for \"%1\" driver.").arg(m_driver->name() )); } #define SET_BEGIN_TR_ERROR \ { if (!error()) \ @@ -2270,7 +2270,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata ) { //not found: retrieve schema /* KexiDB::Cursor *cursor; - if (!(cursor = executeQuery( TQString("select * from kexi__objects where o_id='%1'").tqarg(objId) ))) + if (!(cursor = executeQuery( TQString("select * from kexi__objects where o_id='%1'").arg(objId) ))) return false; if (!cursor->moveFirst()) { deleteCursor(cursor); @@ -2287,7 +2287,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata ) } sdata.m_name = data[2].toString(); if (!KexiUtils::isIdentifier( sdata.m_name )) { - setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"").tqarg(sdata.m_name)); + setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"").arg(sdata.m_name)); return false; } sdata.m_caption = data[3].toString(); @@ -2302,7 +2302,7 @@ tristate Connection::loadObjectSchemaData( int objectID, SchemaData &sdata ) RowData data; if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1") - .tqarg(objectID), data)) + .arg(objectID), data)) return cancelled; return setupObjectSchemaData( data, sdata ); } @@ -2312,7 +2312,7 @@ tristate Connection::loadObjectSchemaData( int objectType, const TQString& objec RowData data; if (true!=querySingleRecord(TQString::fromLatin1("SELECT o_id, o_type, o_name, o_caption, o_desc " "FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2") - .tqarg(objectType).tqarg(m_driver->valueToSQL(Field::Text, objectName.lower())), data)) + .arg(objectType).arg(m_driver->valueToSQL(Field::Text, objectName.lower())), data)) return cancelled; return setupObjectSchemaData( data, sdata ); } @@ -2326,7 +2326,7 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject ) int existingID; if (true == querySingleNumber(TQString::fromLatin1( "SELECT o_id FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2") - .tqarg(sdata.type()).tqarg(m_driver->valueToSQL(Field::Text, sdata.name().lower())), existingID)) + .arg(sdata.type()).arg(m_driver->valueToSQL(Field::Text, sdata.name().lower())), existingID)) { //we already have stored a schema data with the same name and type: //just update it's properties as it would be existing object @@ -2366,9 +2366,9 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject ) } //existing object: return executeSQL(TQString("UPDATE kexi__objects SET o_type=%2, o_caption=%3, o_desc=%4 WHERE o_id=%1") - .tqarg(sdata.id()).tqarg(sdata.type()) - .tqarg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.caption())) - .tqarg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.description())) ); + .arg(sdata.id()).arg(sdata.type()) + .arg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.caption())) + .arg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.description())) ); } tristate Connection::querySingleRecordInternal(RowData &data, const TQString* sql, QuerySchema* query, @@ -2407,7 +2407,7 @@ tristate Connection::querySingleRecord(QuerySchema& query, RowData &data, bool a bool Connection::checkIfColumnExists(Cursor *cursor, uint column) { if (column >= cursor->fieldCount()) { - setError(ERR_CURSOR_RECORD_FETCHING, i18n("Column %1 does not exist for the query.").tqarg(column)); + setError(ERR_CURSOR_RECORD_FETCHING, i18n("Column %1 does not exist for the query.").arg(column)); return false; } return true; @@ -2695,7 +2695,7 @@ bool Connection::loadExtendedTableSchemaData(TableSchema& tableSchema) int errorLine, errorColumn; if (!doc.setContent( extendedTableSchemaString, &errorMsg, &errorLine, &errorColumn )) loadExtendedTableSchemaData_ERR2( i18n("Error in XML data: \"%1\" in line %2, column %3.\nXML data: ") - .tqarg(errorMsg).tqarg(errorLine).tqarg(errorColumn) + extendedTableSchemaString.left(1024)); + .arg(errorMsg).arg(errorLine).arg(errorColumn) + extendedTableSchemaString.left(1024)); //! @todo look at the current format version (KEXIDB_EXTENDED_TABLE_SCHEMA_VERSION) @@ -2777,7 +2777,7 @@ KexiDB::Field* Connection::setupField( const RowData &data ) if (!KexiUtils::isIdentifier( data.at(2).toString() )) { setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"") - .tqarg( data.at(2).toString() )); + .arg( data.at(2).toString() )); ok = false; return 0; } @@ -2809,7 +2809,7 @@ KexiDB::TableSchema* Connection::setupTableSchema( const RowData &data ) if (!(cursor = executeQuery( TQString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, " "f_options, f_default, f_order, f_caption, f_help" - " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->m_id) ))) + " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").arg(t->m_id) ))) { delete t; return 0; @@ -2869,7 +2869,7 @@ TableSchema* Connection::tableSchema( const TQString& tableName ) RowData data; if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2") - .tqarg(m_tableName).tqarg(KexiDB::TableObjectType), data)) + .arg(m_tableName).arg(KexiDB::TableObjectType), data)) return 0; return setupTableSchema(data); @@ -2884,7 +2884,7 @@ TableSchema* Connection::tableSchema( int tableId ) RowData data; if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1") - .tqarg(tableId), data)) + .arg(tableId), data)) return 0; return setupTableSchema(data); @@ -2904,7 +2904,7 @@ bool Connection::storeDataBlock( int objectID, const TQString &dataString, const { if (objectID<=0) return false; - TQString sql(TQString::fromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").tqarg(objectID)); + TQString sql(TQString::fromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").arg(objectID)); TQString sql_sub( KexiDB::sqlWhere(m_driver, KexiDB::Field::Text, "o_sub_id", dataID) ); bool ok, exists; @@ -2943,7 +2943,7 @@ KexiDB::QuerySchema* Connection::setupQuerySchema( const RowData &data ) if (!loadDataBlock( objID, sqlText, "sql" )) { setError(ERR_OBJECT_NOT_FOUND, i18n("Could not find definition for query \"%1\". Removing this query is recommended.") - .tqarg(data[2].toString())); + .arg(data[2].toString())); return 0; } d->parser()->parse( sqlText ); @@ -2953,8 +2953,8 @@ KexiDB::QuerySchema* Connection::setupQuerySchema( const RowData &data ) setError(ERR_SQL_PARSE_ERROR, i18n("<p>Could not load definition for query \"%1\". " "SQL statement for this query is invalid:<br><tt>%2</tt></p>\n" - "<p>You can open this query in Text View and correct it.</p>").tqarg(data[2].toString()) - .tqarg(d->parser()->statement())); + "<p>You can open this query in Text View and correct it.</p>").arg(data[2].toString()) + .arg(d->parser()->statement())); return 0; } if (!setupObjectSchemaData( data, *query )) { @@ -2976,7 +2976,7 @@ QuerySchema* Connection::querySchema( const TQString& queryName ) RowData data; if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2") - .tqarg(m_queryName).tqarg(KexiDB::QueryObjectType), data)) + .arg(m_queryName).arg(KexiDB::QueryObjectType), data)) return 0; return setupQuerySchema(data); @@ -2991,7 +2991,7 @@ QuerySchema* Connection::querySchema( int queryId ) clearError(); RowData data; if (true!=querySingleRecord(TQString::fromLatin1( - "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1").tqarg(queryId), data)) + "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1").arg(queryId), data)) return 0; return setupQuerySchema(data); @@ -3207,7 +3207,7 @@ bool Connection::updateRow(QuerySchema &query, RowData& data, RowEditBuffer& buf TQVariant val = data[ pkeyFieldsOrder[i] ]; if (val.isNull() || !val.isValid()) { setError(ERR_UPDATE_NULL_PKEY_FIELD, - i18n("Primary key's field \"%1\" cannot be empty.").tqarg(it.current()->name())); + i18n("Primary key's field \"%1\" cannot be empty.").arg(it.current()->name())); //js todo: pass the field's name somewhere! return false; } @@ -3291,7 +3291,7 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf KexiDBWarn << "NO ENTIRE MASTER TABLE's PKEY SPECIFIED!" << endl; setError(ERR_INSERT_NO_ENTIRE_MASTER_TABLES_PKEY, i18n("Could not insert row because it does not contain entire master table's primary key.") - .tqarg(query.name())); + .arg(query.name())); return false; } } @@ -3395,7 +3395,7 @@ bool Connection::deleteRow(QuerySchema &query, RowData& data, bool useROWID) KexiDBWarn << " -- NO MASTER TABLE!" << endl; setError(ERR_DELETE_NO_MASTER_TABLE, i18n("Could not delete row because there is no master table defined.") - .tqarg(query.name())); + .arg(query.name())); return false; } IndexSchema *pkey = (mt->primaryKey() && !mt->primaryKey()->fields()->isEmpty()) ? mt->primaryKey() : 0; @@ -3429,7 +3429,7 @@ bool Connection::deleteRow(QuerySchema &query, RowData& data, bool useROWID) TQVariant val = data[ pkeyFieldsOrder[i] ]; if (val.isNull() || !val.isValid()) { setError(ERR_DELETE_NULL_PKEY_FIELD, i18n("Primary key's field \"%1\" cannot be empty.") - .tqarg(it.current()->name())); + .arg(it.current()->name())); //js todo: pass the field's name somewhere! return false; } diff --git a/kexi/kexidb/cursor.cpp b/kexi/kexidb/cursor.cpp index dc95e30f..75c30cfa 100644 --- a/kexi/kexidb/cursor.cpp +++ b/kexi/kexidb/cursor.cpp @@ -57,7 +57,7 @@ Cursor::Cursor(Connection* conn, QuerySchema& query, uint options ) , m_options(options) { #ifdef KEXI_DEBUG_GUI - KexiUtils::addKexiDBDebug(TQString("Create cursor for query \"%1\": ").tqarg(query.name())+query.debugString()); + KexiUtils::addKexiDBDebug(TQString("Create cursor for query \"%1\": ").arg(query.name())+query.debugString()); #endif init(); } diff --git a/kexi/kexidb/dbobjectnamevalidator.cpp b/kexi/kexidb/dbobjectnamevalidator.cpp index 1edf5a25..9e384deb 100644 --- a/kexi/kexidb/dbobjectnamevalidator.cpp +++ b/kexi/kexidb/dbobjectnamevalidator.cpp @@ -45,7 +45,7 @@ Validator::Result ObjectNameValidator::internalCheck( return Validator::Ok; message = i18n("You cannot use name \"%1\" for your object.\n" "It is reserved for internal Kexi objects. Please choose another name.") - .tqarg(v.toString()); + .arg(v.toString()); details = i18n("Names of internal Kexi objects are starting with \"kexi__\"."); return Validator::Error; } diff --git a/kexi/kexidb/dbproperties.cpp b/kexi/kexidb/dbproperties.cpp index 27b6a5b2..490a7390 100644 --- a/kexi/kexidb/dbproperties.cpp +++ b/kexi/kexidb/dbproperties.cpp @@ -39,19 +39,19 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value //we need to know whether update or insert bool exists = m_conn->resultExists( TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") - .tqarg(m_conn->driver()->escapeString(name)), ok); + .arg(m_conn->driver()->escapeString(name)), ok); if (!ok) { - setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); + setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name)); return false; } if (exists) { if (!m_conn->executeSQL( TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") - .tqarg(m_conn->driver()->escapeString(value.toString())) - .tqarg(m_conn->driver()->escapeString(name)))) + .arg(m_conn->driver()->escapeString(value.toString())) + .arg(m_conn->driver()->escapeString(name)))) { - setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); + setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name)); return false; } return true; @@ -59,10 +59,10 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value if (!m_conn->executeSQL( TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") - .tqarg(m_conn->driver()->escapeString(name)) - .tqarg(m_conn->driver()->escapeString(value.toString())))) + .arg(m_conn->driver()->escapeString(name)) + .arg(m_conn->driver()->escapeString(value.toString())))) { - setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); + setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name)); return false; } return true; @@ -77,19 +77,19 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt //we need to know whether update or insert bool exists = m_conn->resultExists( TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") - .tqarg(m_conn->driver()->escapeString(name)), ok); + .arg(m_conn->driver()->escapeString(name)), ok); if (!ok) { - setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); + setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name)); return false; } if (exists) { if (!m_conn->executeSQL( TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") - .tqarg(m_conn->driver()->escapeString(caption)) - .tqarg(m_conn->driver()->escapeString(name)))) + .arg(m_conn->driver()->escapeString(caption)) + .arg(m_conn->driver()->escapeString(name)))) { - setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); + setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name)); return false; } return true; @@ -97,10 +97,10 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt if (!m_conn->executeSQL( TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") - .tqarg(m_conn->driver()->escapeString(name)) - .tqarg(m_conn->driver()->escapeString(caption)))) + .arg(m_conn->driver()->escapeString(name)) + .arg(m_conn->driver()->escapeString(caption)))) { - setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); + setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name)); return false; } return true; @@ -113,7 +113,7 @@ TQVariant DatabaseProperties::value( const TQString& _name ) if (true!=m_conn->querySingleString( TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + m_conn->driver()->escapeString(name), result)) { - m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").tqarg(name)); + m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").arg(name)); return TQVariant(); } return result; @@ -128,7 +128,7 @@ TQString DatabaseProperties::caption( const TQString& _name ) if (true!=m_conn->querySingleString( TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + m_conn->driver()->escapeString(name), result)) { - setError(m_conn, i18n("Could not read database property \"%1\".").tqarg(name)); + setError(m_conn, i18n("Could not read database property \"%1\".").arg(name)); return TQString(); } return result; diff --git a/kexi/kexidb/driver.cpp b/kexi/kexidb/driver.cpp index 5d8f8d48..d760a004 100644 --- a/kexi/kexidb/driver.cpp +++ b/kexi/kexidb/driver.cpp @@ -106,16 +106,16 @@ bool Driver::isValid() { setError(ERR_INCOMPAT_DRIVER_VERSION, i18n("Incompatible database driver's \"%1\" version: found version %2, expected version %3.") - .tqarg(name()) - .tqarg(TQString("%1.%2").tqarg(version().major).tqarg(version().minor)) - .tqarg(TQString("%1.%2").tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor))); + .arg(name()) + .arg(TQString("%1.%2").arg(version().major).arg(version().minor)) + .arg(TQString("%1.%2").arg(KexiDB::version().major).arg(KexiDB::version().minor))); return false; } - TQString inv_impl = i18n("Invalid database driver's \"%1\" implementation:\n").tqarg(name()); + TQString inv_impl = i18n("Invalid database driver's \"%1\" implementation:\n").arg(name()); TQString not_init = i18n("Value of \"%1\" is not initialized for the driver."); if (beh->ROW_ID_FIELD_NAME.isEmpty()) { - setError(ERR_INVALID_DRIVER_IMPL, inv_impl + not_init.tqarg("DriverBehaviour::ROW_ID_FIELD_NAME")); + setError(ERR_INVALID_DRIVER_IMPL, inv_impl + not_init.arg("DriverBehaviour::ROW_ID_FIELD_NAME")); return false; } diff --git a/kexi/kexidb/driver_p.cpp b/kexi/kexidb/driver_p.cpp index 8c7f096a..462ce608 100644 --- a/kexi/kexidb/driver_p.cpp +++ b/kexi/kexidb/driver_p.cpp @@ -85,7 +85,7 @@ void DriverPrivate::initInternalProperties() propertyCaptions["transaction_nested"] = i18n("Nested transactions support"); properties["kexidb_driver_version"] = - TQString("%1.%2").tqarg(version().major).tqarg(version().minor); + TQString("%1.%2").arg(version().major).arg(version().minor); propertyCaptions["kexidb_driver_version"] = i18n("KexiDB driver version"); } diff --git a/kexi/kexidb/drivermanager.cpp b/kexi/kexidb/drivermanager.cpp index 5abacc94..1f348ddf 100644 --- a/kexi/kexidb/drivermanager.cpp +++ b/kexi/kexidb/drivermanager.cpp @@ -137,12 +137,12 @@ bool DriverManagerInternal::lookupDrivers() if (major_ver != KexiDB::version().major || minor_ver != KexiDB::version().minor) { KexiDBWarn << TQString("DriverManagerInternal::lookupDrivers(): '%1' driver" " has version '%2' but required KexiDB driver version is '%3.%4'\n" - " -- skipping this driver!").tqarg(srv_name.lower()).tqarg(srv_ver_str) - .tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor) << endl; + " -- skipping this driver!").arg(srv_name.lower()).arg(srv_ver_str) + .arg(KexiDB::version().major).arg(KexiDB::version().minor) << endl; possibleProblems += TQString("\"%1\" database driver has version \"%2\" " "but required driver version is \"%3.%4\"") - .tqarg(srv_name.lower()).tqarg(srv_ver_str) - .tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor); + .arg(srv_name.lower()).arg(srv_ver_str) + .arg(KexiDB::version().major).arg(KexiDB::version().minor); continue; } @@ -186,7 +186,7 @@ KexiDB::Driver::Info DriverManagerInternal::driverInfo(const TQString &name) { KexiDB::Driver::Info i = m_driversInfo[name.lower()]; if (!error() && i.name.isEmpty()) - setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").tqarg(name) ); + setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").arg(name) ); return i; } @@ -203,7 +203,7 @@ Driver* DriverManagerInternal::driver(const TQString& name) return drv; //cached if (!m_services_lcase.contains(name.lower())) { - setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").tqarg(name) ); + setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").arg(name) ); return 0; } @@ -216,7 +216,7 @@ Driver* DriverManagerInternal::driver(const TQString& name) if (!drv) { setError(ERR_DRIVERMANAGER, i18n("Could not load database driver \"%1\".") - .tqarg(name) ); + .arg(name) ); if (m_componentLoadingErrors.isEmpty()) {//fill errtable on demand m_componentLoadingErrors[KParts::ComponentFactory::ErrNoServiceFound]="ErrNoServiceFound"; m_componentLoadingErrors[KParts::ComponentFactory::ErrServiceProvidesNoLibrary]="ErrServiceProvidesNoLibrary"; @@ -360,7 +360,7 @@ KService::Ptr DriverManager::serviceInfo(const TQString &name) if (d_int->m_services_lcase.contains(name.lower())) { return *d_int->m_services_lcase.find(name.lower()); } else { - setError(ERR_DRIVERMANAGER, i18n("No such driver service: \"%1\".").tqarg(name) ); + setError(ERR_DRIVERMANAGER, i18n("No such driver service: \"%1\".").arg(name) ); return KService::Ptr(); } } diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp b/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp index 18682a4f..44853163 100644 --- a/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp +++ b/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp @@ -175,7 +175,7 @@ bool MySqlConnection::drv_containsTable( const TQString &tableName ) { bool success; return resultExists(TQString("show tables like %1") - .tqarg(driver()->escapeString(tableName)), success) && success; + .arg(driver()->escapeString(tableName)), success) && success; } bool MySqlConnection::drv_getTablesList( TQStringList &list ) diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp index faa7b582..d6262bef 100644 --- a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp +++ b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp @@ -190,15 +190,15 @@ bool pqxxSqlConnection::drv_useDatabase( const TQString &dbName, bool *cancelled if (data()->port == 0) data()->port = 5432; - conninfo += TQString::fromLatin1(" port='%1'").tqarg(data()->port); + conninfo += TQString::fromLatin1(" port='%1'").arg(data()->port); - conninfo += TQString::fromLatin1(" dbname='%1'").tqarg(dbName); + conninfo += TQString::fromLatin1(" dbname='%1'").arg(dbName); if (!data()->userName.isNull()) - conninfo += TQString::fromLatin1(" user='%1'").tqarg(data()->userName); + conninfo += TQString::fromLatin1(" user='%1'").arg(data()->userName); if (!data()->password.isNull()) - conninfo += TQString::fromLatin1(" password='%1'").tqarg(data()->password); + conninfo += TQString::fromLatin1(" password='%1'").arg(data()->password); try { @@ -346,7 +346,7 @@ bool pqxxSqlConnection::drv_containsTable( const TQString &tableName ) { bool success; return resultExists(TQString("select 1 from pg_class where relkind='r' and relname LIKE %1") - .tqarg(driver()->escapeString(tableName)), success) && success; + .arg(driver()->escapeString(tableName)), success) && success; } bool pqxxSqlConnection::drv_getTablesList( TQStringList &list ) diff --git a/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp b/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp index 14d2217a..1fb33233 100644 --- a/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp +++ b/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp @@ -46,7 +46,7 @@ bool SQLiteAdminTools::vacuum(const KexiDB::ConnectionData& data, const TQString #else KexiDB::DriverManager manager; KexiDB::Driver *drv = manager.driver(data.driverName); - TQString title( i18n("Could not compact database \"%1\".").tqarg(TQDir::convertSeparators(databaseName)) ); + TQString title( i18n("Could not compact database \"%1\".").arg(TQDir::convertSeparators(databaseName)) ); if (!drv) { setError(&manager, title); return false; diff --git a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp index b10d5383..08d639ba 100644 --- a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp +++ b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp @@ -130,7 +130,7 @@ bool SQLiteConnection::drv_containsTable( const TQString &tableName ) { bool success; return resultExists(TQString("select name from sqlite_master where type='table' and name LIKE %1") - .tqarg(driver()->escapeString(tableName)), success) && success; + .arg(driver()->escapeString(tableName)), success) && success; } bool SQLiteConnection::drv_getTablesList( TQStringList &list ) @@ -200,7 +200,7 @@ bool SQLiteConnection::drv_useDatabase( const TQString &dbName, bool *cancelled, if (KMessageBox::Continue != askQuestion( i18n("Do you want to open file \"%1\" as read-only?") - .tqarg(TQDir::convertSeparators(data()->fileName())) + .arg(TQDir::convertSeparators(data()->fileName())) + "\n\n" + i18n("The file is probably already open on this or another computer.") + " " + i18n("Could not gain exclusive access for writing the file."), @@ -264,7 +264,7 @@ bool SQLiteConnection::drv_dropDatabase( const TQString &dbName ) const TQString filename = data()->fileName(); if (TQFile(filename).exists() && !TQDir().remove(filename)) { setError(ERR_ACCESS_RIGHTS, i18n("Could not remove file \"%1\".") - .tqarg(TQDir::convertSeparators(filename)) + " " + .arg(TQDir::convertSeparators(filename)) + " " + i18n("Check the file's permissions and whether it is already opened and locked by another application.")); return false; } @@ -396,7 +396,7 @@ bool SQLiteConnection::drv_alterTableName(TableSchema& tableSchema, const TQStri // 3. copy all rows to the new table if (!executeSQL(TQString::fromLatin1("INSERT INTO %1 SELECT * FROM %2") - .tqarg(escapeIdentifier(tableSchema.name())).tqarg(escapeIdentifier(oldTableName)))) + .arg(escapeIdentifier(tableSchema.name())).arg(escapeIdentifier(oldTableName)))) { drv_alterTableName_ERR; return false; diff --git a/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp b/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp index d24d906d..96802596 100644 --- a/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp +++ b/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp @@ -79,7 +79,7 @@ tristate SQLiteVacuum::run() } m_dlg = new KProgressDialog(0, 0, i18n("Compacting database"), "<qt>"+i18n("Compacting database \"%1\"...") - .tqarg("<nobr>"+TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())+"</nobr>") + .arg("<nobr>"+TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())+"</nobr>") ); m_dlg->adjustSize(); m_dlg->resize(300, m_dlg->height()); @@ -98,7 +98,7 @@ tristate SQLiteVacuum::run() const uint newSize = TQFileInfo(m_filePath).size(); const uint decrease = 100-100*newSize/origSize; KMessageBox::information(0, i18n("The database has been compacted. Current size decreased by %1% to %2.") - .tqarg(decrease).tqarg(KIO::convertSize(newSize))); + .arg(decrease).arg(KIO::convertSize(newSize))); } return m_result; } diff --git a/kexi/kexidb/expression.cpp b/kexi/kexidb/expression.cpp index 034154bf..d9a33b4c 100644 --- a/kexi/kexidb/expression.cpp +++ b/kexi/kexidb/expression.cpp @@ -82,7 +82,7 @@ Field::Type BaseExpr::type() TQString BaseExpr::debugString() { - return TQString("BaseExpr(%1,type=%1)").tqarg(m_token).tqarg(Driver::defaultSQLTypeName(type())); + return TQString("BaseExpr(%1,type=%1)").arg(m_token).arg(Driver::defaultSQLTypeName(type())); } bool BaseExpr::validate(ParseInfo& /*parseInfo*/) @@ -241,7 +241,7 @@ TQString UnaryExpr::debugString() return "UnaryExpr('" + tokenToDebugString() + "', " + (m_arg ? m_arg->debugString() : TQString("<NONE>")) - + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type())); + + TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type())); } TQString UnaryExpr::toString(QuerySchemaParameterValueListIterator* params) @@ -256,7 +256,7 @@ TQString UnaryExpr::toString(QuerySchemaParameterValueListIterator* params) return (m_arg ? m_arg->toString(params) : "<NULL>") + " IS NULL"; if (m_token==SQL_IS_NOT_NULL) return (m_arg ? m_arg->toString(params) : "<NULL>") + " IS NOT NULL"; - return TQString("{INVALID_OPERATOR#%1} ").tqarg(m_token) + (m_arg ? m_arg->toString(params) : "<NULL>"); + return TQString("{INVALID_OPERATOR#%1} ").arg(m_token) + (m_arg ? m_arg->toString(params) : "<NULL>"); } void UnaryExpr::getQueryParameters(QuerySchemaParameterList& params) @@ -419,7 +419,7 @@ TQString BinaryExpr::debugString() + "," + (m_larg ? m_larg->debugString() : TQString("<NONE>")) + ",'" + tokenToDebugString() + "'," + (m_rarg ? m_rarg->debugString() : TQString("<NONE>")) - + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type())); + + TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type())); } TQString BinaryExpr::tokenToString() @@ -449,7 +449,7 @@ TQString BinaryExpr::tokenToString() /* not handled here */ default:; } - return TQString("{INVALID_BINARY_OPERATOR#%1} ").tqarg(m_token); + return TQString("{INVALID_BINARY_OPERATOR#%1} ").arg(m_token); } TQString BinaryExpr::toString(QuerySchemaParameterValueListIterator* params) @@ -529,7 +529,7 @@ Field::Type ConstExpr::type() TQString ConstExpr::debugString() { return TQString("ConstExpr('") + tokenToDebugString() +"'," + toString() - + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type())); + + TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type())); } TQString ConstExpr::toString(QuerySchemaParameterValueListIterator* params) @@ -601,13 +601,13 @@ void QueryParameterExpr::setType(Field::Type type) TQString QueryParameterExpr::debugString() { - return TQString("QueryParameterExpr('") + TQString::fromLatin1("[%2]").tqarg(value.toString()) - + TQString("',type=%1)").tqarg(Driver::defaultSQLTypeName(type())); + return TQString("QueryParameterExpr('") + TQString::fromLatin1("[%2]").arg(value.toString()) + + TQString("',type=%1)").arg(Driver::defaultSQLTypeName(type())); } TQString QueryParameterExpr::toString(QuerySchemaParameterValueListIterator* params) { - return params ? params->getPreviousValueAsString(type()) : TQString::fromLatin1("[%2]").tqarg(value.toString()); + return params ? params->getPreviousValueAsString(type()) : TQString::fromLatin1("[%2]").arg(value.toString()); } void QueryParameterExpr::getQueryParameters(QuerySchemaParameterList& params) @@ -656,7 +656,7 @@ VariableExpr* VariableExpr::copy() const TQString VariableExpr::debugString() { return TQString("VariableExpr(") + name - + TQString(",type=%1)").tqarg(field ? Driver::defaultSQLTypeName(type()) : TQString("FIELD NOT DEFINED YET")); + + TQString(",type=%1)").arg(field ? Driver::defaultSQLTypeName(type()) : TQString("FIELD NOT DEFINED YET")); } TQString VariableExpr::toString(QuerySchemaParameterValueListIterator* params) @@ -719,15 +719,15 @@ bool VariableExpr::validate(ParseInfo& parseInfo) parseInfo.errMsg = i18n("Ambiguous field name"); parseInfo.errDescr = i18n("Both table \"%1\" and \"%2\" have defined \"%3\" field. " "Use \"<tableName>.%4\" notation to specify table name.") - .tqarg(firstField->table()->name()).tqarg(f->table()->name()) - .tqarg(fieldName).tqarg(fieldName); + .arg(firstField->table()->name()).arg(f->table()->name()) + .arg(fieldName).arg(fieldName); return false; } } } if (!firstField) { parseInfo.errMsg = i18n("Field not found"); - parseInfo.errDescr = i18n("Table containing \"%1\" field not found").tqarg(fieldName); + parseInfo.errDescr = i18n("Table containing \"%1\" field not found").arg(fieldName); return false; } //ok @@ -754,8 +754,8 @@ bool VariableExpr::validate(ParseInfo& parseInfo) if (covered) { parseInfo.errMsg = i18n("Could not access the table directly using its name"); parseInfo.errDescr = i18n("Table \"%1\" is covered by aliases. Instead of \"%2\", " - "you can write \"%3\"").tqarg(tableName) - .tqarg(TQString(tableName+"."+fieldName)).tqarg(TQString(tableAlias+"."+fieldName.latin1())); + "you can write \"%3\"").arg(tableName) + .arg(TQString(tableName+"."+fieldName)).arg(TQString(tableAlias+"."+fieldName.latin1())); return false; } } @@ -773,7 +773,7 @@ bool VariableExpr::validate(ParseInfo& parseInfo) if (!ts) { parseInfo.errMsg = i18n("Table not found"); - parseInfo.errDescr = i18n("Unknown table \"%1\"").tqarg(tableName); + parseInfo.errDescr = i18n("Unknown table \"%1\"").arg(tableName); return false; } @@ -786,8 +786,8 @@ bool VariableExpr::validate(ParseInfo& parseInfo) //it's a table.* if (fieldName=="*") { if (positionsList->count()>1) { - parseInfo.errMsg = i18n("Ambiguous \"%1.*\" expression").tqarg(tableName); - parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined").tqarg(tableName); + parseInfo.errMsg = i18n("Ambiguous \"%1.*\" expression").arg(tableName); + parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined").arg(tableName); return false; } tableForQueryAsterisk = ts; @@ -800,7 +800,7 @@ bool VariableExpr::validate(ParseInfo& parseInfo) if (!realField) { parseInfo.errMsg = i18n("Field not found"); parseInfo.errDescr = i18n("Table \"%1\" has no \"%2\" field") - .tqarg(tableName).tqarg(fieldName); + .arg(tableName).arg(fieldName); return false; } @@ -815,9 +815,9 @@ bool VariableExpr::validate(ParseInfo& parseInfo) numberOfTheSameFields++; if (numberOfTheSameFields>1) { parseInfo.errMsg = i18n("Ambiguous \"%1.%2\" expression") - .tqarg(tableName).tqarg(fieldName); + .arg(tableName).arg(fieldName); parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined containing \"%2\" field") - .tqarg(tableName).tqarg(fieldName); + .arg(tableName).arg(fieldName); return false; } } @@ -880,7 +880,7 @@ TQString FunctionExpr::debugString() res.append( TQString("FunctionExpr(") + name ); if (args) res.append(TQString(",") + args->debugString()); - res.append(TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type()))); + res.append(TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type()))); return res; } diff --git a/kexi/kexidb/field.cpp b/kexi/kexidb/field.cpp index 6666fcfd..b12000ac 100644 --- a/kexi/kexidb/field.cpp +++ b/kexi/kexidb/field.cpp @@ -179,7 +179,7 @@ TQString Field::typeName(uint type) TQString Field::typeString(uint type) { m_typeNames.init(); - return (type <= LastType) ? m_typeNames.at((int)LastType+1 + type) : TQString("Type%1").tqarg(type); + return (type <= LastType) ? m_typeNames.at((int)LastType+1 + type) : TQString("Type%1").arg(type); } TQString Field::typeGroupName(uint typeGroup) @@ -191,7 +191,7 @@ TQString Field::typeGroupName(uint typeGroup) TQString Field::typeGroupString(uint typeGroup) { m_typeGroupNames.init(); - return (typeGroup <= LastTypeGroup) ? m_typeGroupNames.at((int)LastTypeGroup+1 + typeGroup) : TQString("TypeGroup%1").tqarg(typeGroup); + return (typeGroup <= LastTypeGroup) ? m_typeGroupNames.at((int)LastTypeGroup+1 + typeGroup) : TQString("TypeGroup%1").arg(typeGroup); } Field::Type Field::typeForString(const TQString& typeString) @@ -330,7 +330,7 @@ void Field::setType(Type t) { if (m_expr) { - KexiDBWarn << TQString("Field::setType(%1)").tqarg(t) + KexiDBWarn << TQString("Field::setType(%1)").arg(t) << " could not set type because the field has expression assigned!" << endl; return; } @@ -589,12 +589,12 @@ TQString Field::debugString() const dbg += (conn && conn->driver()) ? conn->driver()->sqlTypeName(type()) : Driver::defaultSQLTypeName(type()); if (isFPNumericType() && m_precision>0) { if (scale()>0) - dbg += TQString::fromLatin1("(%1,%2)").tqarg(m_precision).tqarg(scale()); + dbg += TQString::fromLatin1("(%1,%2)").arg(m_precision).arg(scale()); else - dbg += TQString::fromLatin1("(%1)").tqarg(m_precision); + dbg += TQString::fromLatin1("(%1)").arg(m_precision); } else if (m_type==Field::Text && m_length>0) - dbg += TQString::fromLatin1("(%1)").tqarg(m_length); + dbg += TQString::fromLatin1("(%1)").arg(m_length); if (m_constraints & Field::AutoInc) dbg += " AUTOINC"; if (m_constraints & Field::Unique) @@ -608,18 +608,18 @@ TQString Field::debugString() const if (m_constraints & Field::NotEmpty) dbg += " NOTEMPTY"; if (!m_defaultValue.isNull()) - dbg += TQString(" DEFAULT=[%1]").tqarg(m_defaultValue.typeName()) + KexiDB::variantToString(m_defaultValue); + dbg += TQString(" DEFAULT=[%1]").arg(m_defaultValue.typeName()) + KexiDB::variantToString(m_defaultValue); if (m_expr) dbg += " EXPRESSION=" + m_expr->debugString(); if (m_customProperties && !m_customProperties->isEmpty()) { - dbg += TQString(" CUSTOM PROPERTIES (%1): ").tqarg(m_customProperties->count()); + dbg += TQString(" CUSTOM PROPERTIES (%1): ").arg(m_customProperties->count()); bool first = true; foreach (CustomPropertiesMap::ConstIterator, it, *m_customProperties) { if (first) first = false; else dbg += ", "; - dbg += TQString("%1 = %2 (%3)").tqarg(TQString(it.key())).tqarg(TQString(it.data().toString())).tqarg(TQString(it.data().typeName())); + dbg += TQString("%1 = %2 (%3)").arg(TQString(it.key())).arg(TQString(it.data().toString())).arg(TQString(it.data().typeName())); } } return dbg; diff --git a/kexi/kexidb/fieldlist.cpp b/kexi/kexidb/fieldlist.cpp index dea19876..292ba75e 100644 --- a/kexi/kexidb/fieldlist.cpp +++ b/kexi/kexidb/fieldlist.cpp @@ -94,7 +94,7 @@ void FieldList::renameField(KexiDB::Field *field, const TQString& newName) { if (!field || field != m_fields_by_name[ field->name() ]) { KexiDBFatal << "FieldList::renameField() no field found " - << (field ? TQString("\"%1\"").tqarg(field->name()) : TQString()) << endl; + << (field ? TQString("\"%1\"").arg(field->name()) : TQString()) << endl; return; } m_fields_by_name.take( field->name() ); @@ -157,7 +157,7 @@ void FieldList::debug() } static TQString subListWarning1(const TQString& fname) { - return TQString("FieldList::subList() could not find field \"%1\"").tqarg(fname); + return TQString("FieldList::subList() could not find field \"%1\"").arg(fname); } FieldList* FieldList::subList(const TQString& n1, const TQString& n2, @@ -212,7 +212,7 @@ FieldList* FieldList::subList(const TQValueList<uint>& list) foreach(TQValueList<uint>::ConstIterator, it, list) { f = field(*it); if (!f) { - KexiDBWarn << TQString("FieldList::subList() could not find field at position %1").tqarg(*it) << endl; + KexiDBWarn << TQString("FieldList::subList() could not find field at position %1").arg(*it) << endl; delete fl; return 0; } diff --git a/kexi/kexidb/lookupfieldschema.cpp b/kexi/kexidb/lookupfieldschema.cpp index 62a0665e..05728d00 100644 --- a/kexi/kexidb/lookupfieldschema.cpp +++ b/kexi/kexidb/lookupfieldschema.cpp @@ -91,7 +91,7 @@ void LookupFieldSchema::RowSource::setValues(const TQStringList& values) TQString LookupFieldSchema::RowSource::debugString() const { return TQString("rowSourceType:'%1' rowSourceName:'%2' rowSourceValues:'%3'\n") - .tqarg(typeName()).tqarg(name()).tqarg(m_values ? m_values->join("|") : TQString()); + .arg(typeName()).arg(name()).arg(m_values ? m_values->join("|") : TQString()); } void LookupFieldSchema::RowSource::debug() const @@ -144,11 +144,11 @@ TQString LookupFieldSchema::debugString() const " boundColumn:%2 visibleColumns:%3 maximumListRows:%4 displayWidget:%5\n" " columnHeadersVisible:%6 limitToList:%7\n" " columnWidths:%8 )") - .tqarg(m_rowSource.debugString()) - .tqarg(m_boundColumn).tqarg(visibleColumnsString).tqarg(m_maximumListRows) - .tqarg( m_displayWidget==ComboBox ? "ComboBox" : "ListBox") - .tqarg(m_columnHeadersVisible).tqarg(m_limitToList) - .tqarg(columnWidthsStr); + .arg(m_rowSource.debugString()) + .arg(m_boundColumn).arg(visibleColumnsString).arg(m_maximumListRows) + .arg( m_displayWidget==ComboBox ? "ComboBox" : "ListBox") + .arg(m_columnHeadersVisible).arg(m_limitToList) + .arg(columnWidthsStr); } void LookupFieldSchema::debug() const diff --git a/kexi/kexidb/parser/parser_p.cpp b/kexi/kexidb/parser/parser_p.cpp index c2cece0b..38a7d386 100644 --- a/kexi/kexidb/parser/parser_p.cpp +++ b/kexi/kexidb/parser/parser_p.cpp @@ -142,10 +142,10 @@ void yyerror(const char *str) if (parser->isReservedKeyword(ctoken.latin1())) parser->setError( ParserError(i18n("Syntax Error"), - i18n("\"%1\" is a reserved keyword").tqarg(ctoken)+lexerErr, ctoken, current) ); + i18n("\"%1\" is a reserved keyword").arg(ctoken)+lexerErr, ctoken, current) ); else parser->setError( ParserError(i18n("Syntax Error"), - i18n("Syntax Error near \"%1\"").tqarg(ctoken)+lexerErr, ctoken, current) ); + i18n("Syntax Error near \"%1\"").arg(ctoken)+lexerErr, ctoken, current) ); } } } @@ -204,7 +204,7 @@ bool parseData(Parser *p, const char *data) { if(tableList.findRef(item->table()) == -1) { - ParserError err(i18n("Field List Error"), i18n("Unknown table '%1' in field list").tqarg(item->table()->name()), ctoken, current); + ParserError err(i18n("Field List Error"), i18n("Unknown table '%1' in field list").arg(item->table()->name()), ctoken, current); parser->setError(err); yyerror("fieldlisterror"); @@ -288,15 +288,15 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr ) setError(i18n("Ambiguous field name"), i18n("Both table \"%1\" and \"%2\" have defined \"%3\" field. " "Use \"<tableName>.%4\" notation to specify table name.") - .tqarg(firstField->table()->name()).tqarg(f->table()->name()) - .tqarg(fieldName).tqarg(fieldName)); + .arg(firstField->table()->name()).arg(f->table()->name()) + .arg(fieldName).arg(fieldName)); return false; } } } if (!firstField) { setError(i18n("Field not found"), - i18n("Table containing \"%1\" field not found").tqarg(fieldName)); + i18n("Table containing \"%1\" field not found").arg(fieldName)); return false; } //ok @@ -321,8 +321,8 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr ) if (covered) { setError(i18n("Could not access the table directly using its name"), i18n("Table \"%1\" is covered by aliases. Instead of \"%2\", " - "you can write \"%3\"").tqarg(tableName) - .tqarg(tableName+"."+fieldName).tqarg(tableAlias+"."+fieldName.latin1())); + "you can write \"%3\"").arg(tableName) + .arg(tableName+"."+fieldName).arg(tableAlias+"."+fieldName.latin1())); return false; } } @@ -348,8 +348,8 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr ) if (fieldName=="*") { if (positionsList->count()>1) { - setError(i18n("Ambiguous \"%1.*\" expression").tqarg(tableName), - i18n("More than one \"%1\" table or alias defined").tqarg(tableName)); + setError(i18n("Ambiguous \"%1.*\" expression").arg(tableName), + i18n("More than one \"%1\" table or alias defined").arg(tableName)); return false; } parseInfo.querySchema->addAsterisk( new QueryAsterisk(parseInfo.querySchema, ts) ); @@ -368,9 +368,9 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr ) if (otherTS->field(fieldName)) numberOfTheSameFields++; if (numberOfTheSameFields>1) { - setError(i18n("Ambiguous \"%1.%2\" expression").tqarg(tableName).tqarg(fieldName), + setError(i18n("Ambiguous \"%1.%2\" expression").arg(tableName).arg(fieldName), i18n("More than one \"%1\" table or alias defined containing \"%2\" field") - .tqarg(tableName).tqarg(fieldName)); + .arg(tableName).arg(fieldName)); return false; } } @@ -379,7 +379,7 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr ) } else { setError(i18n("Field not found"), i18n("Table \"%1\" has no \"%2\" field") - .tqarg(tableName).tqarg(fieldName)); + .arg(tableName).arg(fieldName)); return false; } } @@ -436,7 +436,7 @@ QuerySchema* buildSelectQuery( TableSchema *s = parser->db()->tableSchema(TQString(tname)); if(!s) { setError(//i18n("Field List Error"), - i18n("Table \"%1\" does not exist").tqarg(TQString(tname))); + i18n("Table \"%1\" does not exist").arg(TQString(tname))); // yyerror("fieldlisterror"); CLEANUP; return 0; @@ -511,7 +511,7 @@ QuerySchema* buildSelectQuery( aliasVariable = e->toBinary()->right()->toVariable(); if (!aliasVariable) { setError(i18n("Invalid alias definition for column \"%1\"") - .tqarg(columnExpr->toString())); //ok? + .arg(columnExpr->toString())); //ok? CLEANUP; return 0; } @@ -542,7 +542,7 @@ QuerySchema* buildSelectQuery( e->toBinary()->m_larg = 0; } else { - setError(i18n("Invalid \"%1\" column definition").tqarg(e->toString())); //ok? + setError(i18n("Invalid \"%1\" column definition").arg(e->toString())); //ok? CLEANUP; return 0; } @@ -610,7 +610,7 @@ QuerySchema* buildSelectQuery( (*it).ascending, (*it).columnNumber-1 )) { setError(i18n("Could not define sorting - no column at position %1") - .tqarg((*it).columnNumber)); + .arg((*it).columnNumber)); CLEANUP; return 0; } @@ -619,7 +619,7 @@ QuerySchema* buildSelectQuery( Field * f = querySchema->findTableField((*it).aliasOrName); if (!f) { setError(i18n("Could not define sorting - " - "column name or alias \"%1\" does not exist").tqarg((*it).aliasOrName)); + "column name or alias \"%1\" does not exist").arg((*it).aliasOrName)); CLEANUP; return 0; } diff --git a/kexi/kexidb/parser/sqlparser.cpp b/kexi/kexidb/parser/sqlparser.cpp index 091d516b..c7c3aa99 100644 --- a/kexi/kexidb/parser/sqlparser.cpp +++ b/kexi/kexidb/parser/sqlparser.cpp @@ -3111,7 +3111,7 @@ YYACCEPT; Field *f = item->table()->field(item->name()); if(!f) { - ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").tqarg(item->name()).tqarg(schema->name()), ctoken, current); + ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").arg(item->name()).arg(schema->name()), ctoken, current); parser->setError(err); yyerror("fieldlisterror"); } diff --git a/kexi/kexidb/parser/sqlparser.y b/kexi/kexidb/parser/sqlparser.y index 7775885d..5a8357f2 100644 --- a/kexi/kexidb/parser/sqlparser.y +++ b/kexi/kexidb/parser/sqlparser.y @@ -1201,7 +1201,7 @@ IDENTIFIER Field *f = item->table()->field(item->name()); if(!f) { - ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").tqarg(item->name()).tqarg(schema->name()), ctoken, current); + ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").arg(item->name()).arg(schema->name()), ctoken, current); parser->setError(err); yyerror("fieldlisterror"); } @@ -1360,7 +1360,7 @@ ColWildCard: { $$ = new VariableExpr($1); KexiDBDbg << " Invalid identifier! " << $1 << endl; - setError(i18n("Invalid identifier \"%1\"").tqarg($1)); + setError(i18n("Invalid identifier \"%1\"").arg($1)); }*/ ; diff --git a/kexi/kexidb/queryschema.cpp b/kexi/kexidb/queryschema.cpp index cff98a31..47e5d95c 100644 --- a/kexi/kexidb/queryschema.cpp +++ b/kexi/kexidb/queryschema.cpp @@ -402,11 +402,11 @@ TQString OrderByColumn::debugString() const if (m_column) { if (m_pos>-1) return TQString("COLUMN_AT_POSITION_%1(%2, %3)") - .tqarg(m_pos+1).tqarg(m_column->debugString()).tqarg(orderString); + .arg(m_pos+1).arg(m_column->debugString()).arg(orderString); else - return TQString("COLUMN(%1, %2)").tqarg(m_column->debugString()).tqarg(orderString); + return TQString("COLUMN(%1, %2)").arg(m_column->debugString()).arg(orderString); } - return m_field ? TQString("FIELD(%1, %2)").tqarg(m_field->debugString()).tqarg(orderString) + return m_field ? TQString("FIELD(%1, %2)").arg(m_field->debugString()).arg(orderString) : TQString("NONE"); } @@ -801,7 +801,7 @@ TQString QuerySchema::debugString() else { dbg1 = "<NONE>\n"; } - dbg1.prepend( TQString("(%1):\n").tqarg(fieldsExpandedCount) ); + dbg1.prepend( TQString("(%1):\n").arg(fieldsExpandedCount) ); dbg += dbg1; //it's safer to delete fieldsExpanded for now @@ -847,7 +847,7 @@ TQString QuerySchema::debugString() for (int i=0; it.current(); ++it, i++) { TQCString *alias = d->columnAlias(i); if (alias) - aliases += (TQString("field #%1: ").tqarg(i) + aliases += (TQString("field #%1: ").arg(i) + (it.current()->name().isEmpty() ? "<noname>" : it.current()->name()) + " -> " + (const char*)*alias + "\n"); } @@ -862,7 +862,7 @@ TQString QuerySchema::debugString() for (int i=0; t_it.current(); ++t_it, i++) { TQCString *alias = d->tableAliases[i]; if (alias) - aliases += (TQString("table #%1: ").tqarg(i) + aliases += (TQString("table #%1: ").arg(i) + (t_it.current()->name().isEmpty() ? "<noname>" : t_it.current()->name()) + " -> " + (const char*)*alias + "\n"); } @@ -872,7 +872,7 @@ TQString QuerySchema::debugString() if (!where.isEmpty()) dbg += (TQString("\n-WHERE EXPRESSION:\n") + where); if (!orderByColumnList().isEmpty()) - dbg += (TQString("\n-ORDER BY (%1):\n").tqarg(orderByColumnList().count()) + dbg += (TQString("\n-ORDER BY (%1):\n").arg(orderByColumnList().count()) + orderByColumnList().debugString()); return dbg; } @@ -1292,7 +1292,7 @@ void QuerySchema::computeFieldsExpanded() visibleColumn = new Field(); visibleColumn->setName( TQString::fromLatin1("[multiple_visible_fields_%1]") - .tqarg( ++numberOfColumnsWithMultipleVisibleFields )); + .arg( ++numberOfColumnsWithMultipleVisibleFields )); visibleColumn->setExpression( new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/)); if (!d->ownedVisibleColumns) { @@ -1352,7 +1352,7 @@ void QuerySchema::computeFieldsExpanded() visibleColumn = new Field(); visibleColumn->setName( TQString::fromLatin1("[multiple_visible_fields_%1]") - .tqarg( ++numberOfColumnsWithMultipleVisibleFields )); + .arg( ++numberOfColumnsWithMultipleVisibleFields )); visibleColumn->setExpression( new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/)); if (!d->ownedVisibleColumns) { @@ -1509,8 +1509,8 @@ void QuerySchema::computeFieldsExpanded() } else { const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3") - .tqarg( ++numberOfColumnsWithMultipleVisibleFields ) - .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) ); + .arg( ++numberOfColumnsWithMultipleVisibleFields ) + .arg(ci->field->table()->name()).arg(ci->field->name()) ); uint *index = lookup_dict[ key ]; if (index) ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index ); @@ -1543,8 +1543,8 @@ void QuerySchema::computeFieldsExpanded() } else { const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3") - .tqarg( ++numberOfColumnsWithMultipleVisibleFields ) - .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) ); + .arg( ++numberOfColumnsWithMultipleVisibleFields ) + .arg(ci->field->table()->name()).arg(ci->field->name()) ); uint *index = lookup_dict[ key ]; if (index) ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index ); diff --git a/kexi/kexidb/queryschemaparameter.cpp b/kexi/kexidb/queryschemaparameter.cpp index 4cead962..4418f6e9 100644 --- a/kexi/kexidb/queryschemaparameter.cpp +++ b/kexi/kexidb/queryschemaparameter.cpp @@ -36,12 +36,12 @@ QuerySchemaParameter::~QuerySchemaParameter() TQString QuerySchemaParameter::debugString() const { - return TQString("msg=\"%1\" type=\"%2\"").tqarg(Field::typeName(type)).tqarg(message); + return TQString("msg=\"%1\" type=\"%2\"").arg(Field::typeName(type)).arg(message); } void KexiDB::debug(const QuerySchemaParameterList& list) { - KexiDBDbg << TQString("Query parameters (%1):").tqarg(list.count()) << endl; + KexiDBDbg << TQString("Query parameters (%1):").arg(list.count()) << endl; foreach(QuerySchemaParameterListConstIterator, it, list) KexiDBDbg << " - " << (*it).debugString() << endl; } diff --git a/kexi/kexidb/schemadata.cpp b/kexi/kexidb/schemadata.cpp index 9b691349..9370a3ac 100644 --- a/kexi/kexidb/schemadata.cpp +++ b/kexi/kexidb/schemadata.cpp @@ -51,5 +51,5 @@ TQString SchemaData::schemaDataDebugString() const desc+="..."; } return TQString("id=%1 name='%2' caption='%3' desc='%4'") - .tqarg(m_id).tqarg(m_name).tqarg(m_caption).tqarg(desc); + .arg(m_id).arg(m_name).arg(m_caption).arg(desc); } diff --git a/kexi/kexidb/simplecommandlineapp.cpp b/kexi/kexidb/simplecommandlineapp.cpp index 904469bc..570043fe 100644 --- a/kexi/kexidb/simplecommandlineapp.cpp +++ b/kexi/kexidb/simplecommandlineapp.cpp @@ -140,7 +140,7 @@ SimpleCommandLineApp::SimpleCommandLineApp( userAtHost += "@"; userAtHost += (d->connData.hostName.isEmpty() ? "localhost" : d->connData.hostName); TQTextStream cout(stdout,IO_WriteOnly); - cout << i18n("Enter password for %1: ").tqarg(userAtHost); + cout << i18n("Enter password for %1: ").arg(userAtHost); //! @todo make use of pty/tty here! (and care about portability) TQTextStream cin(stdin,IO_ReadOnly); cin >> d->connData.password; diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp index 8551a0ef..594773af 100644 --- a/kexi/kexidb/utils.cpp +++ b/kexi/kexidb/utils.cpp @@ -138,7 +138,7 @@ void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details) if (!obj->serverErrorMsg().isEmpty()) details += "<p><b><nobr>" +i18n("Message from server:") + "</nobr></b><br>" + obj->serverErrorMsg(); if (!obj->recentSQLString().isEmpty()) - details += "<p><b><nobr>" +i18n("SQL statement:") + TQString("</nobr></b><br><tt>%1</tt>").tqarg(obj->recentSQLString()); + details += "<p><b><nobr>" +i18n("SQL statement:") + TQString("</nobr></b><br><tt>%1</tt>").arg(obj->recentSQLString()); int serverResult; TQString serverResultName; if (obj->serverResult()!=0) { @@ -179,7 +179,7 @@ int KexiDB::idForObjectName( Connection &conn, const TQString& objName, int objT { RowData data; if (true!=conn.querySingleRecord(TQString("select o_id from kexi__objects where lower(o_name)='%1' and o_type=%2") - .tqarg(objName.lower()).tqarg(objType), data)) + .arg(objName.lower()).arg(objType), data)) return 0; bool ok; int id = data[0].toInt(&ok); @@ -387,7 +387,7 @@ ConnectionTestDialog::ConnectionTestDialog(TQWidget* parent, KexiDB::MessageHandler& msgHandler) : KProgressDialog(parent, "testconn_dlg", i18n("Test Connection"), i18n("<qt>Testing connection to <b>%1</b> database server...</qt>") - .tqarg(data.serverInfoString(true)), true /*modal*/) + .arg(data.serverInfoString(true)), true /*modal*/) , m_thread(new ConnectionTestThread(this, data)) , m_connData(data) , m_msgHandler(&msgHandler) @@ -441,13 +441,13 @@ void ConnectionTestDialog::slotTimeout() else if (notResponding) { KMessageBox::sorry(0, i18n("<qt>Test connection to <b>%1</b> database server failed. The server is not responding.</qt>") - .tqarg(m_connData.serverInfoString(true)), + .arg(m_connData.serverInfoString(true)), i18n("Test Connection")); } else { KMessageBox::information(0, i18n("<qt>Test connection to <b>%1</b> database server established successfully.</qt>") - .tqarg(m_connData.serverInfoString(true)), + .arg(m_connData.serverInfoString(true)), i18n("Test Connection")); } // slotCancel(); @@ -807,7 +807,7 @@ bool KexiDB::setFieldProperty( Field& field, const TQCString& propertyName, cons else { if (!field.table()) { KexiDBWarn << TQString("KexiDB::setFieldProperty() Cannot set \"%1\" property - no table assinged for field!") - .tqarg(propertyName.data()) << endl; + .arg(propertyName.data()) << endl; } else { LookupFieldSchema *lookup = field.table()->lookupFieldSchema(field); @@ -1228,7 +1228,7 @@ void KexiDB::getLimitsForType(Field::Type type, int &minValue, int &maxValue) void KexiDB::debugRowData(const RowData& rowData) { - KexiDBDbg << TQString("ROW DATA (%1 columns):").tqarg(rowData.count()) << endl; + KexiDBDbg << TQString("ROW DATA (%1 columns):").arg(rowData.count()) << endl; foreach(RowData::ConstIterator, it, rowData) KexiDBDbg << "- " << (*it) << endl; } diff --git a/kexi/kexiutils/identifier.cpp b/kexi/kexiutils/identifier.cpp index dc1754ca..55fc4560 100644 --- a/kexi/kexiutils/identifier.cpp +++ b/kexi/kexiutils/identifier.cpp @@ -27,7 +27,7 @@ bool KexiUtils::isIdentifier(const TQString& s) { uint i; for (i=0; i<s.length(); i++) { - TQChar c = s.tqat(i).lower(); + TQChar c = s.at(i).lower(); if (!((int)c=='_' || (int)c>='a' && (int)c<='z' || i>0 && (int)c>='0' && (int)c<='9')) break; } @@ -87,8 +87,8 @@ TQString KexiUtils::string2Identifier(const TQString &s) TQString KexiUtils::identifierExpectedMessage(const TQString &valueName, const TQVariant& v) { - return "<p>"+i18n("Value of \"%1\" column must be an identifier.").tqarg(valueName) - +"</p><p>"+i18n("\"%1\" is not a valid identifier.").tqarg(v.toString())+"</p>"; + return "<p>"+i18n("Value of \"%1\" column must be an identifier.").arg(valueName) + +"</p><p>"+i18n("\"%1\" is not a valid identifier.").arg(v.toString())+"</p>"; } //-------------------------------------------------------------------------------- diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp index 729312de..fd6c4e87 100644 --- a/kexi/kexiutils/utils.cpp +++ b/kexi/kexiutils/utils.cpp @@ -254,7 +254,7 @@ void KexiUtils::simpleDecrypt(TQString& string) } void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, - const TQPixmap& pixmap, int tqalignment, bool scaledContents, bool keepAspectRatio) + const TQPixmap& pixmap, int alignment, bool scaledContents, bool keepAspectRatio) { if (pixmap.isNull()) return; @@ -285,21 +285,21 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, img = img.smoothScale(w, h, TQ_ScaleMin); pos = rect.topLeft(); //0, 0); if (img.width() < w) { - int hAlign = TQApplication::horizontalAlignment( tqalignment ); + int hAlign = TQApplication::horizontalAlignment( alignment ); if ( hAlign & TQt::AlignRight ) pos.setX(pos.x() + w-img.width()); else if ( hAlign & TQt::AlignHCenter ) pos.setX(pos.x() + w/2-img.width()/2); } else if (img.height() < h) { - if ( tqalignment & TQt::AlignBottom ) + if ( alignment & TQt::AlignBottom ) pos.setY(pos.y() + h-img.height()); - else if ( tqalignment & TQt::AlignVCenter ) + else if ( alignment & TQt::AlignVCenter ) pos.setY(pos.y() + h/2-img.height()/2); } pixmapBuffer.convertFromImage(img); if (!fast) { - p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice()); + p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); } else target->drawPixmap(pos, pixmapBuffer); @@ -307,7 +307,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, else { if (!fast) { pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth)); - p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice()); + p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap); } else @@ -315,7 +315,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, } } else { - int hAlign = TQApplication::horizontalAlignment( tqalignment ); + int hAlign = TQApplication::horizontalAlignment( alignment ); if ( hAlign & TQt::AlignRight ) pos.setX(pos.x() + w-pixmap.width()); else if ( hAlign & TQt::AlignHCenter ) @@ -323,9 +323,9 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, else //left, etc. pos.setX(pos.x()); - if ( tqalignment & TQt::AlignBottom ) + if ( alignment & TQt::AlignBottom ) pos.setY(pos.y() + h-pixmap.height()); - else if ( tqalignment & TQt::AlignVCenter ) + else if ( alignment & TQt::AlignVCenter ) pos.setY(pos.y() + h/2-pixmap.height()/2); else //top, etc. pos.setY(pos.y()); diff --git a/kexi/kexiutils/utils.h b/kexi/kexiutils/utils.h index d7bdbae8..ffa2a85d 100644 --- a/kexi/kexiutils/utils.h +++ b/kexi/kexiutils/utils.h @@ -212,7 +212,7 @@ namespace KexiUtils //! Draws pixmap on painter \a p using predefined parameters. //! Used in KexiDBImageBox and KexiBlobTableEdit. KEXIUTILS_EXPORT void drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, - const TQPixmap& pixmap, int tqalignment, bool scaledContents, bool keepAspectRatio); + const TQPixmap& pixmap, int alignment, bool scaledContents, bool keepAspectRatio); //! @internal KEXIUTILS_EXPORT TQString ptrToStringInternal(void* ptr, uint size); diff --git a/kexi/kexiutils/validator.cpp b/kexi/kexiutils/validator.cpp index bec7a1ec..919a3b61 100644 --- a/kexi/kexiutils/validator.cpp +++ b/kexi/kexiutils/validator.cpp @@ -36,7 +36,7 @@ Validator::Result Validator::check(const TQString &valueName, const TQVariant& v { if (v.isNull() || v.type()==TQVariant::String && v.toString().isEmpty()) { if (!m_acceptsEmptyValue) { - message = Validator::msgColumnNotEmpty().tqarg(valueName); + message = Validator::msgColumnNotEmpty().arg(valueName); return Error; } return Ok; diff --git a/kexi/main/kexifinddialog.cpp b/kexi/main/kexifinddialog.cpp index 0aa0cd35..b46eb20d 100644 --- a/kexi/main/kexifinddialog.cpp +++ b/kexi/main/kexifinddialog.cpp @@ -175,7 +175,7 @@ void KexiFindDialog::setCurrentLookInColumnName(const TQString& columnName) index = d->lookInColumnNames.findIndex( columnName ); if (index == -1) { kdWarning() << TQString("KexiFindDialog::setCurrentLookInColumn(%1) column name not found on the list") - .tqarg(columnName) << endl; + .arg(columnName) << endl; return; } index = index + 1/*"(All fields)"*/ + 1/*"(Current field)"*/; @@ -214,13 +214,13 @@ void KexiFindDialog::setObjectNameForCaption(const TQString& name) if (name.isEmpty()) setCaption(i18n("Replace")); else - setCaption(i18n("Replace in \"%1\"").tqarg(name)); + setCaption(i18n("Replace in \"%1\"").arg(name)); } else { if (name.isEmpty()) setCaption(i18n("Find")); else - setCaption(i18n("Find in \"%1\"").tqarg(name)); + setCaption(i18n("Find in \"%1\"").arg(name)); } } diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index 293271c5..dc7fc428 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -111,7 +111,7 @@ # define KexiVDebug if (0) kdDebug() #endif -//first fix the tqgeometry +//first fix the geometry //#define KEXI_NO_CTXT_HELP 1 #ifndef KEXI_NO_CTXT_HELP @@ -245,8 +245,8 @@ KexiMainWindowImpl::KexiMainWindowImpl() int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); d->config->setGroup("MainWindow"); - TQSize s ( d->config->readNumEntry( TQString::fromLatin1("Width %1").tqarg(desk.width()), 700 ), - d->config->readNumEntry( TQString::fromLatin1("Height %1").tqarg(desk.height()), 480 ) ); + TQSize s ( d->config->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 700 ), + d->config->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 480 ) ); resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height())); } @@ -277,7 +277,7 @@ KexiMainWindowImpl::KexiMainWindowImpl() createShellGUI(true); //} - d->statusBar = new KexiStatusBar(this, "status_bar"); + d->statusBar = new KexitStatusBar(this, "status_bar"); d->origAppCaption = caption(); @@ -465,7 +465,7 @@ void KexiMainWindowImpl::switchToIDEAlMode(bool showMessage) else { KMessageBox::information(this, i18n("User interface mode will be switched to IDEAl at next %1 application startup.") - .tqarg(KEXI_APP_NAME)); + .arg(KEXI_APP_NAME)); //delayed d->mdiModeToSwitchAfterRestart = KMdi::IDEAlMode; } @@ -492,7 +492,7 @@ void KexiMainWindowImpl::switchToChildframeMode(bool showMessage) else { KMessageBox::information(this, i18n("User interface mode will be switched to Childframe at next %1 application startup.") - .tqarg(KEXI_APP_NAME)); + .arg(KEXI_APP_NAME)); //delayed d->mdiModeToSwitchAfterRestart = KMdi::ChildframeMode; } @@ -1281,7 +1281,7 @@ static TQString internalReason(KexiDB::Object *obj) const TQString &s = obj->errorMsg(); if (s.isEmpty()) return s; - return TQString("<br>(%1) ").tqarg(i18n("reason:")+" <i>"+s+"</i>"); + return TQString("<br>(%1) ").arg(i18n("reason:")+" <i>"+s+"</i>"); } tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData) @@ -1319,7 +1319,7 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData) if (incompatibleWithKexi) { if (KMessageBox::Yes == KMessageBox::questionYesNo(this, i18n("<qt>Database project %1 does not appear to have been created using Kexi.<br><br>" - "Do you want to import it as a new Kexi project?</qt>").tqarg(projectData.infoString()), + "Do you want to import it as a new Kexi project?</qt>").arg(projectData.infoString()), 0, KGuiItem(i18n("Import Database", "&Import..."), "database_import"), KStdGuiItem::quit())) { @@ -1447,9 +1447,9 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater() not_found_msg += (TQString("\"") + info["name"] + "\" - "); if (info["action"]=="new") not_found_msg += i18n("cannot create object - unknown object type \"%1\"") - .tqarg(info["type"]); + .arg(info["type"]); else - not_found_msg += i18n("unknown object type \"%1\"").tqarg(info["type"]); + not_found_msg += i18n("unknown object type \"%1\"").arg(info["type"]); not_found_msg += internalReason(&Kexi::partManager())+"<br></li>"; continue; } @@ -1457,7 +1457,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater() if (info["action"]=="new") { if (!newObject( i, openingCancelled) && !openingCancelled) { not_found_msg += "<li>"; - not_found_msg += (i18n("cannot create object of type \"%1\"").tqarg(info["type"])+ + not_found_msg += (i18n("cannot create object of type \"%1\"").arg(info["type"])+ internalReason(d->prj)+"<br></li>"); } else @@ -1551,7 +1551,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater() if (!not_found_msg.isEmpty()) showErrorMessage(i18n("You have requested selected objects to be automatically opened " "or processed on startup. Several objects cannot be opened or processed."), - TQString("<ul>%1</ul>").tqarg(not_found_msg) ); + TQString("<ul>%1</ul>").arg(not_found_msg) ); d->updatePropEditorVisibility(d->curDialog ? d->curDialog->currentViewMode() : 0); #if defined(KDOCKWIDGET_P) @@ -1864,7 +1864,7 @@ void KexiMainWindowImpl::slotPartLoaded(KexiPart::Part* p) } //! internal -void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool tqchildrenMaximized) +void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool childrenMaximized) { //js todo: allow to set custom "static" app caption @@ -1877,13 +1877,13 @@ void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool tqchildrenMaximized) //current dialog isn't attached! - find top level child if (m_pMdi->topChild()) { view = m_pMdi->topChild()->m_pClient; - tqchildrenMaximized = view->mdiParent()->state()==KMdiChildFrm::Maximized; + childrenMaximized = view->mdiParent()->state()==KMdiChildFrm::Maximized; } else view = 0; } - if (tqchildrenMaximized && view) { + if (childrenMaximized && view) { setCaption( d->curDialog->caption() + (d->appCaptionPrefix.isEmpty() ? TQString() : (TQString::fromLatin1(" - ") + d->appCaptionPrefix)) ); } @@ -2093,8 +2093,8 @@ KexiMainWindowImpl::restoreSettings() }*/ config->setGroup("MainWindow"); - TQSize s ( config->readNumEntry( TQString::fromLatin1("Width %1").tqarg(desk.width()), 700 ), - config->readNumEntry( TQString::fromLatin1("Height %1").tqarg(desk.height()), 480 ) ); + TQSize s ( config->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 700 ), + config->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 480 ) ); resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height())); } #endif @@ -3006,10 +3006,10 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode) } if (!d->curDialog->supportsViewMode( viewMode )) { showErrorMessage(i18n("Selected view is not supported for \"%1\" object.") - .tqarg(d->curDialog->partItem()->name()), + .arg(d->curDialog->partItem()->name()), i18n("Selected view (%1) is not supported by this object type (%2).") - .tqarg(Kexi::nameForViewMode(viewMode)) - .tqarg(d->curDialog->part()->instanceCaption()) ); + .arg(Kexi::nameForViewMode(viewMode)) + .arg(d->curDialog->part()->instanceCaption()) ); d->toggleLastCheckedMode(); return false; } @@ -3019,7 +3019,7 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode) tristate res = d->curDialog->switchToViewMode( viewMode ); if (!res) { updateCustomPropertyPanelTabs(0, Kexi::NoViewMode); //revert - showErrorMessage(i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(viewMode)), + showErrorMessage(i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(viewMode)), d->curDialog); d->toggleLastCheckedMode(); return false; @@ -3118,7 +3118,7 @@ tristate KexiMainWindowImpl::getNewObjectInfo( if (allowOverwriting) { int res = KMessageBox::warningYesNoCancel(this, "<p>"+part->i18nMessage("Object \"%1\" already exists.", 0) - .tqarg(d->nameDialog->widget()->nameText()) + .arg(d->nameDialog->widget()->nameText()) +"</p><p>"+i18n("Do you want to replace it?")+"</p>", 0, KGuiItem(i18n("&Replace"), "button_yes"), KGuiItem(i18n("&Choose Other Name...")), @@ -3135,11 +3135,11 @@ tristate KexiMainWindowImpl::getNewObjectInfo( else { KMessageBox::information(this, "<p>"+part->i18nMessage("Object \"%1\" already exists.", 0) - .tqarg(d->nameDialog->widget()->nameText()) + .arg(d->nameDialog->widget()->nameText()) +"</p><p>"+i18n("Please choose other name.")+"</p>"); // " For example: Table \"my_table\" already exists" , // "%1 \"%2\" already exists.\nPlease choose other name.") -// .tqarg(dlg->part()->instanceName()).tqarg(d->nameDialog->widget()->nameText())); +// .arg(dlg->part()->instanceName()).arg(d->nameDialog->widget()->nameText())); continue; } } @@ -3160,7 +3160,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const TQString& me //data was saved in the past -just save again res = dlg->storeData(dontAsk); if (!res) - showErrorMessage(i18n("Saving \"%1\" object failed.").tqarg(dlg->partItem()->name()), + showErrorMessage(i18n("Saving \"%1\" object failed.").arg(dlg->partItem()->name()), d->curDialog); return res; } @@ -3177,7 +3177,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const TQString& me if (~res) return cancelled; if (!res) { - showErrorMessage(i18n("Saving new \"%1\" object failed.").tqarg(dlg->partItem()->name()), + showErrorMessage(i18n("Saving new \"%1\" object failed.").arg(dlg->partItem()->name()), d->curDialog); return false; } @@ -3224,11 +3224,11 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar saveChanges.setToolTip(i18n("Save changes")); saveChanges.setWhatsThis( i18n( "Pressing this button will save all recent changes made in \"%1\" object." ) - .tqarg(dlg->partItem()->name()) ); + .arg(dlg->partItem()->name()) ); KGuiItem discardChanges( KStdGuiItem::discard() ); discardChanges.setWhatsThis( i18n( "Pressing this button will discard all recent changes made in \"%1\" object." ) - .tqarg(dlg->partItem()->name()) ); + .arg(dlg->partItem()->name()) ); //dialog's data is dirty: //--adidional message, e.g. table designer will return @@ -3243,7 +3243,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar const int questionRes = KMessageBox::warningYesNoCancel( this, "<p>"+dlg->part()->i18nMessage("Design of object \"%1\" has been modified.", dlg) - .tqarg(dlg->partItem()->name())+"</p><p>"+i18n("Do you want to save changes?")+"</p>" + .arg(dlg->partItem()->name())+"</p><p>"+i18n("Do you want to save changes?")+"</p>" + additionalMessage /*may be empty*/, TQString(), saveChanges, @@ -3380,9 +3380,9 @@ void KexiMainWindowImpl::attachWindow(KMdiChildView *pWnd, bool /*bShow*/, bool KMdiMainFrm::attachWindow(pWnd,true,bAutomaticResize); //for dialogs in normal state: decrease dialog's height if it exceeds area contents if (pWnd->mdiParent()->state() == KMdiChildFrm::Normal - && pWnd->tqgeometry().bottom() > pWnd->mdiParent()->mdiAreaContentsRect().bottom()) + && pWnd->geometry().bottom() > pWnd->mdiParent()->mdiAreaContentsRect().bottom()) { - TQRect r = pWnd->tqgeometry(); + TQRect r = pWnd->geometry(); r.setBottom( pWnd->mdiParent()->mdiAreaContentsRect().bottom() - 5 ); pWnd->setGeometry( r ); } @@ -3444,7 +3444,7 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) /* Fixes for popup menus behaviour: For hiding/showing: focus previously (d->focus_before_popup) focused window, if known, otherwise focus currently focused one. - And: just tqinvalidate actions. + And: just invalidate actions. */ if (e->type()==TQEvent::Hide || e->type()==TQEvent::Show) { KexiVDebug << e->type() << endl; @@ -3481,8 +3481,8 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) #ifdef KEXI_STATUSBAR_DEBUG TQWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0; d->statusBar->setStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4") - .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "") - .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "") + .arg(focus_w ? focus_w->className() : "").arg(focus_w ? focus_w->name() : "") + .arg(focus_widget ? focus_widget->className() : "").arg(focus_widget ? focus_widget->name() : "") ); #endif } @@ -3494,8 +3494,8 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) #ifdef KEXI_STATUSBAR_DEBUG TQWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0; d->statusBar->setStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4") - .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "") - .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "") + .arg(focus_w ? focus_w->className() : "").arg(focus_w ? focus_w->name() : "") + .arg(focus_widget ? focus_widget->className() : "").arg(focus_widget ? focus_widget->name() : "") ); #endif } @@ -3534,7 +3534,7 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) return true; } - //remember currently focued window tqinvalidate act. + //remember currently focued window invalidate act. if (e->type()==TQEvent::FocusOut) { if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) { @@ -3605,7 +3605,7 @@ KexiMainWindowImpl::openObject(KexiPart::Item* item, int viewMode, bool &opening if (!openingAllowed(item, viewMode)) { if (errorMessage) *errorMessage = i18n("opening is not allowed in \"data view/design view/text view\" mode", - "opening is not allowed in \"%1\" mode").tqarg(Kexi::nameForViewMode(viewMode)); + "opening is not allowed in \"%1\" mode").arg(Kexi::nameForViewMode(viewMode)); openingCancelled = true; return 0; } @@ -3790,7 +3790,7 @@ tristate KexiMainWindowImpl::removeObject( KexiPart::Item *item, bool dontAsk ) "<p>"+i18n("Do you want to permanently delete:\n" "%1\n" "If you click \"Delete\", you will not be able to undo the deletion.") - .tqarg( "</p><p>"+part->instanceCaption()+" \""+ item->name() + "\"?</p>" ), + .arg( "</p><p>"+part->instanceCaption()+" \""+ item->name() + "\"?</p>" ), 0, KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::no())) return cancelled; } @@ -3865,7 +3865,7 @@ void KexiMainWindowImpl::renameObject( KexiPart::Item *item, const TQString& _ne const bool res = d->prj->renameObject(this, *item, newName); enableMessages(true); if (!res) { - showErrorMessage( d->prj, i18n("Renaming object \"%1\" failed.").tqarg(newName) ); + showErrorMessage( d->prj, i18n("Renaming object \"%1\" failed.").arg(newName) ); success = false; return; } @@ -3980,7 +3980,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/) if (onStartup && !d->showImportantInfoOnStartup) return; - TQString key = TQString("showImportantInfo %1").tqarg(KEXI_VERSION_STRING); + TQString key = TQString("showImportantInfo %1").arg(KEXI_VERSION_STRING); d->config->setGroup("Startup"); bool show = d->config->readBoolEntry(key,true); @@ -4005,7 +4005,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/) ts.setCodec( KGlobal::locale()->codecForEncoding() ); TQTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser"); if (tb) { - tb->setText( TQString("<qt>%1</qt>").tqarg(ts.read()) ); + tb->setText( TQString("<qt>%1</qt>").arg(ts.read()) ); } f.close(); } @@ -4062,7 +4062,7 @@ KexiMainWindowImpl::initUserMode(KexiProjectData *projectData) #if 0 //todo reenable; autoopen objects are handled elsewhere KexiDB::TableSchema *sch = d->prj->dbConnection()->tableSchema("kexi__final"); TQString err_msg = i18n("Could not start project \"%1\" in Final Mode.") - .tqarg(static_cast<KexiDB::SchemaData*>(projectData)->name()); + .arg(static_cast<KexiDB::SchemaData*>(projectData)->name()); if(!sch) { hide(); @@ -4184,7 +4184,7 @@ void KexiMainWindowImpl::slotToolsCompactDatabase() if (!drv || !(drv->features() & KexiDB::Driver::CompactingDatabaseSupported)) { KMessageBox::information(this, "<qt>"+ i18n("Compacting database file <nobr>\"%1\"</nobr> is not supported.") - .tqarg(TQDir::convertSeparators(cdata.fileName()))); + .arg(TQDir::convertSeparators(cdata.fileName()))); return; } data = new KexiProjectData( cdata, cdata.fileName() ); @@ -4423,11 +4423,11 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio saveChanges.setToolTip(i18n("Save changes")); saveChanges.setWhatsThis( i18n( "Pressing this button will save all recent changes made in \"%1\" object." ) - .tqarg(item->name()) ); + .arg(item->name()) ); KGuiItem doNotSave( KStdGuiItem::no() ); doNotSave.setWhatsThis( i18n( "Pressing this button will ignore all unsaved changes made in \"%1\" object." ) - .tqarg(dlg->partItem()->name()) ); + .arg(dlg->partItem()->name()) ); TQString question; if (action == PrintItem) @@ -4441,7 +4441,7 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio const int questionRes = KMessageBox::warningYesNoCancel( this, "<p>"+dlg->part()->i18nMessage("Design of object \"%1\" has been modified.", dlg) - .tqarg(item->name()) + "</p><p>" + question + "</p>", + .arg(item->name()) + "</p><p>" + question + "</p>", TQString(), saveChanges, doNotSave); diff --git a/kexi/main/keximainwindowimpl.h b/kexi/main/keximainwindowimpl.h index 5f3d887a..141cd475 100644 --- a/kexi/main/keximainwindowimpl.h +++ b/kexi/main/keximainwindowimpl.h @@ -346,7 +346,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI void slotPartLoaded(KexiPart::Part* p); - void slotCaptionForCurrentMDIChild(bool tqchildrenMaximized); + void slotCaptionForCurrentMDIChild(bool childrenMaximized); void slotNoMaximizedChildFrmLeft(KMdiChildFrm*); void slotLastChildViewClosed(); void slotChildViewIsDetachedNow(TQWidget*); diff --git a/kexi/main/keximainwindowimpl_p.h b/kexi/main/keximainwindowimpl_p.h index 98600c62..b3d60b89 100644 --- a/kexi/main/keximainwindowimpl_p.h +++ b/kexi/main/keximainwindowimpl_p.h @@ -219,8 +219,8 @@ void updatePropEditorDockWidthInfo() { void showStartProcessMsg(const TQStringList& args) { - wnd->showErrorMessage(i18n("Could not start %1 application.").tqarg(KEXI_APP_NAME), - i18n("Command \"%1\" failed.").tqarg(args.join(" "))); + wnd->showErrorMessage(i18n("Could not start %1 application.").arg(KEXI_APP_NAME), + i18n("Command \"%1\" failed.").arg(args.join(" "))); } void hideMenuItem(const TQString& menuName, const TQString& itemText, bool alsoSeparator) @@ -411,7 +411,7 @@ void updatePropEditorDockWidthInfo() { } KexiMainWindowImpl *wnd; - KexiStatusBar *statusBar; + KexitStatusBar *statusBar; KexiProject *prj; KConfig *config; #ifndef KEXI_NO_CTXT_HELP diff --git a/kexi/main/kexinewstuff.cpp b/kexi/main/kexinewstuff.cpp index 9beffbf5..1218df23 100644 --- a/kexi/main/kexinewstuff.cpp +++ b/kexi/main/kexinewstuff.cpp @@ -55,7 +55,7 @@ KexiNewStuff::install(const TQString &fileName) KTar archive( fileName ); if ( !archive.open( IO_ReadOnly ) ) { - kdDebug() << TQString("KexiNewStuff::install: Failed to open archivefile \"%1\"").tqarg(fileName) << endl; + kdDebug() << TQString("KexiNewStuff::install: Failed to open archivefile \"%1\"").arg(fileName) << endl; return false; } const KArchiveDirectory *archiveDir = archive.directory(); diff --git a/kexi/main/kexistatusbar.cpp b/kexi/main/kexistatusbar.cpp index 439c20b6..02778208 100644 --- a/kexi/main/kexistatusbar.cpp +++ b/kexi/main/kexistatusbar.cpp @@ -33,14 +33,14 @@ #include <klocale.h> #include <kparts/part.h> -#if KexiStatusBar_KTEXTEDITOR_USED +#if KexitStatusBar_KTEXTEDITOR_USED #include <ktexteditor/viewcursorinterface.h> #include <ktexteditor/viewstatusmsginterface.h> #endif -KexiStatusBar::KexiStatusBar(TQWidget *parent, const char *name) +KexitStatusBar::KexitStatusBar(TQWidget *parent, const char *name) : KStatusBar(parent, name) -#if KexiStatusBar_KTEXTEDITOR_USED +#if KexitStatusBar_KTEXTEDITOR_USED , m_cursorIface(0) #endif , m_activePart(0) @@ -61,17 +61,17 @@ KexiStatusBar::KexiStatusBar(TQWidget *parent, const char *name) } -KexiStatusBar::~KexiStatusBar() +KexitStatusBar::~KexitStatusBar() { } -void KexiStatusBar::activePartChanged(KParts::Part *part) +void KexitStatusBar::activePartChanged(KParts::Part *part) { if ( m_activePart && m_activePart->widget() ) disconnect( m_activePart->widget(), 0, this, 0 ); m_activePart = part; -#if KexiStatusBar_KTEXTEDITOR_USED +#if KexitStatusBar_KTEXTEDITOR_USED m_cursorIface = 0; m_viewmsgIface = 0; // @todo @@ -98,9 +98,9 @@ void KexiStatusBar::activePartChanged(KParts::Part *part) } -void KexiStatusBar::cursorPositionChanged() +void KexitStatusBar::cursorPositionChanged() { -#if KexiStatusBar_KTEXTEDITOR_USED +#if KexitStatusBar_KTEXTEDITOR_USED if (m_cursorIface) { uint line, col; @@ -110,9 +110,9 @@ void KexiStatusBar::cursorPositionChanged() #endif } -void KexiStatusBar::setStatus(const TQString &str) +void KexitStatusBar::setStatus(const TQString &str) { - kdDebug() << "KexiStatusBar::setStatus(" << str << ")" << endl; + kdDebug() << "KexitStatusBar::setStatus(" << str << ")" << endl; // m_status->setText(str); changeItem(str, m_msgID); @@ -123,13 +123,13 @@ void KexiStatusBar::setStatus(const TQString &str) #endif } -void KexiStatusBar::setCursorPosition(int line, int col) +void KexitStatusBar::setCursorPosition(int line, int col) { -// m_status->setText(i18n(" Line: %1 Col: %2 ").tqarg(line+1).tqarg(col)); - changeItem(i18n(" Line: %1 Col: %2 ").tqarg(line+1).tqarg(col), m_msgID); +// m_status->setText(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col)); + changeItem(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col), m_msgID); } -/*void KexiStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent) +/*void KexitStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent) { KStatusBar::addWidget(widget,stretch,permanent); @@ -137,7 +137,7 @@ void KexiStatusBar::setCursorPosition(int line, int col) setFixedHeight(widget->sizeHint().height() + 4); }*/ -void KexiStatusBar::setReadOnlyFlag(bool readOnly) +void KexitStatusBar::setReadOnlyFlag(bool readOnly) { changeItem(readOnly ? i18n("Read only") : TQString(), m_readOnlyID); } diff --git a/kexi/main/kexistatusbar.h b/kexi/main/kexistatusbar.h index e8c31d41..0d20e0a8 100644 --- a/kexi/main/kexistatusbar.h +++ b/kexi/main/kexistatusbar.h @@ -24,7 +24,7 @@ #define KEXISTATUSBAR_H //temporary -#define KexiStatusBar_KTEXTEDITOR_USED 0 +#define KexitStatusBar_KTEXTEDITOR_USED 0 #include <tdeversion.h> #include <kstatusbar.h> @@ -32,19 +32,19 @@ class TQLabel; -#if KexiStatusBar_KTEXTEDITOR_USED +#if KexitStatusBar_KTEXTEDITOR_USED namespace KTextEditor { class ViewStatusMsgInterface; } namespace KTextEditor { class ViewCursorInterface; } #endif namespace KParts { class Part; } -class KexiStatusBar : public KStatusBar +class KexitStatusBar : public KStatusBar { Q_OBJECT TQ_OBJECT public: - KexiStatusBar( TQWidget *parent=0, const char *name=0 ); - virtual ~KexiStatusBar(); + KexitStatusBar( TQWidget *parent=0, const char *name=0 ); + virtual ~KexitStatusBar(); // virtual void addWidget( TQWidget *widget, int stretch = 0, bool permanent = false); public slots: @@ -60,7 +60,7 @@ class KexiStatusBar : public KStatusBar int m_msgID, m_readOnlyID; // TQLabel *m_status, *m_readOnlyStatus; -#if KexiStatusBar_KTEXTEDITOR_USED +#if KexitStatusBar_KTEXTEDITOR_USED KTextEditor::ViewCursorInterface * m_cursorIface; KTextEditor::ViewStatusMsgInterface * m_viewmsgIface; #endif diff --git a/kexi/main/printing/kexisimpleprintingengine.cpp b/kexi/main/printing/kexisimpleprintingengine.cpp index ac829ce1..3e6f8a97 100644 --- a/kexi/main/printing/kexisimpleprintingengine.cpp +++ b/kexi/main/printing/kexisimpleprintingengine.cpp @@ -326,9 +326,9 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, TQPainter& painter, boo TQString pageNumString; if (m_pagesCount>0) pageNumString = i18n("Page (number) of (total)", "Page %1 of %2") - .tqarg(pageNumber+1).tqarg(m_pagesCount); + .arg(pageNumber+1).arg(m_pagesCount); else - pageNumString = i18n("Page %1").tqarg(pageNumber+1); + pageNumString = i18n("Page %1").arg(pageNumber+1); painter.drawText((int)m_leftMargin, (int)m_topMargin + m_pageHeight - m_mainLineSpacing, m_pageWidth, m_mainLineSpacing, diff --git a/kexi/main/printing/kexisimpleprintingpagesetup.cpp b/kexi/main/printing/kexisimpleprintingpagesetup.cpp index 476f924a..c536f676 100644 --- a/kexi/main/printing/kexisimpleprintingpagesetup.cpp +++ b/kexi/main/printing/kexisimpleprintingpagesetup.cpp @@ -356,7 +356,7 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi m_contents->openDataLink->setText( i18n("Open This Query") ); m_origCaptionLabelText = i18n("<h2>Page setup for printing \"%1\" query data</h2>"); } - m_contents->captionLabel->setText( m_origCaptionLabelText.tqarg(m_item->name()) ); + m_contents->captionLabel->setText( m_origCaptionLabelText.arg(m_item->name()) ); } connect(m_contents->headerTitleLineEdit,TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotTitleTextChanged(const TQString&))); @@ -442,8 +442,8 @@ void KexiSimplePrintingPageSetup::updatePageLayoutAndUnitInfo() TQString s; if (m_settings.pageLayout.format == PG_CUSTOM) { s += TQString(" (%1 %2 x %3 %4)") - .tqarg(m_settings.pageLayout.ptWidth).tqarg(KoUnit::unitName(m_unit)) - .tqarg(m_settings.pageLayout.ptHeight).tqarg(KoUnit::unitName(m_unit)); + .arg(m_settings.pageLayout.ptWidth).arg(KoUnit::unitName(m_unit)) + .arg(m_settings.pageLayout.ptHeight).arg(KoUnit::unitName(m_unit)); } else s += KoPageFormat::name(m_settings.pageLayout.format); diff --git a/kexi/main/printing/kexisimpleprintingpagesetupbase.ui b/kexi/main/printing/kexisimpleprintingpagesetupbase.ui index de57e97e..4bf6deec 100644 --- a/kexi/main/printing/kexisimpleprintingpagesetupbase.ui +++ b/kexi/main/printing/kexisimpleprintingpagesetupbase.ui @@ -45,7 +45,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter</set> </property> </widget> @@ -106,7 +106,7 @@ <property name="text"> <string>Page title:</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignBottom</set> </property> <property name="buddy" stdset="0"> diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp index f07722d8..83d9cb06 100644 --- a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp +++ b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp @@ -52,7 +52,7 @@ void KexiSimplePrintPreviewView::paintEvent( TQPaintEvent *pe ) return; TQPixmap pm(size()); //dbl buffered TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(&pm), this); + p.begin(TQT_TQPAINTDEVICE(&pm), this); //! @todo only for screen! p.fillRect(TQRect(TQPoint(0,0),pm.size()), TQBrush(white));//pe->rect(), TQBrush(white)); if (m_window->currentPage()>=0) @@ -135,7 +135,7 @@ void KexiSimplePrintPreviewScrollView::setFullWidth() viewport()->setUpdatesEnabled(true); resize(size()+TQSize(1,1)); //to update pos. widget->enablePainting = true; - widget->tqrepaint(); + widget->repaint(); } void KexiSimplePrintPreviewScrollView::setContentsPos(int x, int y) @@ -157,7 +157,7 @@ KexiSimplePrintPreviewWindow::KexiSimplePrintPreviewWindow( , m_pageNumber(-1) , m_pagesCount(-1) { - setCaption(i18n("%1 - Print Preview - %2").tqarg(previewName).tqarg(KEXI_APP_NAME)); + setCaption(i18n("%1 - Print Preview - %2").arg(previewName).arg(KEXI_APP_NAME)); setIcon(DesktopIcon("filequickprint")); TQVBoxLayout *lyr = new TQVBoxLayout(this, 6); @@ -308,14 +308,14 @@ void KexiSimplePrintPreviewWindow::goToPage(int pageNumber) m_pageNumber = pageNumber; m_pagesCount = m_engine.pagesCount(); - m_view->tqrepaint(); //this will automatically paint a new page + m_view->repaint(); //this will automatically paint a new page m_navToolbar->setItemEnabled(m_idNext, pageNumber < ((int)m_engine.pagesCount()-1)); m_navToolbar->setItemEnabled(m_idLast, pageNumber < ((int)m_engine.pagesCount()-1)); m_navToolbar->setItemEnabled(m_idPrevious, pageNumber > 0); m_navToolbar->setItemEnabled(m_idFirst, pageNumber > 0); static_cast<TQLabel*>(m_navToolbar->getWidget(m_idPageNumberLabel))->setText( - i18n("Page (number) of (total)", "Page %1 of %2").tqarg(m_pageNumber+1).tqarg(m_engine.pagesCount())); + i18n("Page (number) of (total)", "Page %1 of %2").arg(m_pageNumber+1).arg(m_engine.pagesCount())); } void KexiSimplePrintPreviewWindow::setFullWidth() diff --git a/kexi/main/startup/KexiConnSelector.cpp b/kexi/main/startup/KexiConnSelector.cpp index a9a2a316..60e98852 100644 --- a/kexi/main/startup/KexiConnSelector.cpp +++ b/kexi/main/startup/KexiConnSelector.cpp @@ -350,9 +350,9 @@ bool KexiConnSelectorWidget::confirmOverwrites() const /*static TQString msgUnfinished() { return i18n("To define or change a connection, use command line options or click on .kexis file. " - "You can find example .kexis file at <a href=\"%1\">here</a>.").tqarg("") //temporary, please do not change for 0.8! + "You can find example .kexis file at <a href=\"%1\">here</a>.").arg("") //temporary, please do not change for 0.8! + "\nhttp://www.kexi-project.org/resources/testdb.kexis"; */ -// .tqarg("http://websvn.kde.org/*checkout*/branches/kexi/0.9/koffice/kexi/tests/startup/testdb.kexis"); +// .arg("http://websvn.kde.org/*checkout*/branches/kexi/0.9/koffice/kexi/tests/startup/testdb.kexis"); //} void KexiConnSelectorWidget::slotRemoteAddBtnClicked() @@ -407,7 +407,7 @@ void KexiConnSelectorWidget::slotRemoteRemoveBtnClicked() return; if (KMessageBox::Continue!=KMessageBox::warningContinueCancel(0, i18n("Do you want to remove database connection \"%1\" from the list of available connections?") - .tqarg(item->data()->serverInfoString(true)), TQString(), KStdGuiItem::del(), TQString(), + .arg(item->data()->serverInfoString(true)), TQString(), KStdGuiItem::del(), TQString(), KMessageBox::Notify|KMessageBox::Dangerous)) return; diff --git a/kexi/main/startup/KexiConnSelectorBase.ui b/kexi/main/startup/KexiConnSelectorBase.ui index 4c371ed2..c55614e2 100644 --- a/kexi/main/startup/KexiConnSelectorBase.ui +++ b/kexi/main/startup/KexiConnSelectorBase.ui @@ -246,7 +246,7 @@ <p>You will see existing Kexi projects available for the selected connection. Here you may also add, edit or remove connections from the list. </string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignTop</set> </property> <property name="buddy" stdset="0"> @@ -268,7 +268,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignTop</set> </property> </widget> diff --git a/kexi/main/startup/KexiNewPrjTypeSelector.ui b/kexi/main/startup/KexiNewPrjTypeSelector.ui index 29e52812..122137e1 100644 --- a/kexi/main/startup/KexiNewPrjTypeSelector.ui +++ b/kexi/main/startup/KexiNewPrjTypeSelector.ui @@ -74,7 +74,7 @@ <string>Kexi will create a new database project. Select a storage method which will be used to store the new project. </string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignTop</set> </property> </widget> diff --git a/kexi/main/startup/KexiNewProjectWizard.cpp b/kexi/main/startup/KexiNewProjectWizard.cpp index 625af34f..0e7f872a 100644 --- a/kexi/main/startup/KexiNewProjectWizard.cpp +++ b/kexi/main/startup/KexiNewProjectWizard.cpp @@ -301,7 +301,7 @@ void KexiNewProjectWizard::next() return; } m_project_selector->label->setText( - d->server_db_name_dblist_lbl_txt.tqarg(m_conn_sel->selectedConnectionData()->serverInfoString(false)) ); + d->server_db_name_dblist_lbl_txt.arg(m_conn_sel->selectedConnectionData()->serverInfoString(false)) ); m_server_db_name->le_caption->setFocus(); } @@ -342,7 +342,7 @@ void KexiNewProjectWizard::accept() if (KMessageBox::Continue!=KMessageBox::warningContinueCancel( this, "<qt>" +i18n("<b>A project with database name \"%1\" already exists</b>" "<p>Do you want to delete it and create a new one?") - .tqarg( m_server_db_name->le_dbname->text() ), TQString(), KStdGuiItem::del(), + .arg( m_server_db_name->le_dbname->text() ), TQString(), KStdGuiItem::del(), TQString(), KMessageBox::Notify|KMessageBox::Dangerous )) { m_server_db_name->le_dbname->setFocus(); diff --git a/kexi/main/startup/KexiOpenExistingFile.ui b/kexi/main/startup/KexiOpenExistingFile.ui index b822f0ff..2f778429 100644 --- a/kexi/main/startup/KexiOpenExistingFile.ui +++ b/kexi/main/startup/KexiOpenExistingFile.ui @@ -35,7 +35,7 @@ <string><b>Select existing Kexi project file to open:</b> </string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -112,7 +112,7 @@ <property name="text"> <string>Click "Advanced" button if you want to find an existing project on a server rather than a file.</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignTop</set> </property> </widget> diff --git a/kexi/main/startup/KexiProjectSelector.cpp b/kexi/main/startup/KexiProjectSelector.cpp index 9353e3a6..878e0273 100644 --- a/kexi/main/startup/KexiProjectSelector.cpp +++ b/kexi/main/startup/KexiProjectSelector.cpp @@ -248,7 +248,7 @@ KexiProjectSelectorDialog::KexiProjectSelectorDialog( TQWidget *parent, const ch init(prj_set, showProjectNameColumn, showConnectionColumns); m_sel->label->setText( i18n("Select a project on <b>%1</b> database server to open:") - .tqarg(cdata->serverInfoString(false)) ); + .arg(cdata->serverInfoString(false)) ); } KexiProjectSelectorDialog::~KexiProjectSelectorDialog() diff --git a/kexi/main/startup/KexiProjectSelectorBase.ui b/kexi/main/startup/KexiProjectSelectorBase.ui index 57aa28ad..5159d9bb 100644 --- a/kexi/main/startup/KexiProjectSelectorBase.ui +++ b/kexi/main/startup/KexiProjectSelectorBase.ui @@ -43,7 +43,7 @@ <string><b>There are Kexi projects you have recently opened.</b> Select one you wish to open: </string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignTop</set> </property> </widget> diff --git a/kexi/main/startup/KexiStartup.cpp b/kexi/main/startup/KexiStartup.cpp index 1708efbc..17afbc7d 100644 --- a/kexi/main/startup/KexiStartup.cpp +++ b/kexi/main/startup/KexiStartup.cpp @@ -144,13 +144,13 @@ KexiDBPasswordDialog::KexiDBPasswordDialog(TQWidget *parent, KexiDB::ConnectionD + i18n("Please enter the password.") + "</p>"; /* msg += cdata.userName.isEmpty() ? "<p>"+i18n("Please enter the password.") - : "<p>"+i18n("Please enter the password for user.").tqarg("<b>"+cdata.userName+"</b>");*/ + : "<p>"+i18n("Please enter the password for user.").arg("<b>"+cdata.userName+"</b>");*/ TQString srv = cdata.serverInfoString(false); if (srv.isEmpty() || srv.lower()=="localhost") srv = i18n("local database server"); - msg += ("</p><p>"+i18n("Database server: %1").tqarg(TQString("<nobr>")+srv+"</nobr>")+"</p>"); + msg += ("</p><p>"+i18n("Database server: %1").arg(TQString("<nobr>")+srv+"</nobr>")+"</p>"); TQString usr; if (cdata.userName.isEmpty()) @@ -158,7 +158,7 @@ KexiDBPasswordDialog::KexiDBPasswordDialog(TQWidget *parent, KexiDB::ConnectionD else usr = cdata.userName; - msg += ("<p>"+i18n("Username: %1").tqarg(usr)+"</p>"); + msg += ("<p>"+i18n("Username: %1").arg(usr)+"</p>"); setPrompt( msg ); if (showDetailsButton) { @@ -283,7 +283,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) KMessageBox::sorry( 0, "<qt>" +i18n("Could not read connection information from connection shortcut " "file <nobr>\"%1\"</nobr>.<br><br>Check whether the file has valid contents.") - .tqarg(TQDir::convertSeparators(connectionShortcut.fileName()))); + .arg(TQDir::convertSeparators(connectionShortcut.fileName()))); return false; } } @@ -295,7 +295,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) if (args->count()>0 && (!fileType.isEmpty() && fileType!="project" && fileType!="shortcut" && fileType!="connection")) { KMessageBox::sorry( 0, i18n("You have specified invalid argument (\"%1\") for \"type\" command-line option.") - .tqarg(fileType)); + .arg(fileType)); return false; } @@ -434,7 +434,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) if (dropDB && !projectFileExists) { KMessageBox::sorry(0, i18n("Could not remove project.\nThe file \"%1\" does not exist.") - .tqarg(TQDir::convertSeparators(cdata.dbFileName()))); + .arg(TQDir::convertSeparators(cdata.dbFileName()))); return 0; } } @@ -476,7 +476,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) m_projectData = new KexiProjectData(); if (!d->shortcutFile->loadProjectData(*m_projectData, &d->shortcutFileGroupKey)) { KMessageBox::sorry(0, i18n("Could not open shortcut file\n\"%1\".") - .tqarg(TQDir::convertSeparators(cdata.fileName()))); + .arg(TQDir::convertSeparators(cdata.fileName()))); delete m_projectData; m_projectData = 0; delete d->shortcutFile; @@ -509,7 +509,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) d->connShortcutFile = new KexiDBConnShortcutFile(cdata.fileName()); if (!d->connShortcutFile->loadConnectionData(cdata, &d->shortcutFileGroupKey)) { KMessageBox::sorry(0, i18n("Could not open connection data file\n\"%1\".") - .tqarg(TQDir::convertSeparators(cdata.fileName()))); + .arg(TQDir::convertSeparators(cdata.fileName()))); delete d->connShortcutFile; d->connShortcutFile = 0; return false; @@ -612,7 +612,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) if (!alsoOpenDB) { if (ok) { KMessageBox::information( 0, i18n("Project \"%1\" created successfully.") - .tqarg( TQDir::convertSeparators(projectData()->databaseName()) )); + .arg( TQDir::convertSeparators(projectData()->databaseName()) )); } return ok; } @@ -622,7 +622,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) tristate res = KexiProject::dropProject(projectData(), &gui, false/*ask*/); if (res==true) KMessageBox::information( 0, i18n("Project \"%1\" dropped successfully.") - .tqarg( TQDir::convertSeparators(projectData()->databaseName()) )); + .arg( TQDir::convertSeparators(projectData()->databaseName()) )); return res!=false; } @@ -749,7 +749,7 @@ tristate KexiStartupHandler::detectActionForFile( if (!(options & SkipMessages)) KMessageBox::sorry(parent, i18n("<p>Could not open project.</p>") +i18n("<p>The file <nobr>\"%1\"</nobr> does not exist or is not readable.</p>") - .tqarg(TQDir::convertSeparators(dbFileName)) + .arg(TQDir::convertSeparators(dbFileName)) +i18n("Check the file's permissions and whether it is already opened " "and locked by another application.")); return false; @@ -781,7 +781,7 @@ tristate KexiStartupHandler::detectActionForFile( if (!(options & SkipMessages)) KMessageBox::sorry(parent, i18n("<p>Could not open project.</p>") +i18n("<p>The file <nobr>\"%1\"</nobr> is not readable.</p>") - .tqarg(TQDir::convertSeparators(dbFileName)) + .arg(TQDir::convertSeparators(dbFileName)) +i18n("Check the file's permissions and whether it is already opened " "and locked by another application.")); return false; @@ -804,7 +804,7 @@ tristate KexiStartupHandler::detectActionForFile( if ((options & SkipMessages) || KMessageBox::Yes != KMessageBox::questionYesNo( parent, i18n("\"%1\" is an external file of type:\n\"%2\".\n" "Do you want to import the file as a Kexi project?") - .tqarg(TQDir::convertSeparators(dbFileName)).tqarg(ptr.data()->comment()), + .arg(TQDir::convertSeparators(dbFileName)).arg(ptr.data()->comment()), i18n("Open External File"), KGuiItem(i18n("Import...")), KStdGuiItem::cancel() ) ) { return cancelled; @@ -830,8 +830,8 @@ tristate KexiStartupHandler::detectActionForFile( "The project file \"%1\" is recognized as compatible with \"%2\" database driver, " "while you have asked for \"%3\" database driver to be used.\n" "Do you want to use \"%4\" database driver?") - .tqarg(TQDir::convertSeparators(dbFileName)) - .tqarg(tmpDriverName).tqarg(suggestedDriverName).tqarg(tmpDriverName)); + .arg(TQDir::convertSeparators(dbFileName)) + .arg(tmpDriverName).arg(suggestedDriverName).arg(tmpDriverName)); if (KMessageBox::Yes == res) useDetectedDriver = true; else if (KMessageBox::Cancel == res) @@ -851,7 +851,7 @@ tristate KexiStartupHandler::detectActionForFile( && KMessageBox::Yes == KMessageBox::questionYesNo(parent, i18n( "Previous version of database file format (\"%1\") is detected in the \"%2\" " "project file.\nDo you want to convert the project to a new \"%3\" format (recommended)?") - .tqarg(detectedDriverName).tqarg(TQDir::convertSeparators(dbFileName)).tqarg(newFileFormat)) ) + .arg(detectedDriverName).arg(TQDir::convertSeparators(dbFileName)).arg(newFileFormat)) ) { // SQLite2ToSQLite3Migration *migr = new SQLite2ToSQLite3Migration migr( finfo.absFilePath() ); @@ -862,7 +862,7 @@ tristate KexiStartupHandler::detectActionForFile( KMessageBox::sorry(parent, i18n( "Failed to convert project file \"%1\" to a new \"%2\" format.\n" "The file format remains unchanged.") - .tqarg(TQDir::convertSeparators(dbFileName)).tqarg(newFileFormat) ); + .arg(TQDir::convertSeparators(dbFileName)).arg(newFileFormat) ); //continue... } if (res==true) @@ -878,12 +878,12 @@ tristate KexiStartupHandler::detectActionForFile( if (!(options & SkipMessages)) KMessageBox::detailedSorry(parent, i18n( "The file \"%1\" is not recognized as being supported by Kexi.") - .tqarg(TQDir::convertSeparators(dbFileName)), + .arg(TQDir::convertSeparators(dbFileName)), TQString::fromLatin1("<p>") +i18n("Database driver for this file type not found.\nDetected MIME type: %1") - .tqarg(mimename) + .arg(mimename) +(ptr.data()->comment().isEmpty() - ? TQString::fromLatin1(".") : TQString::fromLatin1(" (%1).").tqarg(ptr.data()->comment())) + ? TQString::fromLatin1(".") : TQString::fromLatin1(" (%1).").arg(ptr.data()->comment())) +TQString::fromLatin1("</p>") +possibleProblemsInfoMsg); return false; @@ -917,13 +917,13 @@ KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled if (prjdlg.projectSet()) msgh.showErrorMessage(prjdlg.projectSet(), i18n("Could not load list of available projects for <b>%1</b> database server.") - .tqarg(cdata->serverInfoString(true))); + .arg(cdata->serverInfoString(true))); else msgh.showErrorMessage( i18n("Could not load list of available projects for <b>%1</b> database server.") - .tqarg(cdata->serverInfoString(true))); + .arg(cdata->serverInfoString(true))); // setStatus(i18n("Could not load list of available projects for database server \"%1\"") -// .tqarg(cdata->serverInfoString(true)), prjdlg.projectSet()->errorMsg()); +// .arg(cdata->serverInfoString(true)), prjdlg.projectSet()->errorMsg()); return 0; } if (prjdlg.exec()!=TQDialog::Accepted) { @@ -952,7 +952,7 @@ void KexiStartupHandler::slotSaveShortcutFileChanges() if (!ok) { KMessageBox::sorry(0, i18n("Failed saving connection data to\n\"%1\" file.") - .tqarg(TQDir::convertSeparators(d->shortcutFile->fileName()))); + .arg(TQDir::convertSeparators(d->shortcutFile->fileName()))); } } diff --git a/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp b/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp index 429499f4..d919463d 100644 --- a/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp +++ b/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp @@ -123,8 +123,8 @@ void TemplatesPage::itemClicked(TQIconViewItem *item) { return; } TQString t = TQString("<h2>%1</h2><p>%2</p>") - .tqarg(static_cast<TemplateItem*>(item)->name) - .tqarg(static_cast<TemplateItem*>(item)->description); + .arg(static_cast<TemplateItem*>(item)->name) + .arg(static_cast<TemplateItem*>(item)->description); #ifndef DB_TEMPLATES t += TQString("<p>") + i18n("We are sorry, templates are not yet available.") +"</p>"; #endif diff --git a/kexi/main/startup/KexiStartupFileDialog.cpp b/kexi/main/startup/KexiStartupFileDialog.cpp index 1e50a12d..72db4af2 100644 --- a/kexi/main/startup/KexiStartupFileDialog.cpp +++ b/kexi/main/startup/KexiStartupFileDialog.cpp @@ -300,7 +300,7 @@ bool KexiStartupFileDialog::checkFileName() if (mode() & KFile::ExistingOnly) { if ( !fi.exists() ) { KMessageBox::error( this, "<qt>"+i18n( "The file \"%1\" does not exist." ) - .tqarg( TQDir::convertSeparators(path) ) ); + .arg( TQDir::convertSeparators(path) ) ); return false; } else if (mode() & KFile::File) { @@ -310,7 +310,7 @@ bool KexiStartupFileDialog::checkFileName() } else if (!fi.isReadable()) { KMessageBox::error( this, "<qt>"+i18n( "The file \"%1\" is not readable." ) - .tqarg( TQDir::convertSeparators(path) ) ); + .arg( TQDir::convertSeparators(path) ) ); return false; } } @@ -329,7 +329,7 @@ bool KexiStartupFileDialog::askForOverwriting(const TQString& filePath, TQWidget if (!fi.exists()) return true; const int res = KMessageBox::warningYesNo( parent, i18n( "The file \"%1\" already exists.\n" - "Do you want to overwrite it?").tqarg( TQDir::convertSeparators(filePath) ), TQString(), + "Do you want to overwrite it?").arg( TQDir::convertSeparators(filePath) ), TQString(), i18n("Overwrite"), KStdGuiItem::no() ); if (res == KMessageBox::Yes) return true; diff --git a/kexi/main/startup/KexiStartupFileDialog_win.cpp b/kexi/main/startup/KexiStartupFileDialog_win.cpp index 67a44ca6..36b8c527 100644 --- a/kexi/main/startup/KexiStartupFileDialog_win.cpp +++ b/kexi/main/startup/KexiStartupFileDialog_win.cpp @@ -120,27 +120,27 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f /* KURL u; u.setPath( TQDir::rootDirPath() ); - TQString text = i18n("Root Directory: %1").tqarg( u.path() ); + TQString text = i18n("Root Directory: %1").arg( u.path() ); d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), text ); u.setPath( TQDir::homeDirPath() ); - text = i18n("Home Directory: %1").tqarg( u.path( +1 ) ); + text = i18n("Home Directory: %1").arg( u.path( +1 ) ); d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), text ); KURL docPath; docPath.setPath( KGlobalSettings::documentPath() ); if ( u.path(+1) != docPath.path(+1) ) { - text = i18n("Documents: %1").tqarg( docPath.path( +1 ) ); + text = i18n("Documents: %1").arg( docPath.path( +1 ) ); d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), text ); } u.setPath( KGlobalSettings::desktopPath() ); - text = i18n("Desktop: %1").tqarg( u.path( +1 ) ); + text = i18n("Desktop: %1").arg( u.path( +1 ) ); d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), text ); @@ -185,7 +185,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f coll->action( "up" )->plug( toolbar ); coll->action( "up" )->setWhatsThis(i18n("<qt>Click this button to enter the parent directory.<p>" "For instance, if the current location is file:/home/%1 clicking this " - "button will take you to file:/home.</qt>").tqarg(getlogin())); + "button will take you to file:/home.</qt>").arg(getlogin())); coll->action( "back" )->plug( toolbar ); coll->action( "back" )->setWhatsThis(i18n("Click this button to move backwards one step in the browsing history.")); coll->action( "forward" )->plug( toolbar ); diff --git a/kexi/main/startup/KexiStartup_p.cpp b/kexi/main/startup/KexiStartup_p.cpp index e8139e18..e959ccdc 100644 --- a/kexi/main/startup/KexiStartup_p.cpp +++ b/kexi/main/startup/KexiStartup_p.cpp @@ -73,7 +73,7 @@ tristate SQLite2ToSQLite3Migration::run() m_dlg = new KProgressDialog(0, 0, TQString(), i18n("Saving \"%1\" project file to a new \"%2\" database format...") - .tqarg(TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())).tqarg("SQLite3") + .arg(TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())).arg("SQLite3") ); m_dlg->setModal(true); connect(m_dlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelClicked())); diff --git a/kexi/migration/importoptionsdlg.cpp b/kexi/migration/importoptionsdlg.cpp index e89d0932..24e9707e 100644 --- a/kexi/migration/importoptionsdlg.cpp +++ b/kexi/migration/importoptionsdlg.cpp @@ -60,7 +60,7 @@ OptionsDialog::OptionsDialog( const TQString& databaseFile, const TQString& sele "<p>Database file \"%1\" appears to be created by a version of Microsoft Access older than 2000.</p>" "<p>In order to properly import national characters, you may need to choose a proper text encoding " "if the database was created on a computer with a different character set.</p>") - .tqarg(TQDir::convertSeparators(databaseFile)), plainPage()); + .arg(TQDir::convertSeparators(databaseFile)), plainPage()); lbl->setAlignment( TQt::AlignAuto | TQt::WordBreak ); lbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); lyr->addMultiCellWidget( lbl, 0, 0, 0, 2 ); diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp index 91de5f7f..6d42da24 100644 --- a/kexi/migration/importwizard.cpp +++ b/kexi/migration/importwizard.cpp @@ -153,14 +153,14 @@ void ImportWizard::setupIntro() if (m_predefinedConnectionData) { //predefined import: server source msg = i18n("<qt>Database Importing wizard is about to import \"%1\" database " "<nobr>(connection %2)</nobr> into a Kexi database.</qt>") - .tqarg(m_predefinedDatabaseName).tqarg(m_predefinedConnectionData->serverInfoString()); + .arg(m_predefinedDatabaseName).arg(m_predefinedConnectionData->serverInfoString()); } else if (!m_predefinedDatabaseName.isEmpty()) { //predefined import: file source //! @todo this message is currently ok for files only KMimeType::Ptr mimeTypePtr = KMimeType::mimeType(m_predefinedMimeType); msg = i18n("<qt>Database Importing wizard is about to import <nobr>\"%1\"</nobr> file " "of type \"%2\" into a Kexi database.</qt>") - .tqarg(TQDir::convertSeparators(m_predefinedDatabaseName)).tqarg(mimeTypePtr->comment()); + .arg(TQDir::convertSeparators(m_predefinedDatabaseName)).arg(mimeTypePtr->comment()); } else { msg = i18n("Database Importing wizard allows you to import an existing database " @@ -572,7 +572,7 @@ void ImportWizard::arriveImportingPage() { void ImportWizard::arriveFinishPage() { // backButton()->hide(); // cancelButton()->setEnabled(false); -// m_finishLbl->setText( m_successText.tqarg(m_dstNewDBNameLineEdit->text()) ); +// m_finishLbl->setText( m_successText.arg(m_dstNewDBNameLineEdit->text()) ); } bool ImportWizard::fileBasedSrcSelected() const @@ -820,7 +820,7 @@ tristate ImportWizard::import() if (KMessageBox::Yes != KMessageBox::warningYesNo(this, "<qt>"+i18n("Database %1 already exists." "<p>Do you want to replace it with a new one?") - .tqarg(sourceDriver->data()->destination->infoString()), + .arg(sourceDriver->data()->destination->infoString()), 0, KGuiItem(i18n("&Replace")), KGuiItem(i18n("No")))) { return cancelled; @@ -861,7 +861,7 @@ tristate ImportWizard::import() setTitle(m_finishPage, i18n("Failure")); m_finishLbl->setText( i18n("<p>Import failed.</p>%1<p>%2</p><p>You can click \"Back\" button and try again.</p>") - .tqarg(msg).tqarg(details)); + .arg(msg).arg(details)); return false; } // delete kexi_conn; @@ -899,9 +899,9 @@ void ImportWizard::next() dbname = m_srcConn->selectedConnectionData() ? m_srcConn->selectedConnectionData()->serverInfoString() : TQString(); if (!dbname.isEmpty()) - dbname = TQString(" \"%1\"").tqarg(dbname); + dbname = TQString(" \"%1\"").arg(dbname); KMessageBox::error(this, i18n("Could not import database%1. This type is not supported.") - .tqarg(dbname)); + .arg(dbname)); return; } } @@ -922,7 +922,7 @@ void ImportWizard::next() if (true == res) { m_finishLbl->setText( i18n("Database has been imported into Kexi database project \"%1\".") - .tqarg(m_dstNewDBNameLineEdit->text()) ); + .arg(m_dstNewDBNameLineEdit->text()) ); cancelButton()->setEnabled(false); setBackEnabled(m_finishPage, false); setFinishEnabled(m_finishPage, true); diff --git a/kexi/migration/keximigrate.cpp b/kexi/migration/keximigrate.cpp index 7b4944f2..1c3295b6 100644 --- a/kexi/migration/keximigrate.cpp +++ b/kexi/migration/keximigrate.cpp @@ -74,7 +74,7 @@ bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::Obje if (!destDriver) { result->setStatus(&drvManager, i18n("Could not create database \"%1\".") - .tqarg(m_migrateData->destination->databaseName())); + .arg(m_migrateData->destination->databaseName())); return false; } @@ -124,7 +124,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (!destDriver) { result->setStatus(&drvManager, i18n("Could not create database \"%1\".") - .tqarg(m_migrateData->destination->databaseName())); + .arg(m_migrateData->destination->databaseName())); return false; } @@ -136,7 +136,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) kdDebug() << "Couldnt connect to database server" << endl; if (result) result->setStatus(i18n("Could not connect to data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString()), ""); + .arg(m_migrateData->source->serverInfoString()), ""); return false; } @@ -147,7 +147,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus( i18n("Could not get a list of table names for data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString()), ""); + .arg(m_migrateData->source->serverInfoString()), ""); return false; } @@ -157,7 +157,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus( i18n("No tables to import found in data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString()), ""); + .arg(m_migrateData->source->serverInfoString()), ""); return false; } @@ -173,7 +173,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (kexi__objects_exists) { tristate res = drv_queryStringListFromSQL( TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1") - .tqarg((int)KexiDB::TableObjectType), 0, kexiDBTables, -1); + .arg((int)KexiDB::TableObjectType), 0, kexiDBTables, -1); if (res == true) { // prepend KexiDB-compatible tables to 'tables' list, so we'll copy KexiDB-compatible tables first, // to make sure existing IDs will not be in conflict with IDs newly generated for non-KexiDB tables @@ -201,7 +201,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus( i18n("Could not import project from data source \"%1\". Error reading table \"%2\".") - .tqarg(m_migrateData->source->serverInfoString()).tqarg(tableName), ""); + .arg(m_migrateData->source->serverInfoString()).arg(tableName), ""); return false; } //yeah, got a table @@ -230,7 +230,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus(destConn, i18n("Could not create database \"%1\".") - .tqarg(m_migrateData->destination->databaseName())); + .arg(m_migrateData->destination->databaseName())); //later destConn->dropDatabase(m_migrateData->destination->databaseName()); //don't delete prj, otherwise eror message will be deleted delete prj; //later return m_destPrj; @@ -250,7 +250,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) bool firstRecord = true; if (true == drv_fetchRecordFromSQL( TQString("SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects " - "WHERE o_name='%1' AND o_type=%1").tqarg(*it).tqarg((int)KexiDB::TableObjectType), + "WHERE o_name='%1' AND o_type=%1").arg(*it).arg((int)KexiDB::TableObjectType), data, firstRecord) && destConn->setupObjectSchemaData( data, *t )) { @@ -260,7 +260,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) TQString sql( TQString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, " "f_options, f_default, f_order, f_caption, f_help" - " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->id()) ); + " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").arg(t->id()) ); while (ok) { tristate res = drv_fetchRecordFromSQL(sql, data, firstRecord); if (res != true) { @@ -301,7 +301,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus(destConn, i18n("Could not create database \"%1\".") - .tqarg(m_migrateData->destination->databaseName())); + .arg(m_migrateData->destination->databaseName())); m_tableSchemas.remove(ts); break; } @@ -331,7 +331,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus(m_destPrj, i18n("Could not import project from data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString())); + .arg(m_migrateData->source->serverInfoString())); } } @@ -381,7 +381,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) kdDebug() << "Failed to copy table " << tname << endl; if (result) result->setStatus(destConn, - i18n("Could not copy table \"%1\" to destination database.").tqarg(tname)); + i18n("Could not copy table \"%1\" to destination database.").arg(tname)); break; } }//for @@ -406,7 +406,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result && result->error()) result->setStatus(destConn, i18n("Could not import data from data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString())); + .arg(m_migrateData->source->serverInfoString())); if (destConn) { destConn->debugError(); destConn->rollbackTransaction(trans); @@ -512,7 +512,7 @@ KexiDB::Field::Type KexiMigrate::userType(const TQString& fname) res = dlg->getItem( i18n("Field Type"), i18n("The data type for %1 could not be determined. " "Please select one of the following data " - "types").tqarg(fname), + "types").arg(fname), types, 0, false); //! @todo use TQMap<TQCString, KexiDB::Field::Type> here! @@ -575,9 +575,9 @@ bool KexiMigrate::isValid() { setError(ERR_INCOMPAT_DRIVER_VERSION, i18n("Incompatible migration driver's \"%1\" version: found version %2, expected version %3.") - .tqarg(name()) - .tqarg(TQString("%1.%2").tqarg(versionMajor()).tqarg(versionMinor())) - .tqarg(TQString("%1.%2").tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor()))); + .arg(name()) + .arg(TQString("%1.%2").arg(versionMajor()).arg(versionMinor())) + .arg(TQString("%1.%2").arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor()))); return false; } return true; @@ -588,8 +588,8 @@ bool KexiMigrate::drv_queryMaxNumber(const TQString& tableName, { TQString string; tristate r = drv_querySingleStringFromSQL( - TQString::fromLatin1("SELECT MAX(%1) FROM %2").tqarg(drv_escapeIdentifier(columnName)) - .tqarg(drv_escapeIdentifier(tableName)), 0, string); + TQString::fromLatin1("SELECT MAX(%1) FROM %2").arg(drv_escapeIdentifier(columnName)) + .arg(drv_escapeIdentifier(tableName)), 0, string); if (r == false) return false; if (~r) { diff --git a/kexi/migration/migratemanager.cpp b/kexi/migration/migratemanager.cpp index d46b9e4d..945f084c 100644 --- a/kexi/migration/migratemanager.cpp +++ b/kexi/migration/migratemanager.cpp @@ -131,19 +131,19 @@ bool MigrateManagerInternal::lookupDrivers() << srv_name.lower() << "' driver's version -- skipping it!" << endl; possibleProblems += TQString("\"%1\" migration driver has unrecognized version; " "required driver version is \"%2.%3\"") - .tqarg(srv_name.lower()) - .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor()); + .arg(srv_name.lower()) + .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor()); continue; } if (major_ver != KexiMigration::versionMajor() || minor_ver != KexiMigration::versionMinor()) { KexiDBWarn << TQString("MigrateManagerInternal::lookupDrivers(): '%1' driver" " has version '%2' but required migration driver version is '%3.%4'\n" - " -- skipping this driver!").tqarg(srv_name.lower()).tqarg(srv_ver_str) - .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor()) << endl; + " -- skipping this driver!").arg(srv_name.lower()).arg(srv_ver_str) + .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor()) << endl; possibleProblems += TQString("\"%1\" migration driver has version \"%2\" " "but required driver version is \"%3.%4\"") - .tqarg(srv_name.lower()).tqarg(srv_ver_str) - .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor()); + .arg(srv_name.lower()).arg(srv_ver_str) + .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor()); continue; } //</COPIED> @@ -188,7 +188,7 @@ KexiMigrate* MigrateManagerInternal::driver(const TQString& name) return drv; //cached if (!m_services_lcase.contains(name.lower())) { - setError(ERR_DRIVERMANAGER, i18n("Could not find import/export database driver \"%1\".").tqarg(name) ); + setError(ERR_DRIVERMANAGER, i18n("Could not find import/export database driver \"%1\".").arg(name) ); return 0; } @@ -201,7 +201,7 @@ KexiMigrate* MigrateManagerInternal::driver(const TQString& name) if (!drv) { setError(ERR_DRIVERMANAGER, i18n("Could not load import/export database driver \"%1\".") - .tqarg(name) ); + .arg(name) ); if (m_componentLoadingErrors.isEmpty()) {//fill errtable on demand m_componentLoadingErrors[KParts::ComponentFactory::ErrNoServiceFound]="ErrNoServiceFound"; m_componentLoadingErrors[KParts::ComponentFactory::ErrServiceProvidesNoLibrary]="ErrServiceProvidesNoLibrary"; @@ -314,7 +314,7 @@ TQString MigrateManager::driverForMimeType(const TQString &mimeType) KService::Ptr ptr = d_int->m_services_by_mimetype[mimeType.lower()]; if (!ptr) { - kdDebug() << TQString("MigrateManager::driverForMimeType(%1) No such mimetype").tqarg(mimeType) << endl; + kdDebug() << TQString("MigrateManager::driverForMimeType(%1) No such mimetype").arg(mimeType) << endl; return TQString(); } @@ -325,7 +325,7 @@ KexiMigrate* MigrateManager::driver(const TQString& name) { KexiMigrate *drv = d_int->driver(name); if (d_int->error()) { - kdDebug() << TQString("MigrateManager::driver(%1) Error: %2").tqarg(name).tqarg(d_int->errorMsg()) << endl; + kdDebug() << TQString("MigrateManager::driver(%1) Error: %2").arg(name).arg(d_int->errorMsg()) << endl; setError(d_int); } return drv; diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp index b7f04351..904e0c92 100644 --- a/kexi/migration/pqxx/pqxxmigrate.cpp +++ b/kexi/migration/pqxx/pqxxmigrate.cpp @@ -217,15 +217,15 @@ bool PqxxMigrate::drv_connect() if (m_migrateData->source->port == 0) m_migrateData->source->port = 5432; - conninfo += TQString::fromLatin1(" port='%1'").tqarg(m_migrateData->source->port); + conninfo += TQString::fromLatin1(" port='%1'").arg(m_migrateData->source->port); - conninfo += TQString::fromLatin1(" dbname='%1'").tqarg(m_migrateData->sourceName); + conninfo += TQString::fromLatin1(" dbname='%1'").arg(m_migrateData->sourceName); if (!m_migrateData->source->userName.isNull()) - conninfo += TQString::fromLatin1(" user='%1'").tqarg(m_migrateData->source->userName); + conninfo += TQString::fromLatin1(" user='%1'").arg(m_migrateData->source->userName); if (!m_migrateData->source->password.isNull()) - conninfo += TQString::fromLatin1(" password='%1'").tqarg(m_migrateData->source->password); + conninfo += TQString::fromLatin1(" password='%1'").arg(m_migrateData->source->password); try { @@ -377,7 +377,7 @@ bool PqxxMigrate::primaryKey(pqxx::oid table_uid, int col) const try { - statement = TQString("SELECT indkey FROM pg_index WHERE ((indisprimary = true) AND (indrelid = %1))").tqarg(table_uid); + statement = TQString("SELECT indkey FROM pg_index WHERE ((indisprimary = true) AND (indrelid = %1))").arg(table_uid); tran = new pqxx::nontransaction(*m_conn, "find_pkey"); tmpres = new pqxx::result(tran->exec(statement.latin1())); @@ -569,7 +569,7 @@ bool PqxxMigrate::uniqueKey(pqxx::oid table_uid, int col) const try { - statement = TQString("SELECT indkey FROM pg_index WHERE ((indisunique = true) AND (indrelid = %1))").tqarg(table_uid); + statement = TQString("SELECT indkey FROM pg_index WHERE ((indisunique = true) AND (indrelid = %1))").arg(table_uid); tran = new pqxx::nontransaction(*m_conn, "find_ukey"); tmpres = new pqxx::result(tran->exec(statement.latin1())); diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp index 921432b6..a20dbe21 100644 --- a/kexi/plugins/forms/kexiactionselectiondialog.cpp +++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp @@ -352,12 +352,12 @@ public: msg = TQString(); // hardcoded, but it's not that bad else if (actionType=="macro") - msg = i18n("&Select macro to be executed after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select macro to be executed after clicking \"%1\" button:").arg(actionWidgetName); else if (actionType=="script") - msg = i18n("&Select script to be executed after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select script to be executed after clicking \"%1\" button:").arg(actionWidgetName); //default: table/query/form/report... else - msg = i18n("&Select object to be opened after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select object to be opened after clicking \"%1\" button:").arg(actionWidgetName); selectActionToBeExecutedLbl->setText(msg); } @@ -587,7 +587,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) TQVBoxLayout *vlyr = new TQVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint()); d->kactionListView = new KActionsListView(d->kactionPageWidget, d->mainWin); d->kactionListView->init(); - TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), + TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->kactionPageWidget); lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); @@ -613,7 +613,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) d->currentFormActionsPageWidget, d->mainWin); d->currentFormActionsListView->init(); TQLabel *lbl = new TQLabel(d->currentFormActionsListView, - selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->currentFormActionsPageWidget); + selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->currentFormActionsPageWidget); lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); vlyr->addWidget(lbl); @@ -696,7 +696,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const KexiPart::Info* partInfo = partItem ? Kexi::partManager().infoForMimeType( partItem->mimeType() ) : 0; if (partInfo) { // opening or executing: table:name, query:name, form:name, macro:name, script:name, etc. - data.string = TQString("%1:%2").tqarg(partInfo->objectName()).tqarg(partItem->name()); + data.string = TQString("%1:%2").arg(partInfo->objectName()).arg(partItem->name()); data.option = actionToExecute->data; return data; } diff --git a/kexi/plugins/forms/kexidataprovider.cpp b/kexi/plugins/forms/kexidataprovider.cpp index 8ae592d9..1a6df899 100644 --- a/kexi/plugins/forms/kexidataprovider.cpp +++ b/kexi/plugins/forms/kexidataprovider.cpp @@ -113,7 +113,7 @@ void KexiFormDataProvider::fillDataItems(KexiTableItem& row, bool cursorAtNewRow kexipluginsdbg << "fill data of '" << itemIface->dataSource() << "' at idx=" << it.data() << " data=" << value << (indexForVisibleLookupValue!=-1 ? TQString(" SPECIAL: indexForVisibleLookupValue=%1 visibleValue=%2") - .tqarg(indexForVisibleLookupValue).tqarg(visibleLookupValue.toString()) + .arg(indexForVisibleLookupValue).arg(visibleLookupValue.toString()) : TQString()) << endl; const bool displayDefaultValue = cursorAtNewRow && (value.isNull() && visibleLookupValue.isNull()) diff --git a/kexi/plugins/forms/kexidbfactory.cpp b/kexi/plugins/forms/kexidbfactory.cpp index e882c082..d87b31c5 100644 --- a/kexi/plugins/forms/kexidbfactory.cpp +++ b/kexi/plugins/forms/kexidbfactory.cpp @@ -462,7 +462,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign //! just inherited StdWidgetFactory::clearWidgetContent() should be called KLineEdit *lineedit = static_cast<KLineEdit*>(w); createEditor(classname, lineedit->text(), lineedit, container, - lineedit->tqgeometry(), lineedit->tqalignment(), true); + lineedit->geometry(), lineedit->alignment(), true); return true; } if(classname == "KexiDBTextEdit") @@ -471,7 +471,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign //! just inherited StdWidgetFactory::clearWidgetContent() should be called KTextEdit *textedit = static_cast<KTextEdit*>(w); createEditor(classname, textedit->text(), textedit, container, - textedit->tqgeometry(), textedit->tqalignment(), true, true); + textedit->geometry(), textedit->alignment(), true, true); //copy a few properties KTextEdit *ed = dynamic_cast<KTextEdit *>( editor(w) ); ed->setWrapPolicy(textedit->wrapPolicy()); @@ -502,8 +502,8 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign else { createEditor(classname, label->text(), label, container, - label->tqgeometry(), label->tqalignment(), - false, label->tqalignment() & TQt::WordBreak /*multiline*/); + label->geometry(), label->alignment(), + false, label->alignment() & TQt::WordBreak /*multiline*/); } return true; } @@ -529,12 +529,12 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign if(static_cast<KexiDBAutoField*>(w)->hasAutoCaption()) return false; // caption is auto, abort editing TQLabel *label = static_cast<KexiDBAutoField*>(w)->label(); - createEditor(classname, label->text(), label, container, label->tqgeometry(), label->tqalignment()); + createEditor(classname, label->text(), label, container, label->geometry(), label->alignment()); return true; } else if (classname == "KexiDBCheckBox") { KexiDBCheckBox *cb = static_cast<KexiDBCheckBox*>(w); - TQRect r( cb->tqgeometry() ); + TQRect r( cb->geometry() ); r.setLeft( r.left() + 2 + cb->tqstyle().subRect( TQStyle::SR_CheckBoxIndicator, cb ).width() ); createEditor(classname, cb->text(), cb, container, r, TQt::AlignAuto); return true; @@ -679,7 +679,7 @@ KexiDBFactory::changeText(const TQString &text) changeProperty("caption", text, form); return true; } - //! \todo check field's tqgeometry + //! \todo check field's geometry return false; } @@ -690,7 +690,7 @@ KexiDBFactory::resizeEditor(TQWidget *editor, TQWidget *w, const TQCString &clas //TQPoint p = widget->pos(); if(classname == "KexiDBAutoField") - editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->tqgeometry() ); + editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->geometry() ); } void diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp index 3c20510e..68dea85f 100644 --- a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp +++ b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp @@ -43,7 +43,7 @@ void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQ } } -void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int tqalignment, bool hasFocus ) +void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int alignment, bool hasFocus ) { KexiFormDataItemInterface *dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(w); KexiDB::QueryColumnInfo *columnInfo = dataItemIface ? dataItemIface->columnInfo() : 0; @@ -57,7 +57,7 @@ void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpt } KexiDisplayUtils::paintAutonumberSign(*m_autonumberDisplayParameters, p, 2 + margin + w->margin(), margin, w->width() - margin*2 -2-2, - w->height() - margin*2 -2, tqalignment, hasFocus); + w->height() - margin*2 -2, alignment, hasFocus); } } } @@ -66,6 +66,6 @@ void KexiDBTextWidgetInterface::event( TQEvent * e, TQWidget *w, bool textIsEmpt { if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) { if (m_autonumberDisplayParameters && textIsEmpty) - w->tqrepaint(); + w->repaint(); } } diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.h b/kexi/plugins/forms/kexidbtextwidgetinterface.h index 6e0299c0..17382e31 100644 --- a/kexi/plugins/forms/kexidbtextwidgetinterface.h +++ b/kexi/plugins/forms/kexidbtextwidgetinterface.h @@ -40,7 +40,7 @@ class KEXIFORMUTILS_EXPORT KexiDBTextWidgetInterface void setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQWidget *w); //! Called from paintEvent( TQPaintEvent *pe ) method of the data aware widget. - void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int tqalignment, bool hasFocus ); + void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int alignment, bool hasFocus ); //! Called from event( TQEvent * e ) method of the data aware widget. void event( TQEvent * e, TQWidget *w, bool textIsEmpty ); diff --git a/kexi/plugins/forms/kexiformeventhandler.cpp b/kexi/plugins/forms/kexiformeventhandler.cpp index 4e066bd6..55e999db 100644 --- a/kexi/plugins/forms/kexiformeventhandler.cpp +++ b/kexi/plugins/forms/kexiformeventhandler.cpp @@ -56,7 +56,7 @@ KexiPart::Info* KexiFormEventAction::ActionData::decodeString( return 0; KexiPart::Info *info = 0; if (_actionType!="kaction" && _actionType!="currentForm") { - info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(_actionType) ); + info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").arg(_actionType) ); if (!info) return 0; } @@ -85,7 +85,7 @@ void KexiFormEventAction::activate() if (!project) return; KexiPart::Part* part = Kexi::partManager().partForMimeType( - TQString("kexi/%1").tqarg(m_actionName) ); + TQString("kexi/%1").arg(m_actionName) ); if (!part) return; KexiPart::Item* item = project->item( part->info(), m_objectName ); diff --git a/kexi/plugins/forms/kexiformmanager.cpp b/kexi/plugins/forms/kexiformmanager.cpp index 9674f4fe..8c0c66e7 100644 --- a/kexi/plugins/forms/kexiformmanager.cpp +++ b/kexi/plugins/forms/kexiformmanager.cpp @@ -112,7 +112,7 @@ void KexiFormManager::setFormDataSource(const TQCString& mime, const TQCString& propValues.insert("dataSource", name); propValues.insert("dataSourceMimeType", mime); KFormDesigner::CommandGroup *group - = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").tqarg(name.data()), propertySet()); + = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").arg(name.data()), propertySet()); propertySet()->createPropertyCommandsInDesignMode(formWidget, propValues, group, true /*addToActiveForm*/); } diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp index 84c50efd..9d8017d8 100644 --- a/kexi/plugins/forms/kexiformpart.cpp +++ b/kexi/plugins/forms/kexiformpart.cpp @@ -277,7 +277,7 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc) TQDomElement lNameProperty = domDoc.createElement("property"); lNameProperty.setAttribute("name", "name"); TQDomElement lType = domDoc.createElement("cstring"); - TQDomText lClassN = domDoc.createTextNode(TQString("l%1").tqarg(list->field(i)->name())); + TQDomText lClassN = domDoc.createTextNode(TQString("l%1").arg(list->field(i)->name())); lType.appendChild(lClassN); lNameProperty.appendChild(lType); lclass.appendChild(lNameProperty); diff --git a/kexi/plugins/forms/kexiformscrollview.cpp b/kexi/plugins/forms/kexiformscrollview.cpp index 790064e2..b4b58f70 100644 --- a/kexi/plugins/forms/kexiformscrollview.cpp +++ b/kexi/plugins/forms/kexiformscrollview.cpp @@ -150,9 +150,9 @@ void KexiFormScrollView::moveToFirstRecordRequested() selectFirstRow(); } -void KexiFormScrollView::clearColumnsInternal(bool tqrepaint) +void KexiFormScrollView::clearColumnsInternal(bool repaint) { - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } @@ -349,7 +349,7 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item) } /*void KexiFormScrollView::slotAboutToDeleteRow(KexiTableItem& item, - KexiDB::ResultInfo* result, bool tqrepaint) + KexiDB::ResultInfo* result, bool repaint) { //! @todo }*/ @@ -359,18 +359,18 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item) //! @todo }*/ -void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool tqrepaint) +void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool repaint) { Q_UNUSED( item ); - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } -void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint) +void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool repaint) { Q_UNUSED( item ); Q_UNUSED( row ); - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } diff --git a/kexi/plugins/forms/kexiformscrollview.h b/kexi/plugins/forms/kexiformscrollview.h index d8326a57..7d2b9867 100644 --- a/kexi/plugins/forms/kexiformscrollview.h +++ b/kexi/plugins/forms/kexiformscrollview.h @@ -162,17 +162,17 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView : virtual void slotRowRepaintRequested(KexiTableItem& item); //! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted(). - virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint) - { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); } + virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint) + { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); } - //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed. + //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed. virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); } - //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed. - virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint); + //! Handles KexiTableViewData::rowInserted() signal to repaint when needed. + virtual void slotRowInserted(KexiTableItem *item, bool repaint); //! Like above, not db-aware version - virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint); + virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint); virtual void slotRowsDeleted( const TQValueList<int> & ); @@ -193,7 +193,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView : protected: //! Implementation for KexiDataAwareObjectInterface - virtual void clearColumnsInternal(bool tqrepaint); + virtual void clearColumnsInternal(bool repaint); //! Implementation for KexiDataAwareObjectInterface virtual void addHeaderColumn(const TQString& caption, const TQString& description, diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp index 3b7968de..36a64db7 100644 --- a/kexi/plugins/forms/kexiformview.cpp +++ b/kexi/plugins/forms/kexiformview.cpp @@ -350,7 +350,7 @@ void KexiFormView::updateValuesForSubproperties() if (meta) { // Special case: the property value of type enum (set) but is saved as a string list, // not as int, so we need to translate it to int. It's been created as such - // by FormIO::readPropertyValue(). Example: "tqalignment" property. + // by FormIO::readPropertyValue(). Example: "alignment" property. if (meta->isSetType() && subpropIt.data().type()==TQVariant::StringList) { TQStrList keys; const TQStringList list( subpropIt.data().toStringList() ); @@ -1115,7 +1115,7 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s // KFormDesigner::WidgetList* prevSelection = form()->selectedWidgets(); KFormDesigner::WidgetList widgetsToSelect; KFormDesigner::CommandGroup *group = new KFormDesigner::CommandGroup( - fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").tqarg(fields.count()), + fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").arg(fields.count()), KFormDesigner::FormManager::self()->propertySet() ); @@ -1191,10 +1191,10 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s } if (widgetsToSelect.last()) { //resize form if needed - TQRect oldFormRect( m_dbform->tqgeometry() ); + TQRect oldFormRect( m_dbform->geometry() ); TQRect newFormRect( oldFormRect ); - newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->tqgeometry().right()+1)); - newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->tqgeometry().bottom()+1)); + newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->geometry().right()+1)); + newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->geometry().bottom()+1)); if (newFormRect != oldFormRect) { //1. resize by hand m_dbform->setGeometry( newFormRect ); @@ -1205,8 +1205,8 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s group->addCommand(resizeFormCommand, true/*will be executed on CommandGroup::execute()*/); } - //remember tqgeometry of the last inserted widget - m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->tqgeometry(); + //remember geometry of the last inserted widget + m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->geometry(); } //eventually, add entire command group to active form @@ -1217,11 +1217,11 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s //enable proper REDO usage group->resetAllowExecuteFlags(); - m_scrollView->tqrepaint(); - m_scrollView->viewport()->tqrepaint(); + m_scrollView->repaint(); + m_scrollView->viewport()->repaint(); m_scrollView->repaintContents(); m_scrollView->updateContents(); - m_scrollView->clipper()->tqrepaint(); + m_scrollView->clipper()->repaint(); m_scrollView->refreshContentsSize(); //select all inserted widgets, if multiple diff --git a/kexi/plugins/forms/kexiformview.h b/kexi/plugins/forms/kexiformview.h index 8bc1cb79..f269abf7 100644 --- a/kexi/plugins/forms/kexiformview.h +++ b/kexi/plugins/forms/kexiformview.h @@ -218,7 +218,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView TQGuardedPtr<TQWidget> m_setFocusInternalOnce; - /*! Stores tqgeometry of widget recently inserted using insertAutoFields() method. + /*! Stores geometry of widget recently inserted using insertAutoFields() method. having this information, we'r eable to compute position for a newly inserted widget in insertAutoFields() is such position has not been specified. (the position is specified when a widget is inserted with mouse drag & dropping diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp index 939d9b91..3a8e8453 100644 --- a/kexi/plugins/forms/widgets/kexidbautofield.cpp +++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp @@ -232,7 +232,7 @@ KexiDBAutoField::setLabelPosition(LabelPosition position) m_subwidget->show(); //! \todo support right-to-left tqlayout where positions are inverted if (position==Top || position==Left) { - int align = d->label->tqalignment(); + int align = d->label->alignment(); if(position == Top) { d->tqlayout = (TQBoxLayout*) new TQVBoxLayout(this); align |= AlignVertical_Mask; diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index 231003cf..db56b550 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -62,7 +62,7 @@ class KexiDBComboBox::Private TQSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(), //!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange() KexiDB::QueryColumnInfo* visibleColumnInfo; - TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false) + TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its children (if isEditable is false) bool isEditable : 1; //!< true is the combo box is editable bool buttonPressed : 1; bool mouseOver : 1; @@ -259,7 +259,7 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e) if ( arrowRect.contains( e->pos() ) ) { d->arrowPressed = TRUE; d->arrowDown = TRUE; - tqrepaint( FALSE ); + repaint( FALSE ); } } else {*/ showPopup(); diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.h b/kexi/plugins/forms/widgets/kexidbcombobox.h index dec6da1d..60ed78d1 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.h +++ b/kexi/plugins/forms/widgets/kexidbcombobox.h @@ -111,7 +111,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox : virtual bool eventFilter( TQObject *o, TQEvent *e ); - //! \return internal editor's tqgeometry + //! \return internal editor's geometry TQRect editorGeometry() const; //! Creates editor. Reimplemented, because if the combo box is not editable, diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index bcf28a58..17242953 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -125,13 +125,13 @@ KexiDBForm::~KexiDBForm() KexiDataAwareObjectInterface* KexiDBForm::dataAwareObject() const { return d->dataAwareObject; } -//tqrepaint all tqchildren widgets +//repaint all children widgets static void repaintAll(TQWidget *w) { TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - TQT_TQWIDGET(obj)->tqrepaint(); + TQT_TQWIDGET(obj)->repaint(); } delete list; } @@ -148,7 +148,7 @@ void KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type) { TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -192,7 +192,7 @@ void KexiDBForm::clearForm() { TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -216,7 +216,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi toPoint = to->parentWidget()->mapTo(this, to->pos()); TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -234,7 +234,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) ); + p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); @@ -313,18 +313,18 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) if (it.current()->widget()->focusPolicy() & TQ_TabFocus) { //this widget has tab focus: it.current()->widget()->installEventFilter(this); - //also filter events for data-aware tqchildren of this widget (i.e. KexiDBAutoField's editors) - TQObjectList *tqchildren = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING); - for (TQObjectListIt tqchildrenIt(*tqchildren); tqchildrenIt.current(); ++tqchildrenIt) { - // if (dynamic_cast<KexiFormDataItemInterface*>(tqchildrenIt.current())) { + //also filter events for data-aware children of this widget (i.e. KexiDBAutoField's editors) + TQObjectList *children = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING); + for (TQObjectListIt childrenIt(*children); childrenIt.current(); ++childrenIt) { + // if (dynamic_cast<KexiFormDataItemInterface*>(childrenIt.current())) { kexipluginsdbg << "KexiDBForm::updateTabStopsOrder(): also adding '" - << tqchildrenIt.current()->className() << " " << tqchildrenIt.current()->name() + << childrenIt.current()->className() << " " << childrenIt.current()->name() << "' child to filtered widgets" << endl; - //it.current()->widget()->installEventFilter(TQT_TQWIDGET(tqchildrenIt.current())); - tqchildrenIt.current()->installEventFilter(this); + //it.current()->widget()->installEventFilter(TQT_TQWIDGET(childrenIt.current())); + childrenIt.current()->installEventFilter(this); // } } - delete tqchildren; + delete children; if (fromWidget) { kexipluginsdbg << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name() << " -> " << it.current()->widget()->name() << endl; diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp index 3ff18406..5b8b2939 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp +++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp @@ -67,7 +67,7 @@ static TQPixmap* KexiDBImageBox_pmSmall = 0; KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *parent, const char *name ) : KexiFrame( parent, name, TQt::WNoAutoErase ) , KexiFormDataItemInterface() - , m_tqalignment(TQt::AlignAuto|TQt::AlignTop) + , m_alignment(TQt::AlignAuto|TQt::AlignTop) , m_designMode(designMode) , m_readOnly(false) , m_scaledContents(false) @@ -176,7 +176,7 @@ void KexiDBImageBox::setValueInternal( const TQVariant& add, bool removeOld, boo m_valueMimeType = TQString(); m_pixmap = TQPixmap(); } - tqrepaint(); + repaint(); } void KexiDBImageBox::setInvalidState( const TQString& displayText ) @@ -242,7 +242,7 @@ void KexiDBImageBox::setPixmapId(uint id) if (m_insideSetData) //avoid recursion return; setData(KexiBLOBBuffer::self()->objectForId( id, /*unstored*/false )); - tqrepaint(); + repaint(); } uint KexiDBImageBox::storedPixmapId() const @@ -257,7 +257,7 @@ uint KexiDBImageBox::storedPixmapId() const void KexiDBImageBox::setStoredPixmapId(uint id) { setData(KexiBLOBBuffer::self()->objectForId( id, /*stored*/true )); - tqrepaint(); + repaint(); } bool KexiDBImageBox::hasScaledContents() const @@ -276,14 +276,14 @@ void KexiDBImageBox::setScaledContents(bool set) { //todo m_pixmapLabel->setScaledContents(set); m_scaledContents = set; - tqrepaint(); + repaint(); } void KexiDBImageBox::setKeepAspectRatio(bool set) { m_keepAspectRatio = set; if (m_scaledContents) - tqrepaint(); + repaint(); } TQWidget* KexiDBImageBox::widget() @@ -331,7 +331,7 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url) if (!h) return; setData(h); - tqrepaint(); + repaint(); } else { //db-aware @@ -429,7 +429,7 @@ void KexiDBImageBox::handlePasteAction() } } - tqrepaint(); + repaint(); if (!dataSource().isEmpty()) { // emit pixmapChanged(); signalValueChanged(); @@ -455,7 +455,7 @@ void KexiDBImageBox::clear() //! @todo emit signal for setting "dirty" flag within the design // m_pixmap = TQPixmap(); //will be loaded on demand - tqrepaint(); + repaint(); if (!dataSource().isEmpty()) { // emit pixmapChanged();//valueChanged(data()); signalValueChanged(); @@ -573,7 +573,7 @@ void KexiDBImageBox::updateActionStrings() (see doc/dev/settings.txt) */ beautifiedImageBoxName = beautifiedImageBoxName[0].upper() + beautifiedImageBoxName.mid(1); } - TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").tqarg(beautifiedImageBoxName)); + TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").arg(beautifiedImageBoxName)); } } } @@ -640,7 +640,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (m_designMode && pixmap().isNull()) { TQPixmap pm(size()-TQSize(m, m)); TQPainter p2; - p2.tqbegin(TQT_TQPAINTDEVICE(&pm), this); + p2.begin(TQT_TQPAINTDEVICE(&pm), this); p2.fillRect(0,0,width(),height(), bg); updatePixmap(); @@ -678,7 +678,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) //clearing needed here because we may need to draw a pixmap with transparency p.fillRect(0,0,width(),height(), bg); - KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_tqalignment, + KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_alignment, m_scaledContents, m_keepAspectRatio ); } KexiFrame::drawFrame( &p ); @@ -697,7 +697,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (oldPalette.active().background()!=palette().active().background()) { delete KexiDBImageBox_pm; KexiDBImageBox_pm = 0; - tqrepaint(); + repaint(); } }*/ @@ -715,11 +715,11 @@ void KexiDBImageBox::updatePixmap() } } -void KexiDBImageBox::setAlignment(int tqalignment) +void KexiDBImageBox::setAlignment(int alignment) { - m_tqalignment = tqalignment; + m_alignment = alignment; if (!m_scaledContents || m_keepAspectRatio) - tqrepaint(); + repaint(); } void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle) @@ -839,7 +839,7 @@ bool KexiDBImageBox::eventFilter( TQObject * watched, TQEvent * e ) { if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_chooser)) { //we're watching chooser as well because it's a focus proxy even if invisible if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut || e->type()==TQEvent::MouseButtonPress) { - update(); //to tqrepaint focus rect + update(); //to repaint focus rect } } // hide popup menu as soon as it loses focus diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h index a7adb3c8..860ee4c6 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.h +++ b/kexi/plugins/forms/widgets/kexidbimagebox.h @@ -48,7 +48,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true ) TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents ) TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio ) - TQ_PROPERTY( int tqalignment READ tqalignment WRITE setAlignment ) + TQ_PROPERTY( int alignment READ alignment WRITE setAlignment ) // TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false ) // TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy ) TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible ) @@ -95,7 +95,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : // bool designMode() const { return m_designMode; } - int tqalignment() const { return m_tqalignment; } + int alignment() const { return m_alignment; } bool keepAspectRatio() const { return m_keepAspectRatio; } @@ -158,7 +158,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : void setScaledContents(bool set); - void setAlignment(int tqalignment); + void setAlignment(int alignment); void setKeepAspectRatio(bool set); @@ -258,7 +258,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : //moved KAction *m_insertFromFileAction, *m_saveAsAction, *m_cutAction, *m_copyAction, *m_pasteAction, // *m_deleteAction, *m_propertiesAction; // TQTimer m_clickTimer; - int m_tqalignment; + int m_alignment; TQ_FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal() bool m_designMode : 1; bool m_readOnly : 1; diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp index 2f653f00..adb833fa 100644 --- a/kexi/plugins/forms/widgets/kexidblabel.cpp +++ b/kexi/plugins/forms/widgets/kexidblabel.cpp @@ -63,7 +63,7 @@ KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent ) : TQLabel( parent ) , m_parentLabel(parent) { - int a = tqalignment() | TQt::WordBreak; + int a = alignment() | TQt::WordBreak; a &= (0xffffff ^ TQt::AlignVertical_Mask); a |= TQt::AlignTop; setAlignment( a ); @@ -426,7 +426,7 @@ void KexiDBLabel::init() d->internalLabel->hide(); d->frameColor = tqpalette().active().foreground(); - setAlignment( d->internalLabel->tqalignment() ); + setAlignment( d->internalLabel->alignment() ); } void KexiDBLabel::updatePixmapLater() { @@ -453,7 +453,7 @@ void KexiDBLabel::updatePixmap() { d->internalLabel->setText( text() ); d->internalLabel->setFixedSize( size() ); d->internalLabel->setPalette( palette() ); - d->internalLabel->setAlignment( tqalignment() ); + d->internalLabel->setAlignment( alignment() ); // d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap KPixmap shadowPixmap = d->internalLabel->getShadowPixmap(); if (shadowPixmap.isNull()) @@ -461,7 +461,7 @@ void KexiDBLabel::updatePixmap() { d->shadowPixmap = shadowPixmap; d->shadowPosition = d->internalLabel->m_shadowRect.topLeft(); d->pixmapDirty = false; - tqrepaint(); + repaint(); } void KexiDBLabel::paintEvent( TQPaintEvent* e ) @@ -491,7 +491,7 @@ void KexiDBLabel::paintEvent( TQPaintEvent* e ) p.drawPixmap( d->internalLabel->m_shadowRect.topLeft(), d->shadowPixmap, clipRect ); } } - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), false ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), false ); TQLabel::paintEvent( e ); } @@ -577,7 +577,7 @@ void KexiDBLabel::setShadowEnabled( bool state ) { d->pixmapDirty = true; if (state) d->internalLabel->updateFrame(); - tqrepaint(); + repaint(); } void KexiDBLabel::resizeEvent( TQResizeEvent* e ) { @@ -636,7 +636,7 @@ void KexiDBLabel::setText( const TQString& text ) { TQLabel::setText( text ); //This is necessary for KexiFormDataItemInterface valueChanged(); - tqrepaint(); + repaint(); } bool KexiDBLabel::shadowEnabled() const diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp index 5bb74e22..815adca9 100644 --- a/kexi/plugins/forms/widgets/kexidblineedit.cpp +++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp @@ -331,14 +331,14 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo) /*todo void KexiDBLineEdit::paint( TQPainter *p ) { - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); }*/ void KexiDBLineEdit::paintEvent ( TQPaintEvent *pe ) { KLineEdit::paintEvent( pe ); TQPainter p(this); - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); } bool KexiDBLineEdit::event( TQEvent * e ) diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp index c4cbe4d0..b6ab6b03 100644 --- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp @@ -145,7 +145,7 @@ void KexiDBTextEdit::paintEvent ( TQPaintEvent *pe ) { KTextEdit::paintEvent( pe ); TQPainter p(this); - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); } TQPopupMenu * KexiDBTextEdit::createPopupMenu(const TQPoint & pos) diff --git a/kexi/plugins/forms/widgets/kexiframe.h b/kexi/plugins/forms/widgets/kexiframe.h index 2f6ca562..ce51766c 100644 --- a/kexi/plugins/forms/widgets/kexiframe.h +++ b/kexi/plugins/forms/widgets/kexiframe.h @@ -53,7 +53,7 @@ class KEXIFORMUTILS_EXPORT KexiFrame : public TQFrame GroupBoxPanel = TQFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style }; Shape frameShape() const; - void setFrameShape( KexiFrame::Shape tqshape ); + void setFrameShape( KexiFrame::Shape shape ); Shadow frameShadow() const; void setFrameShadow( KexiFrame::Shadow shadow ); #endif diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp index 7adfbaa8..22a71001 100644 --- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp +++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp @@ -69,9 +69,9 @@ ClassName::Shape ClassName::frameShape() const return d->frameShape; } -void ClassName::setFrameShape( ClassName::Shape tqshape ) +void ClassName::setFrameShape( ClassName::Shape shape ) { - d->frameShape = tqshape; + d->frameShape = shape; update(); } diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp index e89f6a65..94642d38 100644 --- a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp +++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp @@ -255,9 +255,9 @@ void KexiCSVExportWizard::showPage ( TQWidget * page ) int columns = KexiDB::fieldCount(*m_tableOrQuery); text += "\n"; if (m_rowCount>0) - text += i18n("(rows: %1, columns: %2)").tqarg(m_rowCount).tqarg(columns); + text += i18n("(rows: %1, columns: %2)").arg(m_rowCount).arg(columns); else - text += i18n("(columns: %1)").tqarg(columns); + text += i18n("(columns: %1)").arg(columns); m_infoLblFrom->setLabelText(text); TQFontMetrics fm(m_infoLblFrom->fileNameLabel()->font()); m_infoLblFrom->fileNameLabel()->setFixedHeight( fm.height() * 2 + fm.lineSpacing() ); diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index 5dd04ed9..69942a79 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -352,7 +352,7 @@ if ( m_mode == Clipboard ) if (m_mode == File) { m_loadingProgressDlg = new KProgressDialog( this, "m_loadingProgressDlg", i18n("Loading CSV Data"), i18n("Loading CSV Data from \"%1\"...") - .tqarg(TQDir::convertSeparators(m_fname)), true); + .arg(TQDir::convertSeparators(m_fname)), true); m_loadingProgressDlg->progressBar()->setTotalSteps( m_maximumRowsForPreview+1 ); m_loadingProgressDlg->show(); } @@ -440,7 +440,7 @@ bool KexiCSVImportDialog::openData() delete m_file; m_file = 0; KMessageBox::sorry( this, i18n("Cannot open input file <nobr>\"%1\"</nobr>.") - .tqarg(TQDir::convertSeparators(m_fname)) ); + .arg(TQDir::convertSeparators(m_fname)) ); actionButton( Ok )->setEnabled( false ); m_cancelled = true; if (parentWidget()) @@ -458,7 +458,7 @@ bool KexiCSVImportDialog::cancelled() const void KexiCSVImportDialog::fillTable() { KexiUtils::WaitCursor wc(true); - tqrepaint(); + repaint(); m_blockUserEvents = true; TQPushButton *pb = actionButton(KDialogBase::Cancel); if (pb) @@ -530,16 +530,16 @@ void KexiCSVImportDialog::fillTable() m_startAtLineSpinBox->setMaxValue(count); m_startAtLineSpinBox->setValue(m_startline+1); } - m_startAtLineLabel->setText(i18n( "Start at line%1:").tqarg( - m_allRowsLoadedInPreview ? TQString(" (1-%1)").tqarg(count) + m_startAtLineLabel->setText(i18n( "Start at line%1:").arg( + m_allRowsLoadedInPreview ? TQString(" (1-%1)").arg(count) : TQString() //we do not know what's real count )); updateRowCountInfo(); m_blockUserEvents = false; - tqrepaint(); - m_table->verticalScrollBar()->tqrepaint();//avoid missing tqrepaint - m_table->horizontalScrollBar()->tqrepaint();//avoid missing tqrepaint + repaint(); + m_table->verticalScrollBar()->repaint();//avoid missing repaint + m_table->horizontalScrollBar()->repaint();//avoid missing repaint } TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextStream& inputStream) @@ -548,7 +548,7 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS // try to detect delimiter // \t has priority, then ; then , - const TQIODevice::Offset origOffset = inputStream.tqdevice()->at(); + const TQIODevice::Offset origOffset = inputStream.device()->at(); TQChar c, prevChar=0; int detectedDelimiter = 0; bool insideQuote = false; @@ -601,7 +601,7 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS prevChar = c; } - inputStream.tqdevice()->at(origOffset); //restore orig. offset + inputStream.device()->at(origOffset); //restore orig. offset //now, try to find a delimiter character that exists the same number of times in all the checked lines //this detection method has priority over others @@ -882,7 +882,7 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i m_1stRowForFieldNames->setChecked(true); //this will reload table //slot1stRowForFieldNamesChanged(1); m_blockUserEvents = false; - tqrepaint(); + repaint(); return false; } @@ -926,7 +926,7 @@ void KexiCSVImportDialog::updateColumnText(int col) if (col<(int)m_columnNames.count() && (m_1stRowForFieldNames->isChecked() || m_changedColumnNames[col])) colName = m_columnNames[ col ]; if (colName.isEmpty()) { - colName = i18n("Column %1").tqarg(col+1); //will be changed to a valid identifier on import + colName = i18n("Column %1").arg(col+1); //will be changed to a valid identifier on import m_changedColumnNames[ col ] = false; } int detectedType = m_detectedTypes[col]; @@ -937,7 +937,7 @@ void KexiCSVImportDialog::updateColumnText(int col) detectedType=_TEXT_TYPE; } m_table->horizontalHeader()->setLabel(col, - i18n("Column %1").tqarg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") "); + i18n("Column %1").arg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") "); m_table->setText(0, col, colName); m_table->horizontalHeader()->adjustHeaderSize(); @@ -1108,8 +1108,8 @@ void KexiCSVImportDialog::setText(int row, int col, const TQString& text, bool i TQCString t(text.latin1()); const int textLen = t.length(); for (int i=0; i<textLen; i++) { - if (t.tqat(i)==',') { - t.tqat(i) = '.'; + if (t.at(i)==',') { + t.at(i) = '.'; break; } } @@ -1295,7 +1295,7 @@ void KexiCSVImportDialog::currentCellChanged(int, int col) type=_NUMBER_TYPE; //we're simplifying that for now m_formatCombo->setCurrentItem( type ); - m_formatLabel->setText( m_formatComboText.tqarg(col+1) ); + m_formatLabel->setText( m_formatComboText.arg(col+1) ); m_primaryKeyField->setEnabled( _NUMBER_TYPE == m_detectedTypes[col]); m_primaryKeyField->blockSignals(true); //block to disable executing slotPrimaryKeyFieldToggled() m_primaryKeyField->setChecked( m_primaryKeyColumn == col ); @@ -1522,7 +1522,7 @@ void KexiCSVImportDialog::accept() } m_importingProgressDlg->setLabel( i18n("Importing CSV Data from <nobr>\"%1\"</nobr> into \"%2\" table...") - .tqarg(TQDir::convertSeparators(m_fname)).tqarg(m_destinationTableSchema->name()) ); + .arg(TQDir::convertSeparators(m_fname)).arg(m_destinationTableSchema->name()) ); m_importingProgressDlg->progressBar()->setTotalSteps( TQFileInfo(*m_file).size() ); m_importingProgressDlg->show(); } @@ -1569,7 +1569,7 @@ void KexiCSVImportDialog::accept() TQDialog::accept(); KMessageBox::information(this, i18n("Data has been successfully imported to table \"%1\".") - .tqarg(m_destinationTableSchema->name())); + .arg(m_destinationTableSchema->name())); parentWidget()->raise(); m_conn = 0; } @@ -1651,12 +1651,12 @@ void KexiCSVImportDialog::updateRowCountInfo() m_infoLbl->setFileName( m_fname ); if (m_allRowsLoadedInPreview) { m_infoLbl->setCommentText( - i18n("row count", "(rows: %1)").tqarg( m_table->numRows()-1+m_startline ) ); + i18n("row count", "(rows: %1)").arg( m_table->numRows()-1+m_startline ) ); TQToolTip::remove( m_infoLbl ); } else { m_infoLbl->setCommentText( - i18n("row count", "(rows: more than %1)").tqarg( m_table->numRows()-1+m_startline ) ); + i18n("row count", "(rows: more than %1)").arg( m_table->numRows()-1+m_startline ) ); TQToolTip::add( m_infoLbl->commentLabel(), i18n("Not all rows are visible on this preview") ); } } diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp index d2eb1df1..19922122 100644 --- a/kexi/plugins/macros/kexiactions/datatableaction.cpp +++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp @@ -148,10 +148,10 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context) TQString identifier; if(! partitem.isEmpty()) { TQStringList parts = TQStringList::split(".", partitem); - KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(parts[0]) ); + KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(parts[0]) ); KexiPart::Item* item = part ? mainWin()->project()->item(part->info(), parts[1]) : 0; if(! item) - throw KoMacro::Exception(i18n("No such item \"%1\"").tqarg(partitem)); + throw KoMacro::Exception(i18n("No such item \"%1\"").arg(partitem)); identifier = TQString::number(item->identifier()); } @@ -178,7 +178,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context) delete dlg; } else { - throw KoMacro::Exception(i18n("No such method \"%1\"").tqarg(method)); + throw KoMacro::Exception(i18n("No such method \"%1\"").arg(method)); } } diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp index ccad645c..564b03c8 100644 --- a/kexi/plugins/macros/kexiactions/executeaction.cpp +++ b/kexi/plugins/macros/kexiactions/executeaction.cpp @@ -77,17 +77,17 @@ void ExecuteAction::activate(KSharedPtr<KoMacro::Context> context) return; } - const TQString mimetype = TQString("kexi/%1").tqarg( context->variable("object")->variant().toString() ); + const TQString mimetype = TQString("kexi/%1").arg( context->variable("object")->variant().toString() ); const TQString name = context->variable("name")->variant().toString(); KexiPart::Part* part = Kexi::partManager().partForMimeType(mimetype); if(! part) { - throw KoMacro::Exception(i18n("No such mimetype \"%1\"").tqarg(mimetype)); + throw KoMacro::Exception(i18n("No such mimetype \"%1\"").arg(mimetype)); } KexiPart::Item* item = mainWin()->project()->item(part->info(), name); if(! item) { - throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").tqarg(name).tqarg(mimetype)); + throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").arg(name).arg(mimetype)); } part->execute(item); diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp index bc573d10..815b8723 100644 --- a/kexi/plugins/macros/kexiactions/navigateaction.cpp +++ b/kexi/plugins/macros/kexiactions/navigateaction.cpp @@ -111,13 +111,13 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context) KexiViewBase* view = dialog->selectedView(); if(! view) { - throw KoMacro::Exception(i18n("No view selected for \"%1\".").tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("No view selected for \"%1\".").arg(dialog->caption())); } KexiDataAwareView* dbview = dynamic_cast<KexiDataAwareView*>( view ); KexiDataAwareObjectInterface* dbobj = dbview ? dbview->dataAwareObject() : 0; if(! dbview) { - throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").arg(dialog->caption())); } const TQString record = context->variable("record")->variant().toString(); @@ -151,7 +151,7 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context) void sortAscending(); void sortDescending(); */ - throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").tqarg(record).tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").arg(record).arg(dialog->caption())); } } diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h index 419e2b00..1a0aabf8 100644 --- a/kexi/plugins/macros/kexiactions/objectnamevariable.h +++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h @@ -49,7 +49,7 @@ namespace KexiMacro { return; TQStringList namelist; - KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(objectname) ); + KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").arg(objectname) ); if(info) { KexiPart::ItemDict* items = actionimpl->mainWin()->project()->items(info); if(items) @@ -65,7 +65,7 @@ namespace KexiMacro { this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name ); - kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" tqchildren="<<namelist<<endl; + kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" children="<<namelist<<endl; } virtual ~ObjectNameVariable() {} diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h index 83a7a471..c27f024b 100644 --- a/kexi/plugins/macros/kexiactions/objectvariable.h +++ b/kexi/plugins/macros/kexiactions/objectvariable.h @@ -72,8 +72,8 @@ namespace KexiMacro { if(! objectname.isNull()) this->setVariant( objectname ); - else if(this->tqchildren().count() > 0) - this->setVariant( this->tqchildren()[0]->variant() ); + else if(this->children().count() > 0) + this->setVariant( this->children()[0]->variant() ); else this->setVariant( TQString() ); diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp index 9cd2e664..d7c4e7aa 100644 --- a/kexi/plugins/macros/kexiactions/openaction.cpp +++ b/kexi/plugins/macros/kexiactions/openaction.cpp @@ -53,7 +53,7 @@ namespace KexiMacro { : KexiVariable<ACTIONIMPL>(actionimpl, VIEW, i18n("View")) { TQStringList namelist; - KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(objectname) ); + KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(objectname) ); if(part) { int viewmodes = part->supportedViewModes(); if(viewmodes & Kexi::DataViewMode) @@ -63,7 +63,7 @@ namespace KexiMacro { if(viewmodes & Kexi::TextViewMode) namelist << TEXTVIEW; for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it) - this->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); + this->children().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); } const TQString n = namelist.contains(viewname) @@ -124,9 +124,9 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context) const TQString objectname = context->variable(OBJECT)->variant().toString(); const TQString name = context->variable(NAME)->variant().toString(); - KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").tqarg(objectname).latin1(), name ); + KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").arg(objectname).latin1(), name ); if(! item) { - throw KoMacro::Exception(i18n("No such object \"%1.%2\".").tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("No such object \"%1.%2\".").arg(objectname).arg(name)); } // Determinate the viewmode. @@ -139,14 +139,14 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context) else if(view == TEXTVIEW) viewmode = Kexi::TextViewMode; else { - throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").tqarg(view).tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").arg(view).arg(objectname).arg(name)); } // Try to open the object now. bool openingCancelled; if(! mainWin()->openObject(item, viewmode, openingCancelled)) { if(! openingCancelled) { - throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").arg(objectname).arg(name)); } } } diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp index b7e89e9a..2f6ee825 100644 --- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp +++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp @@ -461,10 +461,10 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop kdDebug() << "KexiMacroDesignView::propertyChanged() set existing property=" << *it << endl; KoProperty::Property& p = set.property((*it).latin1()); - KoMacro::Variable::List tqchildren = variable->tqchildren(); - if(tqchildren.count() > 0) { + KoMacro::Variable::List children = variable->children(); + if(children.count() > 0) { TQStringList keys, names; - KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end()); + KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end()); for(; childit != childend; ++childit) { const TQString s = (*childit)->variant().toString(); keys << s; diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.h b/kexi/plugins/macros/kexipart/keximacrodesignview.h index 3529ea0c..520d1799 100644 --- a/kexi/plugins/macros/kexipart/keximacrodesignview.h +++ b/kexi/plugins/macros/kexipart/keximacrodesignview.h @@ -91,7 +91,7 @@ class KexiMacroDesignView : public KexiMacroView /** * Called if a row got inserted. */ - void rowInserted(KexiTableItem* item, uint row, bool tqrepaint); + void rowInserted(KexiTableItem* item, uint row, bool repaint); /** * Called if a property in the \a KoProperty got changed. diff --git a/kexi/plugins/macros/kexipart/keximacroerror.cpp b/kexi/plugins/macros/kexipart/keximacroerror.cpp index f6422be9..25ec569f 100644 --- a/kexi/plugins/macros/kexipart/keximacroerror.cpp +++ b/kexi/plugins/macros/kexipart/keximacroerror.cpp @@ -53,14 +53,14 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont KoMacro::Exception* exception = context->exception(); iconlbl->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32)); - errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").tqarg( context->macro()->name() ).tqarg( exception->errorMessage() )); + errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() )); int i = 1; KoMacro::MacroItem::List items = context->macro()->items(); for (KoMacro::MacroItem::List::ConstIterator mit = items.begin(); mit != items.end(); mit++) { KListViewItem* listviewitem = new KListViewItem(errorlist); - listviewitem->setText(0,TQString("%1").tqarg(i++)); + listviewitem->setText(0,TQString("%1").arg(i++)); listviewitem->setText(1,i18n("Action")); KSharedPtr<KoMacro::MacroItem> macroitem = *mit; @@ -107,7 +107,7 @@ void KexiMacroError::designbtnClicked() const TQString name = macro->name(); KexiPart::Item* item = d->mainwin->project()->itemForMimeType("kexi/macro", name); if(! item) { - kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").tqarg(name) << endl; + kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").arg(name) << endl; return; } @@ -115,7 +115,7 @@ void KexiMacroError::designbtnClicked() bool openingCancelled; if(! d->mainwin->openObject(item, Kexi::DesignViewMode, openingCancelled)) { if(! openingCancelled) { - kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").tqarg(name) << endl; + kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").arg(name) << endl; return; } } diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui index 72c45001..26bd964d 100644 --- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui +++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui @@ -65,7 +65,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -87,7 +87,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp index d5e576f9..e3599b22 100644 --- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp +++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp @@ -86,7 +86,7 @@ void KexiMacroProperty::init() } //TESTCASE!!!!!!!!!!!!!!!!!!!!!! - //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() ); + //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").arg(variable->name()).latin1() ); Q_ASSERT(! d->name.isNull()); m_property->setName( d->name.latin1() ); @@ -389,45 +389,45 @@ class ListBox : public TQListBox Q_ASSERT( m_edititem->widget() != 0 ); const TQString name = m_macroproperty->name(); - KoMacro::Variable::List tqchildren; + KoMacro::Variable::List children; { - KoMacro::Variable::List actiontqchildren; + KoMacro::Variable::List actionchildren; KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false); //kdDebug() << "KexiMacroProperty::ListBox::update() itemvar="<<(itemvar.data() ? "name:"+itemvar->name()+" value:"+itemvar->toString() : "NULL")<<endl; if(itemvar.data()) - actiontqchildren = itemvar->tqchildren(); + actionchildren = itemvar->children(); KSharedPtr<KoMacro::Action> action = m_edititem->action(); KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>(); //kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl; if(actionvar.data()) - actiontqchildren += actionvar->tqchildren(); + actionchildren += actionvar->children(); - KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd()); + KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd()); for(; it != end; ++it) { if(name == (*it)->name()) { - KoMacro::Variable::List list = (*it)->tqchildren(); + KoMacro::Variable::List list = (*it)->children(); KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd()); for(; listit != listend; ++listit) - tqchildren.append( *listit ); + children.append( *listit ); } } - if(tqchildren.count() <= 0) - tqchildren = actiontqchildren; + if(children.count() <= 0) + children = actionchildren; } /* - kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl; - KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd()); + kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl; + KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd()); for(; listit != listend; ++listit) { - kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl; + kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl; } */ - if(tqchildren.count() > 0) { - KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end()); + if(children.count() > 0) { + KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end()); for(; childit != childend; ++childit) { const TQString n = (*childit)->name(); //if(! n.startsWith("@")) continue; diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.cpp b/kexi/plugins/macros/kexipart/keximacrotextview.cpp index e35ee5b2..d7f3801e 100644 --- a/kexi/plugins/macros/kexipart/keximacrotextview.cpp +++ b/kexi/plugins/macros/kexipart/keximacrotextview.cpp @@ -72,7 +72,7 @@ bool KexiMacroTextView::loadData() return false; } - kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").tqarg(data) << endl; + kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").arg(data) << endl; //d->editor->blockSignals(true); d->editor->setText(data); //d->editor->blockSignals(false); @@ -82,7 +82,7 @@ bool KexiMacroTextView::loadData() tristate KexiMacroTextView::storeData(bool /*dontAsk*/) { - kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id()).tqarg(d->editor->text()) << endl; + kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()).arg(d->editor->text()) << endl; return storeDataBlock( d->editor->text() ); } diff --git a/kexi/plugins/macros/kexipart/keximacroview.cpp b/kexi/plugins/macros/kexipart/keximacroview.cpp index e9f9cd33..19e789f0 100644 --- a/kexi/plugins/macros/kexipart/keximacroview.cpp +++ b/kexi/plugins/macros/kexipart/keximacroview.cpp @@ -115,7 +115,7 @@ bool KexiMacroView::loadData() return false; } - kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").tqarg(domdoc.toString()) << endl; + kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").arg(domdoc.toString()) << endl; TQDomElement macroelem = domdoc.namedItem("macro").toElement(); if(macroelem.isNull()) { kexipluginsdbg << "KexiMacroView::loadData() Macro domelement is null" << endl; @@ -154,8 +154,8 @@ tristate KexiMacroView::storeData(bool /*dontAsk*/) TQDomElement macroelem = d->macro->toXML(); domdoc.appendChild(macroelem); const TQString xml = domdoc.toString(2); - const TQString name = TQString("%1 [%2]").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id()); - kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").tqarg(name).tqarg(xml) << endl; + const TQString name = TQString("%1 [%2]").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()); + kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").arg(name).arg(xml) << endl; return storeDataBlock(xml); } diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp index 45c03d12..fc729b57 100644 --- a/kexi/plugins/macros/lib/action.cpp +++ b/kexi/plugins/macros/lib/action.cpp @@ -81,7 +81,7 @@ Action::Action(const TQString& name, const TQString& text) Action::~Action() { - //kdDebug() << TQString("Action::~Action() name=\"%1\"").tqarg(name()) << endl; + //kdDebug() << TQString("Action::~Action() name=\"%1\"").arg(name()) << endl; // destroy the private d-pointer instance. delete d; @@ -89,7 +89,7 @@ Action::~Action() const TQString Action::toString() const { - return TQString("Action:%1").tqarg(name()); + return TQString("Action:%1").arg(name()); } const TQString Action::name() const diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp index 7c0b6ee8..c0eea250 100644 --- a/kexi/plugins/macros/lib/context.cpp +++ b/kexi/plugins/macros/lib/context.cpp @@ -44,7 +44,7 @@ namespace KoMacro { KSharedPtr<Macro> macro; /** - * List of @a Action instances that are tqchildren of the + * List of @a Action instances that are children of the * macro. */ TQValueList<KSharedPtr<MacroItem > > items; @@ -70,7 +70,7 @@ namespace KoMacro { /// Constructor. explicit Private(KSharedPtr<Macro> m) : macro(m) // remember the macro - , items(m->items()) // set d-pointer tqchildren to macro tqchildren + , items(m->items()) // set d-pointer children to macro children , exception(0) // no exception yet. { } @@ -119,7 +119,7 @@ KSharedPtr<Variable> Context::variable(const TQString& name) const } } //none found throw exception - throw Exception(TQString("Variable name='%1' does not exist.").tqarg(name)); + throw Exception(TQString("Variable name='%1' does not exist.").arg(name)); } //return a map of our (d-pointer) variables @@ -132,7 +132,7 @@ Variable::Map Context::variables() const void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable) { //debuging infos - kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").tqarg(name).tqarg(variable->toString()) << endl; + kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl; //Use TQMap?s replace to set/replace the variable named name d->variables.replace(name, variable); } @@ -198,14 +198,14 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) d->exception = new Exception(e); //add new tracemessages //the macro name - d->exception->addTraceMessage( TQString("macro=%1").tqarg(d->macro->name()) ); + d->exception->addTraceMessage( TQString("macro=%1").arg(d->macro->name()) ); //the action name - d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) ); + d->exception->addTraceMessage( TQString("action=%1").arg(action->name()) ); //and all variables wich belong to the action/macro TQStringList variables = action->variableNames(); for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) { KSharedPtr<Variable> v = d->macroitem->variable(*vit, true); - d->exception->addTraceMessage( TQString("%1=%2").tqarg(*vit).tqarg(v->toString()) ); + d->exception->addTraceMessage( TQString("%1=%2").arg(*vit).arg(v->toString()) ); } return; // abort execution } diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h index 2bb1bef3..a7986167 100644 --- a/kexi/plugins/macros/lib/context.h +++ b/kexi/plugins/macros/lib/context.h @@ -35,7 +35,7 @@ namespace KoMacro { /** * The context of an execution. If a @a Macro got executed it creates - * an instance of this class and passes it around all it's tqchildren + * an instance of this class and passes it around all it's children * as local execution context. */ class KOMACRO_EXPORT Context diff --git a/kexi/plugins/macros/lib/exception.cpp b/kexi/plugins/macros/lib/exception.cpp index 91cfa03c..b435f2f2 100644 --- a/kexi/plugins/macros/lib/exception.cpp +++ b/kexi/plugins/macros/lib/exception.cpp @@ -56,7 +56,7 @@ Exception::Exception(const TQString& errormessage) : d( new Private(errormessage) ) // create the private d-pointer instance. { //debuging infos - kdDebug() << TQString("Exception errormessage=\"%1\"").tqarg(errormessage) << endl; + kdDebug() << TQString("Exception errormessage=\"%1\"").arg(errormessage) << endl; } //copy constructor diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp index 6bcdc21d..808c4043 100644 --- a/kexi/plugins/macros/lib/macro.cpp +++ b/kexi/plugins/macros/lib/macro.cpp @@ -84,7 +84,7 @@ void Macro::setName(const TQString& name) //get an "extended" name const TQString Macro::toString() const { - return TQString("Macro:%1").tqarg(name()); + return TQString("Macro:%1").arg(name()); } //get (d-pointer) itemlist diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h index 86e0122a..5e5decf8 100644 --- a/kexi/plugins/macros/lib/macro.h +++ b/kexi/plugins/macros/lib/macro.h @@ -85,7 +85,7 @@ namespace KoMacro { /** * @return a list of @a MacroItem instances which - * are tqchildren of this @a Macro . + * are children of this @a Macro . */ TQValueList< KSharedPtr<MacroItem> >& items() const; diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp index 16b93803..05bd22c3 100644 --- a/kexi/plugins/macros/lib/metamethod.cpp +++ b/kexi/plugins/macros/lib/metamethod.cpp @@ -92,12 +92,12 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje int startpos = d->signature.find("("); int endpos = d->signature.findRev(")"); if(startpos < 0 || startpos > endpos) { - throw Exception(TQString("Invalid signature \"%1\"").tqarg(d->signature)); + throw Exception(TQString("Invalid signature \"%1\"").arg(d->signature)); } d->signaturetag = d->signature.left(startpos).stripWhiteSpace(); if(d->signaturetag.isEmpty()) { - throw Exception(TQString("Invalid tagname in signature \"%1\"").tqarg(d->signature)); + throw Exception(TQString("Invalid tagname in signature \"%1\"").arg(d->signature)); } d->signaturearguments = d->signature.mid(startpos + 1, endpos - startpos - 1).stripWhiteSpace(); @@ -108,7 +108,7 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje if(starttemplatepos >= 0 && (commapos < 0 || starttemplatepos < commapos)) { int endtemplatepos = d->signaturearguments.find(">", starttemplatepos); if(endtemplatepos <= 0) { - throw Exception(TQString("No closing template-definiton in signature \"%1\"").tqarg(d->signature)); + throw Exception(TQString("No closing template-definiton in signature \"%1\"").arg(d->signature)); } commapos = d->signaturearguments.find(",", endtemplatepos); } @@ -170,7 +170,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) uint argsize = d->arguments.size(); if(arguments.size() <= argsize) { - throw Exception(TQString("To less arguments for slot with siganture \"%1\"").tqarg(d->signature)); + throw Exception(TQString("To less arguments for slot with siganture \"%1\"").arg(d->signature)); } // The first item in the TQUObject-array is for the returnvalue @@ -188,7 +188,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) } if(metaargument->type() != variable->type()) { - throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").tqarg(d->signature).tqarg(metaargument->type()).tqarg(variable->type())); + throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").arg(d->signature).arg(metaargument->type()).arg(variable->type())); } switch(metaargument->type()) { @@ -287,7 +287,7 @@ KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo) return new Variable(v); } - throw Exception(TQString("Invalid parameter '%1'").tqarg(desc)); + throw Exception(TQString("Invalid parameter '%1'").arg(desc)); } Variable::List MetaMethod::toVariableList(TQUObject* uo) diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp index 0916fe37..ee865c82 100644 --- a/kexi/plugins/macros/lib/metaobject.cpp +++ b/kexi/plugins/macros/lib/metaobject.cpp @@ -91,7 +91,7 @@ int MetaObject::indexOfSignal(const char* signal) const TQMetaObject* metaobject = object()->metaObject(); int signalid = metaobject->findSignal(signal, false); if(signalid < 0) { - throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal)); + throw Exception(TQString("Invalid signal \"%1\"").arg(signal)); } return signalid; } @@ -101,7 +101,7 @@ int MetaObject::indexOfSlot(const char* slot) const TQMetaObject* metaobject = object()->metaObject(); int slotid = metaobject->findSlot(slot, false); if(slotid < 0) { - throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot)); + throw Exception(TQString("Invalid slot \"%1\"").arg(slot)); } return slotid; } @@ -119,13 +119,13 @@ KSharedPtr<MetaMethod> MetaObject::method(int index) metadata = metaobject->signal(index, true); if(! metadata) { - throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").tqarg(index).tqarg(obj->name())); + throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name())); } type = MetaMethod::Signal; } if(metadata->access != TQMetaData::Public) { - throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name())); + throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(obj->name())); } return new MetaMethod(metadata->name, type, this); diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp index f64613b0..3661ef9a 100644 --- a/kexi/plugins/macros/lib/variable.cpp +++ b/kexi/plugins/macros/lib/variable.cpp @@ -58,10 +58,10 @@ namespace KoMacro { const TQObject* object; /** - * Optional list of tqchildren this @a Variable has. + * Optional list of children this @a Variable has. */ // TODO Dow we use this or is it for the future?? - Variable::List tqchildren; + Variable::List children; /** * Defines if the variable is enabled or disabled. @@ -199,7 +199,7 @@ const TQString Variable::toString() const return variant().toString(); } break; case KoMacro::MetaParameter::TypeObject: { - return TQString("[%1]").tqarg( object()->name() ); + return TQString("[%1]").arg( object()->name() ); } break; default: { throw Exception("Type is undefined."); @@ -213,24 +213,24 @@ int Variable::toInt() const return variant().toInt(); } -Variable::List Variable::tqchildren() const +Variable::List Variable::children() const { - return d->tqchildren; + return d->children; } void Variable::appendChild(KSharedPtr<Variable> variable) { - d->tqchildren.append(variable); + d->children.append(variable); } void Variable::clearChildren() { - d->tqchildren.clear(); + d->children.clear(); } -void Variable::setChildren(const Variable::List& tqchildren) +void Variable::setChildren(const Variable::List& children) { - d->tqchildren = tqchildren; + d->children = children; } /* diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h index 108a6005..14adf09c 100644 --- a/kexi/plugins/macros/lib/variable.h +++ b/kexi/plugins/macros/lib/variable.h @@ -173,29 +173,29 @@ namespace KoMacro { /** * @return the optional list of @a Variable instances - * that are tqchildren of this @a Variable . + * that are children of this @a Variable . * * @note that the list is returned call-by-reference. The * list is accessed as getter/setter (read/write). So, * don't set this method to const! */ - List tqchildren() const; + List children() const; /** - * Append a @a Variable to the list of tqchildren this + * Append a @a Variable to the list of children this * @a Variable has. */ void appendChild(KSharedPtr<Variable> variable); /** - * Clear the list of tqchildren this @a Variable has. + * Clear the list of children this @a Variable has. */ void clearChildren(); /** - * Set the tqchildren this @a Variable has. + * Set the children this @a Variable has. */ - void setChildren(const List& tqchildren); + void setChildren(const List& children); #if 0 /** diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp index 4894c619..5b53d51b 100644 --- a/kexi/plugins/macros/lib/xmlhandler.cpp +++ b/kexi/plugins/macros/lib/xmlhandler.cpp @@ -75,7 +75,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // We expect a <macro> element. Do we really need to be such strict or // would it be more wise to trust the application in that case? if(element.tagName() != "macro") { - kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").tqarg(element.tagName()) << endl; + kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(element.tagName()) << endl; return false; } @@ -83,7 +83,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // If there is more than one version, parsing should update old macro-data, so that it // could write out in the newer version in toXML(). if( element.attribute("xmlversion") != "1"){ - kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").tqarg(element.attribute("xmlversion")) << endl; + kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(element.attribute("xmlversion")) << endl; return false; } @@ -115,7 +115,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // Set the comment item->setComment( itemelem.attribute("comment") ); - // Iterate through the tqchildren this item has and try + // Iterate through the children this item has and try // to fill the list of variables our new MacroItem has. for(TQDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) { // The tagname should be "variable" @@ -156,12 +156,12 @@ TQDomElement XMLHandler::toXML() // redundancy at this point. //macroelem.setAttribute("name",d->macro->name()); - // The list of MacroItem-tqchildren a Macro provides. + // The list of MacroItem-children a Macro provides. TQValueList<KSharedPtr<MacroItem > > items = d->macro->items(); // Create an iterator... TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd()); - // ...and iterate over the list of tqchildren the Macro provides. + // ...and iterate over the list of children the Macro provides. for(;it != end; ++it) { // We are iterating over MacroItem instances. KSharedPtr<MacroItem> item = *it; diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp index 1086a340..bdc2e6ad 100644 --- a/kexi/plugins/macros/tests/commontests.cpp +++ b/kexi/plugins/macros/tests/commontests.cpp @@ -424,7 +424,7 @@ void CommonTests::testFunction() domdocument.setContent(TQString( "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const TQString & , int)\">" "<argument>" + argument1 + "</argument>" - "<argument>" + TQString("%1").tqarg(argument2) + "</argument>" + "<argument>" + TQString("%1").arg(argument2) + "</argument>" "</function>" )); @@ -677,7 +677,7 @@ void CommonTests::testMacro() // KOMACROTEST_ASSERT( actionptr->comment(), TQString("") ); /* //fetch the second one - KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1]; + KSharedPtr<KoMacro::Action> myfuncptr = children[1]; //cast it to function KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() ); @@ -712,8 +712,8 @@ void CommonTests::testMacro() //KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0); //KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0); - //create a list of the tqchildren from yanMacro - //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren(); + //create a list of the children from yanMacro + //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children(); //check that there are two //KOMACROTEST_ASSERT(yanChildren.count(), uint(2)); /* @@ -722,9 +722,9 @@ void CommonTests::testMacro() const int oldsize = yanChildren.count(); //add a new child to the macro yanMacro->addChild(yanActionptr2); - //get the tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children const int size = yanChildren.count(); //check count has changed KOMACROTEST_XASSERT(size, oldsize); @@ -735,9 +735,9 @@ void CommonTests::testMacro() const int oldsize = yanChildren.count(); //add a new child to the macro yanMacro->addChild(yanActionptr3); - //get the tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children const int size = yanChildren.count(); //check count has changed KOMACROTEST_XASSERT(size, oldsize); @@ -859,12 +859,12 @@ void CommonTests::testVariables() //check that it is not null KOMACROTEST_XASSERT((int) macro, 0); - //create a list of its tqchildren - TQValueList< KSharedPtr<KoMacro::Action> > tqchildren = macro->tqchildren(); - //Check that there are two tqchildren. The first child is always the returnvalue. - KOMACROTEST_ASSERT( tqchildren.count(), uint(2) ); - //fetch the tqchildren - KSharedPtr<KoMacro::Action> func1ptr = tqchildren[1]; + //create a list of its children + TQValueList< KSharedPtr<KoMacro::Action> > children = macro->children(); + //Check that there are two children. The first child is always the returnvalue. + KOMACROTEST_ASSERT( children.count(), uint(2) ); + //fetch the children + KSharedPtr<KoMacro::Action> func1ptr = children[1]; //create new context KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr); diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h index e301730d..ee746991 100644 --- a/kexi/plugins/macros/tests/komacrotestbase.h +++ b/kexi/plugins/macros/tests/komacrotestbase.h @@ -27,7 +27,7 @@ */ #define KOMACROTEST_ASSERT(actual, expected) \ { \ - std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \ check( __FILE__, __LINE__, #actual, actual, expected, false ); \ if(actual != expected) \ { \ @@ -44,7 +44,7 @@ */ #define KOMACROTEST_XASSERT(actual, notexpected) \ { \ - std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \ check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \ if(actual == notexpected) \ { \ diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp index e0db481e..2634d71a 100644 --- a/kexi/plugins/macros/tests/testobject.cpp +++ b/kexi/plugins/macros/tests/testobject.cpp @@ -94,7 +94,7 @@ int TestObject::myslot(const TQString&, int i) //TQString is returnvalue TQString TestObject::myslot(const TQString& s) { - TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s); + TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").arg(s); //be loud kdDebug() << t << endl; //add some extra Debuginfos to TestResults diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp index 29c53831..90454d35 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp @@ -332,7 +332,7 @@ void XMLHandlerTests::testMaxNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX); + "</macro>").arg(INT_MAX).arg(DBL_MAX); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -362,7 +362,7 @@ void XMLHandlerTests::testMaxNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -392,7 +392,7 @@ void XMLHandlerTests::testMinNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN); + "</macro>").arg(INT_MIN).arg(DBL_MIN); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -422,7 +422,7 @@ void XMLHandlerTests::testMinNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -452,7 +452,7 @@ void XMLHandlerTests::testBigNumber() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %1 </variable>" "</item>" - "</macro>").tqarg(DBL_MAX+1); + "</macro>").arg(DBL_MAX+1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp index ac176f89..f32416c0 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp @@ -586,7 +586,7 @@ void XMLHandlerTests2::testMaxNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX); + "</macro>").arg(INT_MAX).arg(DBL_MAX); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -674,7 +674,7 @@ void XMLHandlerTests2::testMaxNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -762,7 +762,7 @@ void XMLHandlerTests2::testMinNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN); + "</macro>").arg(INT_MIN).arg(DBL_MIN); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -850,7 +850,7 @@ void XMLHandlerTests2::testMinNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); diff --git a/kexi/plugins/queries/kexiaddparamwidget.ui b/kexi/plugins/queries/kexiaddparamwidget.ui index ed1864f6..080f8d08 100644 --- a/kexi/plugins/queries/kexiaddparamwidget.ui +++ b/kexi/plugins/queries/kexiaddparamwidget.ui @@ -50,7 +50,7 @@ <property name="text"> <string>kexi_</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp index c6708e7f..cfd38e3a 100644 --- a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp +++ b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp @@ -388,7 +388,7 @@ KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg) d->dataTable->dataAwareObject()->setCursorPosition(i,0); if (errMsg) *errMsg = i18n("Select column for table \"%1\"") - .tqarg(it.current()->at(COLUMN_ID_TABLE).toString()); + .arg(it.current()->at(COLUMN_ID_TABLE).toString()); return false; } @@ -410,7 +410,7 @@ KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg) true/*allowRelationalOperator*/); if (!criteriaExpr) {//for sanity if (errMsg) - *errMsg = i18n("Invalid criteria \"%1\"").tqarg(criteriaStr); + *errMsg = i18n("Invalid criteria \"%1\"").arg(criteriaStr); delete whereExpr; return false; } @@ -431,7 +431,7 @@ KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg) false/*!allowRelationalOperator*/); if (!columnExpr) { if (errMsg) - *errMsg = i18n("Invalid expression \"%1\"").tqarg(fieldName); + *errMsg = i18n("Invalid expression \"%1\"").arg(fieldName); return false; } temp->query()->addExpression(columnExpr, fieldVisible); @@ -901,7 +901,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal( columnAlias = query->columnAlias(row_num); if (field->isExpression()) { // if (columnAlias.isEmpty()) { -// columnAlias = i18n("expression", "expr%1").tqarg(row_num); //TODO +// columnAlias = i18n("expression", "expr%1").arg(row_num); //TODO // } // if (columnAlias.isEmpty()) //TODO: ok? perhaps do not allow to omit aliases? @@ -1239,7 +1239,7 @@ void KexiQueryDesignerGuiEditor::slotNewItemAppendedForAfterDeletingInSpreadShee item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0); //the same init as in initTableRows() } -void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*tqrepaint*/) +void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*repaint*/) { if (d->droppedNewItem && d->droppedNewItem==item) { createPropertySet( row, d->droppedNewTable, d->droppedNewField, true ); @@ -1449,7 +1449,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->allowToDiscardChanges = true; result->column = colnum; result->msg = i18n("Entered column alias \"%1\" is not a valid identifier.") - .tqarg(alias.data()); + .arg(alias.data()); result->desc = i18n("Identifiers should start with a letter or '_' character"); return; } @@ -1468,7 +1468,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->success = false; result->allowToDiscardChanges = true; result->column = colnum; - result->msg = i18n("Invalid expression \"%1\"").tqarg(fieldName); + result->msg = i18n("Invalid expression \"%1\"").arg(fieldName); return; } } @@ -1590,7 +1590,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->allowToDiscardChanges = true; result->column = colnum; result->msg = i18n("Could not set sorting for multiple columns (%1)") - .tqarg(table=="*" ? table : (table+".*")); + .arg(table=="*" ? table : (table+".*")); } } else if (colnum==COLUMN_ID_CRITERIA) { @@ -1612,7 +1612,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->column = colnum; if (propertySet()) result->msg = i18n("Could not set criteria for \"%1\"") - .tqarg(table=="*" ? table : field); + .arg(table=="*" ? table : field); else result->msg = i18n("Could not set criteria for empty row"); //moved to result->allowToDiscardChanges handler //d->dataTable->dataAwareObject()->cancelEditor(); //prevents further editing of this cell @@ -1638,7 +1638,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->success = false; result->allowToDiscardChanges = true; result->column = colnum; - result->msg = i18n("Invalid criteria \"%1\"").tqarg(newValue.toString()); + result->msg = i18n("Invalid criteria \"%1\"").arg(newValue.toString()); } } } diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.h b/kexi/plugins/queries/kexiquerydesignerguieditor.h index d96fd987..1102b1d9 100644 --- a/kexi/plugins/queries/kexiquerydesignerguieditor.h +++ b/kexi/plugins/queries/kexiquerydesignerguieditor.h @@ -129,7 +129,7 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase void slotBeforeCellChanged(KexiTableItem *item, int colnum, TQVariant& newValue, KexiDB::ResultInfo* result); - void slotRowInserted(KexiTableItem* item, uint row, bool tqrepaint); + void slotRowInserted(KexiTableItem* item, uint row, bool repaint); void slotTablePositionChanged(KexiRelationViewTableContainer*); void slotAboutConnectionRemove(KexiRelationViewConnection*); void slotTableFieldDoubleClicked( KexiDB::TableSchema* table, const TQString& fieldName ); diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp index 503b432a..e53e876c 100644 --- a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp +++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp @@ -57,14 +57,14 @@ KexiQueryDesignerSQLHistory::drawContents(TQPainter *p, int cx, int cy, int cw, for(HistoryEntry *it = m_history->first(); it; it = m_history->next()) { // it->drawItem(p, visibleWidth()); - if(clipping.intersects(it->tqgeometry(y, visibleWidth(), fontMetrics()))) + if(clipping.intersects(it->geometry(y, visibleWidth(), fontMetrics()))) { p->saveWorldMatrix(); p->translate(0, y); it->drawItem(p, visibleWidth(), colorGroup()); p->restoreWorldMatrix(); } - y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5; + y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5; } } @@ -80,26 +80,26 @@ KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e) { //clear it.current()->setSelected(false, colorGroup()); - updateContents(it.current()->tqgeometry(y, visibleWidth(), fontMetrics())); + updateContents(it.current()->geometry(y, visibleWidth(), fontMetrics())); } - if(it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).contains(e->pos())) + if(it.current()->geometry(y, visibleWidth(), fontMetrics()).contains(e->pos())) { popupHistory = it.current(); pos = y; } - y += it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5; + y += it.current()->geometry(y, visibleWidth(), fontMetrics()).height() + 5; } //now do update if (popupHistory) { if (m_selected && m_selected != popupHistory) { m_selected->setSelected(false, colorGroup()); - updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics())); + updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics())); } m_selected = popupHistory; m_selected->setSelected(true, colorGroup()); - updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics())); + updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics())); if(e->button() == Qt::RightButton) { m_popup->exec(e->globalPos()); } @@ -121,7 +121,7 @@ KexiQueryDesignerSQLHistory::addEvent(const TQString& q, bool s, const TQString if (he) { if (he->statement()==q) { he->updateTime(TQTime::currentTime()); - tqrepaint(); + repaint(); return; } } @@ -137,7 +137,7 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e) int y = 0; for(HistoryEntry *it = m_history->first(); it; it = m_history->next()) { - y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5; + y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5; } resizeContents(visibleWidth() - 1, y); @@ -155,7 +155,7 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e) m_selected = e; m_selected->setSelected(true, colorGroup()); // updateContents(); - updateContents(m_selected->tqgeometry(0, visibleWidth(), fontMetrics()));*/ + updateContents(m_selected->geometry(0, visibleWidth(), fontMetrics()));*/ } /*void @@ -326,7 +326,7 @@ HistoryEntry::highlight(const TQColorGroup &cg) } else { - text = TQString("<font color=\"%1\">%2").tqarg(cg.highlightedText().name()).tqarg(statement); + text = TQString("<font color=\"%1\">%2").arg(cg.highlightedText().name()).arg(statement); } TQRegExp keywords("\\b(SELECT|UPDATE|INSERT|DELETE|DROP|FROM|WHERE|AND|OR|NOT|NULL|JOIN|LEFT|RIGHT|ON|INTO|TABLE)\\b"); @@ -334,9 +334,9 @@ HistoryEntry::highlight(const TQColorGroup &cg) text = text.replace(keywords, "<b>\\1</b>"); if(!m_error.isEmpty()) -// text += ("<br>"+i18n("Error: %1").tqarg(m_error)); -// text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").tqarg(m_error) + "</font>"; - text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").tqarg(m_error) + "</font>"; +// text += ("<br>"+i18n("Error: %1").arg(m_error)); +// text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").arg(m_error) + "</font>"; + text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").arg(m_error) + "</font>"; kdDebug() << "HistoryEntry::highlight() text:" << text << endl; // m_formated = new TQSimpleRichText(text, TQFont("courier", 8)); @@ -352,7 +352,7 @@ HistoryEntry::setSelected(bool selected, const TQColorGroup &cg) } TQRect -HistoryEntry::tqgeometry(int y, int width, TQFontMetrics f) +HistoryEntry::geometry(int y, int width, TQFontMetrics f) { Q_UNUSED( f ); diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.h b/kexi/plugins/queries/kexiquerydesignersqlhistory.h index a6d55285..6c828c39 100644 --- a/kexi/plugins/queries/kexiquerydesignersqlhistory.h +++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.h @@ -36,7 +36,7 @@ class HistoryEntry HistoryEntry(bool success, const TQTime &time, const TQString &statement, /*int y,*/ const TQString &error = TQString()); ~HistoryEntry(); - TQRect tqgeometry(int y, int width, TQFontMetrics f); + TQRect geometry(int y, int width, TQFontMetrics f); void drawItem(TQPainter *p, int width, const TQColorGroup &cg); void setSelected(bool selected, const TQColorGroup &cg); diff --git a/kexi/plugins/reports/kexireportfactory.cpp b/kexi/plugins/reports/kexireportfactory.cpp index dfa8d0d0..7cf7dae9 100644 --- a/kexi/plugins/reports/kexireportfactory.cpp +++ b/kexi/plugins/reports/kexireportfactory.cpp @@ -139,7 +139,7 @@ KexiReportFactory::startEditing(const TQCString &c, TQWidget *w, KFormDesigner:: editText(); } else - createEditor(c, label->text(), label, container, label->tqgeometry(), label->tqalignment()); + createEditor(c, label->text(), label, container, label->geometry(), label->alignment()); return true; } return false; @@ -153,7 +153,7 @@ KexiReportFactory::isPropertyVisibleInternal(const TQCString &classname, TQWidge return false; } else if(classname == "PicLabel") { - if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "tqalignment")) + if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment")) return false; } diff --git a/kexi/plugins/reports/kexireportform.cpp b/kexi/plugins/reports/kexireportform.cpp index b0731167..cacf40b7 100644 --- a/kexi/plugins/reports/kexireportform.cpp +++ b/kexi/plugins/reports/kexireportform.cpp @@ -40,13 +40,13 @@ KexiReportForm::~KexiReportForm() kexipluginsdbg << "KexiReportForm::~KexiReportForm(): close" << endl; } -//tqrepaint all tqchildren widgets +//repaint all children widgets static void repaintAll(TQWidget *w) { TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - static_cast<TQWidget*>(obj)->tqrepaint(); + static_cast<TQWidget*>(obj)->repaint(); } delete list; } @@ -144,7 +144,7 @@ KexiReportForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) ); + p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp index f64a089f..9d577ec1 100644 --- a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp +++ b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp @@ -102,7 +102,7 @@ const TQString KexiDBConnection::getClassName() const { if(! m_connection) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection is NULL.")) ); //if(m_connection->error()) - // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection error: %1").tqarg(m_connection->errorMsg())) ); + // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection error: %1").arg(m_connection->errorMsg())) ); return m_connection; } @@ -140,9 +140,9 @@ KexiDBCursor* KexiDBConnection::executeQueryString(const TQString& sqlquery) { // or e.g. a DROP TABLE operation. So, let's check for such dangerous operations right now. ::KexiDB::Parser parser( connection() ); if(! parser.parse(sqlquery)) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to parse query: %1 %2").tqarg(parser.error().type()).tqarg(parser.error().error())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to parse query: %1 %2").arg(parser.error().type()).arg(parser.error().error())) ); if( parser.query() == 0 || parser.operation() != ::KexiDB::Parser::OP_Select ) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid query operation \"%1\"").tqarg(parser.operationString()) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid query operation \"%1\"").arg(parser.operationString()) ) ); ::KexiDB::Cursor* cursor = connection()->executeQuery(sqlquery); return cursor ? new KexiDBCursor(cursor) : 0; } diff --git a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp index c2475276..74723bc3 100644 --- a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp +++ b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp @@ -66,7 +66,7 @@ const TQString KexiDBDriverManager::getClassName() const { KexiDB::DriverManager& KexiDBDriverManager::driverManager() { if(m_drivermanager.error()) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::DriverManager error: %1").tqarg(m_drivermanager.errorMsg())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::DriverManager error: %1").arg(m_drivermanager.errorMsg())) ); return m_drivermanager; } @@ -77,7 +77,7 @@ const TQStringList KexiDBDriverManager::driverNames() { KexiDBDriver* KexiDBDriverManager::driver(const TQString& drivername) { TQGuardedPtr< ::KexiDB::Driver > driver = driverManager().driver(drivername); // caching is done by the DriverManager if(! driver) return 0; - if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Driver error for drivername '%1': %2").tqarg(drivername).tqarg(driver->errorMsg())) ); + if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Driver error for drivername '%1': %2").arg(drivername).arg(driver->errorMsg())) ); return new KexiDBDriver(driver); } diff --git a/kexi/plugins/scripting/kexidb/kexidbschema.cpp b/kexi/plugins/scripting/kexidb/kexidbschema.cpp index 2ac40342..c45eedfc 100644 --- a/kexi/plugins/scripting/kexidb/kexidbschema.cpp +++ b/kexi/plugins/scripting/kexidb/kexidbschema.cpp @@ -179,11 +179,11 @@ bool KexiDBQuerySchema::setWhereExpression(const TQString& whereexpression) { ::KexiDB::Field* field = static_cast< ::KexiDB::QuerySchema* >(m_schema)->field(key); if(! field) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").tqarg(key).tqarg(m_schema->name())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").arg(key).arg(m_schema->name())) ); TQVariant v(value); if(! v.cast(field->variantType())) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").tqarg(key).tqarg(v.typeName()).tqarg(field->variantType())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").arg(key).arg(v.typeName()).arg(field->variantType())) ); static_cast< ::KexiDB::QuerySchema* >(m_schema)->addToWhereExpression(field,v); } diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp index 421bc31f..ed3b99e2 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp @@ -191,7 +191,7 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope if(property.name() == "language") { TQString language = property.value().toString(); - kdDebug() << TQString("KexiScriptDesignView::slotPropertyChanged() language=%1").tqarg(language) << endl; + kdDebug() << TQString("KexiScriptDesignView::slotPropertyChanged() language=%1").arg(language) << endl; d->scriptaction->setInterpreterName( language ); // We assume Kross and the HighlightingInterface are using same // names for the support languages... @@ -201,7 +201,7 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope else { bool ok = d->scriptaction->setOption( property.name(), property.value() ); if(! ok) { - kdWarning() << TQString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").tqarg(TQString(property.name())) << endl; + kdWarning() << TQString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").arg(TQString(property.name())) << endl; return; } } @@ -214,12 +214,12 @@ void KexiScriptDesignView::execute() d->statusbrowser->clear(); TQTime time; time.start(); - d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").tqarg(d->scriptaction->name()) ); + d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").arg(d->scriptaction->name()) ); d->scriptaction->activate(); if( d->scriptaction->hadException() ) { TQString errormessage = d->scriptaction->getException()->getError(); - d->statusbrowser->append(TQString("<b>%2</b><br>").tqarg(TQStyleSheet::escape(errormessage)) ); + d->statusbrowser->append(TQString("<b>%2</b><br>").arg(TQStyleSheet::escape(errormessage)) ); TQString tracedetails = d->scriptaction->getException()->getTrace(); d->statusbrowser->append( TQStyleSheet::escape(tracedetails) ); @@ -229,7 +229,7 @@ void KexiScriptDesignView::execute() d->editor->setLineNo(lineno); } else { - d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").tqarg(time.elapsed()) ); + d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").arg(time.elapsed()) ); } } diff --git a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp index 8aec288b..08820522 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp @@ -76,7 +76,7 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction) "support in Kexi. The scripting API may change in details\n" "in the next Kexi version.\n" "For more information and documentation see\n%1" - ).tqarg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n"; + ).arg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n"; } KexiEditor::setText(code); // We assume Kross and the HighlightingInterface are using same diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp index cb66734d..84fbe4ec 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp @@ -95,7 +95,7 @@ bool KexiScriptPart::execute(KexiPart::Item* item, TQObject* sender) bool exec = (dontask == "yes"); if( !exec && dontask != "no" ) { exec = KMessageBox::warningContinueCancel(0, - i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").tqarg(scriptaction->text()), + i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").arg(scriptaction->text()), i18n("Execute Script?"), KGuiItem(i18n("Execute"), "exec"), dontAskAgainName, KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue; diff --git a/kexi/plugins/tables/kexitabledesignercommands.cpp b/kexi/plugins/tables/kexitabledesignercommands.cpp index 298363c4..c5368b26 100644 --- a/kexi/plugins/tables/kexitabledesignercommands.cpp +++ b/kexi/plugins/tables/kexitabledesignercommands.cpp @@ -72,8 +72,8 @@ ChangeFieldPropertyCommand::~ChangeFieldPropertyCommand() TQString ChangeFieldPropertyCommand::name() const { return i18n("Change \"%1\" property for table field from \"%2\" to \"%3\"") - .tqarg(m_alterTableAction.propertyName()).tqarg(m_oldValue.toString()) - .tqarg(m_alterTableAction.newValue().toString()); + .arg(m_alterTableAction.propertyName()).arg(m_oldValue.toString()) + .arg(m_alterTableAction.newValue().toString()); } TQString ChangeFieldPropertyCommand::debugString() @@ -81,15 +81,15 @@ TQString ChangeFieldPropertyCommand::debugString() TQString s( name() ); if (m_oldListData || m_listData) s += TQString("\nAnd list data from [%1]\n to [%2]") - .tqarg( m_oldListData ? + .arg( m_oldListData ? TQString("%1 -> %2") - .tqarg(m_oldListData->keysAsStringList().join(",")).tqarg(m_oldListData->names.join(",")) + .arg(m_oldListData->keysAsStringList().join(",")).arg(m_oldListData->names.join(",")) : TQString("<NONE>")) - .tqarg( m_listData ? + .arg( m_listData ? TQString("%1 -> %2") - .tqarg(m_listData->keysAsStringList().join(",")).tqarg(m_listData->names.join(",")) + .arg(m_listData->keysAsStringList().join(",")).arg(m_listData->names.join(",")) : TQString("<NONE>")); - return s + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid()); + return s + TQString(" (UID=%1)").arg(m_alterTableAction.uid()); } void ChangeFieldPropertyCommand::execute() @@ -136,9 +136,9 @@ RemoveFieldCommand::~RemoveFieldCommand() TQString RemoveFieldCommand::name() const { if (m_set) - return i18n("Remove table field \"%1\"").tqarg(m_alterTableAction.fieldName()); + return i18n("Remove table field \"%1\"").arg(m_alterTableAction.fieldName()); - return TQString("Remove empty row at position %1").tqarg(m_fieldIndex); + return TQString("Remove empty row at position %1").arg(m_fieldIndex); } void RemoveFieldCommand::execute() @@ -161,7 +161,7 @@ TQString RemoveFieldCommand::debugString() return name() + "\nAT ROW " + TQString::number(m_fieldIndex) + ", FIELD: " + (*m_set)["caption"].value().toString() - + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid()); + + TQString(" (UID=%1)").arg(m_alterTableAction.uid()); } KexiDB::AlterTableHandler::ActionBase* RemoveFieldCommand::createAction() @@ -192,7 +192,7 @@ InsertFieldCommand::~InsertFieldCommand() TQString InsertFieldCommand::name() const { - return i18n("Insert table field \"%1\"").tqarg(m_set["caption"].value().toString()); + return i18n("Insert table field \"%1\"").arg(m_set["caption"].value().toString()); } void InsertFieldCommand::execute() @@ -229,9 +229,9 @@ ChangePropertyVisibilityCommand::~ChangePropertyVisibilityCommand() TQString ChangePropertyVisibilityCommand::name() const { return TQString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"") - .tqarg(m_alterTableAction.propertyName()) - .tqarg(m_oldVisibility ? "true" : "false") - .tqarg(m_alterTableAction.newValue().toBool() ? "true" : "false"); + .arg(m_alterTableAction.propertyName()) + .arg(m_oldVisibility ? "true" : "false") + .arg(m_alterTableAction.newValue().toBool() ? "true" : "false"); } void ChangePropertyVisibilityCommand::execute() @@ -265,7 +265,7 @@ InsertEmptyRowCommand::~InsertEmptyRowCommand() TQString InsertEmptyRowCommand::name() const { - return TQString("Insert empty row at position %1").tqarg(m_row); + return TQString("Insert empty row at position %1").arg(m_row); } void InsertEmptyRowCommand::execute() diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp index 190e9834..ea337d36 100644 --- a/kexi/plugins/tables/kexitabledesignerview.cpp +++ b/kexi/plugins/tables/kexitabledesignerview.cpp @@ -495,11 +495,11 @@ void KexiTableDesignerView::slotTogglePrimaryKey() /* CommandGroup *setPrimaryKeyCommand; if (isSet) { setPrimaryKeyCommand = new CommandGroup(i18n("Set primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); } else { setPrimaryKeyCommand = new CommandGroup(i18n("Unset primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); } switchPrimaryKey(set, isSet, false, setPrimaryKeyCommand);*/ //addHistoryCommand( setPrimaryKeyCommand, false /* !execute */ ); @@ -687,8 +687,8 @@ void KexiTableDesignerView::slotBeforeCellChanged( //remember this action containing 2 subactions CommandGroup *changeCaptionAndNameCommand = new CommandGroup( i18n("Change \"%1\" field's name to \"%2\" and caption from \"%3\" to \"%4\"") - .tqarg(oldName).tqarg(propertySetForItem->property("name").value().toString()) - .tqarg(oldCaption).tqarg(newValue.toString() )); + .arg(oldName).arg(propertySetForItem->property("name").value().toString()) + .arg(oldCaption).arg(newValue.toString() )); changeCaptionAndNameCommand->addCommand( changeCaptionCommand ); // new ChangeFieldPropertyCommand( this, *propertySetForItem, // "caption", oldCaption, newValue) @@ -759,7 +759,7 @@ void KexiTableDesignerView::slotBeforeCellChanged( // *** this action contains subactions *** CommandGroup *changeDataTypeCommand = new CommandGroup( i18n("Change data type for field \"%1\" to \"%2\"") - .tqarg(set["name"].value().toString()).tqarg( KexiDB::Field::typeName( fieldType ) ) ); + .arg(set["name"].value().toString()).arg( KexiDB::Field::typeName( fieldType ) ) ); //kexipluginsdbg << "++++++++++" << slist << nlist << endl; @@ -968,13 +968,13 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //switchPrimaryKey(set, true); // this will be toplevel command setAutonumberCommand = new CommandGroup( - i18n("Assign autonumber for field \"%1\"").tqarg(set["name"].value().toString()) ); + i18n("Assign autonumber for field \"%1\"").arg(set["name"].value().toString()) ); toplevelCommand = setAutonumberCommand; d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setAutonumberCommand ); } else { setAutonumberCommand = new CommandGroup( - i18n("Remove autonumber from field \"%1\"").tqarg(set["name"].value().toString()) ); + i18n("Remove autonumber from field \"%1\"").arg(set["name"].value().toString()) ); //d->slotPropertyChanged_enabled = false; // set["autoIncrement"].setValue( TQVariant(false,1), false/*don't save old*/); // d->slotPropertyChanged_enabled = true; @@ -995,7 +995,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty setPrimaryKey = false; // this will be toplevel command CommandGroup *unsetIndexedOrUniquOrNotNullCommand = new CommandGroup( - i18n("Set \"%1\" property for field \"%2\"").tqarg(property.caption()).tqarg(set["name"].value().toString()) ); + i18n("Set \"%1\" property for field \"%2\"").arg(property.caption()).arg(set["name"].value().toString()) ); toplevelCommand = unsetIndexedOrUniquOrNotNullCommand; d->setPropertyValueIfNeeded( set, pname, TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); if (pname=="notNull") { @@ -1040,8 +1040,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty // kdDebug() << set["type"].value() << endl; // if (KexiDB::Field::typeGroup( set["type"].value().toInt() ) == (int)KexiDB::Field::TextGroup) { CommandGroup* changeFieldTypeCommand = new CommandGroup( - i18n("Change type for field \"%1\" to \"%2\"").tqarg(set["name"].value().toString()) - .tqarg(typeName) ); + i18n("Change type for field \"%1\" to \"%2\"").arg(set["name"].value().toString()) + .arg(typeName) ); d->setPropertyValueIfNeeded( set, "subType", property.value(), property.oldValue(), changeFieldTypeCommand ); @@ -1085,7 +1085,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //this action contains subactions CommandGroup *setPrimaryKeyCommand = new CommandGroup( i18n("Set primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); if (toplevelCommand) toplevelCommand->addCommand( setPrimaryKeyCommand ); else @@ -1111,7 +1111,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //remember this action containing 2 subactions CommandGroup *setPrimaryKeyCommand = new CommandGroup( i18n("Unset primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); if (toplevelCommand) toplevelCommand->addCommand( setPrimaryKeyCommand ); else @@ -1147,10 +1147,10 @@ void KexiTableDesignerView::slotRowInserted() } void KexiTableDesignerView::slotAboutToDeleteRow( - KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint) + KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint) { Q_UNUSED(result) - Q_UNUSED(tqrepaint) + Q_UNUSED(repaint) if (item[COLUMN_ID_ICON].toString()=="key") d->primaryKeyExists = false; @@ -1213,7 +1213,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be "for creating relations between database tables. " "Do you want to add primary key automatically now?</p>" "<p>If you want to add a primary key by hand, press \"Cancel\" " - "to cancel saving table design.</p>").tqarg(schema.name()), + "to cancel saving table design.</p>").arg(schema.name()), TQString(), KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(), "autogeneratePrimaryKeysOnTableDesignSaving"); if (questionRes==KMessageBox::Cancel) { @@ -1229,9 +1229,9 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be KoProperty::Set *set = d->sets->at(i); if (set) { if ((*set)["name"].value().toString() - == pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex)) + == pkFieldName.arg(idIndex==1?TQString() : TQString::number(idIndex)) || (*set)["caption"].value().toString() - == pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex))) + == pkFieldCaption.arg(idIndex==1?TQString() : TQString::number(idIndex))) { //try next id index i = 0; @@ -1241,8 +1241,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be } i++; } - pkFieldName = pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex)); - pkFieldCaption = pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex)); + pkFieldName = pkFieldName.arg(idIndex==1?TQString() : TQString::number(idIndex)); + pkFieldCaption = pkFieldCaption.arg(idIndex==1?TQString() : TQString::number(idIndex)); //ok, add PK with such unique name d->view->insertEmptyRow(0); d->view->setCursorPosition(0, COLUMN_ID_CAPTION); @@ -1273,7 +1273,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be if (beSilent) { kexipluginswarn << TQString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...") - .tqarg(i+1) << endl; + .arg(i+1) << endl; } else { d->view->setCursorPosition(i, COLUMN_ID_CAPTION); @@ -1304,7 +1304,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be if (beSilent) { kexipluginswarn << TQString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'") - .tqarg((*b)["name"].value().toString()) << endl; + .arg((*b)["name"].value().toString()) << endl; } else { d->view->setCursorPosition(i, COLUMN_ID_CAPTION); @@ -1313,7 +1313,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be KMessageBox::sorry(this, i18n("You have added \"%1\" field name twice.\nField names cannot be repeated. " "Correct name of the field.") - .tqarg((*b)["name"].value().toString()) ); + .arg((*b)["name"].value().toString()) ); } res = cancelled; } @@ -1457,7 +1457,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) this, *conn, *tempData()->table, i18n("You are about to change the design of table \"%1\" " "but following objects using this table are opened:") - .tqarg(tempData()->table->name())); + .arg(tempData()->table->name())); } if (res == true) { @@ -1659,7 +1659,7 @@ void KexiTableDesignerView::slotAboutToShowContextMenu() if (captionOrName.isEmpty()) captionOrName = set["name"].value().toString(); //! @todo show "field" icon - d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").tqarg(captionOrName) ); + d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").arg(captionOrName) ); } else { d->contextMenuTitle->setTitle( i18n("Empty table row", "Empty Row") ); diff --git a/kexi/plugins/tables/kexitabledesignerview.h b/kexi/plugins/tables/kexitabledesignerview.h index 13ce495d..5b9d0215 100644 --- a/kexi/plugins/tables/kexitabledesignerview.h +++ b/kexi/plugins/tables/kexitabledesignerview.h @@ -146,10 +146,10 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte //! Called before row inserting in tableview. void slotRowInserted(); -// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool tqrepaint); +// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool repaint); //! Called before row deleting in tableview. - void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint); + void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint); /*! Called after any property has been changed in the current property set, to perform some actions (like updating other dependent properties) */ diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp index 4efd237a..55c8be5d 100644 --- a/kexi/plugins/tables/kexitablepart.cpp +++ b/kexi/plugins/tables/kexitablepart.cpp @@ -137,7 +137,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item) tristate res = KexiTablePart::askForClosingObjectsUsingTableSchema( win, *conn, *sch, i18n("You are about to remove table \"%1\" but following objects using this table are opened:") - .tqarg(sch->name())); + .arg(sch->name())); return true == conn->dropTable( sch ); } //last chance: just remove item @@ -182,7 +182,7 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(TQWidget *parent, K TQString openedObjectsStr = "<ul>"; for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners); it.current(); ++it) { - openedObjectsStr += TQString("<li>%1</li>").tqarg(it.current()->listenerInfoString); + openedObjectsStr += TQString("<li>%1</li>").arg(it.current()->listenerInfoString); } openedObjectsStr += "</ul>"; int r = KMessageBox::questionYesNo(parent, diff --git a/kexi/tests/altertable/1.kexi b/kexi/tests/altertable/1.kexi Binary files differindex 8c13ad39..5a1b4ebd 100644 --- a/kexi/tests/altertable/1.kexi +++ b/kexi/tests/altertable/1.kexi diff --git a/kexi/tests/altertable/altertable.cpp b/kexi/tests/altertable/altertable.cpp index 6155eb63..0155ed87 100644 --- a/kexi/tests/altertable/altertable.cpp +++ b/kexi/tests/altertable/altertable.cpp @@ -56,7 +56,7 @@ KexiProject* prj = 0; void showError(const TQString& msg) { TQString msg_(msg); - msg_.prepend(TQString("Error at line %1: ").tqarg(testLineNumber)); + msg_.prepend(TQString("Error at line %1: ").arg(testLineNumber)); kdDebug() << msg_ << endl; } @@ -119,7 +119,7 @@ tristate readLineFromTestFile(const TQString& expectedCommandName = TQString()) } if (!expectedCommandName.isEmpty() && testFileLine[0]!=expectedCommandName) { showError( TQString("Invalid command '%1', expected '%2'") - .tqarg(testFileLine[0]).tqarg(expectedCommandName)); + .arg(testFileLine[0]).arg(expectedCommandName)); return false; } if (quoted) { @@ -136,9 +136,9 @@ bool checkItemsNumber(int expectedNumberOfItems, int optionalNumberOfItems = -1) ok = ok || optionalNumberOfItems==(int)testFileLine.count(); if (!ok) { TQString msg = TQString("Invalid number of args (%1) for command '%2', expected: %3") - .tqarg(testFileLine.count()).tqarg(testFileLine[0]).tqarg(expectedNumberOfItems); + .arg(testFileLine.count()).arg(testFileLine[0]).arg(expectedNumberOfItems); if (optionalNumberOfItems>0) - msg.append( TQString(" or %1").tqarg(optionalNumberOfItems) ); + msg.append( TQString(" or %1").arg(optionalNumberOfItems) ); showError( msg ); return false; } @@ -167,7 +167,7 @@ TQVariant::Type typeNameToTQVariantType(const TQCString& name_) if (name=="longlong") return TQVariant::LongLong; //todo more types - showError(TQString("Invalid type '%1'").tqarg(name_)); + showError(TQString("Invalid type '%1'").arg(name_)); return TQVariant::Invalid; } @@ -202,7 +202,7 @@ static int getNumber(const TQString& argument, bool& ok) else { result = argument.toInt(&ok); if (!ok) { - showError(TQString("Invalid value '%1'").tqarg(argument)); + showError(TQString("Invalid value '%1'").arg(argument)); return -1; } } @@ -248,7 +248,7 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI else { if (!castStringToTQVariant(propertyValueString, propertyType, newValue)) { showError( TQString("Could not set property '%1' value '%2' of type '%3'") - .tqarg(propertyName).tqarg(propertyValueString).tqarg(propertyType) ); + .arg(propertyName).arg(propertyValueString).arg(propertyType) ); return false; } } @@ -283,7 +283,7 @@ bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, TQString& schemaDebugS schemaDebugString = designerIface->debugStringForCurrentTableSchema(result); if (true!=result) { showError( TQString("Loading modified schema failed. Result: %1") - .tqarg(~result ? "cancelled" : "false") ); + .arg(~result ? "cancelled" : "false") ); return false; } schemaDebugString.remove(TQRegExp(",$")); //no need to have "," at the end of lines @@ -298,7 +298,7 @@ bool AlterTableTester::showSchema(KexiDialogBase* dlg, bool copyToClipboard) if (copyToClipboard) TQApplication::tqclipboard()->setText( schemaDebugString ); else - kdDebug() << TQString("Schema for '%1' table:\n").tqarg(dlg->partItem()->name()) + kdDebug() << TQString("Schema for '%1' table:\n").arg(dlg->partItem()->name()) + schemaDebugString + "\nendSchema" << endl; return true; } @@ -354,8 +354,8 @@ bool AlterTableTester::checkSchema(KexiDialogBase* dlg) if (!getSchemaDump(dlg, schemaDebugString)) return false; bool result = checkInternal(dlg, schemaDebugString, "endSchema", true /*skipColonsAndStripWhiteSpace*/); - kdDebug() << TQString("Schema check for table '%1': %2").tqarg(dlg->partItem()->name()) - .tqarg(result ? "OK" : "Failed") << endl; + kdDebug() << TQString("Schema check for table '%1': %2").arg(dlg->partItem()->name()) + .arg(result ? "OK" : "Failed") << endl; return result; } @@ -367,7 +367,7 @@ bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, TQString& actionsDebu return false; tristate result = designerIface->simulateAlterTableExecution(&actionsDebugString); if (true!=result) { - showError( TQString("Computing simplified actions for table '%1' failed.").tqarg(dlg->partItem()->name()) ); + showError( TQString("Computing simplified actions for table '%1' failed.").arg(dlg->partItem()->name()) ); return false; } return true; @@ -381,7 +381,7 @@ bool AlterTableTester::showActions(KexiDialogBase* dlg, bool copyToClipboard) if (copyToClipboard) TQApplication::tqclipboard()->setText( actionsDebugString ); else - kdDebug() << TQString("Simplified actions for altering table '%1':\n").tqarg(dlg->partItem()->name()) + kdDebug() << TQString("Simplified actions for altering table '%1':\n").arg(dlg->partItem()->name()) + actionsDebugString+"\n" << endl; return true; } @@ -392,8 +392,8 @@ bool AlterTableTester::checkActions(KexiDialogBase* dlg) if (!getActionsDump(dlg, actionsDebugString)) return false; bool result = checkInternal(dlg, actionsDebugString, "endActions", true /*skipColonsAndStripWhiteSpace*/); - kdDebug() << TQString("Actions check for table '%1': %2").tqarg(dlg->partItem()->name()) - .tqarg(result ? "OK" : "Failed") << endl; + kdDebug() << TQString("Actions check for table '%1': %2").arg(dlg->partItem()->name()) + .arg(result ? "OK" : "Failed") << endl; return result; } @@ -405,7 +405,7 @@ bool AlterTableTester::saveTableDesign(KexiDialogBase* dlg) return false; tristate result = designerIface->executeRealAlterTable(); if (true!=result) { - showError( TQString("Saving design of table '%1' failed.").tqarg(dlg->partItem()->name()) ); + showError( TQString("Saving design of table '%1' failed.").arg(dlg->partItem()->name()) ); return false; } return true; @@ -441,7 +441,7 @@ bool AlterTableTester::showTableData(KexiDialogBase* dlg, bool copyToClipboard) if (copyToClipboard) TQApplication::tqclipboard()->setText( dataString ); else - kdDebug() << TQString("Contents of table '%1':\n").tqarg(dlg->partItem()->name())+dataString+"\n" << endl; + kdDebug() << TQString("Contents of table '%1':\n").arg(dlg->partItem()->name())+dataString+"\n" << endl; return true; } @@ -451,8 +451,8 @@ bool AlterTableTester::checkTableData(KexiDialogBase* dlg) if (!getTableDataDump(dlg, dataString)) return false; bool result = checkInternal(dlg, dataString, "endTableData", false /*!skipColonsAndStripWhiteSpace*/); - kdDebug() << TQString("Table '%1' contents: %2").tqarg(dlg->partItem()->name()) - .tqarg(result ? "OK" : "Failed") << endl; + kdDebug() << TQString("Table '%1' contents: %2").arg(dlg->partItem()->name()) + .arg(result ? "OK" : "Failed") << endl; return result; } @@ -462,8 +462,8 @@ bool AlterTableTester::closeWindow(KexiDialogBase* dlg) return true; TQString name = dlg->partItem()->name(); tristate result = true == win->closeDialog(dlg, true/*layoutTaskBar*/, true/*doNotSaveChanges*/); - kdDebug() << TQString("Closing window for table '%1': %2").tqarg(name) - .tqarg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl; + kdDebug() << TQString("Closing window for table '%1': %2").arg(name) + .arg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl; return result == true; } @@ -492,13 +492,13 @@ tristate AlterTableTester::run(bool &closeAppRequested) TQString tableName(testFileLine[1]); KexiPart::Item *item = prj->itemForMimeType("kexi/table", tableName); if (!item) { - showError(TQString("No such table '%1'").tqarg(tableName)); + showError(TQString("No such table '%1'").arg(tableName)); return false; } bool openingCancelled; KexiDialogBase* dlg = win->openObject(item, Kexi::DesignViewMode, openingCancelled); if (!dlg) { - showError(TQString("Could not open table '%1'").tqarg(item->name())); + showError(TQString("Could not open table '%1'").arg(item->name())); return false; } KexiTableDesignerInterface* designerIface @@ -570,7 +570,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) bool ok; variableI = command.mid(2).toInt(&ok); if (!ok) { - showError(TQString("Invalid variable initialization '%1'").tqarg(command)); + showError(TQString("Invalid variable initialization '%1'").arg(command)); return false; } continue; @@ -622,7 +622,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) if (command=="stop") { if (!checkItemsNumber(1)) return false; - kdDebug() << TQString("Test STOPPED at line %1.").tqarg(testLineNumber) << endl; + kdDebug() << TQString("Test STOPPED at line %1.").arg(testLineNumber) << endl; break; } else if (command=="closeWindow") { @@ -640,7 +640,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) break; } else { - showError( TQString("No such command '%1'").tqarg(command) ); + showError( TQString("No such command '%1'").arg(command) ); return false; } } @@ -674,7 +674,7 @@ int main(int argc, char *argv[]) testFilename = argv[argc-1]; testFile.setName(testFilename); if (!testFile.open(IO_ReadOnly)) { - kdWarning() << TQString("Opening test file %1 failed.").tqarg(testFilename) << endl; + kdWarning() << TQString("Opening test file %1 failed.").arg(testFilename) << endl; return quit(1); } //load db name @@ -704,10 +704,10 @@ int main(int argc, char *argv[]) res = tester.run(closeAppRequested); if (true != res) { if (false == res) - kdWarning() << TQString("Running test for file '%1' failed.").tqarg(testFilename) << endl; + kdWarning() << TQString("Running test for file '%1' failed.").arg(testFilename) << endl; return quit(res==false ? 1 : 0); } - kdDebug() << TQString("Tests from file '%1': OK").tqarg(testFilename) << endl; + kdDebug() << TQString("Tests from file '%1': OK").arg(testFilename) << endl; result = (closeOnFinish || closeAppRequested) ? 0 : tqApp->exec(); quit(result); return result; diff --git a/kexi/tests/newapi/dr_prop_test.h b/kexi/tests/newapi/dr_prop_test.h index d7bfd5b3..2cbee8b2 100644 --- a/kexi/tests/newapi/dr_prop_test.h +++ b/kexi/tests/newapi/dr_prop_test.h @@ -23,7 +23,7 @@ int drPropTest() { TQValueList<TQCString> names = driver->propertyNames(); - kdDebug() << TQString("%1 properties found:").tqarg(names.count()) << endl; + kdDebug() << TQString("%1 properties found:").arg(names.count()) << endl; for (TQValueList<TQCString>::ConstIterator it = names.constBegin(); it!=names.constEnd(); ++it) { kdDebug() << " - " << (*it) << ":" << " caption=\"" << driver->propertyCaption(*it) << "\"" diff --git a/kexi/tests/newapi/main.cpp b/kexi/tests/newapi/main.cpp index d02dbc9b..9eaff2ab 100644 --- a/kexi/tests/newapi/main.cpp +++ b/kexi/tests/newapi/main.cpp @@ -137,7 +137,7 @@ int main(int argc, char** argv) } test_name = args->getOption("test"); if (!tests.contains(test_name)) { - kdDebug() << TQString("No such test \"%1\". Use --help.").tqarg(test_name.data()) << endl; + kdDebug() << TQString("No such test \"%1\". Use --help.").arg(test_name.data()) << endl; RETURN(1); } @@ -152,7 +152,7 @@ int main(int argc, char** argv) db_name_required = false; } if ((int)args->count()<minargs) { - kdDebug() << TQString("Not enough args (%1 required). Use --help.").tqarg(minargs) << endl; + kdDebug() << TQString("Not enough args (%1 required). Use --help.").arg(minargs) << endl; RETURN(1); } diff --git a/kexi/tests/newapi/parser_test.h b/kexi/tests/newapi/parser_test.h index 90c25d7c..d02017ec 100644 --- a/kexi/tests/newapi/parser_test.h +++ b/kexi/tests/newapi/parser_test.h @@ -42,8 +42,8 @@ int parserTest(const char *st, const TQStringList& params) } else { KexiDB::ParserError err = parser.error(); - kdDebug() << TQString("Error = %1\ntype = %2\nat = %3").tqarg(err.error()) - .tqarg(err.type()).tqarg(err.at()) << endl; + kdDebug() << TQString("Error = %1\ntype = %2\nat = %3").arg(err.error()) + .arg(err.type()).arg(err.at()) << endl; r = 1; } delete q; diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp index 4c279382..af893ddf 100644 --- a/kexi/widget/kexibrowser.cpp +++ b/kexi/widget/kexibrowser.cpp @@ -435,7 +435,7 @@ KexiBrowser::slotContextMenu(KListView* /*list*/, TQListViewItem *item, const TQ pm->changeTitle(m_partPopupTitle_id, *bit->pixmap(0), title_text); /* KexiPart::Part* part = Kexi::partManager().part(bit->info()); if (part) - m_newObjectAction->setText(i18n("&Create Object: %1...").tqarg( part->instanceName() )); + m_newObjectAction->setText(i18n("&Create Object: %1...").arg( part->instanceName() )); else m_newObjectAction->setText(i18n("&Create Object...")); m_newObjectAction->setIconSet( SmallIconSet(bit->info()->itemIcon()) );*/ @@ -523,14 +523,14 @@ KexiBrowser::slotSelectionChanged(TQListViewItem* i) m_prevSelectedPart = part; if (part) { if (m_newObjectAction) { - m_newObjectAction->setText(i18n("&Create Object: %1...").tqarg( part->instanceCaption() )); + m_newObjectAction->setText(i18n("&Create Object: %1...").arg( part->instanceCaption() )); m_newObjectAction->setIcon( part->info()->createItemIcon() ); if (m_features & Toolbar) { m_newObjectToolButton->setIconSet( part->info()->createItemIcon() ); TQToolTip::add(m_newObjectToolButton, - i18n("Create object: %1").tqarg( part->instanceCaption().lower() )); + i18n("Create object: %1").arg( part->instanceCaption().lower() )); TQWhatsThis::add(m_newObjectToolButton, - i18n("Creates a new object: %1").tqarg( part->instanceCaption().lower() )); + i18n("Creates a new object: %1").arg( part->instanceCaption().lower() )); } } } else { diff --git a/kexi/widget/kexicharencodingcombobox.cpp b/kexi/widget/kexicharencodingcombobox.cpp index de6254b7..84038dcd 100644 --- a/kexi/widget/kexicharencodingcombobox.cpp +++ b/kexi/widget/kexicharencodingcombobox.cpp @@ -66,7 +66,7 @@ KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox( if (!defaultEncodingDescriptiveName.isEmpty()) { m_defaultEncodingAdded = true; TQString desc = i18n("Text encoding: Default", "Default: %1") - .tqarg(defaultEncodingDescriptiveName); + .arg(defaultEncodingDescriptiveName); insertItem( desc, 0 ); if (_selectedEncoding==defaultEncoding) { setCurrentItem(0); diff --git a/kexi/widget/kexicustompropertyfactory_p.cpp b/kexi/widget/kexicustompropertyfactory_p.cpp index e06b084b..2cdd0bfc 100644 --- a/kexi/widget/kexicustompropertyfactory_p.cpp +++ b/kexi/widget/kexicustompropertyfactory_p.cpp @@ -101,7 +101,7 @@ void KexiIdentifierPropertyEdit::setValue(const TQVariant &value, bool emitChang TQString identifier( KexiUtils::string2Identifier(string) ); if (identifier!=string) kdDebug() << TQString("KexiIdentifierPropertyEdit::setValue(): " - "String \"%1\" converted to identifier \"%2\".").tqarg(string).tqarg(identifier) << endl; + "String \"%1\" converted to identifier \"%2\".").arg(string).arg(identifier) << endl; StringEdit::setValue( identifier, emitChange ); } diff --git a/kexi/widget/kexidataawareview.cpp b/kexi/widget/kexidataawareview.cpp index c6eb39d3..29bd06d0 100644 --- a/kexi/widget/kexidataawareview.cpp +++ b/kexi/widget/kexidataawareview.cpp @@ -241,7 +241,7 @@ void KexiDataAwareView::slotCellSelected(int /*col*/, int row) void KexiDataAwareView::deleteAllRows() { - m_dataAwareObject->deleteAllRows(true/*ask*/, true/*tqrepaint*/); + m_dataAwareObject->deleteAllRows(true/*ask*/, true/*repaint*/); } void KexiDataAwareView::deleteCurrentRow() diff --git a/kexi/widget/kexidatatable.cpp b/kexi/widget/kexidatatable.cpp index 09680b14..0be99a4a 100644 --- a/kexi/widget/kexidatatable.cpp +++ b/kexi/widget/kexidatatable.cpp @@ -42,10 +42,10 @@ KexiDataTable::KexiDataTable(KexiMainWindow *mainWin, TQWidget *parent, KexiTableView *view; if (dbAware) view = new KexiDataTableView(this, - TQString("%1_datatableview").tqarg(name ? name : "KexiDataTableView").latin1()); + TQString("%1_datatableview").arg(name ? name : "KexiDataTableView").latin1()); else view = new KexiTableView(0, this, - TQString("%1_tableview").tqarg(name ? name : "KexiTableView").latin1()); + TQString("%1_tableview").arg(name ? name : "KexiTableView").latin1()); KexiDataAwareView::init( view, view, view ); } diff --git a/kexi/widget/kexidbconnectionwidgetbase.ui b/kexi/widget/kexidbconnectionwidgetbase.ui index 463d8797..02fe2853 100644 --- a/kexi/widget/kexidbconnectionwidgetbase.ui +++ b/kexi/widget/kexidbconnectionwidgetbase.ui @@ -337,7 +337,7 @@ <property name="text"> <string>&Title (optional):</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignTop</set> </property> <property name="buddy" stdset="0"> diff --git a/kexi/widget/kexifieldcombobox.cpp b/kexi/widget/kexifieldcombobox.cpp index b9c64635..d41d93a2 100644 --- a/kexi/widget/kexifieldcombobox.cpp +++ b/kexi/widget/kexifieldcombobox.cpp @@ -182,7 +182,7 @@ void KexiFieldComboBox::setFieldOrExpression(int index) index++; //skip 1st empty item if (index>=count()) { kexiwarn << TQString("KexiFieldComboBox::setFieldOrExpression(int index): index %1 " - "out of range (0..%2)").tqarg(index).tqarg(count()-1) << endl; + "out of range (0..%2)").arg(index).arg(count()-1) << endl; index = -1; } if (index<=0) { diff --git a/kexi/widget/kexiprjtypeselectorbase.ui b/kexi/widget/kexiprjtypeselectorbase.ui index 059bf080..c6ff117a 100644 --- a/kexi/widget/kexiprjtypeselectorbase.ui +++ b/kexi/widget/kexiprjtypeselectorbase.ui @@ -88,7 +88,7 @@ <property name="scaledContents"> <bool>true</bool> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -110,7 +110,7 @@ <property name="scaledContents"> <bool>true</bool> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> diff --git a/kexi/widget/kexipropertyeditorview.cpp b/kexi/widget/kexipropertyeditorview.cpp index 122d9514..e2a5ac31 100644 --- a/kexi/widget/kexipropertyeditorview.cpp +++ b/kexi/widget/kexipropertyeditorview.cpp @@ -76,7 +76,7 @@ void KexiObjectInfoLabel::updateName() if (txt.isEmpty()) txt = m_objectName; else if (!m_objectName.isEmpty()) - txt += TQString(" \"%1\"").tqarg(m_objectName); + txt += TQString(" \"%1\"").arg(m_objectName); m_objectNameLabel->setText(txt); } diff --git a/kexi/widget/kexiscrollview.cpp b/kexi/widget/kexiscrollview.cpp index 7bdfd12e..04beace6 100644 --- a/kexi/widget/kexiscrollview.cpp +++ b/kexi/widget/kexiscrollview.cpp @@ -173,11 +173,11 @@ KexiScrollView::refreshContentsSize() change = true; } if (change) { - tqrepaint(); - viewport()->tqrepaint(); + repaint(); + viewport()->repaint(); repaintContents(); updateContents(0, 0, 2000,2000); - clipper()->tqrepaint(); + clipper()->repaint(); resizeContents(w, h); } @@ -257,8 +257,8 @@ KexiScrollView::contentsMouseMoveEvent(TQMouseEvent *ev) for(TQObject *o = list->first(); o; o = list->next()) { TQWidget *w = (TQWidget*)o; - tmpx = TQMAX(tmpx, (w->tqgeometry().right() + 10)); - tmpy = TQMAX(tmpy, (w->tqgeometry().bottom() + 10)); + tmpx = TQMAX(tmpx, (w->geometry().right() + 10)); + tmpy = TQMAX(tmpy, (w->geometry().bottom() + 10)); } delete list; diff --git a/kexi/widget/pixmapcollection.cpp b/kexi/widget/pixmapcollection.cpp index 19875521..cee4f360 100644 --- a/kexi/widget/pixmapcollection.cpp +++ b/kexi/widget/pixmapcollection.cpp @@ -232,7 +232,7 @@ TQString LoadIconDialog::iconName() /// Pixmap Collection Editor Dialog PixmapCollectionEditor::PixmapCollectionEditor(PixmapCollection *collection, TQWidget *parent) : KDialogBase(parent, "pixcollection_dialog", true, - i18n("Edit Pixmap Collection: %1").tqarg(collection->collectionName()), Close, Close, false) + i18n("Edit Pixmap Collection: %1").arg(collection->collectionName()), Close, Close, false) { m_collection = collection; TQFrame *frame = makeMainWidget(); @@ -312,7 +312,7 @@ PixmapCollectionEditor::removeItem() int confirm = KMessageBox::questionYesNo(parentWidget(), TQString("<qt>")+ i18n("Do you want to remove item \"%1\" from collection \"%2\"?") - .tqarg(item->text()).tqarg(m_collection->collectionName()) + "</qt>"); + .arg(item->text()).arg(m_collection->collectionName()) + "</qt>"); if(confirm == KMessageBox::No) return; @@ -373,7 +373,7 @@ PixmapCollectionEditor::displayMenu(TQIconViewItem *it, const TQPoint &p) //// A Dialog to choose a pixmap from the PixmapCollection PixmapCollectionChooser::PixmapCollectionChooser(PixmapCollection *collection, const TQString &selectedItem, TQWidget *parent) -: KDialogBase(parent, "pixchoose_dialog", true, i18n("Select Pixmap From %1").tqarg(collection->collectionName()), +: KDialogBase(parent, "pixchoose_dialog", true, i18n("Select Pixmap From %1").arg(collection->collectionName()), User1|Ok|Cancel, Ok, false, KGuiItem(i18n("Edit Collection..."))) { m_collection = collection; diff --git a/kexi/widget/relations/kexirelationview.h b/kexi/widget/relations/kexirelationview.h index 404fbcbe..33d988b9 100644 --- a/kexi/widget/relations/kexirelationview.h +++ b/kexi/widget/relations/kexirelationview.h @@ -78,7 +78,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public TQScrollView TablesDict* tables() { return &m_tables; } /*! Adds a table \a t to the area. This changes only visual representation. - If \a rect is valid, table widget tqgeometry will be initialized. + If \a rect is valid, table widget geometry will be initialized. \return added table container or 0 on failure. */ KexiRelationViewTableContainer* addTableContainer(KexiDB::TableSchema *t, diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp index ea1682f7..b40b9761 100644 --- a/kexi/widget/relations/kexirelationviewtable.cpp +++ b/kexi/widget/relations/kexirelationviewtable.cpp @@ -140,7 +140,7 @@ void KexiRelationViewTableContainer::setFocus() m_tableView->setPalette(p);*/ raise(); - tqrepaint(); + repaint(); emit gotFocus(); } @@ -166,7 +166,7 @@ void KexiRelationViewTableContainer::unsetFocus() m_tableView->setPalette(p);*/ clearFocus(); - tqrepaint(); + repaint(); } diff --git a/kexi/widget/relations/kexirelationwidget.h b/kexi/widget/relations/kexirelationwidget.h index 713ce8fc..6899a434 100644 --- a/kexi/widget/relations/kexirelationwidget.h +++ b/kexi/widget/relations/kexirelationwidget.h @@ -76,7 +76,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationWidget : public KexiViewBase public slots: /*! Adds a table \a t to the area. This changes only visual representation. - If \a rect is valid, table widget rtqgeometry will be initialized. + If \a rect is valid, table widget rgeometry will be initialized. */ void addTable(KexiDB::TableSchema *t, const TQRect &rect = TQRect()); diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index 37ababa5..f45eb0e2 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -350,8 +350,8 @@ bool KexiComboBoxTableEdit::eventFilter( TQObject *o, TQEvent *e ) if (!column()->isReadOnly() && e->type()==TQEvent::MouseButtonPress && m_scrollView) { TQPoint gp = TQT_TQMOUSEEVENT(e)->globalPos() + TQPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button)); - TQRect r(d->button->mapToGlobal(d->button->tqgeometry().topLeft()), - d->button->mapToGlobal(d->button->tqgeometry().bottomRight())); + TQRect r(d->button->mapToGlobal(d->button->geometry().topLeft()), + d->button->mapToGlobal(d->button->geometry().bottomRight())); if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(popup()) && popup()->isVisible() && r.contains( gp )) { m_mouseBtnPressedWhenPopupVisible = true; } diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp index 721cb2d8..ce0b7695 100644 --- a/kexi/widget/tableview/kexidataawareobjectiface.cpp +++ b/kexi/widget/tableview/kexidataawareobjectiface.cpp @@ -539,8 +539,8 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo if ( forceSet || m_curRow != newrow || m_curCol != newcol ) { - kexidbg << "setCursorPosition(): " <<TQString("old:%1,%2 new:%3,%4").tqarg(m_curCol) - .tqarg(m_curRow).tqarg(newcol).tqarg(newrow) << endl; + kexidbg << "setCursorPosition(): " <<TQString("old:%1,%2 new:%3,%4").arg(m_curCol) + .arg(m_curRow).arg(newcol).arg(newrow) << endl; // cursor moved: get rid of editor if (m_editor) { @@ -645,7 +645,7 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo } else { kdDebug(44021) << TQString("NOW item at %1 (%2) is current") - .tqarg(m_curRow).tqarg((ulong)itemAt(m_curRow)) << endl; + .arg(m_curRow).arg((ulong)itemAt(m_curRow)) << endl; //NOT EFFECTIVE!!!!!!!!!!! //set item iterator if (!newRowInserted && isInsertingEnabled() && m_currentItem == m_insertItem && m_curRow == (rows()-1)) { @@ -838,7 +838,7 @@ bool KexiDataAwareObjectInterface::cancelRowEdit() // viewport()->width(), d->rowHeight*3 + (m_navPanel ? m_navPanel->height() : 0)*3 ); // updateContents(); //js: above did not work well so we do that dirty updateWidgetContents(); -//TODO: still doesn't tqrepaint properly!! +//TODO: still doesn't repaint properly!! // TQSize s(tableSize()); // resizeContents(s.width(), s.height()); updateWidgetContentsSize(); @@ -940,7 +940,7 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (!m_errorMessagePopup) { // m_errorMessagePopup->close(); m_errorMessagePopup = new KexiArrowTip( - i18n("Error: %1").tqarg(m_editor->columnInfo()->field->typeName())+"?", + i18n("Error: %1").arg(m_editor->columnInfo()->field->typeName())+"?", dynamic_cast<TQWidget*>(this)); m_errorMessagePopup->move( par->mapToGlobal(edit->pos()) + TQPoint(6, edit->height() + 0) ); @@ -954,8 +954,8 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (m_editor->field()->isNotNull() && !autoIncColumnCanBeOmitted) { kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): NULL NOT ALLOWED!" << endl; res = Validator::Error; -// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName()) - msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName()) +// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName()) + msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); desc = i18n("The column's constraint is declared as NOT NULL."); editCurrentCellAgain = true; @@ -976,8 +976,8 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (m_editor->field()->isNotEmpty() && !autoIncColumnCanBeOmitted) { kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): EMPTY NOT ALLOWED!" << endl; res = Validator::Error; -// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName()) - msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName()) +// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName()) + msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); desc = i18n("The column's constraint is declared as NOT EMPTY."); editCurrentCellAgain = true; @@ -994,8 +994,8 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (m_editor->field()->isNotNull() && !autoIncColumnCanBeOmitted) { kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): NEITHER NULL NOR EMPTY VALUE CAN BE SET!" << endl; res = Validator::Error; -// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName()) - msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName()) +// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName()) + msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); desc = i18n("The column's constraint is declared as NOT EMPTY and NOT NULL."); editCurrentCellAgain = true; @@ -1251,7 +1251,7 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row) m_curRow++; } - m_data->insertRow(*newItem, row, true /*tqrepaint*/); + m_data->insertRow(*newItem, row, true /*repaint*/); if (changeCurrentRow) { //update iter... @@ -1281,15 +1281,15 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row) */ } -void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool tqrepaint) +void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool repaint) { int row = m_data->findRef(item); - slotRowInserted( item, row, tqrepaint ); + slotRowInserted( item, row, repaint ); } -void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool tqrepaint) +void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool repaint) { - if (tqrepaint && (int)row<rows()) { + if (repaint && (int)row<rows()) { updateWidgetContentsSize(); /* updateAllVisibleRowsBelow() used instead @@ -1317,7 +1317,7 @@ void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uin } } -tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint) +tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint) { if (!hasData()) return true; @@ -1331,7 +1331,7 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint) tableName.append("\""); } if (KMessageBox::Cancel == KMessageBox::warningContinueCancel(dynamic_cast<TQWidget*>(this), - i18n("Do you want to clear the contents of table %1?").tqarg(tableName), + i18n("Do you want to clear the contents of table %1?").arg(tableName), 0, KGuiItem(i18n("&Clear Contents")) )) return cancelled; } @@ -1339,10 +1339,10 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint) cancelRowEdit(); // acceptRowEdit(); // m_verticalHeader->clear(); - const bool repaintLater = tqrepaint && m_spreadSheetMode; + const bool repaintLater = repaint && m_spreadSheetMode; const int oldRows = rows(); - bool res = m_data->deleteAllRows(tqrepaint && !repaintLater); + bool res = m_data->deleteAllRows(repaint && !repaintLater); if (res) { if (m_spreadSheetMode) { @@ -1359,21 +1359,21 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint) // m_verticalHeader->setCurrentRow(-1); // d->pUpdateTimer->start(1,true); -// if (tqrepaint) -// viewport()->tqrepaint(); +// if (repaint) +// viewport()->repaint(); return res; } -void KexiDataAwareObjectInterface::clearColumns(bool tqrepaint) +void KexiDataAwareObjectInterface::clearColumns(bool repaint) { cancelRowEdit(); m_data->clearInternal(); - clearColumnsInternal(tqrepaint); + clearColumnsInternal(repaint); updateIndicesForVisibleValues(); - if (tqrepaint) -// viewport()->tqrepaint(); + if (repaint) +// viewport()->repaint(); //OK? updateWidgetContents(); @@ -1393,7 +1393,7 @@ void KexiDataAwareObjectInterface::clearColumns(bool tqrepaint) m_verticalHeader->setCurrentRow(-1); - viewport()->tqrepaint(); + viewport()->repaint(); // d->pColumnTypes.resize(0); // d->pColumnModes.resize(0); @@ -1490,9 +1490,9 @@ void KexiDataAwareObjectInterface::setEmptyRowInsertingEnabled(bool set) } void KexiDataAwareObjectInterface::slotAboutToDeleteRow(KexiTableItem& item, - KexiDB::ResultInfo* /*result*/, bool tqrepaint) + KexiDB::ResultInfo* /*result*/, bool repaint) { - if (tqrepaint) { + if (repaint) { m_rowWillBeDeleted = m_data->findRef(&item); } } @@ -1534,7 +1534,7 @@ bool KexiDataAwareObjectInterface::deleteItem(KexiTableItem *item)/*, bool moveC const bool lastRowDeleted = m_spreadSheetMode && m_data->last() == item; //we need to know this so we //can return to the last row //after reinserting it - if (!m_data->deleteRow(*item, true /*tqrepaint*/)) { + if (!m_data->deleteRow(*item, true /*repaint*/)) { /*const int button =*/ showErrorMessageForResult( m_data->result() ); // if (KMessageBox::No == button) { diff --git a/kexi/widget/tableview/kexidataawareobjectiface.h b/kexi/widget/tableview/kexidataawareobjectiface.h index 389c1c74..0fed82b6 100644 --- a/kexi/widget/tableview/kexidataawareobjectiface.h +++ b/kexi/widget/tableview/kexidataawareobjectiface.h @@ -267,14 +267,14 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface Does not clear columns information. Does not destroy KexiTableViewData object (if present) but only clears its contents. Displays confirmation dialog if \a ask is true (the default is false). - Repaints widget if \a tqrepaint is true (the default). + Repaints widget if \a repaint is true (the default). For empty tables, true is returned immediately. If isDeleteEnabled() is false, false is returned. For spreadsheet mode all current rows are just replaced by empty rows. \return true on success, false on failure, and cancelled if user cancelled deletion (only possible if \a ask is true). */ - tristate deleteAllRows(bool ask = false, bool tqrepaint = true); + tristate deleteAllRows(bool ask = false, bool repaint = true); /*! \return maximum number of rows that can be displayed per one "page" for current view's size. */ @@ -537,12 +537,12 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface virtual void initDataContents(); /*! Clears columns information and thus all internal table data - and its visible representation. Repaints widget if \a tqrepaint is true. */ - virtual void clearColumns(bool tqrepaint = true); + and its visible representation. Repaints widget if \a repaint is true. */ + virtual void clearColumns(bool repaint = true); /*! Called by clearColumns() to clear internals of the object. For example, KexiTableView removes contents of it's horizontal header. */ - virtual void clearColumnsInternal(bool tqrepaint) = 0; + virtual void clearColumnsInternal(bool repaint) = 0; /*! @internal for implementation This should append another section within horizontal header or any sort of caption @@ -654,16 +654,16 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface //! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted(). virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, - bool tqrepaint); + bool repaint); - //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed. + //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed. virtual void slotRowDeleted(); - //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed. - virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint); + //! Handles KexiTableViewData::rowInserted() signal to repaint when needed. + virtual void slotRowInserted(KexiTableItem *item, bool repaint); //! Like above, not db-aware version - virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint); + virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint); virtual void slotRowsDeleted( const TQValueList<int> & ) {} @@ -675,7 +675,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface virtual void selectCellInternal() {} /*! Used in KexiDataAwareObjectInterface::slotRowDeleted() - to tqrepaint tow \a row and all visible below. + to repaint tow \a row and all visible below. Implemented if there is more than one row displayed, i.e. currently for KexiTableView. */ virtual void updateAllVisibleRowsBelow(int row) { Q_UNUSED( row ); } diff --git a/kexi/widget/tableview/kexidataawarepropertyset.cpp b/kexi/widget/tableview/kexidataawarepropertyset.cpp index dde99b31..3b9fe3af 100644 --- a/kexi/widget/tableview/kexidataawarepropertyset.cpp +++ b/kexi/widget/tableview/kexidataawarepropertyset.cpp @@ -206,7 +206,7 @@ void KexiDataAwarePropertySet::slotRowsDeleted( const TQValueList<int> &rows ) } //void KexiDataAwarePropertySet::slotEmptyRowInserted(KexiTableItem*, uint /*index*/) -void KexiDataAwarePropertySet::slotRowInserted(KexiTableItem*, uint row, bool /*tqrepaint*/) +void KexiDataAwarePropertySet::slotRowInserted(KexiTableItem*, uint row, bool /*repaint*/) { m_view->setDirty(); diff --git a/kexi/widget/tableview/kexidataawarepropertyset.h b/kexi/widget/tableview/kexidataawarepropertyset.h index b2c66f96..8db82ba2 100644 --- a/kexi/widget/tableview/kexidataawarepropertyset.h +++ b/kexi/widget/tableview/kexidataawarepropertyset.h @@ -127,7 +127,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public TQObject void slotRowsDeleted( const TQValueList<int> &rows ); //! Called on \a row insertion in a tableview. - void slotRowInserted(KexiTableItem* item, uint row, bool tqrepaint); + void slotRowInserted(KexiTableItem* item, uint row, bool repaint); //! Called on selecting another cell in a tableview. void slotCellSelected(int, int row); diff --git a/kexi/widget/tableview/kexidatetableedit.cpp b/kexi/widget/tableview/kexidatetableedit.cpp index b68b4787..49bb8a0d 100644 --- a/kexi/widget/tableview/kexidatetableedit.cpp +++ b/kexi/widget/tableview/kexidatetableedit.cpp @@ -163,7 +163,7 @@ void KexiDateTableEdit::slotDateChanged(TQDate date) { m_edit->setDate(date); - tqrepaint(); + repaint(); } void diff --git a/kexi/widget/tableview/kexitableitem.cpp b/kexi/widget/tableview/kexitableitem.cpp index 659e341e..d398dabb 100644 --- a/kexi/widget/tableview/kexitableitem.cpp +++ b/kexi/widget/tableview/kexitableitem.cpp @@ -55,7 +55,7 @@ KexiTableItem::clearValues() void KexiTableItem::debug() const { - TQString s = TQString("KexiTableItem (%1 items)").tqarg(size()); + TQString s = TQString("KexiTableItem (%1 items)").arg(size()); for (uint i = 0; i < size(); i++) s.append( TQString::number(i)+":"+at(i).toString()+" " ); kexidbg << s << endl; diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index 35ad2369..da1c2f20 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -366,7 +366,7 @@ void KexiTableView::updateWidgetContentsSize() void KexiTableView::slotRowsDeleted( const TQValueList<int> &rows ) { - viewport()->tqrepaint(); + viewport()->repaint(); updateWidgetContentsSize(); setCursorPosition(TQMAX(0, (int)m_curRow - (int)rows.count()), -1, true); } @@ -384,7 +384,7 @@ void KexiTableView::setFont( const TQFont &font ) updateFonts(true); } -void KexiTableView::updateFonts(bool tqrepaint) +void KexiTableView::updateFonts(bool repaint) { #ifdef TQ_WS_WIN d->rowHeight = fontMetrics().lineSpacing() + 4; @@ -407,7 +407,7 @@ void KexiTableView::updateFonts(bool tqrepaint) KexiDisplayUtils::initDisplayForAutonumberSign(d->autonumberSignDisplayParameters, this); KexiDisplayUtils::initDisplayForDefaultValue(d->defaultValueDisplayParameters, this); - if (tqrepaint) + if (repaint) updateContents(); } @@ -425,7 +425,7 @@ void KexiTableView::updateAllVisibleRowsBelow(int row) clipper()->width(), clipper()->height() - (rowPos(row) - contentsY()) ); } -void KexiTableView::clearColumnsInternal(bool /*tqrepaint*/) +void KexiTableView::clearColumnsInternal(bool /*repaint*/) { while(m_horizontalHeader->count()>0) m_horizontalHeader->removeLabel(0); @@ -614,7 +614,7 @@ void KexiTableView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch) bool paintOnlyInsertRow = false; /* kdDebug(44021) << TQString(" KexiTableView::drawContents(cx:%1 cy:%2 cw:%3 ch:%4)") - .tqarg(cx).tqarg(cy).tqarg(cw).tqarg(ch) << endl;*/ + .arg(cx).arg(cy).arg(cw).arg(ch) << endl;*/ if (rowlast == -1) { rowlast = rows() - 1; @@ -931,9 +931,9 @@ void KexiTableView::paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch // ts.setWidth( TQMIN( ts.width(), visibleWidth() ) ); // ts.setHeight( TQMIN( ts.height() - (m_navPanel ? m_navPanel->height() : 0), visibleHeight()) ); /* kdDebug(44021) << TQString(" (cx:%1 cy:%2 cw:%3 ch:%4)") - .tqarg(cx).tqarg(cy).tqarg(cw).tqarg(ch) << endl; + .arg(cx).arg(cy).arg(cw).arg(ch) << endl; kdDebug(44021) << TQString(" (w:%3 h:%4)") - .tqarg(ts.width()).tqarg(ts.height()) << endl;*/ + .arg(ts.width()).arg(ts.height()) << endl;*/ // Region of the rect we should draw, calculated in viewport // coordinates, as a region can't handle bigger coordinates @@ -959,12 +959,12 @@ void KexiTableView::paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch // reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts ) ); // And draw the rectangles (transformed inc contents coordinates as needed) - TQMemArray<TQRect> r = reg.tqrects(); + TQMemArray<TQRect> r = reg.rects(); for ( int i = 0; i < (int)r.count(); i++ ) { TQRect rect( viewportToContents2(r[i].topLeft()), r[i].size() ); /* kdDebug(44021) << TQString("- pEA: p->fillRect(x:%1 y:%2 w:%3 h:%4)") - .tqarg(rect.x()).tqarg(rect.y()) - .tqarg(rect.width()).tqarg(rect.height()) << endl;*/ + .arg(rect.x()).arg(rect.y()) + .arg(rect.width()).arg(rect.height()) << endl;*/ // p->fillRect( TQRect(viewportToContents2(r[i].topLeft()),r[i].size()), d->emptyAreaColor ); p->fillRect( rect, d->appearance.emptyAreaColor ); // p->fillRect( TQRect(viewportToContents2(r[i].topLeft()),r[i].size()), viewport()->backgroundBrush() ); @@ -1425,7 +1425,7 @@ void KexiTableView::keyPressEvent(TQKeyEvent* e) else { kexidbg << "KexiTableView::KeyPressEvent(): default" << endl; if (e->text().isEmpty() || !e->text().isEmpty() && !e->text()[0].isPrint() ) { - kdDebug(44021) << "NOT PRINTABLE: 0x0" << TQString("%1").tqarg(k,0,16) <<endl; + kdDebug(44021) << "NOT PRINTABLE: 0x0" << TQString("%1").arg(k,0,16) <<endl; // e->ignore(); TQScrollView::keyPressEvent(e); return; @@ -1450,7 +1450,7 @@ void KexiTableView::keyPressEvent(TQKeyEvent* e) m_vScrollBarValueChanged_enabled=false; - // if focus cell changes, tqrepaint + // if focus cell changes, repaint setCursorPosition(curRow, curCol); m_vScrollBarValueChanged_enabled=true; @@ -1630,7 +1630,7 @@ void KexiTableView::resizeEvent(TQResizeEvent *e) slotUpdate(); triggerUpdate(); } -// d->pTopHeader->tqrepaint(); +// d->pTopHeader->repaint(); /* m_navPanel->setGeometry( @@ -1645,14 +1645,14 @@ void KexiTableView::resizeEvent(TQResizeEvent *e) // m_navPanel->setGeometry(1,horizontalScrollBar()->pos().y(), // m_navPanel->width(), horizontalScrollBar()->height()); // updateContents(0,0,2000,2000);//js -// erase(); tqrepaint(); +// erase(); repaint(); } void KexiTableView::viewportResizeEvent( TQResizeEvent *e ) { TQScrollView::viewportResizeEvent( e ); updateGeometries(); -// erase(); tqrepaint(); +// erase(); repaint(); } void KexiTableView::showEvent(TQShowEvent *e) @@ -1818,7 +1818,7 @@ void KexiTableView::slotColumnWidthChanged( int, int, int ) else { // updateContents( columnPos(col), 0, contentsWidth(), contentsHeight() ); updateContents(contentsX(), 0, viewport()->width(), contentsHeight()); - // viewport()->tqrepaint(); + // viewport()->repaint(); } // updateContents(0, 0, d->pBufferPm->width(), d->pBufferPm->height()); @@ -2481,7 +2481,7 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) const bool hp = KexiUtils::hasParent( static_cast<TQWidget*>(o), focusWidget()); if (!hp && KexiUtils::hasParent( this, static_cast<TQWidget*>(o))) { //accept row editing if focus is moved to foreign widget - //(not a child, like eg. editor) from one of our table view's tqchildren + //(not a child, like eg. editor) from one of our table view's children //or from table view itself if (!acceptRowEdit()) { static_cast<TQWidget*>(o)->setFocus(); diff --git a/kexi/widget/tableview/kexitableview.h b/kexi/widget/tableview/kexitableview.h index daabe0f9..fc488c83 100644 --- a/kexi/widget/tableview/kexitableview.h +++ b/kexi/widget/tableview/kexitableview.h @@ -263,7 +263,7 @@ public slots: virtual void setData( KexiTableViewData *data, bool owner = true ) { KexiDataAwareObjectInterface::setData( data, owner ); } - virtual void clearColumnsInternal(bool tqrepaint); + virtual void clearColumnsInternal(bool repaint); /*! Adjusts \a colNum column's width to its (current) contents. If \a colNum == -1, all columns' width is adjusted. */ @@ -432,19 +432,19 @@ protected slots: virtual void slotRowRepaintRequested(KexiTableItem& item); //! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted(). - virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint) - { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); } + virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint) + { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); } - //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed. + //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed. virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); } - //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed. - virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint) - { KexiDataAwareObjectInterface::slotRowInserted(item, tqrepaint); } + //! Handles KexiTableViewData::rowInserted() signal to repaint when needed. + virtual void slotRowInserted(KexiTableItem *item, bool repaint) + { KexiDataAwareObjectInterface::slotRowInserted(item, repaint); } //! Like above, not db-aware version - virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint) - { KexiDataAwareObjectInterface::slotRowInserted(item, row, tqrepaint); } + virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint) + { KexiDataAwareObjectInterface::slotRowInserted(item, row, repaint); } /*! Handles verticalScrollBar()'s valueChanged(int) signal. Called when vscrollbar's value has been changed. */ @@ -588,7 +588,7 @@ protected: virtual void removeEditor(); //! Internal: updated sched fonts for painting. - void updateFonts(bool tqrepaint = false); + void updateFonts(bool repaint = false); /*! @internal Changes bottom margin settings, in pixels. At this time, it's used by KexiComboBoxPopup to decrease margin for popup's table. */ @@ -614,7 +614,7 @@ protected: virtual void paste(); /*! Used in KexiDataAwareObjectInterface::slotRowDeleted() - to tqrepaint tow \a row and all visible below. */ + to repaint tow \a row and all visible below. */ virtual void updateAllVisibleRowsBelow(int row); void updateAfterCancelRowEdit(); @@ -626,7 +626,7 @@ protected: bool getVisibleLookupValue(TQVariant& cellValue, KexiTableEdit *edit, KexiTableItem *item, KexiTableViewColumn *tvcol) const; -// //! Called to tqrepaint contents after a row is deleted. +// //! Called to repaint contents after a row is deleted. // void repaintAfterDelete(); KexiTableViewPrivate *d; diff --git a/kexi/widget/tableview/kexitableviewdata.cpp b/kexi/widget/tableview/kexitableviewdata.cpp index ad670e3e..6a15b0db 100644 --- a/kexi/widget/tableview/kexitableviewdata.cpp +++ b/kexi/widget/tableview/kexitableviewdata.cpp @@ -635,7 +635,7 @@ bool KexiTableViewData::updateRowEditBufferRef(KexiTableItem *item, } //! @todo if there're multiple views for this data, we need multiple buffers! -bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool tqrepaint) +bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool repaint) { if (!m_pRowEditBuffer) return true; //nothing to do @@ -655,7 +655,7 @@ bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool tqrepaint if (val->isNull() && !f->isAutoIncrement()) { //NOT NULL violated m_result.msg = i18n("\"%1\" column requires a value to be entered.") - .tqarg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); + .arg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); m_result.desc = i18n("The column's constraint is declared as NOT NULL."); m_result.column = col; return false; @@ -666,7 +666,7 @@ bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool tqrepaint if (!f->isAutoIncrement() && (val->isNull() || KexiDB::isEmptyValue( f, *val ))) { //NOT EMPTY violated m_result.msg = i18n("\"%1\" column requires a value to be entered.") - .tqarg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); + .arg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); m_result.desc = i18n("The column's constraint is declared as NOT EMPTY."); m_result.column = col; return false; @@ -721,12 +721,12 @@ js: TODO: use KexiMainWindowImpl::showErrorMessage(const TQString &title, KexiDB m_pRowEditBuffer->clear(); - if (tqrepaint) + if (repaint) emit rowRepaintRequested(item); return true; } -bool KexiTableViewData::saveRowChanges(KexiTableItem& item, bool tqrepaint) +bool KexiTableViewData::saveRowChanges(KexiTableItem& item, bool repaint) { kdDebug() << "KexiTableViewData::saveRowChanges()..." << endl; m_result.clear(); @@ -734,32 +734,32 @@ bool KexiTableViewData::saveRowChanges(KexiTableItem& item, bool tqrepaint) if (!m_result.success) return false; - if (saveRow(item, false /*update*/, tqrepaint)) { + if (saveRow(item, false /*update*/, repaint)) { emit rowUpdated(&item); return true; } return false; } -bool KexiTableViewData::saveNewRow(KexiTableItem& item, bool tqrepaint) +bool KexiTableViewData::saveNewRow(KexiTableItem& item, bool repaint) { kdDebug() << "KexiTableViewData::saveNewRow()..." << endl; m_result.clear(); - emit aboutToInsertRow(&item, &m_result, tqrepaint); + emit aboutToInsertRow(&item, &m_result, repaint); if (!m_result.success) return false; - if (saveRow(item, true /*insert*/, tqrepaint)) { - emit rowInserted(&item, tqrepaint); + if (saveRow(item, true /*insert*/, repaint)) { + emit rowInserted(&item, repaint); return true; } return false; } -bool KexiTableViewData::deleteRow(KexiTableItem& item, bool tqrepaint) +bool KexiTableViewData::deleteRow(KexiTableItem& item, bool repaint) { m_result.clear(); - emit aboutToDeleteRow(item, &m_result, tqrepaint); + emit aboutToDeleteRow(item, &m_result, repaint); if (!m_result.success) return false; @@ -784,9 +784,9 @@ bool KexiTableViewData::deleteRow(KexiTableItem& item, bool tqrepaint) return true; } -void KexiTableViewData::deleteRows( const TQValueList<int> &rowsToDelete, bool tqrepaint ) +void KexiTableViewData::deleteRows( const TQValueList<int> &rowsToDelete, bool repaint ) { - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); if (rowsToDelete.isEmpty()) return; @@ -804,11 +804,11 @@ void KexiTableViewData::deleteRows( const TQValueList<int> &rowsToDelete, bool t emit rowsDeleted( rowsToDelete ); } -void KexiTableViewData::insertRow(KexiTableItem& item, uint index, bool tqrepaint) +void KexiTableViewData::insertRow(KexiTableItem& item, uint index, bool repaint) { if (!insert( index = TQMIN(index, count()), &item )) return; - emit rowInserted(&item, index, tqrepaint); + emit rowInserted(&item, index, repaint); } void KexiTableViewData::clearInternal() @@ -827,7 +827,7 @@ void KexiTableViewData::clearInternal() } } -bool KexiTableViewData::deleteAllRows(bool tqrepaint) +bool KexiTableViewData::deleteAllRows(bool repaint) { clearInternal(); @@ -837,7 +837,7 @@ bool KexiTableViewData::deleteAllRows(bool tqrepaint) res = m_cursor->deleteAllRows(); } - if (tqrepaint) + if (repaint) emit reloadRequested(); return res; } diff --git a/kexi/widget/tableview/kexitableviewdata.h b/kexi/widget/tableview/kexitableviewdata.h index 7263f3fe..eb3d20df 100644 --- a/kexi/widget/tableview/kexitableviewdata.h +++ b/kexi/widget/tableview/kexitableviewdata.h @@ -359,27 +359,27 @@ public: /*! \return last operation's result information (always not null). */ inline KexiDB::ResultInfo* result() { return &m_result; } - bool saveRowChanges(KexiTableItem& item, bool tqrepaint = false); + bool saveRowChanges(KexiTableItem& item, bool repaint = false); - bool saveNewRow(KexiTableItem& item, bool tqrepaint = false); + bool saveNewRow(KexiTableItem& item, bool repaint = false); - bool deleteRow(KexiTableItem& item, bool tqrepaint = false); + bool deleteRow(KexiTableItem& item, bool repaint = false); /*! Deletes rows (by number) passed with \a rowsToDelete. Currently, this method is only for non data-aware tables. */ - void deleteRows( const TQValueList<int> &rowsToDelete, bool tqrepaint = false ); + void deleteRows( const TQValueList<int> &rowsToDelete, bool repaint = false ); /*! Deletes all rows. Works either for db-aware and non db-aware tables. Column's definition is not changed. For db-aware version, all rows are removed from a database. Row-edit buffer is cleared. - If \a tqrepaint is true, reloadRequested() signal + If \a repaint is true, reloadRequested() signal is emitted after deleting (if at least one row was deleted), - so presenters can tqrepaint their contents. + so presenters can repaint their contents. \return true on success. */ - virtual bool deleteAllRows(bool tqrepaint = false); + virtual bool deleteAllRows(bool repaint = false); /*! @internal method, used mostly by specialized classes like KexiTableView. Clears internal row structures. Row-edit buffer is cleared. @@ -390,7 +390,7 @@ public: /*! Inserts new \a item at index \a index. \a item will be owned by this data object. Note: Reasonable only for not not-db-aware version. */ - void insertRow(KexiTableItem& item, uint index, bool tqrepaint = false); + void insertRow(KexiTableItem& item, uint index, bool repaint = false); /*TODO: add this as well? void insertRow(KexiTableItem& item, KexiTableItem& aboveItem); */ @@ -445,7 +445,7 @@ signals: /*! Emited before inserting of a new, current row. Connect this signal to your slot and set \a result->success to false to disallow this inserting. You can also change columns in \a item row. */ - void aboutToInsertRow(KexiTableItem *item, KexiDB::ResultInfo* result, bool tqrepaint); + void aboutToInsertRow(KexiTableItem *item, KexiDB::ResultInfo* result, bool repaint); /*! Emited before changing of an edited, current row. Connect this signal to your slot and set \a result->success to false @@ -455,15 +455,15 @@ signals: void rowUpdated(KexiTableItem*); //!< Current row has been updated - void rowInserted(KexiTableItem*, bool tqrepaint); //!< A row has been inserted + void rowInserted(KexiTableItem*, bool repaint); //!< A row has been inserted //! A row has been inserted at \a index position (not db-aware data only) - void rowInserted(KexiTableItem*, uint index, bool tqrepaint); + void rowInserted(KexiTableItem*, uint index, bool repaint); /*! Emited before deleting of a current row. Connect this signal to your slot and set \a result->success to false to disallow this deleting. */ - void aboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint); + void aboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint); //! Current row has been deleted void rowDeleted(); @@ -497,7 +497,7 @@ protected: int cmpBLOB(Item item1, Item item2); //! internal: for saveRowChanges() and saveNewRow() - bool saveRow(KexiTableItem& item, bool insert, bool tqrepaint); + bool saveRow(KexiTableItem& item, bool insert, bool repaint); //! (logical) sorted column number, set by setSorting() //! can differ from m_realSortedColumn if there's lookup column used diff --git a/kexi/widget/utils/kexicontextmenuutils.cpp b/kexi/widget/utils/kexicontextmenuutils.cpp index f34864a9..aeeec86d 100644 --- a/kexi/widget/utils/kexicontextmenuutils.cpp +++ b/kexi/widget/utils/kexicontextmenuutils.cpp @@ -187,7 +187,7 @@ void KexiImageContextMenu::saveAs() if (f.exists() && KMessageBox::Yes != KMessageBox::warningYesNo(this, "<qt>"+i18n("File \"%1\" already exists." "<p>Do you want to replace it with a new one?") - .tqarg(TQDir::convertSeparators(fileName))+"</qt>",0, + .arg(TQDir::convertSeparators(fileName))+"</qt>",0, KGuiItem(i18n("&Replace")), KGuiItem(i18n("&Don't Replace")))) { return; @@ -268,8 +268,8 @@ bool KexiContextMenuUtils::updateTitle(TQPopupMenu *menu, const TQString& object /*! @todo look at makeFirstCharacterUpperCaseInCaptions setting [bool] (see doc/dev/settings.txt) */ TQString realTitle( i18n("Object name : Object type", "%1 : %2") - .tqarg( objectName[0].upper() + objectName.mid(1) ) - .tqarg( objectTypeName )); + .arg( objectName[0].upper() + objectName.mid(1) ) + .arg( objectTypeName )); if (iconName.isEmpty()) title->setTitle(realTitle); diff --git a/kexi/widget/utils/kexidatetimeformatter.cpp b/kexi/widget/utils/kexidatetimeformatter.cpp index b11961d2..298eda48 100644 --- a/kexi/widget/utils/kexidatetimeformatter.cpp +++ b/kexi/widget/utils/kexidatetimeformatter.cpp @@ -78,7 +78,7 @@ KexiDateFormatter::KexiDateFormatter() m_order = TQDateEdit::YDM; //! @todo use TQRegExp (to replace %Y by %1, etc.) instead of hardcoded "%1%299%399" //! because df may contain also other characters - m_inputMask = TQString("%1%299%399").tqarg(yearMask).tqarg(m_separator).tqarg(m_separator); + m_inputMask = TQString("%1%299%399").arg(yearMask).arg(m_separator).arg(m_separator); m_qtFormat = yearDateFormat+m_separator+dayDateFormat+m_separator+monthDateFormat; m_yearpos = 0; m_daypos = yearMask.length()+separatorLen; @@ -86,7 +86,7 @@ KexiDateFormatter::KexiDateFormatter() } else if (daypos<monthpos && monthpos<yearpos) { m_order = TQDateEdit::DMY; - m_inputMask = TQString("99%199%2%3").tqarg(m_separator).tqarg(m_separator).tqarg(yearMask); + m_inputMask = TQString("99%199%2%3").arg(m_separator).arg(m_separator).arg(yearMask); m_qtFormat = dayDateFormat+m_separator+monthDateFormat+m_separator+yearDateFormat; m_daypos = 0; m_monthpos = 2+separatorLen; @@ -94,7 +94,7 @@ KexiDateFormatter::KexiDateFormatter() } else if (monthpos<daypos && daypos<yearpos) { m_order = TQDateEdit::MDY; - m_inputMask = TQString("99%199%2%3").tqarg(m_separator).tqarg(m_separator).tqarg(yearMask); + m_inputMask = TQString("99%199%2%3").arg(m_separator).arg(m_separator).arg(yearMask); m_qtFormat = monthDateFormat+m_separator+dayDateFormat+m_separator+yearDateFormat; m_monthpos = 0; m_daypos = 2+separatorLen; @@ -104,7 +104,7 @@ KexiDateFormatter::KexiDateFormatter() ok = false; } if (!ok || m_order == TQDateEdit::YMD) {//default: YMD - m_inputMask = TQString("%1%299%399").tqarg(yearMask).tqarg(m_separator).tqarg(m_separator); + m_inputMask = TQString("%1%299%399").arg(yearMask).arg(m_separator).arg(m_separator); m_qtFormat = yearDateFormat+m_separator+monthDateFormat+m_separator+dayDateFormat; m_yearpos = 0; m_monthpos = yearMask.length()+separatorLen; diff --git a/kexi/widget/utils/kexiflowlayout.cpp b/kexi/widget/utils/kexiflowlayout.cpp index 50959770..f6868a5e 100644 --- a/kexi/widget/utils/kexiflowlayout.cpp +++ b/kexi/widget/utils/kexiflowlayout.cpp @@ -134,9 +134,9 @@ KexiFlowLayout::widgetList() const } void -KexiFlowLayout::tqinvalidate() +KexiFlowLayout::invalidate() { - TQLayout::tqinvalidate(); + TQLayout::invalidate(); m_cached_sizeHint = TQSize(); m_cached_minSize = TQSize(); m_cached_width = 0; @@ -468,7 +468,7 @@ int KexiFlowLayout::count() const { \reimp */ TQLayoutItem* KexiFlowLayout::itemAt(int index) const { - return index >= 0 && index < m_list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(m_list).tqat(index)) : 0; + return index >= 0 && index < m_list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(m_list).at(index)) : 0; } /*! @@ -477,8 +477,8 @@ TQLayoutItem* KexiFlowLayout::itemAt(int index) const { TQLayoutItem* KexiFlowLayout::takeAt(int index) { if (index < 0 || index >= m_list.count()) return 0; - TQLayoutItem *item = m_list.tqat(index); - m_list.remove(m_list.tqat(index)); + TQLayoutItem *item = m_list.at(index); + m_list.remove(m_list.at(index)); delete item; invalidate(); diff --git a/kexi/widget/utils/kexiflowlayout.h b/kexi/widget/utils/kexiflowlayout.h index c4550fca..aec6c6c3 100644 --- a/kexi/widget/utils/kexiflowlayout.h +++ b/kexi/widget/utils/kexiflowlayout.h @@ -49,7 +49,7 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout virtual void addItem(TQLayoutItem *item); virtual void addSpacing(int size); virtual TQLayoutIterator iterator(); - virtual void tqinvalidate(); + virtual void invalidate(); virtual bool hasHeightForWidth() const; virtual int heightForWidth(int width) const; diff --git a/kexi/widget/utils/kexigradientwidget.cpp b/kexi/widget/utils/kexigradientwidget.cpp index 18d34447..d93b13ff 100644 --- a/kexi/widget/utils/kexigradientwidget.cpp +++ b/kexi/widget/utils/kexigradientwidget.cpp @@ -155,7 +155,7 @@ void KexiGradientWidget::rebuildCache( void ) { } /** - All tqchildren need to have our background set. + All children need to have our background set. */ KPixmap partPixmap; TQRect area; @@ -180,7 +180,7 @@ void KexiGradientWidget::rebuildCache( void ) { under the current child-widget. */ if ( TQT_BASE_OBJECT(childWidget->parent()) == TQT_BASE_OBJECT(this) ) { - area = childWidget->tqgeometry(); + area = childWidget->geometry(); } else { area.setTopLeft( childWidget->mapTo( this, childWidget->clipRegion().boundingRect().topLeft() ) ); @@ -311,7 +311,7 @@ void KexiGradientWidget::updateChildBackground( TQWidget* childWidget ) /** Exclude widgtes that don't have a parent. - This happens when tqchildren are removed + This happens when children are removed which are in the knownWidgets-list. */ if ( childWidget->parent() == 0L ) @@ -330,7 +330,7 @@ void KexiGradientWidget::updateChildBackground( TQWidget* childWidget ) under the current child-widget. */ if ( TQT_BASE_OBJECT(childWidget->parent()) == TQT_BASE_OBJECT(this) ) { - area = childWidget->tqgeometry(); + area = childWidget->geometry(); } else { area.setTopLeft( childWidget->mapTo( this, childWidget->clipRegion().boundingRect().topLeft() ) ); diff --git a/kexi/widget/utils/kexigradientwidget.h b/kexi/widget/utils/kexigradientwidget.h index 3f9b894d..d11c4f04 100644 --- a/kexi/widget/utils/kexigradientwidget.h +++ b/kexi/widget/utils/kexigradientwidget.h @@ -184,11 +184,11 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public TQWidget { private: /*! - Builds a list of tqchildren of \a p. + Builds a list of children of \a p. Only widgets that work correctly with KexiGradientWidget will be in this list. The results will be stored in \a list. - The method recursively calls itself until all tqchildren of \a p + The method recursively calls itself until all children of \a p have been found and stored in the list. */ static void buildChildrenList( WidgetList& list, TQWidget* p ); diff --git a/kexi/widget/utils/kexirecordnavigator.h b/kexi/widget/utils/kexirecordnavigator.h index 9eae328b..6c666e78 100644 --- a/kexi/widget/utils/kexirecordnavigator.h +++ b/kexi/widget/utils/kexirecordnavigator.h @@ -87,7 +87,7 @@ class KEXIGUIUTILS_EXPORT KexiRecordNavigator : public TQFrame /*! \return record count displayed for this navigator. */ uint recordCount() const; - /*! Sets horizontal bar's \a hbar (at the bottom) tqgeometry so this record navigator + /*! Sets horizontal bar's \a hbar (at the bottom) geometry so this record navigator is properly positioned together with horizontal scroll bar. This method is used in TQScrollView::setHBarGeometry() implementations: see KexiTableView::setHBarGeometry() and KexiFormScrollView::setHBarGeometry() |