diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/3rdparty | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/3rdparty')
72 files changed, 1070 insertions, 1061 deletions
diff --git a/kexi/3rdparty/kexisql/src/btree.c b/kexi/3rdparty/kexisql/src/btree.c index 02e01249..3a79a624 100644 --- a/kexi/3rdparty/kexisql/src/btree.c +++ b/kexi/3rdparty/kexisql/src/btree.c @@ -47,7 +47,7 @@ ** the file really is a valid BTree database, a pointer to a list of unused ** pages in the file, and some meta information. The root of the first ** BTree begins on page 2 of the file. (Pages are numbered beginning with -** 1, not 0.) Thus a minimum database contains 2 pages. +** 1, not 0.) Thus a minimum database tqcontains 2 pages. */ #include "sqliteInt.h" #include "pager.h" @@ -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 alignment boundry for structures. +** and 8-byte tqalignment boundry for structures. */ #define ROUNDUP(X) ((X+3) & ~3) @@ -128,7 +128,7 @@ static const char zMagicHeader[] = /* ** The first page of the database file contains a magic header string -** to identify the file as an SQLite database file. It also contains +** to identify the file as an SQLite database file. It also tqcontains ** a pointer to the first free page of the file. Page 2 contains the ** root of the principle BTree. The file might contain other BTrees ** rooted on pages above 2. @@ -313,9 +313,9 @@ struct FreelistInfo { ** page to hold as many as two more cells than it might otherwise hold. ** The extra two entries in apCell[] are an allowance for this situation. ** -** The pParent field points back to the parent page. This allows us to +** The pParent field points back to the tqparent page. This allows us to ** walk up the BTree from any leaf to the root. Care must be taken to -** unref() the parent page pointer when this page is no longer referenced. +** unref() the tqparent page pointer when this page is no longer referenced. ** The pageDestructor() routine handles that chore. */ struct MemPage { @@ -326,7 +326,7 @@ struct MemPage { u8 isInit; /* True if auxiliary data is initialized */ u8 idxShift; /* True if apCell[] indices have changed */ u8 isOverfull; /* Some apCell[] points outside u.aDisk[] */ - MemPage *pParent; /* The parent of this page. NULL for root */ + MemPage *pParent; /* The tqparent of this page. NULL for root */ int idxParent; /* Index in pParent->apCell[] of this node */ int nFree; /* Number of free bytes in u.aDisk[] */ int nCell; /* Number of entries on this page */ @@ -567,8 +567,8 @@ static void freeSpace(Btree *pBt, MemPage *pPage, int start, int size){ ** Initialize the auxiliary information for a disk block. ** ** The pParent parameter must be a pointer to the MemPage which -** is the parent of the page being initialized. The root of the -** BTree (usually page 2) has no parent and so for that page, +** is the tqparent of the page being initialized. The root of the +** BTree (usually page 2) has no tqparent and so for that page, ** pParent==NULL. ** ** Return SQLITE_OK on success. If we see that the page does @@ -726,7 +726,7 @@ int sqliteBtreeOpen( } /* -** Close an open database and invalidate all cursors. +** Close an open database and tqinvalidate all cursors. */ static int fileBtreeClose(Btree *pBt){ while( pBt->pCursor ){ @@ -1414,7 +1414,7 @@ static int moveToChild(BtCursor *pCur, int newPgno){ } /* -** Move the cursor up to the parent page. +** Move the cursor up to the tqparent page. ** ** pCur->idx is set to the cell index that contains the pointer ** to the page we are coming from. If we are coming from the @@ -1451,7 +1451,7 @@ static void moveToParent(BtCursor *pCur){ }else{ /* The MemPage.idxShift flag indicates that cell indices might have ** changed since idxParent was set and hence idxParent might be out - ** of date. So recompute the parent cell index by scanning all cells + ** of date. So recompute the tqparent cell index by scanning all cells ** and locating the one that points to the child we just came from. */ int i; @@ -1998,9 +1998,9 @@ static void reparentPage(Pager *pPager, Pgno pgno, MemPage *pNewParent,int idx){ } /* -** Reparent all children of the given page to be the given page. +** Retqparent all tqchildren 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. +** to make sure that each child knows that pPage is its tqparent. ** ** This routine gets called after you memcpy() one page into ** another. @@ -2141,7 +2141,7 @@ static void copyPage(MemPage *pTo, MemPage *pFrom){ ** of pPage so that all pages have about the same amount of free space. ** Usually one sibling on either side of pPage is used in the balancing, ** though both siblings might come from one side if pPage is the first -** or last child of its parent. If pPage has fewer than two siblings +** or last child of its tqparent. If pPage has fewer than two siblings ** (something which can only happen if pPage is the root page or a ** child of root) then all available siblings participate in the balancing. ** @@ -2168,16 +2168,16 @@ static void copyPage(MemPage *pTo, MemPage *pFrom){ ** if the page is overfull. Part of the job of this routine is to ** make sure all Cells for pPage once again fit in pPage->u.aDisk[]. ** -** In the course of balancing the siblings of pPage, the parent of pPage +** In the course of balancing the siblings of pPage, the tqparent of pPage ** might become overfull or underfull. If that happens, then this routine -** is called recursively on the parent. +** is called recursively on the tqparent. ** ** If this routine fails for any reason, it might leave the database ** in a corrupted state. So if this routine fails, the database should ** be rolled back. */ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ - MemPage *pParent; /* The parent of pPage */ + MemPage *pParent; /* The tqparent of pPage */ int nCell; /* Number of cells in apCell[] */ int nOld; /* Number of pages in apOld[] */ int nNew; /* Number of pages in apNew[] */ @@ -2215,8 +2215,8 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ } /* - ** Find the parent of the page to be balanceed. - ** If there is no parent, it means this page is the root page and + ** Find the tqparent of the page to be balanceed. + ** If there is no tqparent, it means this page is the root page and ** special rules apply. */ pParent = pPage->pParent; @@ -2291,7 +2291,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ assert( pParent->isInit ); /* - ** Find the Cell in the parent page whose h.leftChild points back + ** Find the Cell in the tqparent page whose h.leftChild points back ** to pPage. The "idx" variable is the index of that cell. If pPage ** is the rightmost child of pParent then set idx to pParent->nCell */ @@ -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 children then all children of pParent are taken. + ** has NB or fewer tqchildren then all tqchildren 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 children of all cells. + ** Retqparent tqchildren of all cells. */ for(i=0; i<nNew; i++){ reparentChildPages(pBt, apNew[i]); @@ -2555,7 +2555,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ reparentChildPages(pBt, pParent); /* - ** balance the parent page. + ** balance the tqparent page. */ rc = balance(pBt, pParent, pCur); @@ -2794,7 +2794,7 @@ static int fileBtreeCreateTable(Btree *pBt, int *piTable){ } /* -** Erase the given database page and all its children. Return +** Erase the given database page and all its tqchildren. 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 children. -** 7. Verify that the depth of all children is the same. +** 6. Recursively call checkTreePage on all tqchildren. +** 7. Verify that the depth of all tqchildren 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 3954fe6d..8d905ef0 100644 --- a/kexi/3rdparty/kexisql/src/btree_rb.c +++ b/kexi/3rdparty/kexisql/src/btree_rb.c @@ -123,7 +123,7 @@ struct BtRbNode { int nData; void *pData; u8 isBlack; /* true for a black node, 0 for a red node */ - BtRbNode *pParent; /* Nodes parent node, NULL for the tree head */ + BtRbNode *pParent; /* Nodes tqparent node, NULL for the tree head */ BtRbNode *pLeft; /* Nodes left child, or NULL */ BtRbNode *pRight; /* Nodes right child, or NULL */ @@ -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 children are black + * (1) - If a node is red, both of it's tqchildren are black * (2) - Each path from a given node to a leaf (NULL) node passes thru the * same number of black nodes * @@ -329,7 +329,7 @@ static void check_redblack_tree(BtRbTree * tree, char ** msg) { BtRbNode *pNode; - /* 0 -> came from parent + /* 0 -> came from tqparent * 1 -> came from left * 2 -> came from right */ int prev_step = 0; @@ -400,34 +400,34 @@ static void check_redblack_tree(BtRbTree * tree, char ** msg) /* * Node pX has just been inserted into pTree (by code in sqliteRbtreeInsert()). - * It is possible that pX is a red node with a red parent, which is a violation + * It is possible that pX is a red node with a red tqparent, which is a violation * of the red-black tree properties. This function performs rotations and * color changes to rebalance the tree */ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) { /* In the first iteration of this loop, pX points to the red node just - * inserted in the tree. If the parent of pX exists (pX is not the root + * inserted in the tree. If the tqparent of pX exists (pX is not the root * node) and is red, then the properties of the red-black tree are * violated. * * At the start of any subsequent iterations, pX points to a red node - * with a red parent. In all other respects the tree is a legal red-black + * with a red tqparent. In all other respects the tree is a legal red-black * binary tree. */ while( pX != pTree->pHead && !pX->pParent->isBlack ){ BtRbNode *pUncle; - BtRbNode *pGrandparent; + BtRbNode *pGrandtqparent; - /* Grandparent of pX must exist and must be black. */ - pGrandparent = pX->pParent->pParent; - assert( pGrandparent ); - assert( pGrandparent->isBlack ); + /* Grandtqparent of pX must exist and must be black. */ + pGrandtqparent = pX->pParent->pParent; + assert( pGrandtqparent ); + assert( pGrandtqparent->isBlack ); /* Uncle of pX may or may not exist. */ - if( pX->pParent == pGrandparent->pLeft ) - pUncle = pGrandparent->pRight; + if( pX->pParent == pGrandtqparent->pLeft ) + pUncle = pGrandtqparent->pRight; else - pUncle = pGrandparent->pLeft; + pUncle = pGrandtqparent->pLeft; /* If the uncle of pX exists and is red, we do the following: * | | @@ -438,16 +438,16 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) * X(r) X(r) * * BEFORE AFTER - * pX is then set to G. If the parent of G is red, then the while loop + * pX is then set to G. If the tqparent of G is red, then the while loop * will run again. */ if( pUncle && !pUncle->isBlack ){ - pGrandparent->isBlack = 0; + pGrandtqparent->isBlack = 0; pUncle->isBlack = 1; pX->pParent->isBlack = 1; - pX = pGrandparent; + pX = pGrandtqparent; }else{ - if( pX->pParent == pGrandparent->pLeft ){ + if( pX->pParent == pGrandtqparent->pLeft ){ if( pX == pX->pParent->pRight ){ /* If pX is a right-child, do the following transform, essentially * to change pX into a left-child: @@ -474,10 +474,10 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) * * BEFORE AFTER */ - assert( pGrandparent == pX->pParent->pParent ); - pGrandparent->isBlack = 0; + assert( pGrandtqparent == pX->pParent->pParent ); + pGrandtqparent->isBlack = 0; pX->pParent->isBlack = 1; - rightRotate( pTree, pGrandparent ); + rightRotate( pTree, pGrandtqparent ); }else{ /* This code is symetric to the illustrated case above. */ @@ -485,10 +485,10 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) pX = pX->pParent; rightRotate(pTree, pX); } - assert( pGrandparent == pX->pParent->pParent ); - pGrandparent->isBlack = 0; + assert( pGrandtqparent == pX->pParent->pParent ); + pGrandtqparent->isBlack = 0; pX->pParent->isBlack = 1; - leftRotate( pTree, pGrandparent ); + leftRotate( pTree, pGrandtqparent ); } } } @@ -768,7 +768,7 @@ static int memRbtreeInsert( memcpy(pData, pDataInput, nData); /* Move the cursor to a node near the key to be inserted. If the key already - * exists in the table, then (match == 0). In this case we can just replace + * exists in the table, then (match == 0). In this case we can just tqreplace * the data associated with the entry, we don't need to manipulate the tree. * * If there is no exact match, then the cursor points at what would be either @@ -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 children pZ has: + * to do this depends on how many tqchildren pZ has: * - * 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 + * 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 * 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 children. If pZ is black, and not the tree root, then we + * NULL if pZ has no tqchildren. 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/kexisql/src/build.c b/kexi/3rdparty/kexisql/src/build.c index 1dece406..2fb19064 100644 --- a/kexi/3rdparty/kexisql/src/build.c +++ b/kexi/3rdparty/kexisql/src/build.c @@ -526,7 +526,7 @@ void sqliteStartTable( /* Begin generating the code that will insert the table record into ** the SQLITE_MASTER table. Note in particular that we must go ahead ** and allocate the record number for the table entry now. Before any - ** PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause + ** PRIMARY KEY or UNITQUE keywords are parsed. Those keywords will cause ** indices to be created and the table record must come before the ** indices. Hence, the record number for the table must be allocated ** now. @@ -1461,7 +1461,7 @@ void sqliteDeferForeignKey(Parse *pParse, int isDeferred){ ** Create a new index for an SQL table. pIndex is the name of the index ** and pTable is the name of the table that is to be indexed. Both will ** be NULL for a primary key or an index that is created to satisfy a -** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable +** UNITQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable ** as the table to be indexed. pParse->pNewTable is a table that is ** currently being constructed by a CREATE TABLE statement. ** @@ -1531,7 +1531,7 @@ void sqliteCreateIndex( ** index, then we will continue to process this index. ** ** If pName==0 it means that we are - ** dealing with a primary key or UNIQUE constraint. We have to invent our + ** dealing with a primary key or UNITQUE constraint. We have to invent our ** own name. */ if( pName && !db->init.busy ){ @@ -1673,7 +1673,7 @@ void sqliteCreateIndex( ** we don't want to recreate it. ** ** If pTable==0 it means this index is generated as a primary key - ** or UNIQUE constraint of a CREATE TABLE statement. Since the table + ** or UNITQUE constraint of a CREATE TABLE statement. Since the table ** has just been created, it contains no data and the index initialization ** step can be skipped. */ @@ -1767,7 +1767,7 @@ void sqliteDropIndex(Parse *pParse, SrcList *pName){ goto exit_drop_index; } if( pIndex->autoIndex ){ - sqliteErrorMsg(pParse, "index associated with UNIQUE " + sqliteErrorMsg(pParse, "index associated with UNITQUE " "or PRIMARY KEY constraint cannot be dropped", 0); goto exit_drop_index; } diff --git a/kexi/3rdparty/kexisql/src/encode.c b/kexi/3rdparty/kexisql/src/encode.c index 899901b5..3e14e641 100644 --- a/kexi/3rdparty/kexisql/src/encode.c +++ b/kexi/3rdparty/kexisql/src/encode.c @@ -67,7 +67,7 @@ ** (2) Copy each input character into the output buffer, one by ** one, adding the offset value as you copy. ** -** (3) If the value of an input character plus offset is 0x00, replace +** (3) If the value of an input character plus offset is 0x00, tqreplace ** that one character by the two-character sequence 0x01 0x01. ** If the sum is 0x01, replace it with 0x01 0x02. If the sum ** is 0x27, replace it with 0x01 0x03. @@ -101,7 +101,7 @@ */ /* -** Encode a binary buffer "in" of size n bytes so that it contains +** Encode a binary buffer "in" of size n bytes so that it tqcontains ** no instances of characters '\'' or '\000'. The output is ** null-terminated and can be used as a string value in an INSERT ** or UPDATE statement. Use sqlite_decode_binary() to convert the @@ -231,7 +231,7 @@ int main(int argc, char **argv){ } for(j=0; out[j]; j++){ if( out[j]=='\'' ){ - printf(" ERROR contains (')\n"); + printf(" ERROR tqcontains (')\n"); exit(1); } } diff --git a/kexi/3rdparty/kexisql/src/func.c b/kexi/3rdparty/kexisql/src/func.c index 1e176258..cf0b8baf 100644 --- a/kexi/3rdparty/kexisql/src/func.c +++ b/kexi/3rdparty/kexisql/src/func.c @@ -32,10 +32,10 @@ static void minmaxFunc(sqlite_func *context, int argc, const char **argv){ const char *zBest; int i; int (*xCompare)(const char*, const char*); - int mask; /* 0 for min() or 0xffffffff for max() */ + int tqmask; /* 0 for min() or 0xffffffff for max() */ if( argc==0 ) return; - mask = (int)sqlite_user_data(context); + tqmask = (int)sqlite_user_data(context); zBest = argv[0]; if( zBest==0 ) return; if( argv[1][0]=='n' ){ @@ -45,7 +45,7 @@ static void minmaxFunc(sqlite_func *context, int argc, const char **argv){ } for(i=2; i<argc; i+=2){ if( argv[i]==0 ) return; - if( (xCompare(argv[i], zBest)^mask)<0 ){ + if( (xCompare(argv[i], zBest)^tqmask)<0 ){ zBest = argv[i]; } } @@ -285,7 +285,7 @@ static void versionFunc(sqlite_func *context, int argc, const char **argv){ ** change. This function may disappear. Do not write code that depends ** on this function. ** -** Implementation of the QUOTE() function. This function takes a single +** Implementation of the TQUOTE() function. This function takes a single ** argument. If the argument is numeric, the return value is the same as ** the argument. If the argument is NULL, the return value is the string ** "NULL". Otherwise, the argument is enclosed in single quotes with @@ -365,7 +365,7 @@ static void soundexFunc(sqlite_func *context, int argc, const char **argv){ static void randStr(sqlite_func *context, int argc, const char **argv){ static const unsigned char zSrc[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789" ".-!,:*^+=_|?/<> "; int iMin, iMax, n, r, i; @@ -514,7 +514,7 @@ struct MinMaxCtx { static void minmaxStep(sqlite_func *context, int argc, const char **argv){ MinMaxCtx *p; int (*xCompare)(const char*, const char*); - int mask; /* 0 for min() or 0xffffffff for max() */ + int tqmask; /* 0 for min() or 0xffffffff for max() */ assert( argc==2 ); if( argv[0]==0 ) return; /* Ignore NULL values */ @@ -523,11 +523,11 @@ static void minmaxStep(sqlite_func *context, int argc, const char **argv){ }else{ xCompare = strcmp; } - mask = (int)sqlite_user_data(context); - assert( mask==0 || mask==-1 ); + tqmask = (int)sqlite_user_data(context); + assert( tqmask==0 || tqmask==-1 ); p = sqlite_aggregate_context(context, sizeof(*p)); if( p==0 || argc<1 ) return; - if( p->z==0 || (xCompare(argv[0],p->z)^mask)<0 ){ + if( p->z==0 || (xCompare(argv[0],p->z)^tqmask)<0 ){ int len; if( p->zBuf[0] ){ sqliteFree(p->z); diff --git a/kexi/3rdparty/kexisql/src/insert.c b/kexi/3rdparty/kexisql/src/insert.c index 660a2a56..8c303573 100644 --- a/kexi/3rdparty/kexisql/src/insert.c +++ b/kexi/3rdparty/kexisql/src/insert.c @@ -541,7 +541,7 @@ insert_cleanup: /* ** Generate code to do a constraint check prior to an INSERT or an UPDATE. ** -** When this routine is called, the stack contains (from bottom to top) +** When this routine is called, the stack tqcontains (from bottom to top) ** the following values: ** ** 1. The recno of the row to be updated before the update. This @@ -567,7 +567,7 @@ insert_cleanup: ** aIdxUsed!=0 and aIdxUsed[i]!=0. ** ** This routine also generates code to check constraints. NOT NULL, -** CHECK, and UNIQUE constraints are all checked. If a constraint fails, +** CHECK, and UNITQUE constraints are all checked. If a constraint fails, ** then the appropriate action is performed. There are five possible ** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE. ** @@ -595,7 +595,7 @@ insert_cleanup: ** value for that column. If the default value ** is NULL, the action is the same as ABORT. ** -** UNIQUE REPLACE The other row that conflicts with the row +** UNITQUE REPLACE The other row that conflicts with the row ** being inserted is removed. ** ** CHECK REPLACE Illegal. The results in an exception. @@ -753,7 +753,7 @@ void sqliteGenerateConstraintChecks( } } - /* Test all UNIQUE constraints by creating entries for each UNIQUE + /* Test all UNITQUE constraints by creating entries for each UNITQUE ** index and making sure that duplicate entries do not already exist. ** Add the new records to the indices as we go. */ @@ -777,7 +777,7 @@ void sqliteGenerateConstraintChecks( /* Find out what action to take in case there is an indexing conflict */ onError = pIdx->onError; - if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */ + if( onError==OE_None ) continue; /* pIdx is not a UNITQUE index */ if( overrideError!=OE_Default ){ onError = overrideError; }else if( pParse->db->onError!=OE_Default ){ @@ -843,7 +843,7 @@ void sqliteGenerateConstraintChecks( default: assert(0); } contAddr = sqliteVdbeCurrentAddr(v); -#if NULL_DISTINCT_FOR_UNIQUE +#if NULL_DISTINCT_FOR_UNITQUE sqliteVdbeChangeP2(v, jumpInst1, contAddr); #endif sqliteVdbeChangeP2(v, jumpInst2, contAddr); diff --git a/kexi/3rdparty/kexisql/src/main.c b/kexi/3rdparty/kexisql/src/main.c index c883f2ea..4fc118c8 100644 --- a/kexi/3rdparty/kexisql/src/main.c +++ b/kexi/3rdparty/kexisql/src/main.c @@ -90,7 +90,7 @@ int sqliteInitCallback(void *pInit, int argc, char **argv, char **azColName){ db->init.iDb = 0; }else{ /* If the SQL column is blank it means this is an index that - ** was created to be the PRIMARY KEY or to fulfill a UNIQUE + ** was created to be the PRIMARY KEY or to fulfill a UNITQUE ** constraint for a CREATE TABLE. The index should have already ** been created when we processed the CREATE TABLE. All we have ** to do here is record the root page number for that index. diff --git a/kexi/3rdparty/kexisql/src/os.c b/kexi/3rdparty/kexisql/src/os.c index 16576924..fc0f91e2 100644 --- a/kexi/3rdparty/kexisql/src/os.c +++ b/kexi/3rdparty/kexisql/src/os.c @@ -172,7 +172,7 @@ static unsigned int elapse; ** ** If you close a file descriptor that points to a file that has locks, ** all locks on that file that are owned by the current process are -** released. To work around this problem, each OsFile structure contains +** released. To work around this problem, each OsFile structure tqcontains ** a pointer to an openCnt structure. There is one openCnt structure ** per open inode, which means that multiple OsFiles can point to a single ** openCnt. When an attempt is made to close an OsFile, if there are @@ -531,11 +531,11 @@ int sqliteOsOpenReadWrite( if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrShPerm, &(id->refNum)) != noErr ){ - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrPerm, &(id->refNum)) != noErr ){ - if (FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if (FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; else @@ -650,7 +650,7 @@ int sqliteOsOpenExclusive(const char *zFilename, OsFile *id, int delFlag){ if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; # else @@ -724,7 +724,7 @@ int sqliteOsOpenReadOnly(const char *zFilename, OsFile *id){ if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; # else @@ -800,7 +800,7 @@ int sqliteOsTempFileName(char *zBuf){ }; static unsigned char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; struct stat buf; @@ -827,7 +827,7 @@ int sqliteOsTempFileName(char *zBuf){ #if OS_WIN static char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; const char *zDir; @@ -854,7 +854,7 @@ int sqliteOsTempFileName(char *zBuf){ #if OS_MAC static char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; char *zDir; @@ -1398,20 +1398,20 @@ int sqliteOsReadLock(OsFile *id){ params.ioParam.ioRefNum = id->refNumRF; params.ioParam.ioPosMode = fsFromStart; params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; while( cnt-->0 && (res = PBLockRangeSync(¶ms))!=noErr ){ UInt32 finalTicks; Delay(1, &finalTicks); /* 1/60 sec */ } if( res == noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; PBUnlockRangeSync(¶ms); params.ioParam.ioPosOffset = FIRST_LOCKBYTE+lk; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; res = PBLockRangeSync(¶ms); params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); } if( res == noErr ){ @@ -1504,24 +1504,24 @@ int sqliteOsWriteLock(OsFile *id){ params.ioParam.ioRefNum = id->refNumRF; params.ioParam.ioPosMode = fsFromStart; params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; while( cnt-->0 && (res = PBLockRangeSync(¶ms))!=noErr ){ UInt32 finalTicks; Delay(1, &finalTicks); /* 1/60 sec */ } if( res == noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE + id->locked; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; if( id->locked==0 || PBUnlockRangeSync(¶ms)==noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; res = PBLockRangeSync(¶ms); }else{ res = afpRangeNotLocked; } params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); } if( res == noErr ){ @@ -1611,13 +1611,13 @@ int sqliteOsUnlock(OsFile *id){ rc = SQLITE_OK; }else if( id->locked<0 ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; PBUnlockRangeSync(¶ms); rc = SQLITE_OK; id->locked = 0; }else{ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+id->locked; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); rc = SQLITE_OK; id->locked = 0; diff --git a/kexi/3rdparty/kexisql/src/pager.c b/kexi/3rdparty/kexisql/src/pager.c index 0ce24086..5259e085 100644 --- a/kexi/3rdparty/kexisql/src/pager.c +++ b/kexi/3rdparty/kexisql/src/pager.c @@ -435,7 +435,7 @@ static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){ /* ** Unlock the database and clear the in-memory cache. This routine ** sets the state of the pager back to what it was when it was first -** opened. Any outstanding pages are invalidated and subsequent attempts +** opened. Any outstanding pages are tqinvalidated and subsequent attempts ** to access those pages will likely result in a coredump. */ static void pager_reset(Pager *pPager){ @@ -1059,7 +1059,7 @@ int sqlitepager_truncate(Pager *pPager, Pgno nPage){ ** Shutdown the page cache. Free all memory and close all files. ** ** If a transaction was in progress when this routine is called, that -** transaction is rolled back. All outstanding pages are invalidated +** transaction is rolled back. All outstanding pages are tqinvalidated ** and their memory is freed. Any attempt to use a page associated ** with this page cache after this function returns will likely ** result in a coredump. @@ -1920,7 +1920,7 @@ int sqlitepager_overwrite(Pager *pPager, Pgno pgno, void *pData){ ** a transaction then removed from the freelist during a later part ** of the same transaction and reused for some other purpose. When it ** is first added to the freelist, this routine is called. When reused, -** the dont_rollback() routine is called. But because the page contains +** the dont_rollback() routine is called. But because the page tqcontains ** critical data, we still need to be sure it gets rolled back in spite ** of the dont_rollback() call. */ diff --git a/kexi/3rdparty/kexisql/src/parse.c b/kexi/3rdparty/kexisql/src/parse.c index 46353691..77b09c5b 100644 --- a/kexi/3rdparty/kexisql/src/parse.c +++ b/kexi/3rdparty/kexisql/src/parse.c @@ -97,7 +97,7 @@ typedef union { IdList* yy320; ExprList* yy322; int yy372; - struct {int value; int mask;} yy407; + struct {int value; int tqmask;} yy407; int yy441; } YYMINORTYPE; #define YYSTACKDEPTH 100 @@ -711,7 +711,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* FLOAT => nothing */ 0, /* NULL => nothing */ 0, /* PRIMARY => nothing */ - 0, /* UNIQUE => nothing */ + 0, /* UNITQUE => nothing */ 0, /* CHECK => nothing */ 0, /* REFERENCES => nothing */ 0, /* COLLATE => nothing */ @@ -840,7 +840,7 @@ static const char *yyTokenName[] = { "STAR", "SLASH", "REM", "CONCAT", "UMINUS", "UPLUS", "BITNOT", "STRING", "JOIN_KW", "INTEGER", "CONSTRAINT", "DEFAULT", - "FLOAT", "NULL", "PRIMARY", "UNIQUE", + "FLOAT", "NULL", "PRIMARY", "UNITQUE", "CHECK", "REFERENCES", "COLLATE", "ON", "DELETE", "UPDATE", "INSERT", "SET", "DEFERRABLE", "FOREIGN", "DROP", "UNION", @@ -935,7 +935,7 @@ static const char *yyRuleName[] = { /* 53 */ "ccons ::= NULL onconf", /* 54 */ "ccons ::= NOT NULL onconf", /* 55 */ "ccons ::= PRIMARY KEY sortorder onconf", - /* 56 */ "ccons ::= UNIQUE onconf", + /* 56 */ "ccons ::= UNITQUE onconf", /* 57 */ "ccons ::= CHECK LP expr RP onconf", /* 58 */ "ccons ::= REFERENCES nm idxlist_opt refargs", /* 59 */ "ccons ::= defer_subclause", @@ -962,7 +962,7 @@ static const char *yyRuleName[] = { /* 80 */ "conslist ::= tcons", /* 81 */ "tcons ::= CONSTRAINT nm", /* 82 */ "tcons ::= PRIMARY KEY LP idxlist RP onconf", - /* 83 */ "tcons ::= UNIQUE LP idxlist RP onconf", + /* 83 */ "tcons ::= UNITQUE LP idxlist RP onconf", /* 84 */ "tcons ::= CHECK expr onconf", /* 85 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt", /* 86 */ "defer_subclause_opt ::=", @@ -1115,7 +1115,7 @@ static const char *yyRuleName[] = { /* 233 */ "expritem ::= expr", /* 234 */ "expritem ::=", /* 235 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf", - /* 236 */ "uniqueflag ::= UNIQUE", + /* 236 */ "uniqueflag ::= UNITQUE", /* 237 */ "uniqueflag ::=", /* 238 */ "idxlist_opt ::=", /* 239 */ "idxlist_opt ::= LP idxlist RP", @@ -2183,7 +2183,7 @@ static void yy_reduce( #line 191 "parse.y" {sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);} #line 2185 "parse.c" - /* No destructor defined for UNIQUE */ + /* No destructor defined for UNITQUE */ break; case 57: /* No destructor defined for CHECK */ @@ -2218,33 +2218,33 @@ static void yy_reduce( break; case 62: #line 207 "parse.y" -{ yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.mask) | yymsp[0].minor.yy407.value; } +{ yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.tqmask) | yymsp[0].minor.yy407.value; } #line 2222 "parse.c" break; case 63: #line 209 "parse.y" -{ yygotominor.yy407.value = 0; yygotominor.yy407.mask = 0x000000; } +{ yygotominor.yy407.value = 0; yygotominor.yy407.tqmask = 0x000000; } #line 2227 "parse.c" /* No destructor defined for MATCH */ /* No destructor defined for nm */ break; case 64: #line 210 "parse.y" -{ yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.mask = 0x0000ff; } +{ yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.tqmask = 0x0000ff; } #line 2234 "parse.c" /* No destructor defined for ON */ /* No destructor defined for DELETE */ break; case 65: #line 211 "parse.y" -{ yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.mask = 0x00ff00; } +{ yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.tqmask = 0x00ff00; } #line 2241 "parse.c" /* No destructor defined for ON */ /* No destructor defined for UPDATE */ break; case 66: #line 212 "parse.y" -{ yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.mask = 0xff0000; } +{ yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.tqmask = 0xff0000; } #line 2248 "parse.c" /* No destructor defined for ON */ /* No destructor defined for INSERT */ @@ -2342,7 +2342,7 @@ static void yy_reduce( #line 238 "parse.y" {sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);} #line 2344 "parse.c" - /* No destructor defined for UNIQUE */ + /* No destructor defined for UNITQUE */ /* No destructor defined for LP */ /* No destructor defined for RP */ break; @@ -3428,7 +3428,7 @@ static void yy_reduce( #line 740 "parse.y" { yygotominor.yy372 = OE_Abort; } #line 3430 "parse.c" - /* No destructor defined for UNIQUE */ + /* No destructor defined for UNITQUE */ break; case 237: #line 741 "parse.y" diff --git a/kexi/3rdparty/kexisql/src/parse.h b/kexi/3rdparty/kexisql/src/parse.h index 188a336c..35949283 100644 --- a/kexi/3rdparty/kexisql/src/parse.h +++ b/kexi/3rdparty/kexisql/src/parse.h @@ -92,7 +92,7 @@ #define TK_FLOAT 92 #define TK_NULL 93 #define TK_PRIMARY 94 -#define TK_UNIQUE 95 +#define TK_UNITQUE 95 #define TK_CHECK 96 #define TK_REFERENCES 97 #define TK_COLLATE 98 diff --git a/kexi/3rdparty/kexisql/src/parse.y b/kexi/3rdparty/kexisql/src/parse.y index 29bb493b..ad0f3716 100644 --- a/kexi/3rdparty/kexisql/src/parse.y +++ b/kexi/3rdparty/kexisql/src/parse.y @@ -193,12 +193,12 @@ ccons ::= COLLATE id(C). { // %type refargs {int} refargs(A) ::= . { A = OE_Restrict * 0x010101; } -refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.mask) | Y.value; } -%type refarg {struct {int value; int mask;}} -refarg(A) ::= MATCH nm. { A.value = 0; A.mask = 0x000000; } -refarg(A) ::= ON DELETE refact(X). { A.value = X; A.mask = 0x0000ff; } -refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.mask = 0x00ff00; } -refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.mask = 0xff0000; } +refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.tqmask) | Y.value; } +%type refarg {struct {int value; int tqmask;}} +refarg(A) ::= MATCH nm. { A.value = 0; A.tqmask = 0x000000; } +refarg(A) ::= ON DELETE refact(X). { A.value = X; A.tqmask = 0x0000ff; } +refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.tqmask = 0x00ff00; } +refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.tqmask = 0xff0000; } %type refact {int} refact(A) ::= SET NULL. { A = OE_SetNull; } refact(A) ::= SET DEFAULT. { A = OE_SetDflt; } diff --git a/kexi/3rdparty/kexisql/src/pragma.c b/kexi/3rdparty/kexisql/src/pragma.c index 4f102657..7b100a70 100644 --- a/kexi/3rdparty/kexisql/src/pragma.c +++ b/kexi/3rdparty/kexisql/src/pragma.c @@ -114,7 +114,7 @@ static int changeTempStorage(Parse *pParse, const char *zStorageType){ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ static const struct { const char *zName; /* Name of the pragma */ - int mask; /* Mask for the db->flags value */ + int tqmask; /* Mask for the db->flags value */ } aPragma[] = { { "vdbe_trace", SQLITE_VdbeTrace }, { "full_column_names", SQLITE_FullColNames }, @@ -131,13 +131,13 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ if( strcmp(zLeft,zRight)==0 && (v = sqliteGetVdbe(pParse))!=0 ){ sqliteVdbeOp3(v, OP_ColumnName, 0, 1, aPragma[i].zName, P3_STATIC); sqliteVdbeOp3(v, OP_ColumnName, 1, 0, "boolean", P3_STATIC); - sqliteVdbeCode(v, OP_Integer, (db->flags & aPragma[i].mask)!=0, 0, + sqliteVdbeCode(v, OP_Integer, (db->flags & aPragma[i].tqmask)!=0, 0, OP_Callback, 1, 0, 0); }else if( getBoolean(zRight) ){ - db->flags |= aPragma[i].mask; + db->flags |= aPragma[i].tqmask; }else{ - db->flags &= ~aPragma[i].mask; + db->flags &= ~aPragma[i].tqmask; } return 1; } diff --git a/kexi/3rdparty/kexisql/src/select.c b/kexi/3rdparty/kexisql/src/select.c index 7ae02d33..cc13aec8 100644 --- a/kexi/3rdparty/kexisql/src/select.c +++ b/kexi/3rdparty/kexisql/src/select.c @@ -1634,7 +1634,7 @@ substExprList(ExprList *pList, int iTable, ExprList *pEList){ */ static int flattenSubquery( Parse *pParse, /* The parsing context */ - Select *p, /* The parent or outer SELECT statement */ + Select *p, /* The tqparent or outer SELECT statement */ int iFrom, /* Index in p->pSrc->a[] of the inner subquery */ int isAgg, /* True if outer SELECT uses aggregate functions */ int subqueryIsAgg /* True if the subquery uses aggregate functions */ @@ -1707,7 +1707,7 @@ static int flattenSubquery( ** the FROM clause of the outer query. Before doing this, remember ** the cursor number for the original outer query FROM element in ** iParent. The iParent cursor will never be used. Subsequent code - ** will scan expressions looking for iParent references and replace + ** will scan expressions looking for iParent references and tqreplace ** those references with expressions that resolve to the subquery FROM ** elements we are now copying in. */ @@ -1985,10 +1985,10 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){ ** This routine does NOT free the Select structure passed in. The ** calling function needs to do that. ** -** The pParent, parentTab, and *pParentAgg fields are filled in if this +** The pParent, tqparentTab, and *pParentAgg fields are filled in if this ** SELECT is a subquery. This routine may try to combine this SELECT -** with its parent to form a single flat query. In so doing, it might -** change the parent query from a non-aggregate to an aggregate query. +** with its tqparent to form a single flat query. In so doing, it might +** change the tqparent query from a non-aggregate to an aggregate query. ** For that reason, the pParentAgg flag is passed as a pointer, so it ** can be changed. ** @@ -2003,7 +2003,7 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){ ** pParent will be NULL. During the processing of the outer query, this ** routine is called recursively to handle the subquery. For the recursive ** call, pParent will point to the outer query. Because the subquery is -** the second element in a three-way join, the parentTab parameter will +** the second element in a three-way join, the tqparentTab parameter will ** be 1 (the 2nd value of a 0-indexed array.) */ int sqliteSelect( @@ -2012,7 +2012,7 @@ int sqliteSelect( int eDest, /* How to dispose of the results */ int iParm, /* A parameter used by the eDest disposal method */ Select *pParent, /* Another SELECT for which this is a sub-query */ - int parentTab, /* Index in pParent->pSrc of this query */ + int tqparentTab, /* Index in pParent->pSrc of this query */ int *pParentAgg /* True if pParent uses aggregate functions */ ){ int i; @@ -2228,11 +2228,11 @@ int sqliteSelect( goto select_end; } - /* Check to see if this is a subquery that can be "flattened" into its parent. + /* Check to see if this is a subquery that can be "flattened" into its tqparent. ** If flattening is a possiblity, do so and return immediately. */ if( pParent && pParentAgg && - flattenSubquery(pParse, pParent, parentTab, *pParentAgg, isAgg) ){ + flattenSubquery(pParse, pParent, tqparentTab, *pParentAgg, isAgg) ){ if( isAgg ) *pParentAgg = 1; return rc; } @@ -2409,15 +2409,15 @@ int sqliteSelect( } /* If this was a subquery, we have now converted the subquery into a - ** temporary table. So delete the subquery structure from the parent + ** temporary table. So delete the subquery structure from the tqparent ** to prevent this subquery from being evaluated again and to force the ** the use of the temporary table. */ if( pParent ){ - assert( pParent->pSrc->nSrc>parentTab ); - assert( pParent->pSrc->a[parentTab].pSelect==p ); + assert( pParent->pSrc->nSrc>tqparentTab ); + assert( pParent->pSrc->a[tqparentTab].pSelect==p ); sqliteSelectDelete(p); - pParent->pSrc->a[parentTab].pSelect = 0; + pParent->pSrc->a[tqparentTab].pSelect = 0; } /* The SELECT was successfully coded. Set the return code to 0 diff --git a/kexi/3rdparty/kexisql/src/sqlite.h b/kexi/3rdparty/kexisql/src/sqlite.h index dd227cd0..4264cc1b 100644 --- a/kexi/3rdparty/kexisql/src/sqlite.h +++ b/kexi/3rdparty/kexisql/src/sqlite.h @@ -828,7 +828,7 @@ int sqlite_rekey( ); /* -** Encode a binary buffer "in" of size n bytes so that it contains +** Encode a binary buffer "in" of size n bytes so that it tqcontains ** no instances of characters '\'' or '\000'. The output is ** null-terminated and can be used as a string value in an INSERT ** or UPDATE statement. Use sqlite_decode_binary() to convert the diff --git a/kexi/3rdparty/kexisql/src/sqliteInt.h b/kexi/3rdparty/kexisql/src/sqliteInt.h index dd0710f9..ca5a85e9 100644 --- a/kexi/3rdparty/kexisql/src/sqliteInt.h +++ b/kexi/3rdparty/kexisql/src/sqliteInt.h @@ -45,16 +45,16 @@ /* ** If the following macro is set to 1, then NULL values are considered ** distinct when determining whether or not two entries are the same -** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL, +** in a UNITQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL, ** OCELOT, and Firebird all work. The SQL92 spec explicitly says this ** is the way things are suppose to work. ** ** If the following macro is set to 0, the NULLs are indistinct for -** a UNIQUE index. In this mode, you can only have a single NULL entry -** for a column declared UNIQUE. This is the way Informix and SQL Server +** a UNITQUE index. In this mode, you can only have a single NULL entry +** for a column declared UNITQUE. This is the way Informix and SQL Server ** work. */ -#define NULL_DISTINCT_FOR_UNIQUE 1 +#define NULL_DISTINCT_FOR_UNITQUE 1 /* ** The maximum number of attached databases. This must be at least 2 @@ -563,7 +563,7 @@ struct FKey { ** occurs. IGNORE means that the particular row that caused the constraint ** error is not inserted or updated. Processing continues and no error ** is returned. REPLACE means that preexisting database rows that caused -** a UNIQUE constraint violation are removed so that the new insert or +** a UNITQUE constraint violation are removed so that the new insert or ** update can proceed. Processing continues and no error is reported. ** ** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys. @@ -623,7 +623,7 @@ struct Index { Table *pTable; /* The SQL table being indexed */ int tnum; /* Page containing root of this index in database file */ u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ - u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */ + u8 autoIndex; /* True if is automatically created (ex: by UNITQUE) */ u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */ Index *pNext; /* The next index associated with the same table */ }; @@ -1053,9 +1053,9 @@ struct TriggerStep { * * struct TriggerStack has a "pNext" member, to allow linked lists to be * constructed. When coding nested triggers (triggers fired by other triggers) - * each nested trigger stores its parent trigger's TriggerStack as the "pNext" + * each nested trigger stores its tqparent trigger's TriggerStack as the "pNext" * pointer. Once the nested trigger has been coded, the pNext value is restored - * to the pTriggerStack member of the Parse stucture and coding of the parent + * to the pTriggerStack member of the Parse stucture and coding of the tqparent * trigger continues. * * Before a nested trigger is coded, the linked list pointed to by the diff --git a/kexi/3rdparty/kexisql/src/tclsqlite.c b/kexi/3rdparty/kexisql/src/tclsqlite.c index fdc2f5e8..7256eafe 100644 --- a/kexi/3rdparty/kexisql/src/tclsqlite.c +++ b/kexi/3rdparty/kexisql/src/tclsqlite.c @@ -999,7 +999,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** DBNAME that is used to control that connection. The database ** connection is deleted when the DBNAME command is deleted. ** -** The second argument is the name of the directory that contains +** The second argument is the name of the directory that tqcontains ** the sqlite database that is to be accessed. ** ** For testing purposes, we also support the following: diff --git a/kexi/3rdparty/kexisql/src/threadtest.c b/kexi/3rdparty/kexisql/src/threadtest.c index 89c79a4c..89b84a10 100644 --- a/kexi/3rdparty/kexisql/src/threadtest.c +++ b/kexi/3rdparty/kexisql/src/threadtest.c @@ -107,7 +107,7 @@ char **db_query(sqlite *db, const char *zFile, const char *zFormat, ...){ va_end(ap); memset(&sResult, 0, sizeof(sResult)); sResult.zFile = zFile; - if( verbose ) printf("QUERY %s: %s\n", zFile, zSql); + if( verbose ) printf("TQUERY %s: %s\n", zFile, zSql); rc = sqlite_exec(db, zSql, db_query_callback, &sResult, &zErrMsg); if( rc==SQLITE_SCHEMA ){ if( zErrMsg ) free(zErrMsg); diff --git a/kexi/3rdparty/kexisql/src/tokenize.c b/kexi/3rdparty/kexisql/src/tokenize.c index 68cb9f99..40fe48ef 100644 --- a/kexi/3rdparty/kexisql/src/tokenize.c +++ b/kexi/3rdparty/kexisql/src/tokenize.c @@ -130,7 +130,7 @@ static Keyword aKeywordTable[] = { { "TRANSACTION", TK_TRANSACTION, }, { "TRIGGER", TK_TRIGGER, }, { "UNION", TK_UNION, }, - { "UNIQUE", TK_UNIQUE, }, + { "UNITQUE", TK_UNITQUE, }, { "UPDATE", TK_UPDATE, }, { "USING", TK_USING, }, { "VACUUM", TK_VACUUM, }, diff --git a/kexi/3rdparty/kexisql/src/util.c b/kexi/3rdparty/kexisql/src/util.c index 09a13c7b..12c3b2d2 100644 --- a/kexi/3rdparty/kexisql/src/util.c +++ b/kexi/3rdparty/kexisql/src/util.c @@ -805,7 +805,7 @@ void sqliteRealToSortable(double r, char *z){ ** This means we can not use the traditional base-64 digit set. */ static const char zDigit[] = "0123456789" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "|~"; if( r<0.0 ){ diff --git a/kexi/3rdparty/kexisql/src/vdbe.c b/kexi/3rdparty/kexisql/src/vdbe.c index fb52ef38..dcf56bf5 100644 --- a/kexi/3rdparty/kexisql/src/vdbe.c +++ b/kexi/3rdparty/kexisql/src/vdbe.c @@ -233,7 +233,7 @@ static int hardDynamicify(Mem *pStack){ } /* -** An ephemeral string value (signified by the MEM_Ephem flag) contains +** An ephemeral string value (signified by the MEM_Ephem flag) tqcontains ** a pointer to a dynamically allocated string where some other entity ** is responsible for deallocating that string. Because the stack entry ** does not control the string, it might be deleted without the stack @@ -309,7 +309,7 @@ static int toInt(const char *zNum, int *pNum){ ** Convert the given stack entity into a integer if it isn't one ** already. ** -** Any prior string or real representation is invalidated. +** Any prior string or real representation is tqinvalidated. ** NULLs are converted into 0. */ #define Integerify(P) if(((P)->flags&MEM_Int)==0){ hardIntegerify(P); } @@ -2741,7 +2741,7 @@ case OP_IsUnique: { /* The last four bytes of the key are different from R. Convert the ** last four bytes of the key into an integer and push it onto the ** stack. (These bytes are the record number of an entry that - ** violates a UNIQUE constraint.) + ** violates a UNITQUE constraint.) */ pTos++; pTos->i = v; @@ -4151,8 +4151,8 @@ case OP_FileOpen: { ** Read a single line of input from the open file (the file opened using ** FileOpen). If we reach end-of-file, jump immediately to P2. If ** we are able to get another line, split the line apart using P3 as -** a delimiter. There should be P1 fields. If the input line contains -** more than P1 fields, ignore the excess. If the input line contains +** a delimiter. There should be P1 fields. If the input line tqcontains +** more than P1 fields, ignore the excess. If the input line tqcontains ** fewer than P1 fields, assume the remaining fields contain NULLs. ** ** Input ends if a line consists of just "\.". A field containing only diff --git a/kexi/3rdparty/kexisql/src/vdbeInt.h b/kexi/3rdparty/kexisql/src/vdbeInt.h index 79b6b51a..3daa74c3 100644 --- a/kexi/3rdparty/kexisql/src/vdbeInt.h +++ b/kexi/3rdparty/kexisql/src/vdbeInt.h @@ -161,7 +161,7 @@ struct sqlite_func { /* ** An Agg structure describes an Aggregator. Each Agg consists of -** zero or more Aggregator elements (AggElem). Each AggElem contains +** zero or more Aggregator elements (AggElem). Each AggElem tqcontains ** a key and one or more values. The values are used in processing ** aggregate functions in a SELECT. The key is used to implement ** the GROUP BY clause of a select. diff --git a/kexi/3rdparty/kexisql/src/where.c b/kexi/3rdparty/kexisql/src/where.c index 714972f8..2b94ad3c 100644 --- a/kexi/3rdparty/kexisql/src/where.c +++ b/kexi/3rdparty/kexisql/src/where.c @@ -29,14 +29,14 @@ struct ExprInfo { ** p->pLeft is not the column of any table */ short int idxRight; /* p->pRight is a column in this table number. -1 if ** p->pRight is not the column of any table */ - unsigned prereqLeft; /* Bitmask of tables referenced by p->pLeft */ - unsigned prereqRight; /* Bitmask of tables referenced by p->pRight */ - unsigned prereqAll; /* Bitmask of tables referenced by p */ + unsigned prereqLeft; /* Bittqmask of tables referenced by p->pLeft */ + unsigned prereqRight; /* Bittqmask of tables referenced by p->pRight */ + unsigned prereqAll; /* Bittqmask of tables referenced by p */ }; /* ** An instance of the following structure keeps track of a mapping -** between VDBE cursor numbers and bitmasks. The VDBE cursor numbers +** between VDBE cursor numbers and bittqmasks. The VDBE cursor numbers ** are small integers contained in SrcList_item.iCursor and Expr.iTable ** fields. For any given WHERE clause, we want to track which cursors ** are being used, so we assign a single bit in a 32-bit word to track @@ -81,12 +81,12 @@ static int exprSplit(int nSlot, ExprInfo *aSlot, Expr *pExpr){ } /* -** Initialize an expression mask set +** Initialize an expression tqmask set */ #define initMaskSet(P) memset(P, 0, sizeof(*P)) /* -** Return the bitmask for the given cursor. Assign a new bitmask +** Return the bittqmask for the given cursor. Assign a new bittqmask ** if this is the first time the cursor has been seen. */ static int getMask(ExprMaskSet *pMaskSet, int iCursor){ @@ -103,13 +103,13 @@ static int getMask(ExprMaskSet *pMaskSet, int iCursor){ } /* -** Destroy an expression mask set +** Destroy an expression tqmask set */ #define freeMaskSet(P) /* NO-OP */ /* ** This routine walks (recursively) an expression tree and generates -** a bitmask indicating which tables are used in that expression +** a bittqmask indicating which tables are used in that expression ** tree. ** ** In order for this routine to work, the calling function must have @@ -120,26 +120,26 @@ static int getMask(ExprMaskSet *pMaskSet, int iCursor){ ** the VDBE cursor number of the table. */ static int exprTableUsage(ExprMaskSet *pMaskSet, Expr *p){ - unsigned int mask = 0; + unsigned int tqmask = 0; if( p==0 ) return 0; if( p->op==TK_COLUMN ){ - mask = getMask(pMaskSet, p->iTable); - if( mask==0 ) mask = -1; - return mask; + tqmask = getMask(pMaskSet, p->iTable); + if( tqmask==0 ) tqmask = -1; + return tqmask; } if( p->pRight ){ - mask = exprTableUsage(pMaskSet, p->pRight); + tqmask = exprTableUsage(pMaskSet, p->pRight); } if( p->pLeft ){ - mask |= exprTableUsage(pMaskSet, p->pLeft); + tqmask |= exprTableUsage(pMaskSet, p->pLeft); } if( p->pList ){ int i; for(i=0; i<p->pList->nExpr; i++){ - mask |= exprTableUsage(pMaskSet, p->pList->a[i].pExpr); + tqmask |= exprTableUsage(pMaskSet, p->pList->a[i].pExpr); } } - return mask; + return tqmask; } /* @@ -302,7 +302,7 @@ static void disableTerm(WhereLevel *pLevel, Expr **ppExpr){ /* ** Generate the beginning of the loop used for WHERE clause processing. -** The return value is a pointer to an (opaque) structure that contains +** The return value is a pointer to an (opaque) structure that tqcontains ** information needed to terminate the loop. Later, the calling routine ** should invoke sqliteWhereEnd() with the return value of this function ** in order to complete the WHERE clause processing. @@ -391,7 +391,7 @@ WhereInfo *sqliteWhereBegin( int nExpr; /* Number of subexpressions in the WHERE clause */ int loopMask; /* One bit set for each outer loop */ int haveKey; /* True if KEY is on the stack */ - ExprMaskSet maskSet; /* The expression mask set */ + ExprMaskSet tqmaskSet; /* The expression tqmask set */ int iDirectEq[32]; /* Term of the form ROWID==X for the N-th table */ int iDirectLt[32]; /* Term of the form ROWID<X or ROWID<=X */ int iDirectGt[32]; /* Term of the form ROWID>X or ROWID>=X */ @@ -407,7 +407,7 @@ WhereInfo *sqliteWhereBegin( ** array fills up, the last entry might point to an expression which ** contains additional unfactored AND operators. */ - initMaskSet(&maskSet); + initMaskSet(&tqmaskSet); memset(aExpr, 0, sizeof(aExpr)); nExpr = exprSplit(ARRAYSIZE(aExpr), aExpr, pWhere); if( nExpr==ARRAYSIZE(aExpr) ){ @@ -440,24 +440,24 @@ WhereInfo *sqliteWhereBegin( /* Analyze all of the subexpressions. */ for(i=0; i<nExpr; i++){ - exprAnalyze(&maskSet, &aExpr[i]); + exprAnalyze(&tqmaskSet, &aExpr[i]); /* If we are executing a trigger body, remove all references to - ** new.* and old.* tables from the prerequisite masks. + ** new.* and old.* tables from the prerequisite tqmasks. */ if( pParse->trigStack ){ int x; if( (x = pParse->trigStack->newIdx) >= 0 ){ - int mask = ~getMask(&maskSet, x); - aExpr[i].prereqRight &= mask; - aExpr[i].prereqLeft &= mask; - aExpr[i].prereqAll &= mask; + int tqmask = ~getMask(&tqmaskSet, x); + aExpr[i].prereqRight &= tqmask; + aExpr[i].prereqLeft &= tqmask; + aExpr[i].prereqAll &= tqmask; } if( (x = pParse->trigStack->oldIdx) >= 0 ){ - int mask = ~getMask(&maskSet, x); - aExpr[i].prereqRight &= mask; - aExpr[i].prereqLeft &= mask; - aExpr[i].prereqAll &= mask; + int tqmask = ~getMask(&tqmaskSet, x); + aExpr[i].prereqRight &= tqmask; + aExpr[i].prereqLeft &= tqmask; + aExpr[i].prereqAll &= tqmask; } } } @@ -476,13 +476,13 @@ WhereInfo *sqliteWhereBegin( ** ** Actually, if there are more than 32 tables in the join, only the ** first 32 tables are candidates for indices. This is (again) due - ** to the limit of 32 bits in an integer bitmask. + ** to the limit of 32 bits in an integer bittqmask. */ loopMask = 0; for(i=0; i<pTabList->nSrc && i<ARRAYSIZE(iDirectEq); i++){ int j; int iCur = pTabList->a[i].iCursor; /* The cursor for this table */ - int mask = getMask(&maskSet, iCur); /* Cursor mask for this table */ + int tqmask = getMask(&tqmaskSet, iCur); /* Cursor tqmask for this table */ Table *pTab = pTabList->a[i].pTab; Index *pIdx; Index *pBestIdx = 0; @@ -524,7 +524,7 @@ WhereInfo *sqliteWhereBegin( } } if( iDirectEq[i]>=0 ){ - loopMask |= mask; + loopMask |= tqmask; pWInfo->a[i].pIdx = 0; continue; } @@ -651,7 +651,7 @@ WhereInfo *sqliteWhereBegin( pWInfo->a[i].pIdx = pBestIdx; pWInfo->a[i].score = bestScore; pWInfo->a[i].bRev = 0; - loopMask |= mask; + loopMask |= tqmask; if( pBestIdx ){ pWInfo->a[i].iCur = pParse->nTab++; pWInfo->peakNTab = pParse->nTab; @@ -1132,7 +1132,7 @@ WhereInfo *sqliteWhereBegin( pLevel->p1 = pLevel->iCur; pLevel->p2 = start; } - loopMask |= getMask(&maskSet, iCur); + loopMask |= getMask(&tqmaskSet, iCur); /* Insert code to test every subexpression that can be completely ** computed using the current set of tables. @@ -1179,7 +1179,7 @@ WhereInfo *sqliteWhereBegin( if( pushKey && !haveKey ){ sqliteVdbeAddOp(v, OP_Recno, pTabList->a[0].iCursor, 0); } - freeMaskSet(&maskSet); + freeMaskSet(&tqmaskSet); return pWInfo; } diff --git a/kexi/3rdparty/kexisql/tool/lemon.c b/kexi/3rdparty/kexisql/tool/lemon.c index b801e6b3..84f73d17 100644 --- a/kexi/3rdparty/kexisql/tool/lemon.c +++ b/kexi/3rdparty/kexisql/tool/lemon.c @@ -298,7 +298,7 @@ char *Strsafe(); void Strsafe_init(/* void */); int Strsafe_insert(/* char * */); -char *Strsafe_find(/* char * */); +char *Strsafe_tqfind(/* char * */); /* Routines for handling symbols of the grammar */ @@ -306,7 +306,7 @@ struct symbol *Symbol_new(); int Symbolcmpp(/* struct symbol **, struct symbol ** */); void Symbol_init(/* void */); int Symbol_insert(/* struct symbol *, char * */); -struct symbol *Symbol_find(/* char * */); +struct symbol *Symbol_tqfind(/* char * */); struct symbol *Symbol_Nth(/* int */); int Symbol_count(/* */); struct symbol **Symbol_arrayof(/* */); @@ -317,14 +317,14 @@ int Configcmp(/* struct config *, struct config * */); struct state *State_new(); void State_init(/* void */); int State_insert(/* struct state *, struct config * */); -struct state *State_find(/* struct config * */); +struct state *State_tqfind(/* struct config * */); struct state **State_arrayof(/* */); /* Routines used for efficiency in Configlist_add */ void Configtable_init(/* void */); int Configtable_insert(/* struct config * */); -struct config *Configtable_find(/* struct config * */); +struct config *Configtable_tqfind(/* struct config * */); void Configtable_clear(/* int(*)(struct config *) */); /****************** From the file "action.c" *******************************/ /* @@ -510,7 +510,7 @@ struct lemon *lemp; /* Find the start symbol */ if( lemp->start ){ - sp = Symbol_find(lemp->start); + sp = Symbol_tqfind(lemp->start); if( sp==0 ){ ErrorMsg(lemp->filename,0, "The specified start symbol \"%s\" is not \ @@ -571,7 +571,7 @@ struct lemon *lemp; bp = Configlist_basis(); /* Get a state with the same basis */ - stp = State_find(bp); + stp = State_tqfind(bp); if( stp ){ /* A state with the same basis already exists! Copy all the follow-set ** propagation links from the state under construction into the @@ -755,7 +755,7 @@ struct lemon *lemp; /* Add the accepting token */ if( lemp->start ){ - sp = Symbol_find(lemp->start); + sp = Symbol_tqfind(lemp->start); if( sp==0 ) sp = lemp->rule->lhs; }else{ sp = lemp->rule->lhs; @@ -933,7 +933,7 @@ int dot; /* Index into the RHS of the rule where the dot goes */ assert( currentend!=0 ); model.rp = rp; model.dot = dot; - cfp = Configtable_find(&model); + cfp = Configtable_tqfind(&model); if( cfp==0 ){ cfp = newconfig(); cfp->rp = rp; @@ -961,7 +961,7 @@ int dot; assert( currentend!=0 ); model.rp = rp; model.dot = dot; - cfp = Configtable_find(&model); + cfp = Configtable_tqfind(&model); if( cfp==0 ){ cfp = newconfig(); cfp->rp = rp; @@ -2542,10 +2542,10 @@ struct lemon *lemp; /* Search for the file "name" which is in the same directory as ** the exacutable */ -PRIVATE char *pathsearch(argv0,name,modemask) +PRIVATE char *pathsearch(argv0,name,modetqmask) char *argv0; char *name; -int modemask; +int modetqmask; { char *pathlist; char *path,*cp; @@ -2578,7 +2578,7 @@ int modemask; *cp = c; if( c==0 ) pathlist = ""; else pathlist = &cp[1]; - if( access(path,modemask)==0 ) break; + if( access(path,modetqmask)==0 ) break; } } } @@ -3470,7 +3470,7 @@ char *y; { char *z; - z = Strsafe_find(y); + z = Strsafe_tqfind(y); if( z==0 && (z=malloc( strlen(y)+1 ))!=0 ){ strcpy(z,y); Strsafe_insert(z); @@ -3581,7 +3581,7 @@ char *data; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -char *Strsafe_find(key) +char *Strsafe_tqfind(key) char *key; { int h; @@ -3605,7 +3605,7 @@ char *x; { struct symbol *sp; - sp = Symbol_find(x); + sp = Symbol_tqfind(x); if( sp==0 ){ sp = (struct symbol *)malloc( sizeof(struct symbol) ); MemoryCheck(sp); @@ -3738,7 +3738,7 @@ char *key; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -struct symbol *Symbol_find(key) +struct symbol *Symbol_tqfind(key) char *key; { int h; @@ -3944,7 +3944,7 @@ struct config *key; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -struct state *State_find(key) +struct state *State_tqfind(key) struct config *key; { int h; @@ -4087,7 +4087,7 @@ struct config *data; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -struct config *Configtable_find(key) +struct config *Configtable_tqfind(key) struct config *key; { int h; diff --git a/kexi/3rdparty/kexisql/tool/lempar.c b/kexi/3rdparty/kexisql/tool/lempar.c index 5604fe10..b6ffceb0 100644 --- a/kexi/3rdparty/kexisql/tool/lempar.c +++ b/kexi/3rdparty/kexisql/tool/lempar.c @@ -58,7 +58,7 @@ #define YY_NO_ACTION (YYNSTATE+YYNRULE+2) #define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1) #define YY_ERROR_ACTION (YYNSTATE+YYNRULE) -/* Next is the action table. Each entry in this table contains +/* Next is the action table. Each entry in this table tqcontains ** ** + An integer which is the number representing the look-ahead ** token diff --git a/kexi/3rdparty/kexisql3/src/alter.c b/kexi/3rdparty/kexisql3/src/alter.c index eba01e29..73c49b1f 100644 --- a/kexi/3rdparty/kexisql3/src/alter.c +++ b/kexi/3rdparty/kexisql3/src/alter.c @@ -53,7 +53,7 @@ static void renameTableFunc( /* The principle used to locate the table name in the CREATE TABLE ** statement is that the table name is the first token that is immediatedly - ** followed by a left parenthesis - TK_LP. + ** followed by a left tqparenthesis - TK_LP. */ if( zSql ){ do { @@ -231,7 +231,7 @@ static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){ #ifndef SQLITE_OMIT_TRIGGER /* Now, if the table is not stored in the temp database, reload any temp - ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined. + ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBTQUERY is defined. */ if( (zWhere=whereTempTriggers(pParse, pTab)) ){ sqlite3VdbeOp3(v, OP_ParseSchema, 1, 0, zWhere, P3_DYNAMIC); @@ -407,7 +407,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){ pDflt = 0; } - /* Check that the new column is not specified as PRIMARY KEY or UNIQUE. + /* Check that the new column is not specified as PRIMARY KEY or UNITQUE. ** If there is a NOT NULL constraint, then the default value for the ** column must not be NULL. */ @@ -416,7 +416,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){ return; } if( pNew->pIndex ){ - sqlite3ErrorMsg(pParse, "Cannot add a UNIQUE column"); + sqlite3ErrorMsg(pParse, "Cannot add a UNITQUE column"); return; } if( pCol->notNull && !pDflt ){ diff --git a/kexi/3rdparty/kexisql3/src/btree.c b/kexi/3rdparty/kexisql3/src/btree.c index 472d63a6..65cddcd4 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 children. The zerodata flag means that this page carries +** this page has no tqchildren. 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 alignment on 64-bit architectures. +** to force 8-byte tqalignment on 64-bit architectures. */ #define ROUND8(x) ((x+7)&~7) @@ -262,9 +262,9 @@ static const char zMagicHeader[] = SQLITE_FILE_HEADER; ** structure is appended and initialized to zero. This structure stores ** information about the page that is decoded from the raw file page. ** -** The pParent field points back to the parent page. This allows us to +** The pParent field points back to the tqparent page. This allows us to ** walk up the BTree from any leaf to the root. Care must be taken to -** unref() the parent page pointer when this page is no longer referenced. +** unref() the tqparent page pointer when this page is no longer referenced. ** The pageDestructor() routine handles that chore. */ struct MemPage { @@ -281,7 +281,7 @@ struct MemPage { u16 maxLocal; /* Copy of Btree.maxLocal or Btree.maxLeaf */ u16 minLocal; /* Copy of Btree.minLocal or Btree.minLeaf */ u16 cellOffset; /* Index in aData of first cell pointer */ - u16 idxParent; /* Index in parent of this node */ + u16 idxParent; /* Index in tqparent of this node */ u16 nFree; /* Number of free bytes on the page */ u16 nCell; /* Number of cells on this page, local and ovfl */ struct _OvflCell { /* Cells that will not fit on aData[] */ @@ -291,7 +291,7 @@ struct MemPage { struct Btree *pBt; /* Pointer back to BTree structure */ u8 *aData; /* Pointer back to the start of the page */ Pgno pgno; /* Page number for this page */ - MemPage *pParent; /* The parent of this page. NULL for root */ + MemPage *pParent; /* The tqparent of this page. NULL for root */ }; /* @@ -443,18 +443,18 @@ static void put4byte(unsigned char *p, u32 v){ #define PTRMAP_ISPAGE(pgsz, pgno) (PTRMAP_PAGENO(pgsz,pgno)==pgno) /* -** The pointer map is a lookup table that identifies the parent page for -** each child page in the database file. The parent page is the page that -** contains a pointer to the child. Every page in the database contains -** 0 or 1 parent pages. (In this context 'database page' refers +** The pointer map is a lookup table that identifies the tqparent page for +** each child page in the database file. The tqparent page is the page that +** contains a pointer to the child. Every page in the database tqcontains +** 0 or 1 tqparent pages. (In this context 'database page' refers ** to any page that is not part of the pointer map itself.) Each pointer map -** entry consists of a single byte 'type' and a 4 byte parent page number. +** entry consists of a single byte 'type' and a 4 byte tqparent page number. ** The PTRMAP_XXX identifiers below are the valid types. ** ** The purpose of the pointer map is to facility moving pages from one ** position in the file to another as part of autovacuum. When a page -** is moved, the pointer in its parent must be updated to point to the -** new location. The pointer map is used to locate the parent page quickly. +** is moved, the pointer in its tqparent must be updated to point to the +** new location. The pointer map is used to locate the tqparent page quickly. ** ** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not ** used in this case. @@ -471,7 +471,7 @@ static void put4byte(unsigned char *p, u32 v){ ** page in the overflow page list. ** ** PTRMAP_BTREE: The database page is a non-root btree page. The page number -** identifies the parent page in the btree. +** identifies the tqparent page in the btree. */ #define PTRMAP_ROOTPAGE 1 #define PTRMAP_FREEPAGE 2 @@ -483,10 +483,10 @@ static void put4byte(unsigned char *p, u32 v){ ** Write an entry into the pointer map. ** ** This routine updates the pointer map entry for page number 'key' -** so that it maps to type 'eType' and parent page number 'pgno'. +** so that it maps to type 'eType' and tqparent page number 'pgno'. ** An error code is returned if something goes wrong, otherwise SQLITE_OK. */ -static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno parent){ +static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno tqparent){ u8 *pPtrmap; /* The pointer map page */ Pgno iPtrmap; /* The pointer map page number */ int offset; /* Offset in pointer map page */ @@ -503,12 +503,12 @@ static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno parent){ } offset = PTRMAP_PTROFFSET(pBt->usableSize, key); - if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=parent ){ - TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, parent)); + if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=tqparent ){ + TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, tqparent)); rc = sqlite3pager_write(pPtrmap); if( rc==SQLITE_OK ){ pPtrmap[offset] = eType; - put4byte(&pPtrmap[offset+1], parent); + put4byte(&pPtrmap[offset+1], tqparent); } } @@ -520,7 +520,7 @@ static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno parent){ ** Read an entry from the pointer map. ** ** This routine retrieves the pointer map entry for page 'key', writing -** the type and parent page number to *pEType and *pPgno respectively. +** the type and tqparent page number to *pEType and *pPgno respectively. ** An error code is returned if something goes wrong, otherwise SQLITE_OK. */ static int ptrmapGet(Btree *pBt, Pgno key, u8 *pEType, Pgno *pPgno){ @@ -1001,8 +1001,8 @@ static void decodeFlags(MemPage *pPage, int flagByte){ ** Initialize the auxiliary information for a disk block. ** ** The pParent parameter must be a pointer to the MemPage which -** is the parent of the page being initialized. The root of a -** BTree has no parent and so for that page, pParent==NULL. +** is the tqparent of the page being initialized. The root of a +** BTree has no tqparent and so for that page, pParent==NULL. ** ** Return SQLITE_OK on success. If we see that the page does ** not contain a well-formed database page, then return @@ -1012,7 +1012,7 @@ static void decodeFlags(MemPage *pPage, int flagByte){ */ static int initPage( MemPage *pPage, /* The page to be initialized */ - MemPage *pParent /* The parent. Might be NULL */ + MemPage *pParent /* The tqparent. Might be NULL */ ){ int pc; /* Address of a freeblock within pPage->aData[] */ int hdr; /* Offset to beginning of page header */ @@ -1029,7 +1029,7 @@ static int initPage( assert( pPage->pgno==sqlite3pager_pagenumber(pPage->aData) ); assert( pPage->aData == &((unsigned char*)pPage)[-pBt->pageSize] ); if( pPage->pParent!=pParent && (pPage->pParent!=0 || pPage->isInit) ){ - /* The parent page should never change unless the file is corrupt */ + /* The tqparent page should never change unless the file is corrupt */ return SQLITE_CORRUPT_BKPT; } if( pPage->isInit ) return SQLITE_OK; @@ -1286,14 +1286,14 @@ int sqlite3BtreeOpen( #endif } pBt->usableSize = pBt->pageSize - nReserve; - assert( (pBt->pageSize & 7)==0 ); /* 8-byte alignment of pageSize */ + assert( (pBt->pageSize & 7)==0 ); /* 8-byte tqalignment of pageSize */ sqlite3pager_set_pagesize(pBt->pPager, pBt->pageSize); *ppBtree = pBt; return SQLITE_OK; } /* -** Close an open database and invalidate all cursors. +** Close an open database and tqinvalidate 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 children of page pPage. Also, if +** Set the pointer-map entries for all tqchildren of page pPage. Also, if ** pPage contains cells that point to overflow pages, set the pointer ** map entries for the overflow pages as well. */ @@ -2080,7 +2080,7 @@ int sqlite3BtreeCommitStmt(Btree *pBt){ ** Rollback the active statement subtransaction. If no subtransaction ** is active this routine is a no-op. ** -** All cursors will be invalidated by this operation. Any attempt +** All cursors will be tqinvalidated by this operation. Any attempt ** to use a cursor that was open at the beginning of this operation ** will result in an error. */ @@ -2578,7 +2578,7 @@ static int isRootPage(MemPage *pPage){ } /* -** Move the cursor up to the parent page. +** Move the cursor up to the tqparent page. ** ** pCur->idx is set to the cell index that contains the pointer ** to the page we are coming from. If we are coming from the @@ -3065,7 +3065,7 @@ static int allocatePage( memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4); } }else{ - /* The trunk page is required by the caller but it contains + /* The trunk page is required by the caller but it tqcontains ** pointers to free-list leaves. The first leaf becomes a trunk ** page in this case. */ @@ -3425,11 +3425,11 @@ static int reparentPage(Btree *pBt, Pgno pgno, MemPage *pNewParent, int idx){ /* -** Change the pParent pointer of all children of pPage to point back +** Change the pParent pointer of all tqchildren of pPage to point back ** to pPage. ** ** In other words, for every child of pPage, invoke reparentPage() -** to make sure that each child knows that pPage is its parent. +** to make sure that each child knows that pPage is its tqparent. ** ** This routine gets called after you memcpy() one page into ** another. @@ -3644,7 +3644,7 @@ static void assemblePage( /* Forward reference */ static int balance(MemPage*, int); -#ifndef SQLITE_OMIT_QUICKBALANCE +#ifndef SQLITE_OMIT_TQUICKBALANCE /* ** This version of balance() handles the common special case where ** a new entry is being inserted on the extreme right-end of the @@ -3659,7 +3659,7 @@ static int balance(MemPage*, int); ** fill up. On average. ** ** pPage is the leaf page which is the right-most page in the tree. -** pParent is its parent. pPage must have a single overflow entry +** pParent is its tqparent. pPage must have a single overflow entry ** which is also the right-most entry on the page. */ static int balance_quick(MemPage *pPage, MemPage *pParent){ @@ -3670,9 +3670,9 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){ int szCell; CellInfo info; Btree *pBt = pPage->pBt; - int parentIdx = pParent->nCell; /* pParent new divider cell index */ - int parentSize; /* Size of new divider cell */ - u8 parentCell[64]; /* Space for the new divider cell */ + int tqparentIdx = pParent->nCell; /* pParent new divider cell index */ + int tqparentSize; /* Size of new divider cell */ + u8 tqparentCell[64]; /* Space for the new divider cell */ /* Allocate a new page. Insert the overflow cell from pPage ** into it. Then remove the overflow cell from pPage. @@ -3687,7 +3687,7 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){ assemblePage(pNew, 1, &pCell, &szCell); pPage->nOverflow = 0; - /* Set the parent of the newly allocated page to pParent. */ + /* Set the tqparent of the newly allocated page to pParent. */ pNew->pParent = pParent; sqlite3pager_ref(pParent->aData); @@ -3697,16 +3697,16 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){ */ assert( pPage->nCell>0 ); parseCellPtr(pPage, findCell(pPage, pPage->nCell-1), &info); - rc = fillInCell(pParent, parentCell, 0, info.nKey, 0, 0, &parentSize); + rc = fillInCell(pParent, tqparentCell, 0, info.nKey, 0, 0, &tqparentSize); if( rc!=SQLITE_OK ){ return rc; } - assert( parentSize<64 ); - rc = insertCell(pParent, parentIdx, parentCell, parentSize, 0, 4); + assert( tqparentSize<64 ); + rc = insertCell(pParent, tqparentIdx, tqparentCell, tqparentSize, 0, 4); if( rc!=SQLITE_OK ){ return rc; } - put4byte(findOverflowCell(pParent,parentIdx), pPage->pgno); + put4byte(findOverflowCell(pParent,tqparentIdx), pPage->pgno); put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew); #ifndef SQLITE_OMIT_AUTOVACUUM @@ -3726,13 +3726,13 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){ } #endif - /* Release the reference to the new page and balance the parent page, + /* Release the reference to the new page and balance the tqparent page, ** in case the divider cell inserted caused it to become overfull. */ releasePage(pNew); return balance(pParent, 0); } -#endif /* SQLITE_OMIT_QUICKBALANCE */ +#endif /* SQLITE_OMIT_TQUICKBALANCE */ /* ** The ISAUTOVACUUM macro is used within balance_nonroot() to determine @@ -3752,7 +3752,7 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){ ** of pPage so that all pages have about the same amount of free space. ** Usually NN siblings on either side of pPage is used in the balancing, ** though more siblings might come from one side if pPage is the first -** or last child of its parent. If pPage has fewer than 2*NN siblings +** or last child of its tqparent. If pPage has fewer than 2*NN siblings ** (something which can only happen if pPage is the root page or a ** child of root) then all available siblings participate in the balancing. ** @@ -3768,16 +3768,16 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){ ** if the page is overfull. Part of the job of this routine is to ** make sure all Cells for pPage once again fit in pPage->aData[]. ** -** In the course of balancing the siblings of pPage, the parent of pPage +** In the course of balancing the siblings of pPage, the tqparent of pPage ** might become overfull or underfull. If that happens, then this routine -** is called recursively on the parent. +** is called recursively on the tqparent. ** ** If this routine fails for any reason, it might leave the database ** in a corrupted state. So if this routine fails, the database should ** be rolled back. */ static int balance_nonroot(MemPage *pPage){ - MemPage *pParent; /* The parent of pPage */ + MemPage *pParent; /* The tqparent of pPage */ Btree *pBt; /* The whole database */ int nCell = 0; /* Number of cells in apCell[] */ int nMaxCells = 0; /* Allocated size of apCell, szCell, aFrom. */ @@ -3812,7 +3812,7 @@ static int balance_nonroot(MemPage *pPage){ #endif /* - ** Find the parent page. + ** Find the tqparent page. */ assert( pPage->isInit ); assert( sqlite3pager_iswriteable(pPage->aData) ); @@ -3822,7 +3822,7 @@ static int balance_nonroot(MemPage *pPage){ assert( pParent ); TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno)); -#ifndef SQLITE_OMIT_QUICKBALANCE +#ifndef SQLITE_OMIT_TQUICKBALANCE /* ** A special case: If a new entry has just been inserted into a ** table (that is, a btree with integer keys and all data at the leaves) @@ -3848,7 +3848,7 @@ static int balance_nonroot(MemPage *pPage){ #endif /* - ** Find the cell in the parent page whose left child points back + ** Find the cell in the tqparent page whose left child points back ** to pPage. The "idx" variable is the index of that cell. If pPage ** is the rightmost child of pParent then set idx to pParent->nCell */ @@ -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 children then all children of pParent are taken. + ** has NB or fewer tqchildren then all tqchildren 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 - ** alignment */ + ** tqalignment */ 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 alignment required */ + assert( ((aCopy[0] - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment 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 alignment required */ + assert( ((aCopy[i] - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment required */ } aSpace = &aCopy[NB-1][pBt->pageSize+ROUND8(sizeof(MemPage))]; - assert( ((aSpace - (u8*)apCell) & 7)==0 ); /* 8-byte alignment required */ + assert( ((aSpace - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment 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 - ** children of cells, the right-child of the page, or overflow pages + ** tqchildren of cells, the right-child of the page, or overflow pages ** pointed to by cells. */ if( pBt->autoVacuum ){ @@ -4218,7 +4218,7 @@ static int balance_nonroot(MemPage *pPage){ j = cntNew[i]; /* If the sibling page assembled above was not the right-most sibling, - ** insert a divider cell into the parent page. + ** insert a divider cell into the tqparent page. */ if( i<nNew-1 && j<nCell ){ u8 *pCell; @@ -4284,7 +4284,7 @@ static int balance_nonroot(MemPage *pPage){ } /* - ** Reparent children of all cells. + ** Retqparent tqchildren of all cells. */ for(i=0; i<nNew; i++){ rc = reparentChildPages(apNew[i]); @@ -4294,9 +4294,9 @@ static int balance_nonroot(MemPage *pPage){ if( rc!=SQLITE_OK ) goto balance_cleanup; /* - ** Balance the parent page. Note that the current page (pPage) might + ** Balance the tqparent page. Note that the current page (pPage) might ** have been added to the freelist so it might no longer be initialized. - ** But the parent page will always be initialized. + ** But the tqparent page will always be initialized. */ assert( pParent->isInit ); /* assert( pPage->isInit ); // No! pPage might have been added to freelist */ @@ -4376,7 +4376,7 @@ static int balance_shallower(MemPage *pPage){ szCell[i] = cellSizePtr(pChild, apCell[i]); } assemblePage(pPage, pChild->nCell, apCell, szCell); - /* Copy the right-pointer of the child to the parent. */ + /* Copy the right-pointer of the child to the tqparent. */ put4byte(&pPage->aData[pPage->hdrOffset+8], get4byte(&pChild->aData[pChild->hdrOffset+8])); freePage(pChild); @@ -4433,10 +4433,10 @@ static int balance_deeper(MemPage *pPage){ Pgno pgnoChild; /* Page number of the new child page */ Btree *pBt; /* The BTree */ int usableSize; /* Total usable size of a page */ - u8 *data; /* Content of the parent page */ + u8 *data; /* Content of the tqparent page */ u8 *cdata; /* Content of the child page */ - int hdr; /* Offset to page header in parent */ - int brk; /* Offset to content of first cell in parent */ + int hdr; /* Offset to page header in tqparent */ + int brk; /* Offset to content of first cell in tqparent */ assert( pPage->pParent==0 ); assert( pPage->nOverflow>0 ); @@ -4842,7 +4842,7 @@ int sqlite3BtreeCreateTable(Btree *pBt, int *piTable, int flags){ } /* -** Erase the given database page and all its children. Return +** Erase the given database page and all its tqchildren. Return ** the page to the freelist. */ static int clearDatabasePage( @@ -5136,7 +5136,7 @@ static int btreePageDump(Btree *pBt, int pgno, int recursive, MemPage *pParent){ pPage->leaf = (c & PTF_LEAF)!=0; pPage->hasData = !(pPage->zeroData || (!pPage->leaf && pPage->leafData)); nCell = get2byte(&data[hdr+3]); - sqlite3DebugPrintf("PAGE %d: flags=0x%02x frag=%d parent=%d\n", pgno, + sqlite3DebugPrintf("PAGE %d: flags=0x%02x frag=%d tqparent=%d\n", pgno, data[hdr], data[hdr+7], (pPage->isInit && pPage->pParent) ? pPage->pParent->pgno : 0); assert( hdr == (pgno==1 ? 100 : 0) ); @@ -5353,7 +5353,7 @@ static void checkPtrmap( IntegrityCk *pCheck, /* Integrity check context */ Pgno iChild, /* Child page number */ u8 eType, /* Expected pointer map type */ - Pgno iParent, /* Expected pointer map parent page number */ + Pgno iParent, /* Expected pointer map tqparent page number */ char *zContext /* Context description (used for error msg) */ ){ int rc; @@ -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 children. -** 7. Verify that the depth of all children is the same. +** 6. Recursively call checkTreePage on all tqchildren. +** 7. Verify that the depth of all tqchildren 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 429213da..02faa0fe 100644 --- a/kexi/3rdparty/kexisql3/src/build.c +++ b/kexi/3rdparty/kexisql3/src/build.c @@ -67,19 +67,19 @@ void sqlite3FinishCoding(Parse *pParse){ if( v ){ sqlite3VdbeAddOp(v, OP_Halt, 0, 0); - /* The cookie mask contains one bit for each database file open. + /* The cookie tqmask contains one bit for each database file open. ** (Bit 0 is for main, bit 1 is for temp, and so forth.) Bits are ** set for each database that is used. Generate code to start a ** transaction on each used database and to verify the schema cookie ** on each used database. */ if( pParse->cookieGoto>0 ){ - u32 mask; + u32 tqmask; int iDb; sqlite3VdbeJumpHere(v, pParse->cookieGoto-1); - for(iDb=0, mask=1; iDb<db->nDb; mask<<=1, iDb++){ - if( (mask & pParse->cookieMask)==0 ) continue; - sqlite3VdbeAddOp(v, OP_Transaction, iDb, (mask & pParse->writeMask)!=0); + for(iDb=0, tqmask=1; iDb<db->nDb; tqmask<<=1, iDb++){ + if( (tqmask & pParse->cookieMask)==0 ) continue; + sqlite3VdbeAddOp(v, OP_Transaction, iDb, (tqmask & pParse->writeMask)!=0); sqlite3VdbeAddOp(v, OP_VerifyCookie, iDb, pParse->cookieValue[iDb]); } sqlite3VdbeAddOp(v, OP_Goto, 0, pParse->cookieGoto); @@ -746,7 +746,7 @@ void sqlite3StartTable( /* Begin generating the code that will insert the table record into ** the SQLITE_MASTER table. Note in particular that we must go ahead ** and allocate the record number for the table entry now. Before any - ** PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause + ** PRIMARY KEY or UNITQUE keywords are parsed. Those keywords will cause ** indices to be created and the table record must come before the ** indices. Hence, the record number for the table must be allocated ** now. @@ -879,7 +879,7 @@ void sqlite3AddNotNull(Parse *pParse, int onError){ ** ** This routine does a case-independent search of zType for the ** substrings in the following table. If one of the substrings is -** found, the corresponding affinity is returned. If zType contains +** found, the corresponding affinity is returned. If zType tqcontains ** more than one of the substrings, entries toward the top of ** the table take priority. For example, if zType is 'BLOBINT', ** SQLITE_AFF_INTEGER is returned. @@ -2011,7 +2011,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){ ** Create a new index for an SQL table. pName1.pName2 is the name of the index ** and pTblList is the name of the table that is to be indexed. Both will ** be NULL for a primary key or an index that is created to satisfy a -** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable +** UNITQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable ** as the table to be indexed. pParse->pNewTable is a table that is ** currently being constructed by a CREATE TABLE statement. ** @@ -2104,7 +2104,7 @@ void sqlite3CreateIndex( ** index, then we will continue to process this index. ** ** If pName==0 it means that we are - ** dealing with a primary key or UNIQUE constraint. We have to invent our + ** dealing with a primary key or UNITQUE constraint. We have to invent our ** own name. */ if( pName ){ @@ -2211,12 +2211,12 @@ void sqlite3CreateIndex( if( pTab==pParse->pNewTable ){ /* This routine has been called to create an automatic index as a - ** result of a PRIMARY KEY or UNIQUE clause on a column definition, or - ** a PRIMARY KEY or UNIQUE clause following the column definitions. + ** result of a PRIMARY KEY or UNITQUE clause on a column definition, or + ** a PRIMARY KEY or UNITQUE clause following the column definitions. ** i.e. one of: ** ** CREATE TABLE t(x PRIMARY KEY, y); - ** CREATE TABLE t(x, y, UNIQUE(x, y)); + ** CREATE TABLE t(x, y, UNITQUE(x, y)); ** ** Either way, check to see if the table already has such an index. If ** so, don't bother creating this one. This only applies to @@ -2285,7 +2285,7 @@ void sqlite3CreateIndex( ** we don't want to recreate it. ** ** If pTblName==0 it means this index is generated as a primary key - ** or UNIQUE constraint of a CREATE TABLE statement. Since the table + ** or UNITQUE constraint of a CREATE TABLE statement. Since the table ** has just been created, it contains no data and the index initialization ** step can be skipped. */ @@ -2309,11 +2309,11 @@ void sqlite3CreateIndex( if( pStart && pEnd ){ /* A named index with an explicit CREATE INDEX statement */ zStmt = sqlite3MPrintf("CREATE%s INDEX %.*s", - onError==OE_None ? "" : " UNIQUE", + onError==OE_None ? "" : " UNITQUE", pEnd->z - pName->z + 1, pName->z); }else{ - /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */ + /* An automatic index created by a PRIMARY KEY or UNITQUE constraint */ /* zStmt = sqlite3MPrintf(""); */ zStmt = 0; } @@ -2331,7 +2331,7 @@ void sqlite3CreateIndex( sqliteFree(zStmt); /* Fill the index with data and reparse the schema. Code an OP_Expire - ** to invalidate all pre-compiled statements. + ** to tqinvalidate all pre-compiled statements. */ if( pTblName ){ sqlite3RefillIndex(pParse, pIndex, iMem); @@ -2428,7 +2428,7 @@ void sqlite3DropIndex(Parse *pParse, SrcList *pName){ goto exit_drop_index; } if( pIndex->autoIndex ){ - sqlite3ErrorMsg(pParse, "index associated with UNIQUE " + sqlite3ErrorMsg(pParse, "index associated with UNITQUE " "or PRIMARY KEY constraint cannot be dropped", 0); goto exit_drop_index; } @@ -2766,7 +2766,7 @@ static int sqlite3OpenTempDatabase(Parse *pParse){ void sqlite3CodeVerifySchema(Parse *pParse, int iDb){ sqlite3 *db; Vdbe *v; - int mask; + int tqmask; v = sqlite3GetVdbe(pParse); if( v==0 ) return; /* This only happens if there was a prior error */ @@ -2778,9 +2778,9 @@ void sqlite3CodeVerifySchema(Parse *pParse, int iDb){ assert( iDb<db->nDb ); assert( db->aDb[iDb].pBt!=0 || iDb==1 ); assert( iDb<32 ); - mask = 1<<iDb; - if( (pParse->cookieMask & mask)==0 ){ - pParse->cookieMask |= mask; + tqmask = 1<<iDb; + if( (pParse->cookieMask & tqmask)==0 ){ + pParse->cookieMask |= tqmask; pParse->cookieValue[iDb] = db->aDb[iDb].schema_cookie; if( !OMIT_TEMPDB && iDb==1 ){ sqlite3OpenTempDatabase(pParse); diff --git a/kexi/3rdparty/kexisql3/src/expr.c b/kexi/3rdparty/kexisql3/src/expr.c index 45f7fc2f..9d079e1b 100644 --- a/kexi/3rdparty/kexisql3/src/expr.c +++ b/kexi/3rdparty/kexisql3/src/expr.c @@ -478,7 +478,7 @@ ExprList *sqlite3ExprListDup(ExprList *p){ ** called with a NULL argument. */ #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \ - || !defined(SQLITE_OMIT_SUBQUERY) + || !defined(SQLITE_OMIT_SUBTQUERY) SrcList *sqlite3SrcListDup(SrcList *p){ SrcList *pNew; int i; @@ -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 children +** 0 means continue walking the tree. 1 means do not walk tqchildren ** of the current node but continue with siblings. 2 means abandon ** the tree walk completely. ** @@ -698,7 +698,7 @@ static int exprNodeIsConstant(void *pArg, Expr *pExpr){ case TK_DOT: case TK_AGG_FUNCTION: case TK_AGG_COLUMN: -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY case TK_SELECT: case TK_EXISTS: #endif @@ -1018,15 +1018,15 @@ static int lookupName( } /* If a column from a table in pSrcList is referenced, then record - ** this fact in the pSrcList.a[].colUsed bitmask. Column 0 causes + ** this fact in the pSrcList.a[].colUsed bittqmask. Column 0 causes ** bit 0 to be set. Column 1 sets bit 1. And so forth. If the - ** column number is greater than the number of bits in the bitmask - ** then set the high-order bit of the bitmask. + ** column number is greater than the number of bits in the bittqmask + ** then set the high-order bit of the bittqmask. */ if( pExpr->iColumn>=0 && pMatch!=0 ){ int n = pExpr->iColumn; - if( n>=sizeof(Bitmask)*8 ){ - n = sizeof(Bitmask)*8-1; + if( n>=sizeof(Bittqmask)*8 ){ + n = sizeof(Bittqmask)*8-1; } assert( pMatch->iCursor==pExpr->iTable ); pMatch->colUsed |= 1<<n; @@ -1190,7 +1190,7 @@ static int nameResolverStep(void *pArg, Expr *pExpr){ */ return is_agg; } -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY case TK_SELECT: case TK_EXISTS: #endif @@ -1273,7 +1273,7 @@ struct QueryCoder { ** of allowed values. The second form causes the SELECT to generate ** a temporary table. */ -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){ int testAddr = 0; /* One-time test address */ Vdbe *v = sqlite3GetVdbe(pParse); @@ -1414,7 +1414,7 @@ void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){ } return; } -#endif /* SQLITE_OMIT_SUBQUERY */ +#endif /* SQLITE_OMIT_SUBTQUERY */ /* ** Generate an instruction that will put the integer describe by @@ -1649,7 +1649,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){ sqlite3VdbeOp3(v, OP_Function, constMask, nExpr, (char*)pDef, P3_FUNCDEF); break; } -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY case TK_EXISTS: case TK_SELECT: { sqlite3CodeSubselect(pParse, pExpr); @@ -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 alignment of TK_ and OP_ constants + /* Verify correct tqalignment 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/func.c b/kexi/3rdparty/kexisql3/src/func.c index 9917f4e2..36435343 100644 --- a/kexi/3rdparty/kexisql3/src/func.c +++ b/kexi/3rdparty/kexisql3/src/func.c @@ -42,20 +42,20 @@ static void minmaxFunc( sqlite3_value **argv ){ int i; - int mask; /* 0 for min() or 0xffffffff for max() */ + int tqmask; /* 0 for min() or 0xffffffff for max() */ int iBest; CollSeq *pColl; if( argc==0 ) return; - mask = sqlite3_user_data(context)==0 ? 0 : -1; + tqmask = sqlite3_user_data(context)==0 ? 0 : -1; pColl = sqlite3GetFuncCollSeq(context); assert( pColl ); - assert( mask==-1 || mask==0 ); + assert( tqmask==-1 || tqmask==0 ); iBest = 0; if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; for(i=1; i<argc; i++){ if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return; - if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^mask)>=0 ){ + if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^tqmask)>=0 ){ iBest = i; } } @@ -545,7 +545,7 @@ static void versionFunc( ** change. This function may disappear. Do not write code that depends ** on this function. ** -** Implementation of the QUOTE() function. This function takes a single +** Implementation of the TQUOTE() function. This function takes a single ** argument. If the argument is numeric, the return value is the same as ** the argument. If the argument is NULL, the return value is the string ** "NULL". Otherwise, the argument is enclosed in single quotes with @@ -661,7 +661,7 @@ static void soundexFunc(sqlite3_context *context, int argc, sqlite3_value **argv static void randStr(sqlite3_context *context, int argc, sqlite3_value **argv){ static const unsigned char zSrc[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789" ".-!,:*^+=_|?/<> "; int iMin, iMax, n, r, i; diff --git a/kexi/3rdparty/kexisql3/src/insert.c b/kexi/3rdparty/kexisql3/src/insert.c index 28d4236e..4cac8724 100644 --- a/kexi/3rdparty/kexisql3/src/insert.c +++ b/kexi/3rdparty/kexisql3/src/insert.c @@ -720,7 +720,7 @@ insert_cleanup: /* ** Generate code to do a constraint check prior to an INSERT or an UPDATE. ** -** When this routine is called, the stack contains (from bottom to top) +** When this routine is called, the stack tqcontains (from bottom to top) ** the following values: ** ** 1. The rowid of the row to be updated before the update. This @@ -746,7 +746,7 @@ insert_cleanup: ** aIdxUsed!=0 and aIdxUsed[i]!=0. ** ** This routine also generates code to check constraints. NOT NULL, -** CHECK, and UNIQUE constraints are all checked. If a constraint fails, +** CHECK, and UNITQUE constraints are all checked. If a constraint fails, ** then the appropriate action is performed. There are five possible ** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE. ** @@ -774,7 +774,7 @@ insert_cleanup: ** value for that column. If the default value ** is NULL, the action is the same as ABORT. ** -** UNIQUE REPLACE The other row that conflicts with the row +** UNITQUE REPLACE The other row that conflicts with the row ** being inserted is removed. ** ** CHECK REPLACE Illegal. The results in an exception. @@ -927,7 +927,7 @@ void sqlite3GenerateConstraintChecks( } } - /* Test all UNIQUE constraints by creating entries for each UNIQUE + /* Test all UNITQUE constraints by creating entries for each UNITQUE ** index and making sure that duplicate entries do not already exist. ** Add the new records to the indices as we go. */ @@ -951,7 +951,7 @@ void sqlite3GenerateConstraintChecks( /* Find out what action to take in case there is an indexing conflict */ onError = pIdx->onError; - if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */ + if( onError==OE_None ) continue; /* pIdx is not a UNITQUE index */ if( overrideError!=OE_Default ){ onError = overrideError; }else if( onError==OE_Default ){ @@ -1015,7 +1015,7 @@ void sqlite3GenerateConstraintChecks( break; } } -#if NULL_DISTINCT_FOR_UNIQUE +#if NULL_DISTINCT_FOR_UNITQUE sqlite3VdbeJumpHere(v, jumpInst1); #endif sqlite3VdbeJumpHere(v, jumpInst2); diff --git a/kexi/3rdparty/kexisql3/src/keywordhash.h b/kexi/3rdparty/kexisql3/src/keywordhash.h index 9beb5fbd..708440a2 100644 --- a/kexi/3rdparty/kexisql3/src/keywordhash.h +++ b/kexi/3rdparty/kexisql3/src/keywordhash.h @@ -8,8 +8,8 @@ static int keywordCode(const char *z, int n){ "CASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSS" "CURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCH" "FAILIMITFROMFULLGROUPDATEIMMEDIATEINSERTINSTEADINTOFFSETISNULL" - "JOINORDEREPLACEOUTERESTRICTPRIMARYQUERYRIGHTROLLBACKROWHENUNION" - "UNIQUEUSINGVACUUMVALUESVIEWHERE"; + "JOINORDEREPLACEOUTERESTRICTPRIMARYTQUERYRIGHTROLLBACKROWHENUNION" + "UNITQUEUSINGVACUUMVALUESVIEWHERE"; static const unsigned char aHash[127] = { 91, 80, 106, 90, 0, 4, 0, 0, 113, 0, 83, 0, 0, 94, 44, 76, 92, 0, 105, 108, 96, 0, 0, 10, 0, 0, @@ -76,8 +76,8 @@ static int keywordCode(const char *z, int n){ TK_FROM, TK_JOIN_KW, TK_GROUP, TK_UPDATE, TK_IMMEDIATE, TK_INSERT, TK_INSTEAD, TK_INTO, TK_OF, TK_OFFSET, TK_SET, TK_ISNULL, TK_JOIN, TK_ORDER, TK_REPLACE, - TK_JOIN_KW, TK_RESTRICT, TK_PRIMARY, TK_QUERY, TK_JOIN_KW, - TK_ROLLBACK, TK_ROW, TK_WHEN, TK_UNION, TK_UNIQUE, + TK_JOIN_KW, TK_RESTRICT, TK_PRIMARY, TK_TQUERY, TK_JOIN_KW, + TK_ROLLBACK, TK_ROW, TK_WHEN, TK_UNION, TK_UNITQUE, TK_USING, TK_VACUUM, TK_VALUES, TK_VIEW, TK_WHERE, }; int h, i; diff --git a/kexi/3rdparty/kexisql3/src/main.c b/kexi/3rdparty/kexisql3/src/main.c index 83356f43..8d6acd5c 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 invalidate all precompiled statements. + ** operation to continue but tqinvalidate all precompiled statements. */ p = sqlite3FindFunction(db, zFunctionName, nName, nArg, enc, 0); if( p && p->iPrefEnc==enc && p->nArg==nArg ){ @@ -667,7 +667,7 @@ const char *sqlite3_errmsg(sqlite3 *db){ ** error. */ const void *sqlite3_errmsg16(sqlite3 *db){ - /* Because all the characters in the string are in the unicode + /* Because all the characters in the string are in the tqunicode ** range 0x00-0xFF, if we pad the big-endian string with a ** zero byte, we can obtain the little-endian string with ** &big_endian[1]. @@ -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, invalidate any pre-compiled statements. + ** are no active VMs, tqinvalidate any pre-compiled statements. */ pColl = sqlite3FindCollSeq(db, (u8)enc, zName, strlen(zName), 0); if( pColl && pColl->xCmp ){ diff --git a/kexi/3rdparty/kexisql3/src/os_mac.c b/kexi/3rdparty/kexisql3/src/os_mac.c index 15798b5d..f393b423 100644 --- a/kexi/3rdparty/kexisql3/src/os_mac.c +++ b/kexi/3rdparty/kexisql3/src/os_mac.c @@ -84,11 +84,11 @@ int sqlite3OsOpenReadWrite( if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrShPerm, &(id->refNum)) != noErr ){ - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrPerm, &(id->refNum)) != noErr ){ - if (FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if (FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; else @@ -149,7 +149,7 @@ int sqlite3OsOpenExclusive(const char *zFilename, OsFile *id, int delFlag){ if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; # else @@ -185,7 +185,7 @@ int sqlite3OsOpenReadOnly(const char *zFilename, OsFile *id){ if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; # else @@ -232,7 +232,7 @@ int sqlite3OsOpenDirectory( int sqlite3OsTempFileName(char *zBuf){ static char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; char zTempPath[SQLITE_TEMPNAME_SIZE]; @@ -506,20 +506,20 @@ int sqlite3OsReadLock(OsFile *id){ params.ioParam.ioRefNum = id->refNumRF; params.ioParam.ioPosMode = fsFromStart; params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; while( cnt-->0 && (res = PBLockRangeSync(¶ms))!=noErr ){ UInt32 finalTicks; Delay(1, &finalTicks); /* 1/60 sec */ } if( res == noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; PBUnlockRangeSync(¶ms); params.ioParam.ioPosOffset = FIRST_LOCKBYTE+lk; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; res = PBLockRangeSync(¶ms); params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); } if( res == noErr ){ @@ -550,24 +550,24 @@ int sqlite3OsWriteLock(OsFile *id){ params.ioParam.ioRefNum = id->refNumRF; params.ioParam.ioPosMode = fsFromStart; params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; while( cnt-->0 && (res = PBLockRangeSync(¶ms))!=noErr ){ UInt32 finalTicks; Delay(1, &finalTicks); /* 1/60 sec */ } if( res == noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE + id->locked; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; if( id->locked==0 || PBUnlockRangeSync(¶ms)==noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; res = PBLockRangeSync(¶ms); }else{ res = afpRangeNotLocked; } params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); } if( res == noErr ){ @@ -596,13 +596,13 @@ int sqlite3OsUnlock(OsFile *id){ rc = SQLITE_OK; }else if( id->locked<0 ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; PBUnlockRangeSync(¶ms); rc = SQLITE_OK; id->locked = 0; }else{ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+id->locked; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); rc = SQLITE_OK; id->locked = 0; diff --git a/kexi/3rdparty/kexisql3/src/os_unix.c b/kexi/3rdparty/kexisql3/src/os_unix.c index cf846b93..91ca787e 100644 --- a/kexi/3rdparty/kexisql3/src/os_unix.c +++ b/kexi/3rdparty/kexisql3/src/os_unix.c @@ -147,7 +147,7 @@ ** ** If you close a file descriptor that points to a file that has locks, ** all locks on that file that are owned by the current process are -** released. To work around this problem, each OsFile structure contains +** released. To work around this problem, each OsFile structure tqcontains ** a pointer to an openCnt structure. There is one openCnt structure ** per open inode, which means that multiple OsFiles can point to a single ** openCnt. When an attempt is made to close an OsFile, if there are @@ -680,7 +680,7 @@ int sqlite3OsTempFileName(char *zBuf){ }; static const unsigned char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; struct stat buf; diff --git a/kexi/3rdparty/kexisql3/src/os_win.c b/kexi/3rdparty/kexisql3/src/os_win.c index ec7a0840..8c729136 100644 --- a/kexi/3rdparty/kexisql3/src/os_win.c +++ b/kexi/3rdparty/kexisql3/src/os_win.c @@ -104,7 +104,7 @@ static WCHAR *utf8ToUnicode(const char *zFilename){ ** Convert UTF-32 to UTF-8. Space to hold the returned string is ** obtained from sqliteMalloc(). */ -static char *unicodeToUtf8(const WCHAR *zWideFilename){ +static char *tqunicodeToUtf8(const WCHAR *zWideFilename){ int nByte; char *zFilename; @@ -438,7 +438,7 @@ char *sqlite3_temp_directory = 0; int sqlite3OsTempFileName(char *zBuf){ static char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; char zTempPath[SQLITE_TEMPNAME_SIZE]; @@ -449,7 +449,7 @@ int sqlite3OsTempFileName(char *zBuf){ char *zMulti; WCHAR zWidePath[SQLITE_TEMPNAME_SIZE]; GetTempPathW(SQLITE_TEMPNAME_SIZE-30, zWidePath); - zMulti = unicodeToUtf8(zWidePath); + zMulti = tqunicodeToUtf8(zWidePath); if( zMulti ){ strncpy(zTempPath, zMulti, SQLITE_TEMPNAME_SIZE-30); zTempPath[SQLITE_TEMPNAME_SIZE-30] = 0; @@ -881,7 +881,7 @@ char *sqlite3OsFullPathname(const char *zRelative){ if( zTemp==0 ) return 0; GetFullPathNameW(zWide, nByte, zTemp, &zNotUsedW); sqliteFree(zWide); - zFull = unicodeToUtf8(zTemp); + zFull = tqunicodeToUtf8(zTemp); sqliteFree(zTemp); }else{ nByte = GetFullPathNameA(zRelative, 0, 0, &zNotUsed) + 1; diff --git a/kexi/3rdparty/kexisql3/src/pager.c b/kexi/3rdparty/kexisql3/src/pager.c index 4b981350..469d05fa 100644 --- a/kexi/3rdparty/kexisql3/src/pager.c +++ b/kexi/3rdparty/kexisql3/src/pager.c @@ -839,7 +839,7 @@ static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){ /* ** Unlock the database and clear the in-memory cache. This routine ** sets the state of the pager back to what it was when it was first -** opened. Any outstanding pages are invalidated and subsequent attempts +** opened. Any outstanding pages are tqinvalidated and subsequent attempts ** to access those pages will likely result in a coredump. */ static void pager_reset(Pager *pPager){ @@ -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 -** children. If all children are either missing or do not refer to +** tqchildren. If all tqchildren 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){ @@ -1948,7 +1948,7 @@ int sqlite3pager_truncate(Pager *pPager, Pgno nPage){ ** Shutdown the page cache. Free all memory and close all files. ** ** If a transaction was in progress when this routine is called, that -** transaction is rolled back. All outstanding pages are invalidated +** transaction is rolled back. All outstanding pages are tqinvalidated ** and their memory is freed. Any attempt to use a page associated ** with this page cache after this function returns will likely ** result in a coredump. @@ -2972,7 +2972,7 @@ int sqlite3pager_overwrite(Pager *pPager, Pgno pgno, void *pData){ ** a transaction then removed from the freelist during a later part ** of the same transaction and reused for some other purpose. When it ** is first added to the freelist, this routine is called. When reused, -** the dont_rollback() routine is called. But because the page contains +** the dont_rollback() routine is called. But because the page tqcontains ** critical data, we still need to be sure it gets rolled back in spite ** of the dont_rollback() call. */ diff --git a/kexi/3rdparty/kexisql3/src/parse.c b/kexi/3rdparty/kexisql3/src/parse.c index 668f0012..d763cb29 100644 --- a/kexi/3rdparty/kexisql3/src/parse.c +++ b/kexi/3rdparty/kexisql3/src/parse.c @@ -106,7 +106,7 @@ typedef union { struct LikeOp yy222; IdList* yy240; int yy280; - struct {int value; int mask;} yy359; + struct {int value; int tqmask;} yy359; TriggerStep* yy360; struct AttachKey yy361; Select* yy375; @@ -682,7 +682,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* CONST_FUNC => nothing */ 0, /* SEMI => nothing */ 30, /* EXPLAIN => ID */ - 30, /* QUERY => ID */ + 30, /* TQUERY => ID */ 30, /* PLAN => ID */ 30, /* BEGIN => ID */ 0, /* TRANSACTION => nothing */ @@ -770,7 +770,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* DEFAULT => nothing */ 0, /* NULL => nothing */ 0, /* PRIMARY => nothing */ - 0, /* UNIQUE => nothing */ + 0, /* UNITQUE => nothing */ 0, /* CHECK => nothing */ 0, /* REFERENCES => nothing */ 0, /* COLLATE => nothing */ @@ -888,7 +888,7 @@ static const char *const yyTokenName[] = { "$", "END_OF_FILE", "ILLEGAL", "SPACE", "UNCLOSED_STRING", "COMMENT", "FUNCTION", "COLUMN", "AGG_FUNCTION", "AGG_COLUMN", "CONST_FUNC", "SEMI", - "EXPLAIN", "QUERY", "PLAN", "BEGIN", + "EXPLAIN", "TQUERY", "PLAN", "BEGIN", "TRANSACTION", "DEFERRED", "IMMEDIATE", "EXCLUSIVE", "COMMIT", "END", "ROLLBACK", "CREATE", "TABLE", "TEMP", "LP", "RP", @@ -910,7 +910,7 @@ static const char *const yyTokenName[] = { "STAR", "SLASH", "REM", "CONCAT", "UMINUS", "UPLUS", "BITNOT", "STRING", "JOIN_KW", "CONSTRAINT", "DEFAULT", "NULL", - "PRIMARY", "UNIQUE", "CHECK", "REFERENCES", + "PRIMARY", "UNITQUE", "CHECK", "REFERENCES", "COLLATE", "AUTOINCR", "ON", "DELETE", "UPDATE", "INSERT", "SET", "DEFERRABLE", "FOREIGN", "DROP", "UNION", "ALL", @@ -962,7 +962,7 @@ static const char *const yyRuleName[] = { /* 5 */ "ecmd ::= explain cmdx SEMI", /* 6 */ "explain ::=", /* 7 */ "explain ::= EXPLAIN", - /* 8 */ "explain ::= EXPLAIN QUERY PLAN", + /* 8 */ "explain ::= EXPLAIN TQUERY PLAN", /* 9 */ "cmd ::= BEGIN transtype trans_opt", /* 10 */ "trans_opt ::=", /* 11 */ "trans_opt ::= TRANSACTION", @@ -1011,7 +1011,7 @@ static const char *const yyRuleName[] = { /* 54 */ "ccons ::= NULL onconf", /* 55 */ "ccons ::= NOT NULL onconf", /* 56 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc", - /* 57 */ "ccons ::= UNIQUE onconf", + /* 57 */ "ccons ::= UNITQUE onconf", /* 58 */ "ccons ::= CHECK LP expr RP onconf", /* 59 */ "ccons ::= REFERENCES nm idxlist_opt refargs", /* 60 */ "ccons ::= defer_subclause", @@ -1040,7 +1040,7 @@ static const char *const yyRuleName[] = { /* 83 */ "conslist ::= tcons", /* 84 */ "tcons ::= CONSTRAINT nm", /* 85 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf", - /* 86 */ "tcons ::= UNIQUE LP idxlist RP onconf", + /* 86 */ "tcons ::= UNITQUE LP idxlist RP onconf", /* 87 */ "tcons ::= CHECK expr onconf", /* 88 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt", /* 89 */ "defer_subclause_opt ::=", @@ -1199,7 +1199,7 @@ static const char *const yyRuleName[] = { /* 242 */ "expritem ::= expr", /* 243 */ "expritem ::=", /* 244 */ "cmd ::= CREATE uniqueflag INDEX nm dbnm ON nm LP idxlist RP onconf", - /* 245 */ "uniqueflag ::= UNIQUE", + /* 245 */ "uniqueflag ::= UNITQUE", /* 246 */ "uniqueflag ::=", /* 247 */ "idxlist_opt ::=", /* 248 */ "idxlist_opt ::= LP idxlist RP", @@ -2164,27 +2164,27 @@ static void yy_reduce( break; case 65: #line 289 "parse.y" -{ yygotominor.yy280 = (yymsp[-1].minor.yy280 & yymsp[0].minor.yy359.mask) | yymsp[0].minor.yy359.value; } +{ yygotominor.yy280 = (yymsp[-1].minor.yy280 & yymsp[0].minor.yy359.tqmask) | yymsp[0].minor.yy359.value; } #line 2170 "parse.c" break; case 66: #line 291 "parse.y" -{ yygotominor.yy359.value = 0; yygotominor.yy359.mask = 0x000000; } +{ yygotominor.yy359.value = 0; yygotominor.yy359.tqmask = 0x000000; } #line 2175 "parse.c" break; case 67: #line 292 "parse.y" -{ yygotominor.yy359.value = yymsp[0].minor.yy280; yygotominor.yy359.mask = 0x0000ff; } +{ yygotominor.yy359.value = yymsp[0].minor.yy280; yygotominor.yy359.tqmask = 0x0000ff; } #line 2180 "parse.c" break; case 68: #line 293 "parse.y" -{ yygotominor.yy359.value = yymsp[0].minor.yy280<<8; yygotominor.yy359.mask = 0x00ff00; } +{ yygotominor.yy359.value = yymsp[0].minor.yy280<<8; yygotominor.yy359.tqmask = 0x00ff00; } #line 2185 "parse.c" break; case 69: #line 294 "parse.y" -{ yygotominor.yy359.value = yymsp[0].minor.yy280<<16; yygotominor.yy359.mask = 0xff0000; } +{ yygotominor.yy359.value = yymsp[0].minor.yy280<<16; yygotominor.yy359.tqmask = 0xff0000; } #line 2190 "parse.c" break; case 70: diff --git a/kexi/3rdparty/kexisql3/src/parse.h b/kexi/3rdparty/kexisql3/src/parse.h index fcedda58..b96836ce 100644 --- a/kexi/3rdparty/kexisql3/src/parse.h +++ b/kexi/3rdparty/kexisql3/src/parse.h @@ -10,7 +10,7 @@ #define TK_CONST_FUNC 10 #define TK_SEMI 11 #define TK_EXPLAIN 12 -#define TK_QUERY 13 +#define TK_TQUERY 13 #define TK_PLAN 14 #define TK_BEGIN 15 #define TK_TRANSACTION 16 @@ -98,7 +98,7 @@ #define TK_DEFAULT 98 #define TK_NULL 99 #define TK_PRIMARY 100 -#define TK_UNIQUE 101 +#define TK_UNITQUE 101 #define TK_CHECK 102 #define TK_REFERENCES 103 #define TK_COLLATE 104 diff --git a/kexi/3rdparty/kexisql3/src/parse.y b/kexi/3rdparty/kexisql3/src/parse.y index b92d2276..c591c99d 100644 --- a/kexi/3rdparty/kexisql3/src/parse.y +++ b/kexi/3rdparty/kexisql3/src/parse.y @@ -207,12 +207,12 @@ ccons ::= COLLATE id(C). {sqlite3AddCollateType(pParse, C.z, C.n);} // %type refargs {int} refargs(A) ::= . { A = OE_Restrict * 0x010101; } -refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.mask) | Y.value; } -%type refarg {struct {int value; int mask;}} -refarg(A) ::= MATCH nm. { A.value = 0; A.mask = 0x000000; } -refarg(A) ::= ON DELETE refact(X). { A.value = X; A.mask = 0x0000ff; } -refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.mask = 0x00ff00; } -refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.mask = 0xff0000; } +refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.tqmask) | Y.value; } +%type refarg {struct {int value; int tqmask;}} +refarg(A) ::= MATCH nm. { A.value = 0; A.tqmask = 0x000000; } +refarg(A) ::= ON DELETE refact(X). { A.value = X; A.tqmask = 0x0000ff; } +refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.tqmask = 0x00ff00; } +refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.tqmask = 0xff0000; } %type refact {int} refact(A) ::= SET NULL. { A = OE_SetNull; } refact(A) ::= SET DEFAULT. { A = OE_SetDflt; } @@ -398,7 +398,7 @@ seltablist(A) ::= stl_prefix(X) LP seltablist_paren(S) RP } // A seltablist_paren nonterminal represents anything in a FROM that -// is contained inside parentheses. This can be either a subquery or +// is contained inside tqparentheses. This can be either a subquery or // a grouping of table and subqueries. // %type seltablist_paren {Select*} diff --git a/kexi/3rdparty/kexisql3/src/pragma.c b/kexi/3rdparty/kexisql3/src/pragma.c index c85c19d5..618ce9e1 100644 --- a/kexi/3rdparty/kexisql3/src/pragma.c +++ b/kexi/3rdparty/kexisql3/src/pragma.c @@ -86,7 +86,7 @@ static int getTempStore(const char *z){ ** Invalidate temp storage, either when the temp storage is changed ** from default, or when 'file' and the temp_store_directory has changed */ -static int invalidateTempStorage(Parse *pParse){ +static int tqinvalidateTempStorage(Parse *pParse){ sqlite3 *db = pParse->db; if( db->aDb[1].pBt!=0 ){ if( db->flags & SQLITE_InTrans ){ @@ -112,7 +112,7 @@ static int changeTempStorage(Parse *pParse, const char *zStorageType){ int ts = getTempStore(zStorageType); sqlite3 *db = pParse->db; if( db->temp_store==ts ) return SQLITE_OK; - if( invalidateTempStorage( pParse ) != SQLITE_OK ){ + if( tqinvalidateTempStorage( pParse ) != SQLITE_OK ){ return SQLITE_ERROR; } db->temp_store = ts; @@ -142,7 +142,7 @@ static void returnSingleInt(Parse *pParse, const char *zLabel, int value){ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ static const struct sPragmaType { const char *zName; /* Name of the pragma */ - int mask; /* Mask for the db->flags value */ + int tqmask; /* Mask for the db->flags value */ } aPragma[] = { { "vdbe_trace", SQLITE_VdbeTrace }, { "sql_trace", SQLITE_SqlTrace }, @@ -164,12 +164,12 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ v = sqlite3GetVdbe(pParse); if( v ){ if( zRight==0 ){ - returnSingleInt(pParse, p->zName, (db->flags & p->mask)!=0 ); + returnSingleInt(pParse, p->zName, (db->flags & p->tqmask)!=0 ); }else{ if( getBoolean(zRight) ){ - db->flags |= p->mask; + db->flags |= p->tqmask; }else{ - db->flags &= ~p->mask; + db->flags &= ~p->tqmask; } } /* If one of these pragmas is executed, any prepared statements @@ -377,7 +377,7 @@ void sqlite3Pragma( ** Return or set the local value of the temp_store_directory flag. Changing ** the value sets a specific directory to be used for temporary files. ** Setting to a null string reverts to the default temporary directory search. - ** If temporary directory is changed, then invalidateTempStorage. + ** If temporary directory is changed, then tqinvalidateTempStorage. ** */ if( sqlite3StrICmp(zLeft, "temp_store_directory")==0 ){ @@ -397,7 +397,7 @@ void sqlite3Pragma( || (TEMP_STORE==1 && db->temp_store<=1) || (TEMP_STORE==2 && db->temp_store==1) ){ - invalidateTempStorage(pParse); + tqinvalidateTempStorage(pParse); } sqliteFree(sqlite3_temp_directory); if( zRight[0] ){ diff --git a/kexi/3rdparty/kexisql3/src/prepare.c b/kexi/3rdparty/kexisql3/src/prepare.c index b3222a82..23bfa533 100644 --- a/kexi/3rdparty/kexisql3/src/prepare.c +++ b/kexi/3rdparty/kexisql3/src/prepare.c @@ -77,7 +77,7 @@ int sqlite3InitCallback(void *pInit, int argc, char **argv, char **azColName){ } }else{ /* If the SQL column is blank it means this is an index that - ** was created to be the PRIMARY KEY or to fulfill a UNIQUE + ** was created to be the PRIMARY KEY or to fulfill a UNITQUE ** constraint for a CREATE TABLE. The index should have already ** been created when we processed the CREATE TABLE. All we have ** to do here is record the root page number for that index. @@ -527,7 +527,7 @@ int sqlite3_prepare16( if( zTail8 && pzTail ){ /* If sqlite3_prepare returns a tail pointer, we calculate the - ** equivalent pointer into the UTF-16 string by counting the unicode + ** equivalent pointer into the UTF-16 string by counting the tqunicode ** characters between zSql8 and zTail8, and then returning a pointer ** the same number of characters into the UTF-16 string. */ diff --git a/kexi/3rdparty/kexisql3/src/select.c b/kexi/3rdparty/kexisql3/src/select.c index 86b22c38..0f465c09 100644 --- a/kexi/3rdparty/kexisql3/src/select.c +++ b/kexi/3rdparty/kexisql3/src/select.c @@ -518,7 +518,7 @@ static int selectInnerLoop( break; } -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY /* If we are creating a set for an "expr IN (SELECT ...)" construct, ** then there should be a single item on the stack. Write this ** item into the set table with bogus data. @@ -562,7 +562,7 @@ static int selectInnerLoop( } break; } -#endif /* #ifndef SQLITE_OMIT_SUBQUERY */ +#endif /* #ifndef SQLITE_OMIT_SUBTQUERY */ /* Send the data to the callback function or to a subroutine. In the ** case of a subroutine, the subroutine itself is responsible for @@ -671,7 +671,7 @@ static void generateSortTail( sqlite3VdbeAddOp(v, OP_Insert, iParm, 0); break; } -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY case SRT_Set: { assert( nColumn==1 ); sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3); @@ -773,7 +773,7 @@ static const char *columnType(NameContext *pNC, Expr *pExpr){ } break; } -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY case TK_SELECT: { NameContext sNC; Select *pS = pExpr->pSelect; @@ -1058,7 +1058,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){ return 0; } if( pFrom->zName==0 ){ -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY /* A sub-query in the FROM clause of a SELECT */ assert( pFrom->pSelect!=0 ); if( pFrom->zAlias==0 ){ @@ -1961,7 +1961,7 @@ static void substSelect(Select *p, int iTable, ExprList *pEList){ */ static int flattenSubquery( Parse *pParse, /* The parsing context */ - Select *p, /* The parent or outer SELECT statement */ + Select *p, /* The tqparent or outer SELECT statement */ int iFrom, /* Index in p->pSrc->a[] of the inner subquery */ int isAgg, /* True if outer SELECT uses aggregate functions */ int subqueryIsAgg /* True if the subquery uses aggregate functions */ @@ -2038,7 +2038,7 @@ static int flattenSubquery( ** the FROM clause of the outer query. Before doing this, remember ** the cursor number for the original outer query FROM element in ** iParent. The iParent cursor will never be used. Subsequent code - ** will scan expressions looking for iParent references and replace + ** will scan expressions looking for iParent references and tqreplace ** those references with expressions that resolve to the subquery FROM ** elements we are now copying in. */ @@ -2322,7 +2322,7 @@ static int processOrderGroupBy( ** This routine resolves any names used in the result set of the ** supplied SELECT statement. If the SELECT statement being resolved ** is a sub-select, then pOuterNC is a pointer to the NameContext -** of the parent SELECT. +** of the tqparent SELECT. */ int sqlite3SelectResolve( Parse *pParse, /* The parser context */ @@ -2569,10 +2569,10 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){ ** This routine does NOT free the Select structure passed in. The ** calling function needs to do that. ** -** The pParent, parentTab, and *pParentAgg fields are filled in if this +** The pParent, tqparentTab, and *pParentAgg fields are filled in if this ** SELECT is a subquery. This routine may try to combine this SELECT -** with its parent to form a single flat query. In so doing, it might -** change the parent query from a non-aggregate to an aggregate query. +** with its tqparent to form a single flat query. In so doing, it might +** change the tqparent query from a non-aggregate to an aggregate query. ** For that reason, the pParentAgg flag is passed as a pointer, so it ** can be changed. ** @@ -2587,7 +2587,7 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){ ** pParent will be NULL. During the processing of the outer query, this ** routine is called recursively to handle the subquery. For the recursive ** call, pParent will point to the outer query. Because the subquery is -** the second element in a three-way join, the parentTab parameter will +** the second element in a three-way join, the tqparentTab parameter will ** be 1 (the 2nd value of a 0-indexed array.) */ int sqlite3Select( @@ -2596,7 +2596,7 @@ int sqlite3Select( int eDest, /* How to dispose of the results */ int iParm, /* A parameter used by the eDest disposal method */ Select *pParent, /* Another SELECT for which this is a sub-query */ - int parentTab, /* Index in pParent->pSrc of this query */ + int tqparentTab, /* Index in pParent->pSrc of this query */ int *pParentAgg, /* True if pParent uses aggregate functions */ char *aff /* If eDest is SRT_Union, the affinity string */ ){ @@ -2664,7 +2664,7 @@ int sqlite3Select( ** only a single column may be output. */ assert( eDest!=SRT_Exists || pEList->nExpr==1 ); -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY if( (eDest==SRT_Mem || eDest==SRT_Set) && pEList->nExpr>1 ){ sqlite3ErrorMsg(pParse, "only a single result allowed for " "a SELECT that is part of an expression"); @@ -2692,7 +2692,7 @@ int sqlite3Select( /* Generate code for all sub-queries in the FROM clause */ -#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) +#if !defined(SQLITE_OMIT_SUBTQUERY) || !defined(SQLITE_OMIT_VIEW) for(i=0; i<pTabList->nSrc; i++){ const char *zSavedAuthContext = 0; int needRestoreContext; @@ -2730,12 +2730,12 @@ int sqlite3Select( goto select_end; } - /* Check to see if this is a subquery that can be "flattened" into its parent. + /* Check to see if this is a subquery that can be "flattened" into its tqparent. ** If flattening is a possiblity, do so and return immediately. */ #ifndef SQLITE_OMIT_VIEW if( pParent && pParentAgg && - flattenSubquery(pParse, pParent, parentTab, *pParentAgg, isAgg) ){ + flattenSubquery(pParse, pParent, tqparentTab, *pParentAgg, isAgg) ){ if( isAgg ) *pParentAgg = 1; goto select_end; } @@ -3098,17 +3098,17 @@ int sqlite3Select( generateSortTail(pParse, p, v, pEList->nExpr, eDest, iParm); } -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY /* If this was a subquery, we have now converted the subquery into a - ** temporary table. So delete the subquery structure from the parent + ** temporary table. So delete the subquery structure from the tqparent ** to prevent this subquery from being evaluated again and to force the ** the use of the temporary table. */ if( pParent ){ - assert( pParent->pSrc->nSrc>parentTab ); - assert( pParent->pSrc->a[parentTab].pSelect==p ); + assert( pParent->pSrc->nSrc>tqparentTab ); + assert( pParent->pSrc->a[tqparentTab].pSelect==p ); sqlite3SelectDelete(p); - pParent->pSrc->a[parentTab].pSelect = 0; + pParent->pSrc->a[tqparentTab].pSelect = 0; } #endif diff --git a/kexi/3rdparty/kexisql3/src/sqlite3.h b/kexi/3rdparty/kexisql3/src/sqlite3.h index 414c6cac..be29db69 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 invalidate +** Once sqlite3_open() has been called, changing this variable will tqinvalidate ** the current temporary database, if any. */ extern char *sqlite3_temp_directory; diff --git a/kexi/3rdparty/kexisql3/src/sqliteInt.h b/kexi/3rdparty/kexisql3/src/sqliteInt.h index 796653e7..74916805 100644 --- a/kexi/3rdparty/kexisql3/src/sqliteInt.h +++ b/kexi/3rdparty/kexisql3/src/sqliteInt.h @@ -104,22 +104,22 @@ /* ** If the following macro is set to 1, then NULL values are considered ** distinct when determining whether or not two entries are the same -** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL, +** in a UNITQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL, ** OCELOT, and Firebird all work. The SQL92 spec explicitly says this ** is the way things are suppose to work. ** ** If the following macro is set to 0, the NULLs are indistinct for -** a UNIQUE index. In this mode, you can only have a single NULL entry -** for a column declared UNIQUE. This is the way Informix and SQL Server +** a UNITQUE index. In this mode, you can only have a single NULL entry +** for a column declared UNITQUE. This is the way Informix and SQL Server ** work. */ -#define NULL_DISTINCT_FOR_UNIQUE 1 +#define NULL_DISTINCT_FOR_UNITQUE 1 /* ** The maximum number of attached databases. This must be at least 2 ** in order to support the main database file (0) and the file used to ** hold temporary tables (1). And it must be less than 32 because -** we use a bitmask of databases with a u32 in places (for example +** we use a bittqmask of databases with a u32 in places (for example ** the Parse.cookieMask field). */ #define MAX_ATTACHED 10 @@ -700,7 +700,7 @@ struct FKey { ** occurs. IGNORE means that the particular row that caused the constraint ** error is not inserted or updated. Processing continues and no error ** is returned. REPLACE means that preexisting database rows that caused -** a UNIQUE constraint violation are removed so that the new insert or +** a UNITQUE constraint violation are removed so that the new insert or ** update can proceed. Processing continues and no error is reported. ** ** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys. @@ -779,7 +779,7 @@ struct Index { Table *pTable; /* The SQL table being indexed */ int tnum; /* Page containing root of this index in database file */ u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ - u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */ + u8 autoIndex; /* True if is automatically created (ex: by UNITQUE) */ u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */ char *zColAff; /* String defining the affinity of each column */ Index *pNext; /* The next index associated with the same table */ @@ -976,9 +976,9 @@ struct IdList { }; /* -** The bitmask datatype defined below is used for various optimizations. +** The bittqmask datatype defined below is used for various optimizations. */ -typedef unsigned int Bitmask; +typedef unsigned int Bittqmask; /* ** The following structure describes the FROM clause of a SELECT statement. @@ -1004,7 +1004,7 @@ struct SrcList { i16 iCursor; /* The VDBE cursor number used to access this table */ Expr *pOn; /* The ON clause of a join */ IdList *pUsing; /* The USING clause of a join */ - Bitmask colUsed; /* Bit N (1<<N) set if column N or pTab is used */ + Bittqmask colUsed; /* Bit N (1<<N) set if column N or pTab is used */ } a[1]; /* One entry for each identifier on the list */ }; @@ -1076,7 +1076,7 @@ struct WhereInfo { ** the context containing the match is incremented. ** ** Each subquery gets a new NameContext. The pNext field points to the -** NameContext in the parent query. Thus the process of scanning the +** NameContext in the tqparent query. Thus the process of scanning the ** NameContext list corresponds to searching through successively outer ** subqueries looking for a match. */ @@ -1176,7 +1176,7 @@ struct Parse { int nMem; /* Number of memory cells used so far */ int nSet; /* Number of sets used so far */ u32 writeMask; /* Start a write transaction on these databases */ - u32 cookieMask; /* Bitmask of schema verified databases */ + u32 cookieMask; /* Bittqmask of schema verified databases */ int cookieGoto; /* Address of OP_Goto to cookie verifier subroutine */ int cookieValue[MAX_ATTACHED+2]; /* Values of cookies to verify */ @@ -1328,9 +1328,9 @@ struct TriggerStep { * * struct TriggerStack has a "pNext" member, to allow linked lists to be * constructed. When coding nested triggers (triggers fired by other triggers) - * each nested trigger stores its parent trigger's TriggerStack as the "pNext" + * each nested trigger stores its tqparent trigger's TriggerStack as the "pNext" * pointer. Once the nested trigger has been coded, the pNext value is restored - * to the pTriggerStack member of the Parse stucture and coding of the parent + * to the pTriggerStack member of the Parse stucture and coding of the tqparent * trigger continues. * * Before a nested trigger is coded, the linked list pointed to by the diff --git a/kexi/3rdparty/kexisql3/src/tclsqlite.c b/kexi/3rdparty/kexisql3/src/tclsqlite.c index 51bde4ee..4387e2f7 100644 --- a/kexi/3rdparty/kexisql3/src/tclsqlite.c +++ b/kexi/3rdparty/kexisql3/src/tclsqlite.c @@ -921,7 +921,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** as column separators. If a column contains a null string, or the ** value of NULLINDICATOR, a NULL is inserted for the column. ** conflict-algorithm is one of the sqlite conflict algorithms: - ** rollback, abort, fail, ignore, replace + ** rollback, abort, fail, ignore, tqreplace ** On success, return the number of lines processed, not necessarily same ** as 'db changes' due to conflict-algorithm selected. ** @@ -982,10 +982,10 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ sqlite3StrICmp(zConflict, "abort" ) != 0 && sqlite3StrICmp(zConflict, "fail" ) != 0 && sqlite3StrICmp(zConflict, "ignore" ) != 0 && - sqlite3StrICmp(zConflict, "replace" ) != 0 ) { + sqlite3StrICmp(zConflict, "tqreplace" ) != 0 ) { Tcl_AppendResult(interp, "Error: \"", zConflict, "\", conflict-algorithm must be one of: rollback, " - "abort, fail, ignore, or replace", 0); + "abort, fail, ignore, or tqreplace", 0); return TCL_ERROR; } zSql = sqlite3_mprintf("SELECT * FROM '%q'", zTable); @@ -1822,7 +1822,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** DBNAME that is used to control that connection. The database ** connection is deleted when the DBNAME command is deleted. ** -** The second argument is the name of the directory that contains +** The second argument is the name of the directory that tqcontains ** the sqlite database that is to be accessed. ** ** For testing purposes, we also support the following: diff --git a/kexi/3rdparty/kexisql3/src/trigger.c b/kexi/3rdparty/kexisql3/src/trigger.c index f39d2bd8..610f5090 100644 --- a/kexi/3rdparty/kexisql3/src/trigger.c +++ b/kexi/3rdparty/kexisql3/src/trigger.c @@ -581,7 +581,7 @@ int sqlite3TriggersExist( ExprList *pChanges /* Columns that change in an UPDATE statement */ ){ Trigger *pTrigger = pTab->pTrigger; - int mask = 0; + int tqmask = 0; while( pTrigger ){ if( pTrigger->op==op && checkColumnOverLap(pTrigger->pColumns, pChanges) ){ @@ -591,12 +591,12 @@ int sqlite3TriggersExist( ss = ss->pNext; } if( ss==0 ){ - mask |= pTrigger->tr_tm; + tqmask |= pTrigger->tr_tm; } } pTrigger = pTrigger->pNext; } - return mask; + return tqmask; } /* diff --git a/kexi/3rdparty/kexisql3/src/utf.c b/kexi/3rdparty/kexisql3/src/utf.c index d42ab759..5efbfe78 100644 --- a/kexi/3rdparty/kexisql3/src/utf.c +++ b/kexi/3rdparty/kexisql3/src/utf.c @@ -43,11 +43,11 @@ ** ** When converting malformed UTF-8 strings to UTF-16, one instance of the ** replacement character U+FFFD for each byte that cannot be interpeted as -** part of a valid unicode character. +** part of a valid tqunicode character. ** ** When converting malformed UTF-16 strings to UTF-8, one instance of the ** replacement character U+FFFD for each pair of bytes that cannot be -** interpeted as part of a valid unicode character. +** interpeted as part of a valid tqunicode character. ** ** This file contains the following public routines: ** @@ -427,10 +427,10 @@ int sqlite3VdbeMemHandleBom(Mem *pMem){ #endif /* SQLITE_OMIT_UTF16 */ /* -** pZ is a UTF-8 encoded unicode string. If nByte is less than zero, -** return the number of unicode characters in pZ up to (but not including) +** pZ is a UTF-8 encoded tqunicode string. If nByte is less than zero, +** return the number of tqunicode characters in pZ up to (but not including) ** the first 0x00 byte. If nByte is not less than zero, return the -** number of unicode characters in the first nByte of pZ (or up to +** number of tqunicode characters in the first nByte of pZ (or up to ** the first 0x00, whichever comes first). */ int sqlite3utf8CharLen(const char *z, int nByte){ @@ -451,10 +451,10 @@ int sqlite3utf8CharLen(const char *z, int nByte){ #ifndef SQLITE_OMIT_UTF16 /* -** pZ is a UTF-16 encoded unicode string. If nChar is less than zero, +** pZ is a UTF-16 encoded tqunicode string. If nChar is less than zero, ** return the number of bytes up to (but not including), the first pair ** of consecutive 0x00 bytes in pZ. If nChar is not less than zero, -** then return the number of bytes in the first nChar unicode characters +** then return the number of bytes in the first nChar tqunicode characters ** in pZ (or up until the first pair of 0x00 bytes, whichever comes first). */ int sqlite3utf16ByteLen(const void *zIn, int nChar){ diff --git a/kexi/3rdparty/kexisql3/src/vacuum.c b/kexi/3rdparty/kexisql3/src/vacuum.c index 6f544a6b..8f22c7f8 100644 --- a/kexi/3rdparty/kexisql3/src/vacuum.c +++ b/kexi/3rdparty/kexisql3/src/vacuum.c @@ -212,8 +212,8 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ " FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' ", 0); if( rc!=SQLITE_OK ) goto end_of_vacuum; rc = execExecSql(db, - "SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21,100000000) " - " FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'", 0); + "SELECT 'CREATE UNITQUE INDEX vacuum_db.' || substr(sql,21,100000000) " + " FROM sqlite_master WHERE sql LIKE 'CREATE UNITQUE INDEX %'", 0); if( rc!=SQLITE_OK ) goto end_of_vacuum; rc = execExecSql(db, "SELECT 'CREATE VIEW vacuum_db.' || substr(sql,13,100000000) " diff --git a/kexi/3rdparty/kexisql3/src/vdbe.c b/kexi/3rdparty/kexisql3/src/vdbe.c index abb68aec..c5582b5c 100644 --- a/kexi/3rdparty/kexisql3/src/vdbe.c +++ b/kexi/3rdparty/kexisql3/src/vdbe.c @@ -103,7 +103,7 @@ int sqlite3_sort_count = 0; /* -** An ephemeral string value (signified by the MEM_Ephem flag) contains +** An ephemeral string value (signified by the MEM_Ephem flag) tqcontains ** a pointer to a dynamically allocated string where some other entity ** is responsible for deallocating that string. Because the stack entry ** does not control the string, it might be deleted without the stack @@ -121,7 +121,7 @@ int sqlite3_sort_count = 0; ** Convert the given stack entity into a integer if it isn't one ** already. ** -** Any prior string or real representation is invalidated. +** Any prior string or real representation is tqinvalidated. ** NULLs are converted into 0. */ #define Integerify(P) sqlite3VdbeMemIntegerify(P) @@ -129,7 +129,7 @@ int sqlite3_sort_count = 0; /* ** Convert P so that it has type MEM_Real. ** -** Any prior string or integer representation is invalidated. +** Any prior string or integer representation is tqinvalidated. ** NULLs are converted into 0.0. */ #define Realify(P) sqlite3VdbeMemRealify(P) @@ -508,7 +508,7 @@ int sqlite3VdbeExec( ** case statement is followed by a comment of the form "/# same as ... #/" ** that comment is used to determine the particular value of the opcode. ** -** If a comment on the same line as the "case OP_" construction contains +** If a comment on the same line as the "case OP_" construction tqcontains ** the word "no-push", then the opcode is guarenteed not to grow the ** vdbe stack when it is executed. See function opcode() in ** vdbeaux.c for details. @@ -1103,7 +1103,7 @@ case OP_CollSeq: { /* no-push */ ** defines the function) with P2 arguments taken from the stack. Pop all ** arguments from the stack and push back the result. ** -** P1 is a 32-bit bitmask indicating whether or not each argument to the +** P1 is a 32-bit bittqmask indicating whether or not each argument to the ** function was determined to be constant at compile time. If the first ** argument was constant then bit 0 of P1 is set. This is used to determine ** whether meta data associated with a user function argument using the @@ -1421,7 +1421,7 @@ case OP_ToBlob: { /* no-push */ ** whereas it would normally be NULL. Similarly, NULL==123 is false when ** 0x200 is set but is NULL when the 0x200 bit of P1 is clear. ** -** The least significant byte of P1 (mask 0xff) must be an affinity character - +** The least significant byte of P1 (tqmask 0xff) must be an affinity character - ** 'n', 't', 'i' or 'o' - or 0x00. An attempt is made to coerce both values ** according to the affinity before the comparison is made. If the byte is ** 0x00, then numeric affinity is used. @@ -1676,7 +1676,7 @@ case OP_BitNot: { /* same as TK_BITNOT, no-push */ */ /* ** The magic Explain opcode are only inserted when explain==2 (which -** is to say when the EXPLAIN QUERY PLAN syntax is used.) +** is to say when the EXPLAIN TQUERY PLAN syntax is used.) ** This opcode records information from the optimizer. It is the ** the same as a no-op. This opcodesnever appears in a real VM program. */ @@ -2539,8 +2539,8 @@ case OP_OpenWrite: { /* no-push */ case SQLITE_OK: { int flags = sqlite3BtreeFlags(pCur->pCursor); /* Sanity checking. Only the lower four bits of the flags byte should - ** be used. Bit 3 (mask 0x08) is unpreditable. The lower 3 bits - ** (mask 0x07) should be either 5 (intkey+leafdata for tables) or + ** be used. Bit 3 (tqmask 0x08) is unpreditable. The lower 3 bits + ** (tqmask 0x07) should be either 5 (intkey+leafdata for tables) or ** 2 (zerodata for indices). If these conditions are not met it can ** only mean that we are dealing with a corrupt database file */ @@ -2956,7 +2956,7 @@ case OP_IsUnique: { /* no-push */ } /* The final varint of the key is different from R. Push it onto - ** the stack. (The record number of an entry that violates a UNIQUE + ** the stack. (The record number of an entry that violates a UNITQUE ** constraint.) */ pTos++; @@ -3020,7 +3020,7 @@ case OP_Sequence: { assert( i>=0 && i<p->nCursor ); assert( p->apCsr[i]!=0 ); pTos++; - pTos->i = p->apCsr[i]->seqCount++; + pTos->i = p->apCsr[i]->setqCount++; pTos->flags = MEM_Int; break; } diff --git a/kexi/3rdparty/kexisql3/src/vdbeInt.h b/kexi/3rdparty/kexisql3/src/vdbeInt.h index 1746ee56..dea8465b 100644 --- a/kexi/3rdparty/kexisql3/src/vdbeInt.h +++ b/kexi/3rdparty/kexisql3/src/vdbeInt.h @@ -81,7 +81,7 @@ struct Cursor { u8 *pIncrKey; /* Pointer to pKeyInfo->incrKey */ KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */ int nField; /* Number of fields in the header */ - i64 seqCount; /* Sequence counter */ + i64 setqCount; /* Sequence counter */ /* Cached information about the header for the data record that the ** cursor is currently pointing to. Only valid if cacheValid is true. @@ -133,7 +133,7 @@ typedef struct Mem Mem; ** No other flags may be set in this case. ** ** If the MEM_Str flag is set then Mem.z points at a string representation. -** Usually this is encoded in the same unicode encoding as the main +** Usually this is encoded in the same tqunicode encoding as the main ** database (see below for exceptions). If the MEM_Term flag is also ** set, then the string is nul terminated. The MEM_Int and MEM_Real ** flags may coexist with the MEM_Str flag. @@ -160,7 +160,7 @@ typedef struct Mem Mem; #define MEM_Agg 0x0400 /* Mem.z points to an agg function context */ -/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains +/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that tqcontains ** additional information about auxiliary information bound to arguments ** of the function. This is used to implement the sqlite3_get_auxdata() ** and sqlite3_set_auxdata() APIs. The "auxdata" is some auxiliary data diff --git a/kexi/3rdparty/kexisql3/src/vdbeaux.c b/kexi/3rdparty/kexisql3/src/vdbeaux.c index cba9c096..6b37312d 100644 --- a/kexi/3rdparty/kexisql3/src/vdbeaux.c +++ b/kexi/3rdparty/kexisql3/src/vdbeaux.c @@ -176,7 +176,7 @@ void sqlite3VdbeResolveLabel(Vdbe *p, int x){ */ static int opcodeNoPush(u8 op){ /* The 10 NOPUSH_MASK_n constants are defined in the automatically - ** generated header file opcodes.h. Each is a 16-bit bitmask, one + ** generated header file opcodes.h. Each is a 16-bit bittqmask, one ** bit corresponding to each opcode implemented by the virtual ** machine in vdbe.c. The bit is true if the word "no-push" appears ** in a comment on the same line as the "case OP_XXX:" in @@ -186,23 +186,23 @@ static int opcodeNoPush(u8 op){ ** to grow the stack when it is executed. Otherwise, it may grow the ** stack by at most one entry. ** - ** NOPUSH_MASK_0 corresponds to opcodes 0 to 15. NOPUSH_MASK_1 contains + ** NOPUSH_MASK_0 corresponds to opcodes 0 to 15. NOPUSH_MASK_1 tqcontains ** one bit for opcodes 16 to 31, and so on. ** - ** 16-bit bitmasks (rather than 32-bit) are specified in opcodes.h + ** 16-bit bittqmasks (rather than 32-bit) are specified in opcodes.h ** because the file is generated by an awk program. Awk manipulates ** all numbers as floating-point and we don't want to risk a rounding ** error if someone builds with an awk that uses (for example) 32-bit ** IEEE floats. */ - static const u32 masks[5] = { + static const u32 tqmasks[5] = { NOPUSH_MASK_0 + (NOPUSH_MASK_1<<16), NOPUSH_MASK_2 + (NOPUSH_MASK_3<<16), NOPUSH_MASK_4 + (NOPUSH_MASK_5<<16), NOPUSH_MASK_6 + (NOPUSH_MASK_7<<16), NOPUSH_MASK_8 + (NOPUSH_MASK_9<<16) }; - return (masks[op>>5] & (1<<(op&0x1F))); + return (tqmasks[op>>5] & (1<<(op&0x1F))); } #ifndef NDEBUG @@ -1326,15 +1326,15 @@ int sqlite3VdbeFinalize(Vdbe *p){ /* ** Call the destructor for each auxdata entry in pVdbeFunc for which -** the corresponding bit in mask is clear. Auxdata entries beyond 31 +** the corresponding bit in tqmask is clear. Auxdata entries beyond 31 ** are always destroyed. To destroy all auxdata entries, call this -** routine with mask==0. +** routine with tqmask==0. */ -void sqlite3VdbeDeleteAuxData(VdbeFunc *pVdbeFunc, int mask){ +void sqlite3VdbeDeleteAuxData(VdbeFunc *pVdbeFunc, int tqmask){ int i; for(i=0; i<pVdbeFunc->nAux; i++){ struct AuxData *pAux = &pVdbeFunc->apAux[i]; - if( (i>31 || !(mask&(1<<i))) && pAux->pAux ){ + if( (i>31 || !(tqmask&(1<<i))) && pAux->pAux ){ if( pAux->xDelete ){ pAux->xDelete(pAux->pAux); } diff --git a/kexi/3rdparty/kexisql3/src/vdbemem.c b/kexi/3rdparty/kexisql3/src/vdbemem.c index 0b7e193b..a7ecce53 100644 --- a/kexi/3rdparty/kexisql3/src/vdbemem.c +++ b/kexi/3rdparty/kexisql3/src/vdbemem.c @@ -151,7 +151,7 @@ int sqlite3VdbeMemNulTerminate(Mem *pMem){ ** are converted using sqlite3_snprintf(). Converting a BLOB to a string ** is a no-op. ** -** Existing representations MEM_Int and MEM_Real are *not* invalidated. +** Existing representations MEM_Int and MEM_Real are *not* tqinvalidated. ** ** A MEM_Null value will never be passed to this function. This function is ** used for converting values to text for returning to the user (i.e. via diff --git a/kexi/3rdparty/kexisql3/src/where.c b/kexi/3rdparty/kexisql3/src/where.c index e63f2763..ab19f288 100644 --- a/kexi/3rdparty/kexisql3/src/where.c +++ b/kexi/3rdparty/kexisql3/src/where.c @@ -21,9 +21,9 @@ #include "sqliteInt.h" /* -** The number of bits in a Bitmask. "BMS" means "BitMask Size". +** The number of bits in a Bittqmask. "BMS" means "BitMask Size". */ -#define BMS (sizeof(Bitmask)*8) +#define BMS (sizeof(Bittqmask)*8) /* ** Determine the number of elements in an array. @@ -61,20 +61,20 @@ typedef struct WhereClause WhereClause; ** where X is a column name and <op> is one of certain operators, ** then WhereTerm.leftCursor and WhereTerm.leftColumn record the ** cursor number and column number for X. WhereTerm.operator records -** the <op> using a bitmask encoding defined by WO_xxx below. The -** use of a bitmask encoding for the operator allows us to search +** the <op> using a bittqmask encoding defined by WO_xxx below. The +** use of a bittqmask encoding for the operator allows us to search ** quickly for terms that match any of several different operators. ** ** prereqRight and prereqAll record sets of cursor numbers, ** but they do so indirectly. A single ExprMaskSet structure translates ** cursor number into bits and the translated bit is stored in the prereq ** fields. The translation is used in order to maximize the number of -** bits that will fit in a Bitmask. The VDBE cursor numbers might be +** bits that will fit in a Bittqmask. The VDBE cursor numbers might be ** spread out over the non-negative integers. For example, the cursor ** numbers might be 3, 8, 9, 10, 20, 23, 41, and 45. The ExprMaskSet ** translates these sparse cursor numbers into consecutive integers ** beginning with 0 in order to make the best possible use of the available -** bits in the Bitmask. So, in the example above, the cursor numbers +** bits in the Bittqmask. So, in the example above, the cursor numbers ** would be mapped into integers 0 through 7. */ typedef struct WhereTerm WhereTerm; @@ -85,10 +85,10 @@ 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 children that must disable us */ + u8 nChild; /* Number of tqchildren 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 */ + Bittqmask prereqRight; /* Bittqmask of tables used by pRight */ + Bittqmask prereqAll; /* Bittqmask of tables referenced by p */ }; /* @@ -114,18 +114,18 @@ struct WhereClause { /* ** An instance of the following structure keeps track of a mapping -** between VDBE cursor numbers and bits of the bitmasks in WhereTerm. +** between VDBE cursor numbers and bits of the bittqmasks in WhereTerm. ** ** The VDBE cursor numbers are small integers contained in ** SrcList_item.iCursor and Expr.iTable fields. For any given WHERE ** clause, the cursor numbers might not begin with 0 and they might ** contain gaps in the numbering sequence. But we want to make maximum -** use of the bits in our bitmasks. This structure provides a mapping +** use of the bits in our bittqmasks. This structure provides a mapping ** from the sparse cursor numbers into consecutive integers beginning ** with 0. ** -** If ExprMaskSet.ix[A]==B it means that The A-th bit of a Bitmask -** corresponds VDBE cursor number B. The A-th bit of a bitmask is 1<<A. +** If ExprMaskSet.ix[A]==B it means that The A-th bit of a Bittqmask +** corresponds VDBE cursor number B. The A-th bit of a bittqmask is 1<<A. ** ** For example, if the WHERE clause expression used these VDBE ** cursors: 4, 5, 8, 29, 57, 73. Then the ExprMaskSet structure @@ -141,12 +141,12 @@ struct WhereClause { typedef struct ExprMaskSet ExprMaskSet; struct ExprMaskSet { int n; /* Number of assigned cursor values */ - int ix[sizeof(Bitmask)*8]; /* Cursor assigned to each bit */ + int ix[sizeof(Bittqmask)*8]; /* Cursor assigned to each bit */ }; /* -** Bitmasks for the operators that indices are able to exploit. An +** Bittqmasks for the operators that indices are able to exploit. An ** OR-ed combination of these values can be used when searching for ** terms in the where clause. */ @@ -170,7 +170,7 @@ struct ExprMaskSet { #define WHERE_IDX_ONLY 0x0800 /* Use index only - omit table */ #define WHERE_ORDERBY 0x1000 /* Output will appear in correct order */ #define WHERE_REVERSE 0x2000 /* Scan in reverse order */ -#define WHERE_UNIQUE 0x4000 /* Selects no more than one row */ +#define WHERE_UNITQUE 0x4000 /* Selects no more than one row */ /* ** Initialize a preallocated WhereClause structure. @@ -258,26 +258,26 @@ static void whereSplit(WhereClause *pWC, Expr *pExpr, int op){ } /* -** Initialize an expression mask set +** Initialize an expression tqmask set */ #define initMaskSet(P) memset(P, 0, sizeof(*P)) /* -** Return the bitmask for the given cursor number. Return 0 if +** Return the bittqmask for the given cursor number. Return 0 if ** iCursor is not in the set. */ -static Bitmask getMask(ExprMaskSet *pMaskSet, int iCursor){ +static Bittqmask getMask(ExprMaskSet *pMaskSet, int iCursor){ int i; for(i=0; i<pMaskSet->n; i++){ if( pMaskSet->ix[i]==iCursor ){ - return ((Bitmask)1)<<i; + return ((Bittqmask)1)<<i; } } return 0; } /* -** Create a new mask for cursor iCursor. +** Create a new tqmask for cursor iCursor. ** ** There is one cursor per table in the FROM clause. The number of ** tables in the FROM clause is limited by a test early in the @@ -291,7 +291,7 @@ static void createMask(ExprMaskSet *pMaskSet, int iCursor){ /* ** This routine walks (recursively) an expression tree and generates -** a bitmask indicating which tables are used in that expression +** a bittqmask indicating which tables are used in that expression ** tree. ** ** In order for this routine to work, the calling function must have @@ -300,46 +300,46 @@ static void createMask(ExprMaskSet *pMaskSet, int iCursor){ ** The sqlite3ExprResolveNames() routines looks for column names and ** sets their opcodes to TK_COLUMN and their Expr.iTable fields to ** the VDBE cursor number of the table. This routine just has to -** translate the cursor numbers into bitmask values and OR all -** the bitmasks together. +** translate the cursor numbers into bittqmask values and OR all +** the bittqmasks together. */ -static Bitmask exprListTableUsage(ExprMaskSet*, ExprList*); -static Bitmask exprSelectTableUsage(ExprMaskSet*, Select*); -static Bitmask exprTableUsage(ExprMaskSet *pMaskSet, Expr *p){ - Bitmask mask = 0; +static Bittqmask exprListTableUsage(ExprMaskSet*, ExprList*); +static Bittqmask exprSelectTableUsage(ExprMaskSet*, Select*); +static Bittqmask exprTableUsage(ExprMaskSet *pMaskSet, Expr *p){ + Bittqmask tqmask = 0; if( p==0 ) return 0; if( p->op==TK_COLUMN ){ - mask = getMask(pMaskSet, p->iTable); - return mask; + tqmask = getMask(pMaskSet, p->iTable); + return tqmask; } - mask = exprTableUsage(pMaskSet, p->pRight); - mask |= exprTableUsage(pMaskSet, p->pLeft); - mask |= exprListTableUsage(pMaskSet, p->pList); - mask |= exprSelectTableUsage(pMaskSet, p->pSelect); - return mask; + tqmask = exprTableUsage(pMaskSet, p->pRight); + tqmask |= exprTableUsage(pMaskSet, p->pLeft); + tqmask |= exprListTableUsage(pMaskSet, p->pList); + tqmask |= exprSelectTableUsage(pMaskSet, p->pSelect); + return tqmask; } -static Bitmask exprListTableUsage(ExprMaskSet *pMaskSet, ExprList *pList){ +static Bittqmask exprListTableUsage(ExprMaskSet *pMaskSet, ExprList *pList){ int i; - Bitmask mask = 0; + Bittqmask tqmask = 0; if( pList ){ for(i=0; i<pList->nExpr; i++){ - mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr); + tqmask |= exprTableUsage(pMaskSet, pList->a[i].pExpr); } } - return mask; + return tqmask; } -static Bitmask exprSelectTableUsage(ExprMaskSet *pMaskSet, Select *pS){ - Bitmask mask; +static Bittqmask exprSelectTableUsage(ExprMaskSet *pMaskSet, Select *pS){ + Bittqmask tqmask; if( pS==0 ){ - mask = 0; + tqmask = 0; }else{ - mask = exprListTableUsage(pMaskSet, pS->pEList); - mask |= exprListTableUsage(pMaskSet, pS->pGroupBy); - mask |= exprListTableUsage(pMaskSet, pS->pOrderBy); - mask |= exprTableUsage(pMaskSet, pS->pWhere); - mask |= exprTableUsage(pMaskSet, pS->pHaving); + tqmask = exprListTableUsage(pMaskSet, pS->pEList); + tqmask |= exprListTableUsage(pMaskSet, pS->pGroupBy); + tqmask |= exprListTableUsage(pMaskSet, pS->pOrderBy); + tqmask |= exprTableUsage(pMaskSet, pS->pWhere); + tqmask |= exprTableUsage(pMaskSet, pS->pHaving); } - return mask; + return tqmask; } /* @@ -379,7 +379,7 @@ static void exprCommute(Expr *pExpr){ } /* -** Translate from TK_xx operator to WO_xx bitmask. +** Translate from TK_xx operator to WO_xx bittqmask. */ static int operatorMask(int op){ int c; @@ -408,7 +408,7 @@ static WhereTerm *findTerm( WhereClause *pWC, /* The WHERE clause to be searched */ int iCur, /* Cursor number of LHS */ int iColumn, /* Column number of LHS */ - Bitmask notReady, /* RHS must not overlap with this mask */ + Bittqmask notReady, /* RHS must not overlap with this tqmask */ u16 op, /* Mask of WO_xx values describing operator */ Index *pIdx /* Must be compatible with this index, if not NULL */ ){ @@ -458,7 +458,7 @@ static void exprAnalyze(SrcList*, ExprMaskSet*, WhereClause*, int); */ static void exprAnalyzeAll( SrcList *pTabList, /* the FROM clause */ - ExprMaskSet *pMaskSet, /* table masks */ + ExprMaskSet *pMaskSet, /* table tqmasks */ WhereClause *pWC /* the WHERE clause to be analyzed */ ){ int i; @@ -536,14 +536,14 @@ static int isLikeOrGlob( */ static void exprAnalyze( SrcList *pSrc, /* the FROM clause */ - ExprMaskSet *pMaskSet, /* table masks */ + ExprMaskSet *pMaskSet, /* table tqmasks */ WhereClause *pWC, /* the WHERE clause */ int idxTerm /* Index of the term to be analyzed */ ){ WhereTerm *pTerm = &pWC->a[idxTerm]; Expr *pExpr = pTerm->pExpr; - Bitmask prereqLeft; - Bitmask prereqAll; + Bittqmask prereqLeft; + Bittqmask prereqAll; int nPattern; int isComplete; @@ -747,7 +747,7 @@ or_not_possible: ** clause and the match can still be a success. ** ** All terms of the ORDER BY that match against the index must be either -** ASC or DESC. (Terms of the ORDER BY clause past the end of a UNIQUE +** ASC or DESC. (Terms of the ORDER BY clause past the end of a UNITQUE ** index do not need to satisfy this constraint.) The *pbRev value is ** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if ** the ORDER BY clause is all ASC. @@ -885,7 +885,7 @@ static double bestIndex( Parse *pParse, /* The parsing context */ WhereClause *pWC, /* The WHERE clause */ struct SrcList_item *pSrc, /* The FROM clause term to search */ - Bitmask notReady, /* Mask of cursors that are not available */ + Bittqmask notReady, /* Mask of cursors that are not available */ ExprList *pOrderBy, /* The order by clause */ Index **ppIndex, /* Make *ppIndex point to the best index */ int *pFlags, /* Put flags describing this choice in *pFlags */ @@ -915,7 +915,7 @@ static double bestIndex( if( pTerm->operator & WO_EQ ){ /* Rowid== is always the best pick. Look no further. Because only ** a single row is generated, output is always in sorted order */ - *pFlags = WHERE_ROWID_EQ | WHERE_UNIQUE; + *pFlags = WHERE_ROWID_EQ | WHERE_UNITQUE; *pnEq = 1; TRACE(("... best is rowid\n")); return 0.0; @@ -1007,7 +1007,7 @@ static double bestIndex( nEq = i; if( pProbe->onError!=OE_None && (flags & WHERE_COLUMN_IN)==0 && nEq==pProbe->nColumn ){ - flags |= WHERE_UNIQUE; + flags |= WHERE_UNITQUE; } TRACE(("...... nEq=%d inMult=%.9g cost=%.9g\n", nEq, inMultiplier, cost)); @@ -1052,13 +1052,13 @@ static double bestIndex( ** ever reading the table. If that is the case, then halve the ** cost of this index. */ - if( flags && pSrc->colUsed < (((Bitmask)1)<<(BMS-1)) ){ - Bitmask m = pSrc->colUsed; + if( flags && pSrc->colUsed < (((Bittqmask)1)<<(BMS-1)) ){ + Bittqmask m = pSrc->colUsed; int j; for(j=0; j<pProbe->nColumn; j++){ int x = pProbe->aiColumn[j]; if( x<BMS-1 ){ - m &= ~(((Bitmask)1)<<x); + m &= ~(((Bittqmask)1)<<x); } } if( m==0 ){ @@ -1169,7 +1169,7 @@ static void codeEqualityTerm( if( pX->op!=TK_IN ){ assert( pX->op==TK_EQ ); sqlite3ExprCode(pParse, pX->pRight); -#ifndef SQLITE_OMIT_SUBQUERY +#ifndef SQLITE_OMIT_SUBTQUERY }else{ int iTab; int *aIn; @@ -1223,7 +1223,7 @@ static void codeAllEqualityTerms( Parse *pParse, /* Parsing context */ WhereLevel *pLevel, /* Which nested loop of the FROM we are coding */ WhereClause *pWC, /* The WHERE clause */ - Bitmask notReady, /* Which parts of FROM have not yet been coded */ + Bittqmask notReady, /* Which parts of FROM have not yet been coded */ int brk /* Jump here to end the loop */ ){ int nEq = pLevel->nEq; /* The number of == or IN constraints to code */ @@ -1276,7 +1276,7 @@ static void codeAllEqualityTerms( ** analysis only. */ char sqlite3_query_plan[BMS*2*40]; /* Text of the join */ -static int nQPlan = 0; /* Next free slow in _query_plan[] */ +static int nTQPlan = 0; /* Next free slow in _query_plan[] */ #endif /* SQLITE_TEST */ @@ -1284,7 +1284,7 @@ static int nQPlan = 0; /* Next free slow in _query_plan[] */ /* ** Generate the beginning of the loop used for WHERE clause processing. -** The return value is a pointer to an opaque structure that contains +** The return value is a pointer to an opaque structure that tqcontains ** information needed to terminate the loop. Later, the calling routine ** should invoke sqlite3WhereEnd() with the return value of this function ** in order to complete the WHERE clause processing. @@ -1380,9 +1380,9 @@ WhereInfo *sqlite3WhereBegin( WhereInfo *pWInfo; /* Will become the return value of this function */ Vdbe *v = pParse->pVdbe; /* The virtual database engine */ int brk, cont = 0; /* Addresses used during code generation */ - Bitmask notReady; /* Cursors that are not yet positioned */ + Bittqmask notReady; /* Cursors that are not yet positioned */ WhereTerm *pTerm; /* A single term in the WHERE clause */ - ExprMaskSet maskSet; /* The expression mask set */ + ExprMaskSet tqmaskSet; /* The expression tqmask set */ WhereClause wc; /* The WHERE clause is divided into these terms */ struct SrcList_item *pTabItem; /* A single entry from pTabList */ WhereLevel *pLevel; /* A single level in the pWInfo list */ @@ -1390,7 +1390,7 @@ WhereInfo *sqlite3WhereBegin( int andFlags; /* AND-ed combination of all wc.a[].flags */ /* The number of tables in the FROM clause is limited by the number of - ** bits in a Bitmask + ** bits in a Bittqmask */ if( pTabList->nSrc>BMS ){ sqlite3ErrorMsg(pParse, "at most %d tables in a join", BMS); @@ -1400,7 +1400,7 @@ WhereInfo *sqlite3WhereBegin( /* Split the WHERE clause into separate subexpressions where each ** subexpression is separated by an AND operator. */ - initMaskSet(&maskSet); + initMaskSet(&tqmaskSet); whereClauseInit(&wc, pParse); whereSplit(&wc, pWhere, TK_AND); @@ -1429,9 +1429,9 @@ WhereInfo *sqlite3WhereBegin( ** and work forward so that the added virtual terms are never processed. */ for(i=0; i<pTabList->nSrc; i++){ - createMask(&maskSet, pTabList->a[i].iCursor); + createMask(&tqmaskSet, pTabList->a[i].iCursor); } - exprAnalyzeAll(pTabList, &maskSet, &wc); + exprAnalyzeAll(pTabList, &tqmaskSet, &wc); if( sqlite3_malloc_failed ){ goto whereBeginNoMem; } @@ -1450,7 +1450,7 @@ WhereInfo *sqlite3WhereBegin( ** This loop also figures out the nesting order of tables in the FROM ** clause. */ - notReady = ~(Bitmask)0; + notReady = ~(Bittqmask)0; pTabItem = pTabList->a; pLevel = pWInfo->a; andFlags = ~0; @@ -1466,10 +1466,10 @@ WhereInfo *sqlite3WhereBegin( int bestNEq = 0; /* nEq associated with pBest */ double lowestCost = 1.0e99; /* Cost of the pBest */ int bestJ; /* The value of j */ - Bitmask m; /* Bitmask value for j or bestJ */ + Bittqmask m; /* Bittqmask value for j or bestJ */ for(j=iFrom, pTabItem=&pTabList->a[j]; j<pTabList->nSrc; j++, pTabItem++){ - m = getMask(&maskSet, pTabItem->iCursor); + m = getMask(&tqmaskSet, pTabItem->iCursor); if( (m & notReady)==0 ){ if( j==iFrom ) iFrom++; continue; @@ -1506,7 +1506,7 @@ WhereInfo *sqlite3WhereBegin( }else{ pLevel->iIdxCur = -1; } - notReady &= ~getMask(&maskSet, pTabList->a[bestJ].iCursor); + notReady &= ~getMask(&tqmaskSet, pTabList->a[bestJ].iCursor); pLevel->iFrom = bestJ; } TRACE(("*** Optimizer Finished ***\n")); @@ -1514,7 +1514,7 @@ WhereInfo *sqlite3WhereBegin( /* If the total query only selects a single row, then the ORDER BY ** clause is irrelevant. */ - if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){ + if( (andFlags & WHERE_UNITQUE)!=0 && ppOrderBy ){ *ppOrderBy = 0; } @@ -1566,7 +1566,7 @@ WhereInfo *sqlite3WhereBegin( ** loop below generates code for a single nested loop of the VM ** program. */ - notReady = ~(Bitmask)0; + notReady = ~(Bittqmask)0; for(i=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){ int j; int iCur = pTabItem->iCursor; /* The VDBE cursor for the table */ @@ -1854,7 +1854,7 @@ WhereInfo *sqlite3WhereBegin( pLevel->p1 = iCur; pLevel->p2 = 1 + sqlite3VdbeAddOp(v, OP_Rewind, iCur, brk); } - notReady &= ~getMask(&maskSet, iCur); + notReady &= ~getMask(&tqmaskSet, iCur); /* Insert code to test every subexpression that can be completely ** computed using the current set of tables. @@ -1904,36 +1904,36 @@ WhereInfo *sqlite3WhereBegin( z = pTabItem->zAlias; if( z==0 ) z = pTabItem->pTab->zName; n = strlen(z); - if( n+nQPlan < sizeof(sqlite3_query_plan)-10 ){ + if( n+nTQPlan < sizeof(sqlite3_query_plan)-10 ){ if( pLevel->flags & WHERE_IDX_ONLY ){ - strcpy(&sqlite3_query_plan[nQPlan], "{}"); - nQPlan += 2; + strcpy(&sqlite3_query_plan[nTQPlan], "{}"); + nTQPlan += 2; }else{ - strcpy(&sqlite3_query_plan[nQPlan], z); - nQPlan += n; + strcpy(&sqlite3_query_plan[nTQPlan], z); + nTQPlan += n; } - sqlite3_query_plan[nQPlan++] = ' '; + sqlite3_query_plan[nTQPlan++] = ' '; } if( pLevel->flags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){ - strcpy(&sqlite3_query_plan[nQPlan], "* "); - nQPlan += 2; + strcpy(&sqlite3_query_plan[nTQPlan], "* "); + nTQPlan += 2; }else if( pLevel->pIdx==0 ){ - strcpy(&sqlite3_query_plan[nQPlan], "{} "); - nQPlan += 3; + strcpy(&sqlite3_query_plan[nTQPlan], "{} "); + nTQPlan += 3; }else{ n = strlen(pLevel->pIdx->zName); - if( n+nQPlan < sizeof(sqlite3_query_plan)-2 ){ - strcpy(&sqlite3_query_plan[nQPlan], pLevel->pIdx->zName); - nQPlan += n; - sqlite3_query_plan[nQPlan++] = ' '; + if( n+nTQPlan < sizeof(sqlite3_query_plan)-2 ){ + strcpy(&sqlite3_query_plan[nTQPlan], pLevel->pIdx->zName); + nTQPlan += n; + sqlite3_query_plan[nTQPlan++] = ' '; } } } - while( nQPlan>0 && sqlite3_query_plan[nQPlan-1]==' ' ){ - sqlite3_query_plan[--nQPlan] = 0; + while( nTQPlan>0 && sqlite3_query_plan[nTQPlan-1]==' ' ){ + sqlite3_query_plan[--nTQPlan] = 0; } - sqlite3_query_plan[nQPlan] = 0; - nQPlan = 0; + sqlite3_query_plan[nTQPlan] = 0; + nTQPlan = 0; #endif /* SQLITE_TEST // Testing and debugging use only */ /* Record the continuation address in the WhereInfo structure. Then diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp b/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp index db5e3e25..60057c88 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp @@ -22,28 +22,28 @@ #include <KoUnit.h> #include <KoUnitWidgets.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> -KoPageLayoutColumns::KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout) - : KoPageLayoutColumnsBase(parent) { +KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout) + : KoPageLayoutColumnsBase(tqparent) { m_columns = columns; - QHBoxLayout *lay = new QHBoxLayout(previewPane); - m_preview = new KoPagePreview( previewPane, "Preview", layout ); + TQHBoxLayout *lay = new TQHBoxLayout(previewPane); + m_preview = new KoPagePreview( previewPane, "Preview", tqlayout ); lay->addWidget(m_preview); - lay = new QHBoxLayout(columnSpacingPane); + lay = new TQHBoxLayout(columnSpacingPane); m_spacing = new KoUnitDoubleSpinBox( columnSpacingPane ); m_spacing->setValue( m_columns.ptColumnSpacing ); m_spacing->setUnit( unit ); double dStep = KoUnit::fromUserValue( 0.2, unit ); - m_spacing->setMinMaxStep( 0, layout.ptWidth/2, dStep ); + m_spacing->setMinMaxStep( 0, tqlayout.ptWidth/2, dStep ); lay->addWidget(m_spacing); labelSpacing->setBuddy( m_spacing ); nColumns->setValue( m_columns.columns ); m_preview->setPageColumns( m_columns ); - connect( nColumns, SIGNAL( valueChanged( int ) ), this, SLOT( nColChanged( int ) ) ); - connect( m_spacing, SIGNAL( valueChangedPt(double) ), this, SLOT( nSpaceChanged( double ) ) ); + connect( nColumns, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( nColChanged( int ) ) ); + connect( m_spacing, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( nSpaceChanged( double ) ) ); } void KoPageLayoutColumns::setEnableColumns(bool on) { @@ -63,8 +63,8 @@ void KoPageLayoutColumns::nSpaceChanged( double spacing ) { emit propertyChange(m_columns); } -void KoPageLayoutColumns::setLayout(KoPageLayout &layout) { - m_preview->setPageLayout( layout ); +void KoPageLayoutColumns::setLayout(KoPageLayout &tqlayout) { + m_preview->setPageLayout( tqlayout ); } #include <KoPageLayoutColumns.moc> diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumns.h b/kexi/3rdparty/kolibs/KoPageLayoutColumns.h index be0a4a49..016eb767 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutColumns.h +++ b/kexi/3rdparty/kolibs/KoPageLayoutColumns.h @@ -19,14 +19,14 @@ // Description: Page Layout Dialog (sources) -#ifndef kopagelayoutcolumns_h -#define kopagelayoutcolumns_h +#ifndef kopagetqlayoutcolumns_h +#define kopagetqlayoutcolumns_h #include <KoUnit.h> #include <KoPageLayout.h> #include <KoPageLayoutColumnsBase.h> -class QWidget; +class TQWidget; class KoUnitDoubleSpinBox; class KoPagePreview; @@ -35,22 +35,23 @@ class KoPagePreview; */ class KoPageLayoutColumns : public KoPageLayoutColumnsBase { Q_OBJECT + TQ_OBJECT public: /** * Contructor - * @param parent the parent widget + * @param tqparent the tqparent widget * @param columns the KoColumns data structure that this dialog should be initialzed with * @param unit the unit-type (mm/cm/inch) that the dialog should show - * @param layout the page layout that the preview should be initialzed with. + * @param tqlayout the page tqlayout that the preview should be initialzed with. */ - KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout); + KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout); /** - * Update the page preview widget with the param layout. - * @param layout the new layout + * Update the page preview widget with the param tqlayout. + * @param tqlayout the new tqlayout */ - void setLayout(KoPageLayout &layout); + void setLayout(KoPageLayout &tqlayout); public slots: /** diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui index 1ffe032d..780bc792 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui +++ b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KoPageLayoutColumnsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KoPageLayoutColumnsBase</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame" row="1" column="1"> + <widget class="TQFrame" row="1" column="1"> <property name="name"> <cstring>columnSpacingPane</cstring> </property> @@ -27,7 +27,7 @@ <enum>Raised</enum> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -38,7 +38,7 @@ <cstring>nColumns</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>labelSpacing</cstring> </property> @@ -56,14 +56,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QFrame" row="0" column="2" rowspan="3" colspan="1"> + <widget class="TQFrame" row="0" column="2" rowspan="3" colspan="1"> <property name="name"> <cstring>previewPane</cstring> </property> @@ -82,7 +82,7 @@ <enum>Raised</enum> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>nColumns</cstring> </property> @@ -95,5 +95,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp b/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp index ad5e018c..b436447b 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp @@ -20,21 +20,21 @@ #include <KoPageLayoutHeader.moc> #include <KoUnitWidgets.h> -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> -KoPageLayoutHeader::KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf) - : KoPageLayoutHeaderBase(parent) { +KoPageLayoutHeader::KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf) + : KoPageLayoutHeaderBase(tqparent) { m_headerFooters = kwhf; - QHBoxLayout *lay = new QHBoxLayout(headerSpacingPane); + TQHBoxLayout *lay = new TQHBoxLayout(headerSpacingPane); m_headerSpacing = new KoUnitDoubleSpinBox( headerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptHeaderBodySpacing, unit ); lay->addWidget(m_headerSpacing); - lay = new QHBoxLayout(footerSpacingPane); + lay = new TQHBoxLayout(footerSpacingPane); m_footerSpacing = new KoUnitDoubleSpinBox( footerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptFooterBodySpacing, unit ); lay->addWidget(m_footerSpacing); - lay = new QHBoxLayout(footnotePane); + lay = new TQHBoxLayout(footnotePane); m_footnoteSpacing = new KoUnitDoubleSpinBox( footnotePane, 0.0, 999.0, 0.5, kwhf.ptFootNoteBodySpacing, unit ); lay->addWidget(m_footnoteSpacing); diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeader.h b/kexi/3rdparty/kolibs/KoPageLayoutHeader.h index 65449dc0..4e3a00a4 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutHeader.h +++ b/kexi/3rdparty/kolibs/KoPageLayoutHeader.h @@ -16,22 +16,23 @@ * Boston, MA 02110-1301, USA. */ -#ifndef kopagelayoutheader_h -#define kopagelayoutheader_h +#ifndef kopagetqlayoutheader_h +#define kopagetqlayoutheader_h #include <KoUnit.h> #include <KoPageLayout.h> #include <KoPageLayoutHeaderBase.h> -class QWidget; +class TQWidget; class KoUnitDoubleSpinBox; class KoPagePreview; class KoPageLayoutHeader : public KoPageLayoutHeaderBase { Q_OBJECT + TQ_OBJECT public: - KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf); + KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf); const KoKWHeaderFooter& headerFooter(); private: diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui index d46ca98e..4488c6f4 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui +++ b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KoPageLayoutHeaderBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KoPageLayoutHeaderBase</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>rhFirst</cstring> </property> @@ -35,7 +35,7 @@ <string>Different header for the first page</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>rhEvenOdd</cstring> </property> @@ -43,9 +43,9 @@ <string>Different header for even and odd pages</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -61,14 +61,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -76,7 +76,7 @@ <string>Spacing between header and body:</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>headerSpacingPane</cstring> </property> @@ -91,7 +91,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -102,7 +102,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>rfFirst</cstring> </property> @@ -110,7 +110,7 @@ <string>Different footer for the first page</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>rfEvenOdd</cstring> </property> @@ -118,9 +118,9 @@ <string>Different footer for even and odd pages</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -136,14 +136,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -151,7 +151,7 @@ <string>Spacing between footer and body:</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>footerSpacingPane</cstring> </property> @@ -166,7 +166,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -187,14 +187,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -202,7 +202,7 @@ <string>Spacing between footnote and body:</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>footnotePane</cstring> </property> @@ -217,5 +217,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp index cb22fe9c..a8eb447f 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp @@ -26,143 +26,143 @@ #include <kiconloader.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qhbox.h> -#include <qvgroupbox.h> -#include <qhbuttongroup.h> - -KoPageLayoutSize::KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) - : QWidget(parent) { - m_layout = layout; +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqhbox.h> +#include <tqvgroupbox.h> +#include <tqhbuttongroup.h> + +KoPageLayoutSize::KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) + : TQWidget(tqparent) { + m_layout = tqlayout; m_unit = unit; - QGridLayout *grid1 = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); + TQGridLayout *grid1 = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); if ( unitChooser ) { // ------------- unit _______________ - QWidget* unitFrame = new QWidget( this ); - grid1->addWidget( unitFrame, 0, 0, Qt::AlignLeft ); - QBoxLayout* unitLayout = new QHBoxLayout( unitFrame, KDialog::marginHint(), KDialog::spacingHint() ); + TQWidget* unitFrame = new TQWidget( this ); + grid1->addWidget( unitFrame, 0, 0, TQt::AlignLeft ); + TQBoxLayout* unitLayout = new TQHBoxLayout( unitFrame, KDialog::marginHint(), KDialog::spacingHint() ); // label unit - QLabel *lpgUnit = new QLabel( i18n( "Unit:" ), unitFrame ); - unitLayout->addWidget( lpgUnit, 0, Qt::AlignRight | Qt::AlignVCenter ); + TQLabel *lpgUnit = new TQLabel( i18n( "Unit:" ), unitFrame ); + unitLayout->addWidget( lpgUnit, 0, TQt::AlignRight | TQt::AlignVCenter ); // combo unit - cpgUnit = new QComboBox( false, unitFrame, "cpgUnit" ); + cpgUnit = new TQComboBox( false, unitFrame, "cpgUnit" ); lpgUnit->setBuddy( cpgUnit ); cpgUnit->insertStringList( KoUnit::listOfUnitName() ); cpgUnit->setCurrentItem( unit ); - unitLayout->addWidget( cpgUnit, 0, Qt::AlignLeft | Qt::AlignVCenter ); - connect( cpgUnit, SIGNAL( activated( int ) ), this, SLOT( setUnitInt( int ) ) ); + unitLayout->addWidget( cpgUnit, 0, TQt::AlignLeft | TQt::AlignVCenter ); + connect( cpgUnit, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( setUnitInt( int ) ) ); } else { - QString str=KoUnit::unitDescription(unit); + TQString str=KoUnit::unitDescription(unit); - QLabel *lpgUnit = new QLabel( i18n("All values are given in %1.").arg(str), this ); - grid1->addWidget( lpgUnit, 0, 0, Qt::AlignLeft ); + TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").tqarg(str), this ); + grid1->addWidget( lpgUnit, 0, 0, TQt::AlignLeft ); } // -------------- page size ----------------- - QVGroupBox *formatFrame = new QVGroupBox( i18n( "Page Size" ), this ); + TQVGroupBox *formatFrame = new TQVGroupBox( i18n( "Page Size" ), this ); grid1->addWidget( formatFrame, 1, 0 ); - QHBox *formatPageSize = new QHBox( formatFrame ); + TQHBox *formatPageSize = new TQHBox( formatFrame ); formatPageSize->setSpacing( KDialog::spacingHint() ); // label page size - QLabel *lpgFormat = new QLabel( i18n( "&Size:" ), formatPageSize ); + TQLabel *lpgFormat = new TQLabel( i18n( "&Size:" ), formatPageSize ); // combo size - cpgFormat = new QComboBox( false, formatPageSize, "cpgFormat" ); + cpgFormat = new TQComboBox( false, formatPageSize, "cpgFormat" ); cpgFormat->insertStringList( KoPageFormat::allFormats() ); lpgFormat->setBuddy( cpgFormat ); - connect( cpgFormat, SIGNAL( activated( int ) ), this, SLOT( formatChanged( int ) ) ); + connect( cpgFormat, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( formatChanged( int ) ) ); // spacer - formatPageSize->setStretchFactor( new QWidget( formatPageSize ), 10 ); + formatPageSize->setStretchFactor( new TQWidget( formatPageSize ), 10 ); - QHBox *formatCustomSize = new QHBox( formatFrame ); + TQHBox *formatCustomSize = new TQHBox( formatFrame ); formatCustomSize->setSpacing( KDialog::spacingHint() ); // label width - QLabel *lpgWidth = new QLabel( i18n( "&Width:" ), formatCustomSize ); + TQLabel *lpgWidth = new TQLabel( i18n( "&Width:" ), formatCustomSize ); // linedit width epgWidth = new KoUnitDoubleSpinBox( formatCustomSize, "Width" ); lpgWidth->setBuddy( epgWidth ); if ( m_layout.format != PG_CUSTOM ) epgWidth->setEnabled( false ); - connect( epgWidth, SIGNAL( valueChangedPt(double) ), this, SLOT( widthChanged(double) ) ); + connect( epgWidth, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( widthChanged(double) ) ); // label height - QLabel *lpgHeight = new QLabel( i18n( "&Height:" ), formatCustomSize ); + TQLabel *lpgHeight = new TQLabel( i18n( "&Height:" ), formatCustomSize ); // linedit height epgHeight = new KoUnitDoubleSpinBox( formatCustomSize, "Height" ); lpgHeight->setBuddy( epgHeight ); if ( m_layout.format != PG_CUSTOM ) epgHeight->setEnabled( false ); - connect( epgHeight, SIGNAL( valueChangedPt(double ) ), this, SLOT( heightChanged(double) ) ); + connect( epgHeight, TQT_SIGNAL( valueChangedPt(double ) ), this, TQT_SLOT( heightChanged(double) ) ); // --------------- orientation --------------- - m_orientGroup = new QHButtonGroup( i18n( "Orientation" ), this ); + m_orientGroup = new TQHButtonGroup( i18n( "Qt::Orientation" ), this ); m_orientGroup->setInsideSpacing( KDialog::spacingHint() ); grid1->addWidget( m_orientGroup, 2, 0 ); - QLabel* lbPortrait = new QLabel( m_orientGroup ); - lbPortrait->setPixmap( QPixmap( UserIcon( "koPortrait" ) ) ); + TQLabel* lbPortrait = new TQLabel( m_orientGroup ); + lbPortrait->setPixmap( TQPixmap( UserIcon( "koPortrait" ) ) ); lbPortrait->setMaximumWidth( lbPortrait->pixmap()->width() ); - new QRadioButton( i18n("&Portrait"), m_orientGroup ); + new TQRadioButton( i18n("&Portrait"), m_orientGroup ); - QLabel* lbLandscape = new QLabel( m_orientGroup ); - lbLandscape->setPixmap( QPixmap( UserIcon( "koLandscape" ) ) ); + TQLabel* lbLandscape = new TQLabel( m_orientGroup ); + lbLandscape->setPixmap( TQPixmap( UserIcon( "koLandscape" ) ) ); lbLandscape->setMaximumWidth( lbLandscape->pixmap()->width() ); - new QRadioButton( i18n("La&ndscape"), m_orientGroup ); + new TQRadioButton( i18n("La&ndscape"), m_orientGroup ); - connect( m_orientGroup, SIGNAL (clicked (int)), this, SLOT( orientationChanged(int) )); + connect( m_orientGroup, TQT_SIGNAL (clicked (int)), this, TQT_SLOT( orientationChanged(int) )); // --------------- page margins --------------- - QVGroupBox *marginsFrame = new QVGroupBox( i18n( "Margins" ), this ); + TQVGroupBox *marginsFrame = new TQVGroupBox( i18n( "Margins" ), this ); marginsFrame->setColumnLayout( 0, Qt::Vertical ); marginsFrame->setMargin( KDialog::marginHint() ); grid1->addWidget( marginsFrame, 3, 0 ); - QGridLayout *marginsLayout = new QGridLayout( marginsFrame->layout(), 3, 3, + TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->tqlayout(), 3, 3, KDialog::spacingHint() ); // left margin ebrLeft = new KoUnitDoubleSpinBox( marginsFrame, "Left" ); marginsLayout->addWidget( ebrLeft, 1, 0 ); - connect( ebrLeft, SIGNAL( valueChangedPt( double ) ), this, SLOT( leftChanged( double ) ) ); + connect( ebrLeft, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( leftChanged( double ) ) ); // right margin ebrRight = new KoUnitDoubleSpinBox( marginsFrame, "Right" ); marginsLayout->addWidget( ebrRight, 1, 2 ); - connect( ebrRight, SIGNAL( valueChangedPt( double ) ), this, SLOT( rightChanged( double ) ) ); + connect( ebrRight, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( rightChanged( double ) ) ); // top margin ebrTop = new KoUnitDoubleSpinBox( marginsFrame, "Top" ); - marginsLayout->addWidget( ebrTop, 0, 1 , Qt::AlignCenter ); - connect( ebrTop, SIGNAL( valueChangedPt( double ) ), this, SLOT( topChanged( double ) ) ); + marginsLayout->addWidget( ebrTop, 0, 1 , TQt::AlignCenter ); + connect( ebrTop, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( topChanged( double ) ) ); // bottom margin ebrBottom = new KoUnitDoubleSpinBox( marginsFrame, "Bottom" ); - marginsLayout->addWidget( ebrBottom, 2, 1, Qt::AlignCenter ); - connect( ebrBottom, SIGNAL( valueChangedPt( double ) ), this, SLOT( bottomChanged( double ) ) ); + marginsLayout->addWidget( ebrBottom, 2, 1, TQt::AlignCenter ); + connect( ebrBottom, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( bottomChanged( double ) ) ); // ------------- preview ----------- pgPreview = new KoPagePreview( this, "Preview", m_layout ); grid1->addMultiCellWidget( pgPreview, 1, 3, 1, 1 ); // ------------- spacers ----------- - QWidget* spacer1 = new QWidget( this ); - QWidget* spacer2 = new QWidget( this ); - spacer1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, - QSizePolicy::Expanding ) ); - spacer2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, - QSizePolicy::Expanding ) ); + TQWidget* spacer1 = new TQWidget( this ); + TQWidget* spacer2 = new TQWidget( this ); + spacer1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + TQSizePolicy::Expanding ) ); + spacer2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + TQSizePolicy::Expanding ) ); grid1->addWidget( spacer1, 4, 0 ); grid1->addWidget( spacer2, 4, 1 ); @@ -262,12 +262,12 @@ void KoPageLayoutSize::formatChanged( int format ) { } void KoPageLayoutSize::orientationChanged(int which) { - KoOrientation oldOrientation = m_layout.orientation; + KoOrientation oldQt::Orientation = m_layout.orientation; m_layout.orientation = which == 0 ? PG_PORTRAIT : PG_LANDSCAPE; // without this check, width & height would be swapped around (below) // even though the orientation has not changed - if (m_layout.orientation == oldOrientation) return; + if (m_layout.orientation == oldQt::Orientation) return; m_layout.ptWidth = epgWidth->value(); m_layout.ptHeight = epgHeight->value(); @@ -277,7 +277,7 @@ void KoPageLayoutSize::orientationChanged(int which) { m_layout.ptBottom = ebrBottom->value(); // swap dimension and adjust margins - qSwap( m_layout.ptWidth, m_layout.ptHeight ); + tqSwap( m_layout.ptWidth, m_layout.ptHeight ); double tmp = m_layout.ptTop; m_layout.ptTop = m_layout.ptRight; m_layout.ptRight = m_layout.ptBottom; diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.h b/kexi/3rdparty/kolibs/KoPageLayoutSize.h index e32f9670..3f46def2 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutSize.h +++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.h @@ -17,37 +17,38 @@ * Boston, MA 02110-1301, USA. */ -#ifndef kopagelayoutsize_h -#define kopagelayoutsize_h +#ifndef kopagetqlayoutsize_h +#define kopagetqlayoutsize_h -#include <qgroupbox.h> +#include <tqgroupbox.h> #include <KoGlobal.h> #include <KoUnit.h> #include <kdialogbase.h> #include <KoPageLayout.h> #include <KoPageLayoutDia.h> -class QComboBox; +class TQComboBox; class KoUnitDoubleSpinBox; class KoPageLayoutColumns; /** * This class is a widget that shows the KoPageLayout data structure and allows the user to change it. */ -class KoPageLayoutSize : public QWidget { +class KoPageLayoutSize : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Contructor - * @param parent the parent widget - * @param layout the page layout that this widget should be initialzed with. + * @param tqparent the tqparent widget + * @param tqlayout the page tqlayout that this widget should be initialzed with. * @param unit the unit-type (mm/cm/inch) that the dialog should show * @param columns the KoColumns (amout of columns) that the preview should be initialized with * @param unitChooser if true a combobox with the unit-type is shown for the user to change * @param enableBorders if true enable the user to change the margins (aka borders) of the page */ - KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit, + KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit, const KoColumns& columns, bool unitChooser, bool enableBorders); /** @@ -75,15 +76,15 @@ public slots: signals: /** * Emitted whenever the user changed something in the dialog. - * @param layout the update layout structure with currently displayed info. + * @param tqlayout the update tqlayout structure with currently displayed info. * Note that the info may not be fully correct and physically possible (in which * case queryClose will return false) */ - void propertyChange(KoPageLayout &layout); + void propertyChange(KoPageLayout &tqlayout); protected: - QComboBox *cpgUnit; - QComboBox *cpgFormat; + TQComboBox *cpgUnit; + TQComboBox *cpgFormat; KoUnitDoubleSpinBox *epgWidth; KoUnitDoubleSpinBox *epgHeight; KoUnitDoubleSpinBox *ebrLeft; @@ -91,7 +92,7 @@ protected: KoUnitDoubleSpinBox *ebrTop; KoUnitDoubleSpinBox *ebrBottom; KoPagePreview *pgPreview; - QButtonGroup *m_orientGroup; + TQButtonGroup *m_orientGroup; protected slots: void formatChanged( int ); diff --git a/kexi/3rdparty/kolibs/koGlobal.cc b/kexi/3rdparty/kolibs/koGlobal.cc index 09c74eab..58c90445 100644 --- a/kexi/3rdparty/kolibs/koGlobal.cc +++ b/kexi/3rdparty/kolibs/koGlobal.cc @@ -21,8 +21,8 @@ #include "config.h" #include <KoGlobal.h> #include <kdebug.h> -#include <qfont.h> -#include <qfontinfo.h> +#include <tqfont.h> +#include <tqfontinfo.h> #include <kglobalsettings.h> #include <kglobal.h> #include <klocale.h> @@ -58,12 +58,12 @@ KoGlobal::KoGlobal() // Tell the iconloader about share/apps/koffice/icons KGlobal::iconLoader()->addAppDir("koffice"); - // Another way to get the DPI of the display would be QPaintDeviceMetrics, + // Another way to get the DPI of the display would be TQPaintDeviceMetrics, // but we have no widget here (and moving this to KoView wouldn't allow // using this from the document easily). -#ifdef Q_WS_X11 - m_dpiX = QPaintDevice::x11AppDpiX(); - m_dpiY = QPaintDevice::x11AppDpiY(); +#ifdef TQ_WS_X11 + m_dpiX = TQPaintDevice::x11AppDpiX(); + m_dpiY = TQPaintDevice::x11AppDpiY(); #else m_dpiX = 75; m_dpiY = 75; @@ -75,31 +75,31 @@ KoGlobal::~KoGlobal() delete m_kofficeConfig; } -QFont KoGlobal::_defaultFont() +TQFont KoGlobal::_defaultFont() { - QFont font = KGlobalSettings::generalFont(); - // we have to use QFontInfo, in case the font was specified with a pixel size + TQFont font = KGlobalSettings::generalFont(); + // we have to use TQFontInfo, in case the font was specified with a pixel size if ( font.pointSize() == -1 ) { - // cache size into m_pointSize, since QFontInfo loads the font -> slow + // cache size into m_pointSize, since TQFontInfo loads the font -> slow if ( m_pointSize == -1 ) - m_pointSize = QFontInfo(font).pointSize(); + m_pointSize = TQFontInfo(font).pointSize(); Q_ASSERT( m_pointSize != -1 ); font.setPointSize( m_pointSize ); } - //kdDebug()<<k_funcinfo<<"QFontInfo(font).pointSize() :"<<QFontInfo(font).pointSize()<<endl; + //kdDebug()<<k_funcinfo<<"TQFontInfo(font).pointSize() :"<<TQFontInfo(font).pointSize()<<endl; //kdDebug()<<k_funcinfo<<"font.name() :"<<font.family ()<<endl; return font; } -QStringList KoGlobal::_listOfLanguageTags() +TQStringList KoGlobal::_listOfLanguageTags() { if ( m_langMap.isEmpty() ) createListOfLanguages(); return m_langMap.values(); } -QStringList KoGlobal::_listOfLanguages() +TQStringList KoGlobal::_listOfLanguages() { if ( m_langMap.empty() ) createListOfLanguages(); @@ -111,17 +111,17 @@ void KoGlobal::createListOfLanguages() KConfig config( "all_languages", true, false, "locale" ); // Note that we could also use KLocale::allLanguagesTwoAlpha - QMap<QString, bool> seenLanguages; - const QStringList langlist = config.groupList(); - for ( QStringList::ConstIterator itall = langlist.begin(); + TQMap<TQString, bool> seenLanguages; + const TQStringList langlist = config.groupList(); + for ( TQStringList::ConstIterator itall = langlist.begin(); itall != langlist.end(); ++itall ) { - const QString tag = *itall; + const TQString tag = *itall; config.setGroup( tag ); - const QString name = config.readEntry("Name", tag); + const TQString name = config.readEntry("Name", tag); // e.g. name is "French" and tag is "fr" - // The QMap does the sorting on the display-name, so that + // The TQMap does the sorting on the display-name, so that // comboboxes are sorted. m_langMap.insert( name, tag ); @@ -132,23 +132,23 @@ void KoGlobal::createListOfLanguages() // Many of them are already in all_languages but all_languages doesn't // currently have en_GB or en_US etc. - const QStringList translationList = KGlobal::dirs()->findAllResources("locale", - QString::fromLatin1("*/entry.desktop")); - for ( QStringList::ConstIterator it = translationList.begin(); + const TQStringList translationList = KGlobal::dirs()->findAllResources("locale", + TQString::tqfromLatin1("*/entry.desktop")); + for ( TQStringList::ConstIterator it = translationList.begin(); it != translationList.end(); ++it ) { // Extract the language tag from the directory name - QString tag = *it; - int index = tag.findRev('/'); + TQString tag = *it; + int index = tag.tqfindRev('/'); tag = tag.left(index); - index = tag.findRev('/'); + index = tag.tqfindRev('/'); tag = tag.mid(index+1); - if ( seenLanguages.find( tag ) == seenLanguages.end() ) { + if ( seenLanguages.tqfind( tag ) == seenLanguages.end() ) { KSimpleConfig entry(*it); entry.setGroup("KCM Locale"); - const QString name = entry.readEntry("Name", tag); + const TQString name = entry.readEntry("Name", tag); // e.g. name is "US English" and tag is "en_US" m_langMap.insert( name, tag ); @@ -163,20 +163,20 @@ void KoGlobal::createListOfLanguages() // How to add them? } -QString KoGlobal::tagOfLanguage( const QString & _lang) +TQString KoGlobal::tagOfLanguage( const TQString & _lang) { const LanguageMap& map = self()->m_langMap; - QMap<QString,QString>::ConstIterator it = map.find( _lang ); + TQMap<TQString,TQString>::ConstIterator it = map.tqfind( _lang ); if ( it != map.end() ) return *it; - return QString::null; + return TQString(); } -QString KoGlobal::languageFromTag( const QString &langTag ) +TQString KoGlobal::languageFromTag( const TQString &langTag ) { const LanguageMap& map = self()->m_langMap; - QMap<QString,QString>::ConstIterator it = map.begin(); - const QMap<QString,QString>::ConstIterator end = map.end(); + TQMap<TQString,TQString>::ConstIterator it = map.begin(); + const TQMap<TQString,TQString>::ConstIterator end = map.end(); for ( ; it != end; ++it ) if ( it.data() == langTag ) return it.key(); diff --git a/kexi/3rdparty/kolibs/koGlobal.h b/kexi/3rdparty/kolibs/koGlobal.h index bab9c261..367a150b 100644 --- a/kexi/3rdparty/kolibs/koGlobal.h +++ b/kexi/3rdparty/kolibs/koGlobal.h @@ -22,9 +22,9 @@ #ifndef koGlobal_h #define koGlobal_h -#include <qstringlist.h> -#include <qfont.h> -#include <qmap.h> +#include <tqstringlist.h> +#include <tqfont.h> +#include <tqmap.h> class KConfig; #include <koffice_export.h> @@ -39,9 +39,9 @@ public: * Return the default font for KOffice programs. * This is (currently) the same as the KDE-global default font, * except that it is guaranteed to have a point size set, - * never a pixel size (see @ref QFont). + * never a pixel size (see @ref TQFont). */ - static QFont defaultFont() { + static TQFont defaultFont() { return self()->_defaultFont(); } @@ -66,32 +66,32 @@ public: /// Return the list of available languages, in their displayable form /// (translated names) - static QStringList listOfLanguages() { + static TQStringList listOfLanguages() { return self()->_listOfLanguages(); } /// Return the list of available languages, in their internal form /// e.g. "fr" or "en_US", here called "tag" - static QStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags + static TQStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags return self()->_listOfLanguageTags(); } /// For a given language display name, return its tag - static QString tagOfLanguage( const QString & _lang ); + static TQString tagOfLanguage( const TQString & _lang ); /// For a given language tag, return its display name - static QString languageFromTag( const QString &_lang ); + static TQString languageFromTag( const TQString &_lang ); ~KoGlobal(); private: static KoGlobal* self(); KoGlobal(); - QFont _defaultFont(); - QStringList _listOfLanguages(); - QStringList _listOfLanguageTags(); + TQFont _defaultFont(); + TQStringList _listOfLanguages(); + TQStringList _listOfLanguageTags(); KConfig* _kofficeConfig(); void createListOfLanguages(); int m_pointSize; - typedef QMap<QString, QString> LanguageMap; + typedef TQMap<TQString, TQString> LanguageMap; LanguageMap m_langMap; // display-name -> language tag KConfig* m_kofficeConfig; int m_dpiX; diff --git a/kexi/3rdparty/kolibs/koPageLayout.cpp b/kexi/3rdparty/kolibs/koPageLayout.cpp index 4ec985f3..7888ba7d 100644 --- a/kexi/3rdparty/kolibs/koPageLayout.cpp +++ b/kexi/3rdparty/kolibs/koPageLayout.cpp @@ -28,7 +28,7 @@ # include <kodom.h> # include <koxmlns.h> #endif -#include <qdom.h> +#include <tqdom.h> // paper formats ( mm ) #define PG_A3_WIDTH 297.0 @@ -60,21 +60,21 @@ KoGenStyle KoPageLayout::saveOasis() const return style; } -void KoPageLayout::loadOasis(const QDomElement &style) +void KoPageLayout::loadOasis(const TQDomElement &style) { - QDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-layout-properties" ) ); + TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-tqlayout-properties" ) ); if ( !properties.isNull() ) { - ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", QString::null ) ); - ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", QString::null ) ); - if (properties.attributeNS( KoXmlNS::style, "print-orientation", QString::null)=="portrait") + ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", TQString() ) ); + ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", TQString() ) ); + if (properties.attributeNS( KoXmlNS::style, "print-orientation", TQString())=="portrait") orientation=PG_PORTRAIT; else orientation=PG_LANDSCAPE; - ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", QString::null ) ); - ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", QString::null ) ); - ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", QString::null ) ); - ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", QString::null ) ); + ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", TQString() ) ); + ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", TQString() ) ); + ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", TQString() ) ); + ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", TQString() ) ); // guessFormat takes millimeters if ( orientation == PG_LANDSCAPE ) format = KoPageFormat::guessFormat( POINT_TO_MM(ptHeight), POINT_TO_MM(ptWidth) ); @@ -86,16 +86,16 @@ void KoPageLayout::loadOasis(const QDomElement &style) KoPageLayout KoPageLayout::standardLayout() { - KoPageLayout layout; - layout.format = KoPageFormat::defaultFormat(); - layout.orientation = PG_PORTRAIT; - layout.ptWidth = MM_TO_POINT( KoPageFormat::width( layout.format, layout.orientation ) ); - layout.ptHeight = MM_TO_POINT( KoPageFormat::height( layout.format, layout.orientation ) ); - layout.ptLeft = MM_TO_POINT( 20.0 ); - layout.ptRight = MM_TO_POINT( 20.0 ); - layout.ptTop = MM_TO_POINT( 20.0 ); - layout.ptBottom = MM_TO_POINT( 20.0 ); - return layout; + KoPageLayout tqlayout; + tqlayout.format = KoPageFormat::defaultFormat(); + tqlayout.orientation = PG_PORTRAIT; + tqlayout.ptWidth = MM_TO_POINT( KoPageFormat::width( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptHeight = MM_TO_POINT( KoPageFormat::height( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptLeft = MM_TO_POINT( 20.0 ); + tqlayout.ptRight = MM_TO_POINT( 20.0 ); + tqlayout.ptTop = MM_TO_POINT( 20.0 ); + tqlayout.ptBottom = MM_TO_POINT( 20.0 ); + return tqlayout; } struct PageFormatInfo @@ -151,12 +151,12 @@ int KoPageFormat::printerPageSize( KoFormat format ) { if ( format == PG_SCREEN ) { - kdWarning() << "You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; + kdWarning() << "You use the page tqlayout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; return KPrinter::A4; } else if ( format == PG_CUSTOM ) { - kdWarning() << "The used page layout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; + kdWarning() << "The used page tqlayout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; return KPrinter::A4; } else if ( format <= PG_LAST_FORMAT ) @@ -197,18 +197,18 @@ KoFormat KoPageFormat::guessFormat( double width, double height ) return PG_CUSTOM; } -QString KoPageFormat::formatString( KoFormat format ) +TQString KoPageFormat::formatString( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) - return QString::fromLatin1( pageFormatInfo[ format ].shortName ); - return QString::fromLatin1( "A4" ); + return TQString::tqfromLatin1( pageFormatInfo[ format ].shortName ); + return TQString::tqfromLatin1( "A4" ); } -KoFormat KoPageFormat::formatFromString( const QString & string ) +KoFormat KoPageFormat::formatFromString( const TQString & string ) { for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { - if (string == QString::fromLatin1( pageFormatInfo[ i ].shortName )) + if (string == TQString::tqfromLatin1( pageFormatInfo[ i ].shortName )) return pageFormatInfo[ i ].format; } // We do not know the format name, so we have a custom format @@ -226,16 +226,16 @@ KoFormat KoPageFormat::defaultFormat() return PG_DIN_A4; } -QString KoPageFormat::name( KoFormat format ) +TQString KoPageFormat::name( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) return i18n( pageFormatInfo[ format ].descriptiveName ); return i18n( pageFormatInfo[ PG_DIN_A4 ].descriptiveName ); } -QStringList KoPageFormat::allFormats() +TQStringList KoPageFormat::allFormats() { - QStringList lst; + TQStringList lst; for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { lst << i18n( pageFormatInfo[ i ].descriptiveName ); diff --git a/kexi/3rdparty/kolibs/koPageLayout.h b/kexi/3rdparty/kolibs/koPageLayout.h index b526620e..724f9275 100644 --- a/kexi/3rdparty/kolibs/koPageLayout.h +++ b/kexi/3rdparty/kolibs/koPageLayout.h @@ -25,15 +25,15 @@ #ifndef SIMPLE_KOLIBS # include <koGenStyles.h> #endif -#include <qstringlist.h> +#include <tqstringlist.h> #include <koffice_export.h> -class QDomElement; +class TQDomElement; /** * @brief Represents the paper format a document shall be printed on. * * For compatibility reasons, and because of screen and custom, - * this enum doesn't map to QPrinter::PageSize but KoPageFormat::printerPageSize + * this enum doesn't map to TQPrinter::PageSize but KoPageFormat::printerPageSize * does the conversion. * * @todo convert DIN to ISO in the names @@ -110,13 +110,13 @@ namespace KoPageFormat * Returns the internal name of the given page format. * Use for saving. */ - KOFFICECORE_EXPORT QString formatString( KoFormat format ); + KOFFICECORE_EXPORT TQString formatString( KoFormat format ); /** * Convert a format string (internal name) to a page format value. * Use for loading. */ - KOFFICECORE_EXPORT KoFormat formatFromString( const QString & string ); + KOFFICECORE_EXPORT KoFormat formatFromString( const TQString & string ); /** * Returns the default format (based on the KControl settings) @@ -127,12 +127,12 @@ namespace KoPageFormat * Returns the translated name of the given page format. * Use for showing the user. */ - KOFFICECORE_EXPORT QString name( KoFormat format ); + KOFFICECORE_EXPORT TQString name( KoFormat format ); /** * Lists the translated names of all the available formats */ - KOFFICECORE_EXPORT QStringList allFormats(); + KOFFICECORE_EXPORT TQStringList allFormats(); /** * Try to find the paper format for the given width and height (in mm). @@ -156,7 +156,7 @@ enum KoHFType { }; /** - * This structure defines the page layout, including + * This structure defines the page tqlayout, including * its size in pt, its format (e.g. A4), orientation, unit, margins etc. */ struct KoPageLayout @@ -193,18 +193,18 @@ struct KoPageLayout #ifndef SIMPLE_KOLIBS /** - * Save this page layout to OASIS. + * Save this page tqlayout to OASIS. */ KOFFICECORE_EXPORT KoGenStyle saveOasis() const; /** - * Load this page layout from OASIS + * Load this page tqlayout from OASIS */ - KOFFICECORE_EXPORT void loadOasis(const QDomElement &style); + KOFFICECORE_EXPORT void loadOasis(const TQDomElement &style); #endif /** - * @return a page layout with the default page size depending on the locale settings, + * @return a page tqlayout with the default page size depending on the locale settings, * default margins (2 cm), and portrait orientation. * @since 1.4 */ @@ -214,12 +214,12 @@ struct KoPageLayout /** structure for header-footer */ struct KoHeadFoot { - QString headLeft; - QString headMid; - QString headRight; - QString footLeft; - QString footMid; - QString footRight; + TQString headLeft; + TQString headMid; + TQString headRight; + TQString footLeft; + TQString footMid; + TQString footRight; }; /** structure for columns */ @@ -229,11 +229,11 @@ struct KoColumns double ptColumnSpacing; bool operator==( const KoColumns& rhs ) const { return columns == rhs.columns && - QABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10; + TQABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10; } bool operator!=( const KoColumns& rhs ) const { return columns != rhs.columns || - QABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10; + TQABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10; } }; @@ -247,9 +247,9 @@ struct KoKWHeaderFooter double ptFootNoteBodySpacing; bool operator==( const KoKWHeaderFooter& rhs ) const { return header == rhs.header && footer == rhs.footer && - QABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 && - QABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 && - QABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10; + TQABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 && + TQABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 && + TQABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10; } bool operator!=( const KoKWHeaderFooter& rhs ) const { return !( *this == rhs ); diff --git a/kexi/3rdparty/kolibs/koPageLayoutDia.cc b/kexi/3rdparty/kolibs/koPageLayoutDia.cc index 5fe8832e..991a2ced 100644 --- a/kexi/3rdparty/kolibs/koPageLayoutDia.cc +++ b/kexi/3rdparty/kolibs/koPageLayoutDia.cc @@ -33,26 +33,26 @@ #include <kiconloader.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qlineedit.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qvgroupbox.h> -#include <qhbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqlineedit.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqvgroupbox.h> +#include <tqhbuttongroup.h> /******************************************************************/ /* class KoPagePreview */ /******************************************************************/ /*===================== constrcutor ==============================*/ -KoPagePreview::KoPagePreview( QWidget* parent, const char *name, const KoPageLayout& layout ) - : QGroupBox( i18n( "Page Preview" ), parent, name ) +KoPagePreview::KoPagePreview( TQWidget* tqparent, const char *name, const KoPageLayout& tqlayout ) + : TQGroupBox( i18n( "Page Preview" ), tqparent, name ) { - setPageLayout( layout ); + setPageLayout( tqlayout ); columns = 1; setMinimumSize( 150, 150 ); } @@ -62,47 +62,47 @@ KoPagePreview::~KoPagePreview() { } -/*=================== set layout =================================*/ -void KoPagePreview::setPageLayout( const KoPageLayout &layout ) +/*=================== set tqlayout =================================*/ +void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout ) { // resolution[XY] is in pixel per pt double resolutionX = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiX()) ); double resolutionY = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiY()) ); - m_pageWidth = layout.ptWidth * resolutionX; - m_pageHeight = layout.ptHeight * resolutionY; + m_pageWidth = tqlayout.ptWidth * resolutionX; + m_pageHeight = tqlayout.ptHeight * resolutionY; double zh = 110.0 / m_pageHeight; double zw = 110.0 / m_pageWidth; - double z = QMIN( zw, zh ); + double z = TQMIN( zw, zh ); m_pageWidth *= z; m_pageHeight *= z; - m_textFrameX = layout.ptLeft * resolutionX * z; - m_textFrameY = layout.ptTop * resolutionY * z; - m_textFrameWidth = m_pageWidth - ( layout.ptLeft + layout.ptRight ) * resolutionX * z; - m_textFrameHeight = m_pageHeight - ( layout.ptTop + layout.ptBottom ) * resolutionY * z; + m_textFrameX = tqlayout.ptLeft * resolutionX * z; + m_textFrameY = tqlayout.ptTop * resolutionY * z; + m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z; + m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z; - repaint( true ); + tqrepaint( true ); } -/*=================== set layout =================================*/ +/*=================== set tqlayout =================================*/ void KoPagePreview::setPageColumns( const KoColumns &_columns ) { columns = _columns.columns; - repaint( true ); + tqrepaint( true ); } /*======================== draw contents =========================*/ -void KoPagePreview::drawContents( QPainter *painter ) +void KoPagePreview::drawContents( TQPainter *painter ) { double cw = m_textFrameWidth; if(columns!=1) cw/=static_cast<double>(columns); painter->setBrush( white ); - painter->setPen( QPen( black ) ); + painter->setPen( TQPen( black ) ); int x=static_cast<int>( ( width() - m_pageWidth ) * 0.5 ); int y=static_cast<int>( ( height() - m_pageHeight ) * 0.5 ); @@ -111,7 +111,7 @@ void KoPagePreview::drawContents( QPainter *painter ) //painter->drawRect( x + 1, y + 1, w, h); painter->drawRect( x, y, w, h ); - painter->setBrush( QBrush( black, HorPattern ) ); + painter->setBrush( TQBrush( black, HorPattern ) ); if ( m_textFrameWidth == m_pageWidth || m_textFrameHeight == m_pageHeight ) painter->setPen( NoPen ); else @@ -128,16 +128,16 @@ void KoPagePreview::drawContents( QPainter *painter ) /******************************************************************/ /*==================== constructor ===============================*/ -KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, +KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& hf, int tabs, KoUnit::Unit unit, bool modal ) : KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel, - KDialogBase::Ok, parent, name, modal) + KDialogBase::Ok, tqparent, name, modal) { flags = tabs; - m_layout = layout; + m_layout = tqlayout; m_unit = unit; m_pageSizeTab = 0; m_columnsTab = 0; @@ -148,23 +148,23 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, if ( tabs & FORMAT_AND_BORDERS ) setupTab1( true ); if ( tabs & HEADER_AND_FOOTER ) setupTab2( hf ); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); setFocus(); } /*==================== constructor ===============================*/ -KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, +KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& hf, const KoColumns& columns, const KoKWHeaderFooter& kwhf, int tabs, KoUnit::Unit unit ) : KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel, - KDialogBase::Ok, parent, name, true) + KDialogBase::Ok, tqparent, name, true) { flags = tabs; - m_layout = layout; + m_layout = tqlayout; m_column = columns; m_unit = unit; m_pageSizeTab = 0; @@ -176,7 +176,7 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, if ( tabs & COLUMNS ) setupTab3(); if ( tabs & KW_HEADER_AND_FOOTER ) setupTab4(kwhf); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); setFocus(); } @@ -186,14 +186,14 @@ KoPageLayoutDia::~KoPageLayoutDia() } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, QWidget* parent ) +bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, tabs, unit ); - if ( dlg->exec() == QDialog::Accepted ) { + if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); + if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); unit = dlg->unit(); } @@ -204,15 +204,15 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumns& columns, - KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, QWidget* parent ) +bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColumns& columns, + KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, columns, _kwhf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, columns, _kwhf, tabs, unit ); - if ( dlg->exec() == QDialog::Accepted ) { + if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); + if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); if ( tabs & COLUMNS ) columns = dlg->columns(); if ( tabs & KW_HEADER_AND_FOOTER ) _kwhf = dlg->headerFooter(); @@ -224,7 +224,7 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumn return res; } -/*===================== get a standard page layout ===============*/ +/*===================== get a standard page tqlayout ===============*/ KoPageLayout KoPageLayoutDia::standardLayout() { return KoPageLayout::standardLayout(); @@ -252,121 +252,121 @@ const KoKWHeaderFooter& KoPageLayoutDia::headerFooter() /*================ setup page size & margins tab ==================*/ void KoPageLayoutDia::setupTab1( bool enableBorders ) { - QWidget *tab1 = addPage(i18n( "Page Size && &Margins" )); - QHBoxLayout *lay = new QHBoxLayout(tab1); + TQWidget *tab1 = addPage(i18n( "Page Size && &Margins" )); + TQHBoxLayout *lay = new TQHBoxLayout(tab1); m_pageSizeTab = new KoPageLayoutSize(tab1, m_layout, m_unit, m_column, !(flags & DISABLE_UNIT), enableBorders ); lay->addWidget(m_pageSizeTab); m_pageSizeTab->show(); - connect (m_pageSizeTab, SIGNAL( propertyChange(KoPageLayout&)), - this, SLOT (sizeUpdated( KoPageLayout&))); + connect (m_pageSizeTab, TQT_SIGNAL( propertyChange(KoPageLayout&)), + this, TQT_SLOT (sizeUpdated( KoPageLayout&))); } -void KoPageLayoutDia::sizeUpdated(KoPageLayout &layout) { - m_layout.ptWidth = layout.ptWidth; - m_layout.ptHeight = layout.ptHeight; - m_layout.ptLeft = layout.ptLeft; - m_layout.ptRight = layout.ptRight; - m_layout.ptTop = layout.ptTop; - m_layout.ptBottom = layout.ptBottom; - m_layout.format = layout.format; - m_layout.orientation = layout.orientation; +void KoPageLayoutDia::sizeUpdated(KoPageLayout &tqlayout) { + m_layout.ptWidth = tqlayout.ptWidth; + m_layout.ptHeight = tqlayout.ptHeight; + m_layout.ptLeft = tqlayout.ptLeft; + m_layout.ptRight = tqlayout.ptRight; + m_layout.ptTop = tqlayout.ptTop; + m_layout.ptBottom = tqlayout.ptBottom; + m_layout.format = tqlayout.format; + m_layout.orientation = tqlayout.orientation; if(m_columnsTab) - m_columnsTab->setLayout(layout); + m_columnsTab->setLayout(tqlayout); } /*================ setup header and footer tab ===================*/ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf ) { - QWidget *tab2 = addPage(i18n( "H&eader && Footer" )); - QGridLayout *grid2 = new QGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() ); + TQWidget *tab2 = addPage(i18n( "H&eader && Footer" )); + TQGridLayout *grid2 = new TQGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() ); // ------------- header --------------- - QGroupBox *gHead = new QGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 ); - gHead->layout()->setSpacing(KDialog::spacingHint()); - gHead->layout()->setMargin(KDialog::marginHint()); - QGridLayout *headGrid = new QGridLayout( gHead->layout(), 2, 3 ); + TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 ); + gHead->tqlayout()->setSpacing(KDialog::spacingHint()); + gHead->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout *headGrid = new TQGridLayout( gHead->tqlayout(), 2, 3 ); - QLabel *lHeadLeft = new QLabel( i18n( "Left:" ), gHead ); + TQLabel *lHeadLeft = new TQLabel( i18n( "Left:" ), gHead ); headGrid->addWidget( lHeadLeft, 0, 0 ); - eHeadLeft = new QLineEdit( gHead ); + eHeadLeft = new TQLineEdit( gHead ); headGrid->addWidget( eHeadLeft, 1, 0 ); eHeadLeft->setText( hf.headLeft ); - QLabel *lHeadMid = new QLabel( i18n( "Mid:" ), gHead ); + TQLabel *lHeadMid = new TQLabel( i18n( "Mid:" ), gHead ); headGrid->addWidget( lHeadMid, 0, 1 ); - eHeadMid = new QLineEdit( gHead ); + eHeadMid = new TQLineEdit( gHead ); headGrid->addWidget( eHeadMid, 1, 1 ); eHeadMid->setText( hf.headMid ); - QLabel *lHeadRight = new QLabel( i18n( "Right:" ), gHead ); + TQLabel *lHeadRight = new TQLabel( i18n( "Right:" ), gHead ); headGrid->addWidget( lHeadRight, 0, 2 ); - eHeadRight = new QLineEdit( gHead ); + eHeadRight = new TQLineEdit( gHead ); headGrid->addWidget( eHeadRight, 1, 2 ); eHeadRight->setText( hf.headRight ); grid2->addMultiCellWidget( gHead, 0, 1, 0, 1 ); // ------------- footer --------------- - QGroupBox *gFoot = new QGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 ); - gFoot->layout()->setSpacing(KDialog::spacingHint()); - gFoot->layout()->setMargin(KDialog::marginHint()); - QGridLayout *footGrid = new QGridLayout( gFoot->layout(), 2, 3 ); + TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 ); + gFoot->tqlayout()->setSpacing(KDialog::spacingHint()); + gFoot->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout *footGrid = new TQGridLayout( gFoot->tqlayout(), 2, 3 ); - QLabel *lFootLeft = new QLabel( i18n( "Left:" ), gFoot ); + TQLabel *lFootLeft = new TQLabel( i18n( "Left:" ), gFoot ); footGrid->addWidget( lFootLeft, 0, 0 ); - eFootLeft = new QLineEdit( gFoot ); + eFootLeft = new TQLineEdit( gFoot ); footGrid->addWidget( eFootLeft, 1, 0 ); eFootLeft->setText( hf.footLeft ); - QLabel *lFootMid = new QLabel( i18n( "Mid:" ), gFoot ); + TQLabel *lFootMid = new TQLabel( i18n( "Mid:" ), gFoot ); footGrid->addWidget( lFootMid, 0, 1 ); - eFootMid = new QLineEdit( gFoot ); + eFootMid = new TQLineEdit( gFoot ); footGrid->addWidget( eFootMid, 1, 1 ); eFootMid->setText( hf.footMid ); - QLabel *lFootRight = new QLabel( i18n( "Right:" ), gFoot ); + TQLabel *lFootRight = new TQLabel( i18n( "Right:" ), gFoot ); footGrid->addWidget( lFootRight, 0, 2 ); - eFootRight = new QLineEdit( gFoot ); + eFootRight = new TQLineEdit( gFoot ); footGrid->addWidget( eFootRight, 1, 2 ); eFootRight->setText( hf.footRight ); grid2->addMultiCellWidget( gFoot, 2, 3, 0, 1 ); - QLabel *lMacros2 = new QLabel( i18n( "You can insert several tags in the text:" ), tab2 ); + TQLabel *lMacros2 = new TQLabel( i18n( "You can insert several tags in the text:" ), tab2 ); grid2->addMultiCellWidget( lMacros2, 4, 4, 0, 1 ); - QLabel *lMacros3 = new QLabel( i18n("<qt><ul><li><sheet> The sheet name</li>" + TQLabel *lMacros3 = new TQLabel( i18n("<qt><ul><li><sheet> The sheet name</li>" "<li><page> The current page</li>" "<li><pages> The total number of pages</li>" "<li><name> The filename or URL</li>" "<li><file> The filename with complete path or the URL</li></ul></qt>"), tab2 ); - grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, Qt::AlignTop ); + grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, TQt::AlignTop ); - QLabel *lMacros4 = new QLabel( i18n("<qt><ul><li><time> The current time</li>" + TQLabel *lMacros4 = new TQLabel( i18n("<qt><ul><li><time> The current time</li>" "<li><date> The current date</li>" "<li><author> Your full name</li>" "<li><org> Your organization</li>" "<li><email> Your email address</li></ul></qt>"), tab2 ); - grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, Qt::AlignTop ); + grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, TQt::AlignTop ); } /*================================================================*/ void KoPageLayoutDia::setupTab3() { - QWidget *tab3 = addPage(i18n( "Col&umns" )); - QHBoxLayout *lay = new QHBoxLayout(tab3); + TQWidget *tab3 = addPage(i18n( "Col&umns" )); + TQHBoxLayout *lay = new TQHBoxLayout(tab3); m_columnsTab = new KoPageLayoutColumns(tab3, m_column, m_unit, m_layout); - m_columnsTab->layout()->setMargin(0); + m_columnsTab->tqlayout()->setMargin(0); lay->addWidget(m_columnsTab); m_columnsTab->show(); - connect (m_columnsTab, SIGNAL( propertyChange(KoColumns&)), - this, SLOT (columnsUpdated( KoColumns&))); + connect (m_columnsTab, TQT_SIGNAL( propertyChange(KoColumns&)), + this, TQT_SLOT (columnsUpdated( KoColumns&))); } void KoPageLayoutDia::columnsUpdated(KoColumns &columns) { @@ -379,10 +379,10 @@ void KoPageLayoutDia::columnsUpdated(KoColumns &columns) { /*================================================================*/ void KoPageLayoutDia::setupTab4(const KoKWHeaderFooter kwhf ) { - QWidget *tab4 = addPage(i18n( "H&eader && Footer" )); - QHBoxLayout *lay = new QHBoxLayout(tab4); + TQWidget *tab4 = addPage(i18n( "H&eader && Footer" )); + TQHBoxLayout *lay = new TQHBoxLayout(tab4); m_headerTab = new KoPageLayoutHeader(tab4, m_unit, kwhf); - m_headerTab->layout()->setMargin(0); + m_headerTab->tqlayout()->setMargin(0); lay->addWidget(m_headerTab); m_headerTab->show(); diff --git a/kexi/3rdparty/kolibs/koPageLayoutDia.h b/kexi/3rdparty/kolibs/koPageLayoutDia.h index f3f1d932..05f8f3db 100644 --- a/kexi/3rdparty/kolibs/koPageLayoutDia.h +++ b/kexi/3rdparty/kolibs/koPageLayoutDia.h @@ -22,16 +22,16 @@ #ifndef __KOPGLAYOUTDIA_H__ #define __KOPGLAYOUTDIA_H__ -#include <qgroupbox.h> +#include <tqgroupbox.h> #include <KoGlobal.h> #include <KoUnit.h> #include <kdialogbase.h> #include <KoPageLayout.h> -class QButtonGroup; -class QComboBox; -class QLineEdit; -class QCheckBox; +class TQButtonGroup; +class TQComboBox; +class TQLineEdit; +class TQCheckBox; class KoUnitDoubleSpinBox; class KoPageLayoutColumns; class KoPageLayoutSize; @@ -44,23 +44,24 @@ enum { FORMAT_AND_BORDERS = 1, HEADER_AND_FOOTER = 2, COLUMNS = 4, DISABLE_BORDE * KoPagePreview. * Internal to KoPageLayoutDia. */ -class KoPagePreview : public QGroupBox +class KoPagePreview : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: /** * constructor */ - KoPagePreview( QWidget*, const char*, const KoPageLayout & ); + KoPagePreview( TQWidget*, const char*, const KoPageLayout & ); /** * destructor */ ~KoPagePreview(); /** - * set page layout + * set page tqlayout */ void setPageLayout( const KoPageLayout& ); void setPageColumns( const KoColumns& ); @@ -68,7 +69,7 @@ public: protected: // paint page - void drawContents( QPainter* ); + void drawContents( TQPainter* ); double m_pageHeight, m_pageWidth, m_textFrameX, m_textFrameY, m_textFrameWidth, m_textFrameHeight; int columns; @@ -77,44 +78,45 @@ protected: class KoPageLayoutDiaPrivate; /** - * With this dialog the user can specify the layout of the paper during printing. + * With this dialog the user can specify the tqlayout of the paper during printing. */ class KOFFICEUI_EXPORT KoPageLayoutDia : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Constructor. * - * @param parent The parent of the dialog. + * @param tqparent The tqparent of the dialog. * @param name The name of the dialog. - * @param layout The layout. + * @param tqlayout The tqlayout. * @param headfoot The header and the footer. * @param flags a variable with all features this dialog should show. * @param unit The unit to use for displaying the values to the user. * @param modal Whether the dialog is modal or not. */ - KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, + KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& headfoot, int flags, KoUnit::Unit unit, bool modal=true ); /** * Constructor. * - * @param parent The parent of the dialog. + * @param tqparent The tqparent of the dialog. * @param name The name of the dialog. - * @param layout The layout. + * @param tqlayout The tqlayout. * @param headfoot The header and the footer. * @param columns The number of columns on the page. * @param kwheadfoot The KWord header and footer. * @param tabs The number of tabs. * @param unit The unit to use for displaying the values to the user */ - KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, + KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& headfoot, const KoColumns& columns, const KoKWHeaderFooter& kwheadfoot, @@ -126,26 +128,26 @@ public: ~KoPageLayoutDia(); /** - * Show page layout dialog. + * Show page tqlayout dialog. * See constructor for documentation on the parameters */ - static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 ); + static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 ); /** - * Show page layout dialog. + * Show page tqlayout dialog. * See constructor for documentation on the parameters */ - static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 ); + static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 ); /** - * Retrieves a standard page layout. + * Retrieves a standard page tqlayout. * Deprecated: better use KoPageLayout::standardLayout() */ static KDE_DEPRECATED KoPageLayout standardLayout(); /** - * Returns the layout + * Returns the tqlayout */ - const KoPageLayout& layout() const { return m_layout; } + const KoPageLayout& tqlayout() const { return m_layout; } /** * Returns the header and footer information @@ -168,14 +170,14 @@ private: void setupTab4( const KoKWHeaderFooter kwhf ); // dialog objects - QLineEdit *eHeadLeft; - QLineEdit *eHeadMid; - QLineEdit *eHeadRight; - QLineEdit *eFootLeft; - QLineEdit *eFootMid; - QLineEdit *eFootRight; - - // layout + TQLineEdit *eHeadLeft; + TQLineEdit *eHeadMid; + TQLineEdit *eHeadRight; + TQLineEdit *eFootLeft; + TQLineEdit *eFootMid; + TQLineEdit *eFootRight; + + // tqlayout KoPageLayout m_layout; KoColumns m_column; @@ -187,7 +189,7 @@ protected slots: virtual void slotOk(); private slots: - void sizeUpdated(KoPageLayout &layout); + void sizeUpdated(KoPageLayout &tqlayout); void columnsUpdated(KoColumns &columns); private: diff --git a/kexi/3rdparty/kolibs/koUnit.cc b/kexi/3rdparty/kolibs/koUnit.cc index 6c19a29f..bd10e26e 100644 --- a/kexi/3rdparty/kolibs/koUnit.cc +++ b/kexi/3rdparty/kolibs/koUnit.cc @@ -28,12 +28,12 @@ #include <kglobal.h> #include <kdebug.h> -#include <qregexp.h> -#include <qdom.h> +#include <tqregexp.h> +#include <tqdom.h> -QStringList KoUnit::listOfUnitName() +TQStringList KoUnit::listOfUnitName() { - QStringList lst; + TQStringList lst; for ( uint i = 0 ; i <= KoUnit::U_LASTUNIT ; ++i ) { KoUnit::Unit unit = static_cast<KoUnit::Unit>( i ); @@ -42,7 +42,7 @@ QStringList KoUnit::listOfUnitName() return lst; } -QString KoUnit::unitDescription( Unit _unit ) +TQString KoUnit::unitDescription( Unit _unit ) { switch ( _unit ) { @@ -114,7 +114,7 @@ double KoUnit::ptToUnit( const double ptValue, const Unit unit ) } } -QString KoUnit::toUserStringValue( double ptValue, Unit unit ) +TQString KoUnit::toUserStringValue( double ptValue, Unit unit ) { return KGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) ); } @@ -142,12 +142,12 @@ double KoUnit::fromUserValue( double value, Unit unit ) } } -double KoUnit::fromUserValue( const QString& value, Unit unit, bool* ok ) +double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok ) { return fromUserValue( KGlobal::locale()->readNumber( value, ok ), unit ); } -double KoUnit::parseValue( QString value, double defaultVal ) +double KoUnit::parseValue( TQString value, double defaultVal ) { value.simplifyWhiteSpace(); value.remove( ' ' ); @@ -155,11 +155,11 @@ double KoUnit::parseValue( QString value, double defaultVal ) if( value.isEmpty() ) return defaultVal; - int index = value.find( QRegExp( "[a-z]+$" ) ); + int index = value.tqfind( TQRegExp( "[a-z]+$" ) ); if ( index == -1 ) return value.toDouble(); - QString unit = value.mid( index ); + TQString unit = value.mid( index ); value.truncate ( index ); double val = value.toDouble(); @@ -181,34 +181,34 @@ double KoUnit::parseValue( QString value, double defaultVal ) return defaultVal; } -KoUnit::Unit KoUnit::unit( const QString &_unitName, bool* ok ) +KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) { if ( ok ) *ok = true; - if ( _unitName == QString::fromLatin1( "mm" ) ) return U_MM; - if ( _unitName == QString::fromLatin1( "cm" ) ) return U_CM; - if ( _unitName == QString::fromLatin1( "dm" ) ) return U_DM; - if ( _unitName == QString::fromLatin1( "in" ) - || _unitName == QString::fromLatin1("inch") /*compat*/ ) return U_INCH; - if ( _unitName == QString::fromLatin1( "pi" ) ) return U_PI; - if ( _unitName == QString::fromLatin1( "dd" ) ) return U_DD; - if ( _unitName == QString::fromLatin1( "cc" ) ) return U_CC; - if ( _unitName == QString::fromLatin1( "pt" ) ) return U_PT; + if ( _unitName == TQString::tqfromLatin1( "mm" ) ) return U_MM; + if ( _unitName == TQString::tqfromLatin1( "cm" ) ) return U_CM; + if ( _unitName == TQString::tqfromLatin1( "dm" ) ) return U_DM; + if ( _unitName == TQString::tqfromLatin1( "in" ) + || _unitName == TQString::tqfromLatin1("inch") /*compat*/ ) return U_INCH; + if ( _unitName == TQString::tqfromLatin1( "pi" ) ) return U_PI; + if ( _unitName == TQString::tqfromLatin1( "dd" ) ) return U_DD; + if ( _unitName == TQString::tqfromLatin1( "cc" ) ) return U_CC; + if ( _unitName == TQString::tqfromLatin1( "pt" ) ) return U_PT; if ( ok ) *ok = false; return U_PT; } -QString KoUnit::unitName( Unit _unit ) +TQString KoUnit::unitName( Unit _unit ) { - if ( _unit == U_MM ) return QString::fromLatin1( "mm" ); - if ( _unit == U_CM ) return QString::fromLatin1( "cm" ); - if ( _unit == U_DM ) return QString::fromLatin1( "dm" ); - if ( _unit == U_INCH ) return QString::fromLatin1( "in" ); - if ( _unit == U_PI ) return QString::fromLatin1( "pi" ); - if ( _unit == U_DD ) return QString::fromLatin1( "dd" ); - if ( _unit == U_CC ) return QString::fromLatin1( "cc" ); - return QString::fromLatin1( "pt" ); + if ( _unit == U_MM ) return TQString::tqfromLatin1( "mm" ); + if ( _unit == U_CM ) return TQString::tqfromLatin1( "cm" ); + if ( _unit == U_DM ) return TQString::tqfromLatin1( "dm" ); + if ( _unit == U_INCH ) return TQString::tqfromLatin1( "in" ); + if ( _unit == U_PI ) return TQString::tqfromLatin1( "pi" ); + if ( _unit == U_DD ) return TQString::tqfromLatin1( "dd" ); + if ( _unit == U_CC ) return TQString::tqfromLatin1( "cc" ); + return TQString::tqfromLatin1( "pt" ); } #ifndef SIMPLE_KOLIBS diff --git a/kexi/3rdparty/kolibs/koUnit.h b/kexi/3rdparty/kolibs/koUnit.h index 86f749d6..7f02f6fd 100644 --- a/kexi/3rdparty/kolibs/koUnit.h +++ b/kexi/3rdparty/kolibs/koUnit.h @@ -20,13 +20,13 @@ #ifndef kounit_h #define kounit_h -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <math.h> // for floor #include <koffice_export.h> class KoXmlWriter; -class QDomElement; +class TQDomElement; // 1 inch ^= 72 pt // 1 inch ^= 25.399956 mm (-pedantic ;p) @@ -137,7 +137,7 @@ public: /// This method is the one to use to display a value in a dialog /// @return the value @p ptValue converted to @p unit and rounded, ready to be displayed /// Old name: userValue - static QString toUserStringValue( double ptValue, Unit unit ); + static TQString toUserStringValue( double ptValue, Unit unit ); /// This method is the one to use to read a value from a dialog /// @return the value in @p unit, converted to points for internal use @@ -150,20 +150,20 @@ public: /// @param ok if set, the pointed bool is set to true if the value could be /// converted to a double, and to false otherwise. /// @return the value in @p unit, converted to points for internal use - static double fromUserValue( const QString& value, Unit unit, bool* ok = 0 ); + static double fromUserValue( const TQString& value, Unit unit, bool* ok = 0 ); /// Convert a unit name into a Unit enum /// @param _unitName name to convert /// @param ok if set, it will be true if the unit was known, false if unknown - static Unit unit( const QString &_unitName, bool* ok = 0 ); + static Unit unit( const TQString &_unitName, bool* ok = 0 ); /// Get the name of a unit - static QString unitName( Unit _unit ); + static TQString unitName( Unit _unit ); /// Get the full (translated) description of a unit - static QString unitDescription( Unit _unit ); - static QStringList listOfUnitName(); + static TQString unitDescription( Unit _unit ); + static TQStringList listOfUnitName(); /// parse common %KOffice and OO values, like "10cm", "5mm" to pt - static double parseValue( QString value, double defaultVal = 0.0 ); + static double parseValue( TQString value, double defaultVal = 0.0 ); // Note: the above method doesn't take a const ref, since it modifies the arg. #ifndef SIMPLE_KOLIBS diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.cc b/kexi/3rdparty/kolibs/koUnitWidgets.cc index 0472caf5..21251b81 100644 --- a/kexi/3rdparty/kolibs/koUnitWidgets.cc +++ b/kexi/3rdparty/kolibs/koUnitWidgets.cc @@ -22,27 +22,27 @@ #include <kdebug.h> #include <kglobal.h> #include <klocale.h> -#include <qpushbutton.h> -#include <qlayout.h> +#include <tqpushbutton.h> +#include <tqlayout.h> // ---------------------------------------------------------------- // Support classes -KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name ) -: KDoubleValidator( parent, name ), m_base( base ) +KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name ) +: KDoubleValidator( tqparent, name ), m_base( base ) { } -QValidator::State -KoUnitDoubleValidator::validate( QString &s, int &pos ) const +TQValidator::State +KoUnitDoubleValidator::validate( TQString &s, int &pos ) const { kdDebug(30004) << "KoUnitDoubleValidator::validate : " << s << " at " << pos << endl; - QValidator::State result = Acceptable; + TQValidator::State result = Acceptable; - QRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end + TQRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end const int res = regexp.search( s ); if ( res == -1 ) @@ -52,9 +52,9 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const return Intermediate; } - // ### TODO: are all the QString::stripWhiteSpace really necessary? - const QString number ( s.left( res ).stripWhiteSpace() ); - const QString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() ); + // ### TODO: are all the TQString::stripWhiteSpace really necessary? + const TQString number ( s.left( res ).stripWhiteSpace() ); + const TQString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() ); kdDebug(30004) << "Split:" << number << ":" << unitName << ":" << endl; @@ -87,25 +87,25 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const } -QString KoUnitDoubleBase::getVisibleText( double value ) const +TQString KoUnitDoubleBase::getVisibleText( double value ) const { - const QString num ( QString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); - kdDebug(30004) << "getVisibleText: " << QString::number( value, 'f', 12 ) << " => " << num << endl; + const TQString num ( TQString( "%1%2").tqarg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); + kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl; return num; } -double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const +double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const { - QString str2( str ); + TQString str2( str ); /* KLocale::readNumber wants the thousand separator exactly at 1000. But when editing, it might be anywhere. So we need to remove it. */ - const QString sep( KGlobal::locale()->thousandsSeparator() ); + const TQString sep( KGlobal::locale()->thousandsSeparator() ); if ( !sep.isEmpty() ) str2.remove( sep ); str2.remove( KoUnit::unitName( m_unit ) ); const double dbl = KGlobal::locale()->readNumber( str2, ok ); if ( ok ) - kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << QString::number( dbl, 'f', 12 ) << endl; + kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl; else kdWarning(30004) << "toDouble error:" << str << ": => :" << str2 << ":" << endl; return dbl; @@ -116,42 +116,42 @@ double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const // Widget classes -KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent, const char *name ) - : KDoubleSpinBox( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ) +KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent, const char *name ) + : KDoubleSpinBox( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ) , m_lowerInPoints( -9999 ) , m_upperInPoints( 9999 ) , m_stepInPoints( 1 ) { KDoubleSpinBox::setPrecision( 2 ); m_validator = new KoUnitDoubleValidator( this, this ); - QSpinBox::setValidator( m_validator ); + TQSpinBox::setValidator( m_validator ); setAcceptLocalizedNumbers( true ); setUnit( KoUnit::U_PT ); - connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged())); } -KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent, +KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent, double lower, double upper, double step, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : KDoubleSpinBox( lower, upper, step, value, precision, parent, name ), + : KDoubleSpinBox( lower, upper, step, value, precision, tqparent, name ), KoUnitDoubleBase( unit, precision ), m_lowerInPoints( lower ), m_upperInPoints( upper ), m_stepInPoints( step ) { m_unit = KoUnit::U_PT; m_validator = new KoUnitDoubleValidator( this, this ); - QSpinBox::setValidator( m_validator ); + TQSpinBox::setValidator( m_validator ); setAcceptLocalizedNumbers( true ); setUnit( unit ); changeValue( value ); setLineStep( 0.5 ); - connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged())); } void @@ -218,23 +218,23 @@ void KoUnitDoubleSpinBox::setMinMaxStep( double min, double max, double step ) // ---------------------------------------------------------------- -KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, const char *name ) - : KLineEdit( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), +KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, const char *name ) + : KLineEdit( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - setAlignment( Qt::AlignRight ); + tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( KoUnit::U_PT ); changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) ); } -KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit, +KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : KLineEdit( parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), + : KLineEdit( tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - setAlignment( Qt::AlignRight ); + tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( unit ); @@ -259,10 +259,10 @@ KoUnitDoubleLineEdit::setUnit( KoUnit::Unit unit ) } bool -KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev ) +KoUnitDoubleLineEdit::eventFilter( TQObject* o, TQEvent* ev ) { #if 0 - if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide ) + if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide ) { bool ok; double value = toDouble( text(), &ok ); @@ -271,7 +271,7 @@ KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev ) } else #endif - return QLineEdit::eventFilter( o, ev ); + return TQLineEdit::eventFilter( o, ev ); } double KoUnitDoubleLineEdit::value( void ) const @@ -283,34 +283,34 @@ double KoUnitDoubleLineEdit::value( void ) const // ---------------------------------------------------------------- -KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, const char *name ) - : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) +KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, const char *name ) + : KComboBox( true, tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - lineEdit()->setAlignment( Qt::AlignRight ); + lineEdit()->tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( KoUnit::U_PT ); changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) ); - connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) ); } -KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit, +KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : KComboBox( true, parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), + : KComboBox( true, tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - lineEdit()->setAlignment( Qt::AlignRight ); + lineEdit()->tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( unit ); changeValue( KoUnit::ptToUnit( value, unit ) ); - connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) ); } void KoUnitDoubleComboBox::changeValue( double value ) { - QString oldLabel = lineEdit()->text(); + TQString oldLabel = lineEdit()->text(); updateValue( value ); if( lineEdit()->text() != oldLabel ) emit valueChanged( m_value ); @@ -351,10 +351,10 @@ KoUnitDoubleComboBox::setUnit( KoUnit::Unit unit ) } bool -KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev ) +KoUnitDoubleComboBox::eventFilter( TQObject* o, TQEvent* ev ) { #if 0 - if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide ) + if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide ) { bool ok; double value = toDouble( lineEdit()->text(), &ok ); @@ -363,7 +363,7 @@ KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev ) } else #endif - return QComboBox::eventFilter( o, ev ); + return TQComboBox::eventFilter( o, ev ); } double KoUnitDoubleComboBox::value( void ) const @@ -375,51 +375,51 @@ double KoUnitDoubleComboBox::value( void ) const // ---------------------------------------------------------------- -KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, const char *name ) - : QWidget( parent ), m_step( 1.0 ) +KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, const char *name ) + : TQWidget( tqparent ), m_step( 1.0 ) { - QGridLayout *layout = new QGridLayout( this, 2, 3 ); - //layout->setMargin( 2 ); - QPushButton *up = new QPushButton( "+", this ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); + //tqlayout->setMargin( 2 ); + TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - layout->addWidget( up, 0, 0 ); - connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) ); + tqlayout->addWidget( up, 0, 0 ); + connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); - QPushButton *down = new QPushButton( "-", this ); + TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - layout->addWidget( down, 1, 0 ); - connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) ); + tqlayout->addWidget( down, 1, 0 ); + connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( 0.0, KoUnit::U_PT ), KoUnit::ptToUnit( 9999.99, KoUnit::U_PT ), 0.0, KoUnit::U_PT, 2, name ); - connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) ); - layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); + tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } -KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value, +KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : QWidget( parent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper ) + : TQWidget( tqparent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper ) { - QGridLayout *layout = new QGridLayout( this, 2, 3 ); - //layout->setMargin( 2 ); - QPushButton *up = new QPushButton( "+", this ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); + //tqlayout->setMargin( 2 ); + TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - layout->addWidget( up, 0, 0 ); - connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) ); + tqlayout->addWidget( up, 0, 0 ); + connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); - QPushButton *down = new QPushButton( "-", this ); + TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - layout->addWidget( down, 1, 0 ); - connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) ); + tqlayout->addWidget( down, 1, 0 ); + connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( lower, unit ), KoUnit::ptToUnit( upper, unit ), value, unit, precision, name ); - connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) ); - layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); + tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } void diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.h b/kexi/3rdparty/kolibs/koUnitWidgets.h index 957b1b36..dbdcb9c0 100644 --- a/kexi/3rdparty/kolibs/koUnitWidgets.h +++ b/kexi/3rdparty/kolibs/koUnitWidgets.h @@ -44,9 +44,9 @@ class KoUnitDoubleBase; class KOFFICEUI_EXPORT KoUnitDoubleValidator : public KDoubleValidator { public: - KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name = 0 ); + KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name = 0 ); - virtual QValidator::State validate( QString &, int & ) const; + virtual TQValidator::State validate( TQString &, int & ) const; private: KoUnitDoubleBase *m_base; @@ -80,14 +80,14 @@ protected: * @param value the number as double * @return the resulting string */ - QString getVisibleText( double value ) const; + TQString getVisibleText( double value ) const; /** * Transfrom a string into a double, while taking care of locale specific symbols. * @param str the string to transform into a number * @param ok true, if the conversion was succesful * @return the value as double */ - double toDouble( const QString& str, bool* ok ) const; + double toDouble( const TQString& str, bool* ok ) const; protected: KoUnitDoubleValidator *m_validator; @@ -107,10 +107,11 @@ protected: class KOFFICEUI_EXPORT KoUnitDoubleSpinBox : public KDoubleSpinBox, public KoUnitDoubleBase { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleSpinBox( QWidget *parent = 0L, const char *name = 0L ); + KoUnitDoubleSpinBox( TQWidget *tqparent = 0L, const char *name = 0L ); // lower, upper, step and value are in pt - KoUnitDoubleSpinBox( QWidget *parent, double lower, double upper, double step, double value = 0.0, + KoUnitDoubleSpinBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); // added so the class can be used in .ui files(by Tymoteusz Majewski, maju7@o2.pl) virtual void changeValue( double ); @@ -135,7 +136,7 @@ public: void setMinMaxStep( double min, double max, double step ); signals: - /// emitted like valueChanged in the parent, but this one emits the point value + /// emitted like valueChanged in the tqparent, but this one emits the point value void valueChangedPt( double ); @@ -157,9 +158,10 @@ private slots: class KOFFICEUI_EXPORT KoUnitDoubleLineEdit : public KLineEdit, public KoUnitDoubleBase { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleLineEdit( QWidget *parent = 0L, const char *name = 0L ); - KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); + KoUnitDoubleLineEdit( TQWidget *tqparent = 0L, const char *name = 0L ); + KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); virtual void changeValue( double ); virtual void setUnit( KoUnit::Unit = KoUnit::U_PT ); @@ -168,7 +170,7 @@ public: double value( void ) const; protected: - bool eventFilter( QObject* obj, QEvent* ev ); + bool eventFilter( TQObject* obj, TQEvent* ev ); private: double m_value; @@ -185,9 +187,10 @@ private: class KOFFICEUI_EXPORT KoUnitDoubleComboBox : public KComboBox, public KoUnitDoubleBase { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleComboBox( QWidget *parent = 0L, const char *name = 0L ); - KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); + KoUnitDoubleComboBox( TQWidget *tqparent = 0L, const char *name = 0L ); + KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); virtual void changeValue( double ); void updateValue( double ); @@ -198,7 +201,7 @@ public: void insertItem( double, int index = -1 ); protected: - bool eventFilter( QObject* obj, QEvent* ev ); + bool eventFilter( TQObject* obj, TQEvent* ev ); signals: void valueChanged(double); @@ -218,12 +221,13 @@ protected: * Combo box (with spin control) for double precision numbers with unit display * \since 1.4 (change of behavior) */ -class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public QWidget +class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleSpinComboBox( QWidget *parent = 0L, const char *name = 0L ); - KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); + KoUnitDoubleSpinComboBox( TQWidget *tqparent = 0L, const char *name = 0L ); + KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); void insertItem( double, int index = -1 ); void updateValue( double ); |