Rename obsolete tq methods to standard names

pull/16/head
Timothy Pearson 13 years ago
parent a51cd9949c
commit 1180237ab3

@ -189,7 +189,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
to klocale-&gt;translate with i18n.<P> to klocale-&gt;translate with i18n.<P>
The return value of i18n is also no longer a const char*, The return value of i18n is also no longer a const char*,
but a tqunicode TQString.<P> but a unicode TQString.<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

@ -158,7 +158,7 @@ void queryFunctions( const char* app, const char* obj )
int callFunction( const char* app, const char* obj, const char* func, const QCStringList args ) int callFunction( const char* app, const char* obj, const char* func, const QCStringList args )
{ {
TQString f = func; // Qt is better with tqunicode strings, so use one. TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' ); int left = f.find( '(' );
int right = f.find( ')' ); int right = f.find( ')' );

@ -40,7 +40,7 @@ static bool bLaunchApp = 0;
bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{ {
TQString f = func; // Qt is better with tqunicode strings, so use one. TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' ); int left = f.find( '(' );
int right = f.find( ')' ); int right = f.find( ')' );

@ -1411,7 +1411,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
uint pos, len = text.length(); uint pos, len = text.length();
bool seenOpen = false; bool seenOpen = false;
for(pos = 0; pos < len; ++pos) { for(pos = 0; pos < len; ++pos) {
int ch = text.at(pos).tqunicode(); int ch = text.at(pos).unicode();
switch(ch) { switch(ch) {
case '<': case '<':
seenOpen = true; seenOpen = true;
@ -1467,11 +1467,11 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
if(unclosedTag) { if(unclosedTag) {
// find the start of the next attribute, so we can align with it // find the start of the next attribute, so we can align with it
do { do {
lastCh = text.at(++attrCol).tqunicode(); lastCh = text.at(++attrCol).unicode();
}while(lastCh && lastCh != ' ' && lastCh != '\t'); }while(lastCh && lastCh != ' ' && lastCh != '\t');
while(lastCh == ' ' || lastCh == '\t') { while(lastCh == ' ' || lastCh == '\t') {
lastCh = text.at(++attrCol).tqunicode(); lastCh = text.at(++attrCol).unicode();
} }
attrCol = prevLine->cursorX(attrCol, tabWidth); attrCol = prevLine->cursorX(attrCol, tabWidth);

@ -172,10 +172,10 @@ class KateFileLoader
// should spaces be ignored at end of line? // should spaces be ignored at end of line?
inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; } inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; }
// internal tqunicode data array // internal unicode data array
inline const TQChar *tqunicode () const { return m_text.tqunicode(); } inline const TQChar *unicode () const { return m_text.unicode(); }
// read a line, return length + offset in tqunicode data // read a line, return length + offset in unicode data
void readLine (uint &offset, uint &length) void readLine (uint &offset, uint &length)
{ {
length = 0; length = 0;
@ -543,7 +543,7 @@ bool KateBuffer::canEncode ()
kdDebug(13020) << "ENC NAME: " << codec->name() << endl; kdDebug(13020) << "ENC NAME: " << codec->name() << endl;
// hardcode some tqunicode encodings which can encode all chars // hardcode some unicode encodings which can encode all chars
if ((TQString(codec->name()) == "UTF-8") || (TQString(codec->name()) == "ISO-10646-UCS-2")) if ((TQString(codec->name()) == "UTF-8") || (TQString(codec->name()) == "ISO-10646-UCS-2"))
return true; return true;
@ -1353,14 +1353,14 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
{ {
uint offset = 0, length = 0; uint offset = 0, length = 0;
stream->readLine(offset, length); stream->readLine(offset, length);
const TQChar *tqunicodeData = stream->tqunicode () + offset; const TQChar *unicodeData = stream->unicode () + offset;
// strip spaces at end of line // strip spaces at end of line
if ( stream->removeTrailingSpaces() ) if ( stream->removeTrailingSpaces() )
{ {
while (length > 0) while (length > 0)
{ {
if (tqunicodeData[length-1].isSpace()) if (unicodeData[length-1].isSpace())
--length; --length;
else else
break; break;
@ -1391,13 +1391,13 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
memcpy(buf+pos, (char *) &length, sizeof(uint)); memcpy(buf+pos, (char *) &length, sizeof(uint));
pos += sizeof(uint); pos += sizeof(uint);
memcpy(buf+pos, (char *) tqunicodeData, sizeof(TQChar)*length); memcpy(buf+pos, (char *) unicodeData, sizeof(TQChar)*length);
pos += sizeof(TQChar)*length; pos += sizeof(TQChar)*length;
} }
else else
{ {
KateTextLine::Ptr textLine = new KateTextLine (); KateTextLine::Ptr textLine = new KateTextLine ();
textLine->insertText (0, length, tqunicodeData); textLine->insertText (0, length, unicodeData);
m_stringList.push_back (textLine); m_stringList.push_back (textLine);
} }

@ -578,7 +578,7 @@ bool KateCommands::Character::exec (Kate::View *view, const TQString &_cmd, TQSt
view->insertText(TQString(buf)); view->insertText(TQString(buf));
} }
else else
{ // do the tqunicode thing { // do the unicode thing
TQChar c(number); TQChar c(number);
view->insertText(TQString(&c, 1)); view->insertText(TQString(&c, 1));
} }

@ -119,7 +119,7 @@ class SedReplace : public Kate::Command
}; };
/** /**
* insert a tqunicode or ascii character * insert a unicode or ascii character
* base 9+1: 1234 * base 9+1: 1234
* hex: 0x1234 or x1234 * hex: 0x1234 or x1234
* octal: 01231 * octal: 01231

@ -1187,7 +1187,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const TQString &str )
editAddUndo (KateUndoGroup::editInsertText, line, col, s.length(), s); editAddUndo (KateUndoGroup::editInsertText, line, col, s.length(), s);
l->insertText (col, s.length(), s.tqunicode()); l->insertText (col, s.length(), s.unicode());
// removeTrailingSpace(line); // ### nessecary? // removeTrailingSpace(line); // ### nessecary?
m_buffer->changeLine(line); m_buffer->changeLine(line);
@ -1410,7 +1410,7 @@ bool KateDocument::editInsertLine ( uint line, const TQString &s )
removeTrailingSpace( line ); // old line removeTrailingSpace( line ); // old line
KateTextLine::Ptr tl = new KateTextLine(); KateTextLine::Ptr tl = new KateTextLine();
tl->insertText (0, s.length(), s.tqunicode(), 0); tl->insertText (0, s.length(), s.unicode(), 0);
m_buffer->insertLine(line, tl); m_buffer->insertLine(line, tl);
m_buffer->changeLine(line); m_buffer->changeLine(line);
@ -2589,7 +2589,7 @@ bool KateDocument::saveFile()
// //
if (!m_buffer->canEncode () if (!m_buffer->canEncode ()
&& (KMessageBox::warningContinueCancel(0, && (KMessageBox::warningContinueCancel(0,
i18n("The selected encoding cannot encode every tqunicode character in this document. Do you really want to save it? There could be some data lost."),i18n("Possible Data Loss"),i18n("Save Nevertheless")) != KMessageBox::Continue)) i18n("The selected encoding cannot encode every unicode character in this document. Do you really want to save it? There could be some data lost."),i18n("Possible Data Loss"),i18n("Save Nevertheless")) != KMessageBox::Continue))
{ {
return false; return false;
} }
@ -3227,7 +3227,7 @@ void KateDocument::del( KateView *view, const KateTextCursor& c )
void KateDocument::paste ( KateView* view ) void KateDocument::paste ( KateView* view )
{ {
TQString s = TQApplication::tqclipboard()->text(); TQString s = TQApplication::clipboard()->text();
if (s.isEmpty()) if (s.isEmpty())
return; return;

@ -65,10 +65,10 @@ static const int KATE_DYNAMIC_CONTEXTS_RESET_DELAY = 30 * 1000;
inline bool kateInsideString (const TQString &str, TQChar ch) inline bool kateInsideString (const TQString &str, TQChar ch)
{ {
const TQChar *tqunicode = str.tqunicode(); const TQChar *unicode = str.unicode();
const uint len = str.length(); const uint len = str.length();
for (uint i=0; i < len; i++) for (uint i=0; i < len; i++)
if (tqunicode[i] == ch) if (unicode[i] == ch)
return true; return true;
return false; return false;
@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const TQString& text, int offset, int len)
if (wordLen < minLen) return 0; if (wordLen < minLen) return 0;
if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.tqunicode() + offset, wordLen).string()) ) if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.unicode() + offset, wordLen).string()) )
return offset2; return offset2;
return 0; return 0;

@ -62,7 +62,7 @@ UString::UString(const TQString &d)
{ {
unsigned int len = d.length(); unsigned int len = d.length();
UChar *dat = new UChar[len]; UChar *dat = new UChar[len];
memcpy(dat, d.tqunicode(), len * sizeof(UChar)); memcpy(dat, d.unicode(), len * sizeof(UChar));
rep = UString::Rep::create(dat, len); rep = UString::Rep::create(dat, len);
} }

@ -745,7 +745,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
KateFontStruct *fs = config()->fontStruct(); KateFontStruct *fs = config()->fontStruct();
const TQChar *tqunicode = textLine->text(); const TQChar *unicode = textLine->text();
const TQString &textString = textLine->string(); const TQString &textString = textLine->string();
int x = 0; int x = 0;
@ -763,7 +763,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol)
x += width; x += width;
if (z < len && tqunicode[z] == TQChar('\t')) if (z < len && unicode[z] == TQChar('\t'))
x -= x % width; x -= x % width;
} }
@ -787,7 +787,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
*needWrap = false; *needWrap = false;
const uint len = textLine->length(); const uint len = textLine->length();
const TQChar *tqunicode = textLine->text(); const TQChar *unicode = textLine->text();
const TQString &textString = textLine->string(); const TQString &textString = textLine->string();
uint z = startcol; uint z = startcol;
@ -800,10 +800,10 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u
// How should tabs be treated when they word-wrap on a print-out? // How should tabs be treated when they word-wrap on a print-out?
// if startcol != 0, this messes up (then again, word wrapping messes up anyway) // if startcol != 0, this messes up (then again, word wrapping messes up anyway)
if (tqunicode[z] == TQChar('\t')) if (unicode[z] == TQChar('\t'))
x -= x % width; x -= x % width;
if (tqunicode[z].isSpace()) if (unicode[z].isSpace())
{ {
lastWhiteSpace = z+1; lastWhiteSpace = z+1;
lastWhiteSpaceX = x; lastWhiteSpaceX = x;
@ -887,7 +887,7 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
if (!textLine) return 0; if (!textLine) return 0;
const uint len = textLine->length(); const uint len = textLine->length();
const TQChar *tqunicode = textLine->text(); const TQChar *unicode = textLine->text();
const TQString &textString = textLine->string(); const TQString &textString = textLine->string();
x = oldX = 0; x = oldX = 0;
@ -906,7 +906,7 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol)
x += width; x += width;
if (z < len && tqunicode[z] == TQChar('\t')) if (z < len && unicode[z] == TQChar('\t'))
x -= x % width; x -= x % width;
z++; z++;

@ -110,11 +110,11 @@ void KateTextLine::truncate(uint newLen)
int KateTextLine::nextNonSpaceChar(uint pos) const int KateTextLine::nextNonSpaceChar(uint pos) const
{ {
const uint len = m_text.length(); const uint len = m_text.length();
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
for(uint i = pos; i < len; i++) for(uint i = pos; i < len; i++)
{ {
if(!tqunicode[i].isSpace()) if(!unicode[i].isSpace())
return i; return i;
} }
@ -128,11 +128,11 @@ int KateTextLine::previousNonSpaceChar(uint pos) const
if (pos >= (uint)len) if (pos >= (uint)len)
pos = len - 1; pos = len - 1;
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
for(int i = pos; i >= 0; i--) for(int i = pos; i >= 0; i--)
{ {
if(!tqunicode[i].isSpace()) if(!unicode[i].isSpace())
return i; return i;
} }
@ -152,20 +152,20 @@ int KateTextLine::lastChar() const
const TQChar *KateTextLine::firstNonSpace() const const TQChar *KateTextLine::firstNonSpace() const
{ {
int first = firstChar(); int first = firstChar();
return (first > -1) ? ((TQChar*)m_text.tqunicode())+first : m_text.tqunicode(); return (first > -1) ? ((TQChar*)m_text.unicode())+first : m_text.unicode();
} }
uint KateTextLine::indentDepth (uint tabwidth) const uint KateTextLine::indentDepth (uint tabwidth) const
{ {
uint d = 0; uint d = 0;
const uint len = m_text.length(); const uint len = m_text.length();
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
for(uint i = 0; i < len; i++) for(uint i = 0; i < len; i++)
{ {
if(tqunicode[i].isSpace()) if(unicode[i].isSpace())
{ {
if (tqunicode[i] == TQChar('\t')) if (unicode[i] == TQChar('\t'))
d += tabwidth - (d % tabwidth); d += tabwidth - (d % tabwidth);
else else
d++; d++;
@ -189,11 +189,11 @@ bool KateTextLine::stringAtPos(uint pos, const TQString& match) const
// overflow again which (pos+matchlen > len) does not catch; see bugs #129263 and #129580 // overflow again which (pos+matchlen > len) does not catch; see bugs #129263 and #129580
Q_ASSERT(pos < len); Q_ASSERT(pos < len);
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
const TQChar *matchUnicode = match.tqunicode(); const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++) for (uint i=0; i < matchlen; i++)
if (tqunicode[i+pos] != matchUnicode[i]) if (unicode[i+pos] != matchUnicode[i])
return false; return false;
return true; return true;
@ -206,11 +206,11 @@ bool KateTextLine::startingWith(const TQString& match) const
if (matchlen > m_text.length()) if (matchlen > m_text.length())
return false; return false;
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
const TQChar *matchUnicode = match.tqunicode(); const TQChar *matchUnicode = match.unicode();
for (uint i=0; i < matchlen; i++) for (uint i=0; i < matchlen; i++)
if (tqunicode[i] != matchUnicode[i]) if (unicode[i] != matchUnicode[i])
return false; return false;
return true; return true;
@ -223,12 +223,12 @@ bool KateTextLine::endingWith(const TQString& match) const
if (matchlen > m_text.length()) if (matchlen > m_text.length())
return false; return false;
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
const TQChar *matchUnicode = match.tqunicode(); const TQChar *matchUnicode = match.unicode();
uint start = m_text.length() - matchlen; uint start = m_text.length() - matchlen;
for (uint i=0; i < matchlen; i++) for (uint i=0; i < matchlen; i++)
if (tqunicode[start+i] != matchUnicode[i]) if (unicode[start+i] != matchUnicode[i])
return false; return false;
return true; return true;
@ -239,11 +239,11 @@ int KateTextLine::cursorX(uint pos, uint tabChars) const
uint x = 0; uint x = 0;
const uint n = kMin (pos, (uint)m_text.length()); const uint n = kMin (pos, (uint)m_text.length());
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < n; z++) for ( uint z = 0; z < n; z++)
{ {
if (tqunicode[z] == TQChar('\t')) if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars); x += tabChars - (x % tabChars);
else else
x++; x++;
@ -257,11 +257,11 @@ uint KateTextLine::lengthWithTabs (uint tabChars) const
{ {
uint x = 0; uint x = 0;
const uint len = m_text.length(); const uint len = m_text.length();
const TQChar *tqunicode = m_text.tqunicode(); const TQChar *unicode = m_text.unicode();
for ( uint z = 0; z < len; z++) for ( uint z = 0; z < len; z++)
{ {
if (tqunicode[z] == TQChar('\t')) if (unicode[z] == TQChar('\t'))
x += tabChars - (x % tabChars); x += tabChars - (x % tabChars);
else else
x++; x++;
@ -346,7 +346,7 @@ char *KateTextLine::dump (char *buf, bool withHighlighting) const
memcpy(buf, &l, sizeof(uint)); memcpy(buf, &l, sizeof(uint));
buf += sizeof(uint); buf += sizeof(uint);
memcpy(buf, (char *) m_text.tqunicode(), sizeof(TQChar)*l); memcpy(buf, (char *) m_text.unicode(), sizeof(TQChar)*l);
buf += sizeof(TQChar) * l; buf += sizeof(TQChar) * l;
if (!withHighlighting) if (!withHighlighting)

@ -145,10 +145,10 @@ class KateTextLine : public KShared
inline TQChar getChar (uint pos) const { return m_text[pos]; } inline TQChar getChar (uint pos) const { return m_text[pos]; }
/** /**
* Gets the text as a tqunicode representation * Gets the text as a unicode representation
* @return text of this line as TQChar array * @return text of this line as TQChar array
*/ */
inline const TQChar *text() const { return m_text.tqunicode(); } inline const TQChar *text() const { return m_text.unicode(); }
/** /**
* Highlighting array * Highlighting array
@ -419,7 +419,7 @@ class KateTextLine : public KShared
*/ */
private: private:
/** /**
* text of line as tqunicode * text of line as unicode
*/ */
TQString m_text; TQString m_text;

@ -1613,7 +1613,7 @@ void KateView::copy() const
if (!hasSelection()) if (!hasSelection())
return; return;
TQApplication::tqclipboard()->setText(selection ()); TQApplication::clipboard()->setText(selection ());
} }
void KateView::copyHTML() void KateView::copyHTML()
@ -1629,7 +1629,7 @@ void KateView::copyHTML()
drag->addDragObject( htmltextdrag); drag->addDragObject( htmltextdrag);
drag->addDragObject( new TQTextDrag( selection())); drag->addDragObject( new TQTextDrag( selection()));
TQApplication::tqclipboard()->setData(drag); TQApplication::clipboard()->setData(drag);
} }
TQString KateView::selectionAsHtml() TQString KateView::selectionAsHtml()

@ -795,10 +795,10 @@ int KateIconBorder::lineNumberWidth() const
int width = m_lineNumbersOn ? ((int)log10((double)(m_view->doc()->numLines())) + 1) * m_maxCharWidth + 4 : 0; int width = m_lineNumbersOn ? ((int)log10((double)(m_view->doc()->numLines())) + 1) * m_maxCharWidth + 4 : 0;
if (m_view->dynWordWrap() && m_dynWrapIndicatorsOn) { if (m_view->dynWordWrap() && m_dynWrapIndicatorsOn) {
width = kMax(tqstyle().scrollBarExtent().width() + 4, width); width = kMax(style().scrollBarExtent().width() + 4, width);
if (m_cachedLNWidth != width || m_oldBackgroundColor != m_view->renderer()->config()->iconBarColor()) { if (m_cachedLNWidth != width || m_oldBackgroundColor != m_view->renderer()->config()->iconBarColor()) {
int w = tqstyle().scrollBarExtent().width(); int w = style().scrollBarExtent().width();
int h = m_view->renderer()->config()->fontMetrics()->height(); int h = m_view->renderer()->config()->fontMetrics()->height();
TQSize newSize(w, h); TQSize newSize(w, h);

@ -106,7 +106,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
// bottom corner box // bottom corner box
m_dummy = new TQWidget(m_view); m_dummy = new TQWidget(m_view);
m_dummy->setFixedHeight(tqstyle().scrollBarExtent().width()); m_dummy->setFixedHeight(style().scrollBarExtent().width());
if (m_view->dynWordWrap()) if (m_view->dynWordWrap())
m_dummy->hide(); m_dummy->hide();
@ -425,7 +425,7 @@ void KateViewInternal::scrollPos(KateTextCursor& c, bool force, bool calledExter
updateView(false, viewLinesScrolled); updateView(false, viewLinesScrolled);
int scrollHeight = -(viewLinesScrolled * (int)m_view->renderer()->fontHeight()); int scrollHeight = -(viewLinesScrolled * (int)m_view->renderer()->fontHeight());
int scrollbarWidth = tqstyle().scrollBarExtent().width(); int scrollbarWidth = style().scrollBarExtent().width();
// //
// updates are for working around the scrollbar leaving blocks in the view // updates are for working around the scrollbar leaving blocks in the view
@ -2649,9 +2649,9 @@ void KateViewInternal::keyReleaseEvent( TQKeyEvent* e )
if (m_selChangedByUser) if (m_selChangedByUser)
{ {
TQApplication::tqclipboard()->setSelectionMode( true ); TQApplication::clipboard()->setSelectionMode( true );
m_view->copy(); m_view->copy();
TQApplication::tqclipboard()->setSelectionMode( false ); TQApplication::clipboard()->setSelectionMode( false );
m_selChangedByUser = false; m_selChangedByUser = false;
} }
@ -2711,9 +2711,9 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e )
m_view->selectLine( cursor ); m_view->selectLine( cursor );
} }
TQApplication::tqclipboard()->setSelectionMode( true ); TQApplication::clipboard()->setSelectionMode( true );
m_view->copy(); m_view->copy();
TQApplication::tqclipboard()->setSelectionMode( false ); TQApplication::clipboard()->setSelectionMode( false );
// Keep the line at the select anchor selected during further // Keep the line at the select anchor selected during further
// mouse selection // mouse selection
@ -2889,9 +2889,9 @@ void KateViewInternal::mouseDoubleClickEvent(TQMouseEvent *e)
// Move cursor to end (or beginning) of selected word // Move cursor to end (or beginning) of selected word
if (m_view->hasSelection()) if (m_view->hasSelection())
{ {
TQApplication::tqclipboard()->setSelectionMode( true ); TQApplication::clipboard()->setSelectionMode( true );
m_view->copy(); m_view->copy();
TQApplication::tqclipboard()->setSelectionMode( false ); TQApplication::clipboard()->setSelectionMode( false );
// Shift+DC before the "cached" word should move the cursor to the // Shift+DC before the "cached" word should move the cursor to the
// beginning of the selection, not the end // beginning of the selection, not the end
@ -2933,9 +2933,9 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e )
if (m_selChangedByUser) if (m_selChangedByUser)
{ {
TQApplication::tqclipboard()->setSelectionMode( true ); TQApplication::clipboard()->setSelectionMode( true );
m_view->copy(); m_view->copy();
TQApplication::tqclipboard()->setSelectionMode( false ); TQApplication::clipboard()->setSelectionMode( false );
// Set cursor to edge of selection... which edge depends on what // Set cursor to edge of selection... which edge depends on what
// "direction" the selection was made in // "direction" the selection was made in
if ( m_view->selectStart < selectAnchor ) if ( m_view->selectStart < selectAnchor )
@ -2961,9 +2961,9 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e )
if( m_doc->isReadWrite() ) if( m_doc->isReadWrite() )
{ {
TQApplication::tqclipboard()->setSelectionMode( true ); TQApplication::clipboard()->setSelectionMode( true );
m_view->paste (); m_view->paste ();
TQApplication::tqclipboard()->setSelectionMode( false ); TQApplication::clipboard()->setSelectionMode( false );
} }
e->accept (); e->accept ();

@ -871,8 +871,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path)
pos++; pos++;
int newpos = absBase.find('/', pos); int newpos = absBase.find('/', pos);
if (newpos == -1) newpos = absBase.length(); if (newpos == -1) newpos = absBase.length();
TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
// kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl; // kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl;
// kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl; // kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl;
// kdDebug() << "pos: " << pos << " newpos: " << newpos << endl; // kdDebug() << "pos: " << pos << " newpos: " << newpos << endl;
@ -886,8 +886,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path)
TQString rel; TQString rel;
{ {
TQConstString relBase(absBase.tqunicode() + basepos, absBase.length() - basepos); TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
TQConstString relPath(absPath.tqunicode() + pathpos, absPath.length() - pathpos); TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
// generate as many .. as there are path elements in relBase // generate as many .. as there are path elements in relBase
if (relBase.string().length() > 0) { if (relBase.string().length() > 0) {
for (int i = relBase.string().contains('/'); i > 0; --i) for (int i = relBase.string().contains('/'); i > 0; --i)

@ -112,7 +112,7 @@ TQString HelpProtocol::lookupFile(const TQString &fname,
} }
else else
{ {
tqunicodeError( i18n("There is no documentation available for %1." ).arg(path) ); unicodeError( i18n("There is no documentation available for %1." ).arg(path) );
finished(); finished();
return TQString::null; return TQString::null;
} }
@ -123,7 +123,7 @@ TQString HelpProtocol::lookupFile(const TQString &fname,
} }
void HelpProtocol::tqunicodeError( const TQString &t ) void HelpProtocol::unicodeError( const TQString &t )
{ {
data(fromUnicode( TQString( data(fromUnicode( TQString(
"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\"></head>\n" "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\"></head>\n"
@ -215,7 +215,7 @@ void HelpProtocol::get( const KURL& url )
kdDebug( 7119 ) << "parsed " << mParsed.length() << endl; kdDebug( 7119 ) << "parsed " << mParsed.length() << endl;
if (mParsed.isEmpty()) { if (mParsed.isEmpty()) {
tqunicodeError( i18n( "The requested help file could not be parsed:<br>%1" ).arg( file ) ); unicodeError( i18n( "The requested help file could not be parsed:<br>%1" ).arg( file ) );
} else { } else {
int pos1 = mParsed.find( "charset=" ); int pos1 = mParsed.find( "charset=" );
if ( pos1 > 0 ) { if ( pos1 > 0 ) {
@ -248,7 +248,7 @@ void HelpProtocol::get( const KURL& url )
kdDebug( 7119 ) << "parsed " << mParsed.length() << endl; kdDebug( 7119 ) << "parsed " << mParsed.length() << endl;
if (mParsed.isEmpty()) { if (mParsed.isEmpty()) {
tqunicodeError( i18n( "The requested help file could not be parsed:<br>%1" ).arg( file ) ); unicodeError( i18n( "The requested help file could not be parsed:<br>%1" ).arg( file ) );
} else { } else {
TQString query = url.query(), anchor; TQString query = url.query(), anchor;
@ -316,7 +316,7 @@ void HelpProtocol::emitFile( const KURL& url )
return; return;
} }
tqunicodeError( i18n("Could not find filename %1 in %2.").arg(filename).arg( url.url() ) ); unicodeError( i18n("Could not find filename %1 in %2.").arg(filename).arg( url.url() ) );
return; return;
} }

@ -37,7 +37,7 @@ private:
TQString lookupFile(const TQString &fname, const TQString &query, TQString lookupFile(const TQString &fname, const TQString &query,
bool &redirect); bool &redirect);
void tqunicodeError( const TQString &t ); void unicodeError( const TQString &t );
TQString mParsed; TQString mParsed;
bool mGhelp; bool mGhelp;

@ -336,7 +336,7 @@ TQCString fromUnicode( const TQString &data )
buffer_len += test.length(); buffer_len += test.length();
} else { } else {
TQString res; TQString res;
res.sprintf( "&#%d;", TQChar(part.at( i )).tqunicode() ); res.sprintf( "&#%d;", TQChar(part.at( i )).unicode() );
test = locale->fromUnicode( res ); test = locale->fromUnicode( res );
if (buffer_len + test.length() + 1 > sizeof(buffer)) if (buffer_len + test.length() + 1 > sizeof(buffer))
break; break;

@ -291,7 +291,7 @@ that defines the DTD to use for HTML (used mainly in the parser).
<dd>Java related stuff. <dd>Java related stuff.
<dt><a href="misc/">misc:</a> <dt><a href="misc/">misc:</a>
<dd>Some misc stuff needed in khtml. Contains the image loader, some misc definitions and the <dd>Some misc stuff needed in khtml. Contains the image loader, some misc definitions and the
decoder class that converts the incoming stream to tqunicode. decoder class that converts the incoming stream to unicode.
<dt><a href="rendering">rendering:</a> <dt><a href="rendering">rendering:</a>
<dd>Everything thats related to bringing a DOM tree with CSS declarations to the screen. Contains <dd>Everything thats related to bringing a DOM tree with CSS declarations to the screen. Contains
the definition of the objects used in the rendering tree, the layouting code, and the RenderStyle objects. the definition of the objects used in the rendering tree, the layouting code, and the RenderStyle objects.

@ -930,7 +930,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
case CSS_PROP_TOP: case CSS_PROP_TOP:
return getPositionOffsetValue(renderer, CSS_PROP_TOP); return getPositionOffsetValue(renderer, CSS_PROP_TOP);
case CSS_PROP_UNICODE_BIDI: case CSS_PROP_UNICODE_BIDI:
switch (style->tqunicodeBidi()) { switch (style->unicodeBidi()) {
case UBNormal: case UBNormal:
return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL); return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL);
case Embed: case Embed:

@ -78,7 +78,7 @@ DOMString khtml::parseURL(const DOMString &url)
int nl = 0; int nl = 0;
for(int k = o; k < o+l; k++) for(int k = o; k < o+l; k++)
if(i->s[k].tqunicode() > '\r') if(i->s[k].unicode() > '\r')
j->s[nl++] = i->s[k]; j->s[nl++] = i->s[k];
j->l = nl; j->l = nl;

@ -166,7 +166,7 @@ void CSSParser::parseSheet( CSSStyleSheetImpl *sheet, const DOMString &string )
int length = string.length() + 3; int length = string.length() + 3;
data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); data = (unsigned short *)malloc( length *sizeof( unsigned short ) );
memcpy( data, string.tqunicode(), string.length()*sizeof( unsigned short) ); memcpy( data, string.unicode(), string.length()*sizeof( unsigned short) );
#ifdef CSS_DEBUG #ifdef CSS_DEBUG
kdDebug( 6080 ) << ">>>>>>> start parsing style sheet" << endl; kdDebug( 6080 ) << ">>>>>>> start parsing style sheet" << endl;
@ -190,7 +190,7 @@ CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOM
data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); data = (unsigned short *)malloc( length *sizeof( unsigned short ) );
for ( unsigned int i = 0; i < strlen(khtml_rule); i++ ) for ( unsigned int i = 0; i < strlen(khtml_rule); i++ )
data[i] = khtml_rule[i]; data[i] = khtml_rule[i];
memcpy( data + strlen( khtml_rule ), string.tqunicode(), string.length()*sizeof( unsigned short) ); memcpy( data + strlen( khtml_rule ), string.unicode(), string.length()*sizeof( unsigned short) );
// qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() );
data[length-4] = '}'; data[length-4] = '}';
@ -218,7 +218,7 @@ bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id,
data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); data = (unsigned short *)malloc( length *sizeof( unsigned short ) );
for ( unsigned int i = 0; i < strlen(khtml_value); i++ ) for ( unsigned int i = 0; i < strlen(khtml_value); i++ )
data[i] = khtml_value[i]; data[i] = khtml_value[i];
memcpy( data + strlen( khtml_value ), string.tqunicode(), string.length()*sizeof( unsigned short) ); memcpy( data + strlen( khtml_value ), string.unicode(), string.length()*sizeof( unsigned short) );
data[length-4] = '}'; data[length-4] = '}';
// qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); // qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() );
@ -260,7 +260,7 @@ bool CSSParser::parseDeclaration( DOM::CSSStyleDeclarationImpl *declaration, con
data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); data = (unsigned short *)malloc( length *sizeof( unsigned short ) );
for ( unsigned int i = 0; i < strlen(khtml_decls); i++ ) for ( unsigned int i = 0; i < strlen(khtml_decls); i++ )
data[i] = khtml_decls[i]; data[i] = khtml_decls[i];
memcpy( data + strlen( khtml_decls ), string.tqunicode(), string.length()*sizeof( unsigned short) ); memcpy( data + strlen( khtml_decls ), string.unicode(), string.length()*sizeof( unsigned short) );
data[length-4] = '}'; data[length-4] = '}';
nonCSSHint = _nonCSSHint; nonCSSHint = _nonCSSHint;

@ -281,7 +281,7 @@ findProp (register const char *str, register unsigned int len)
#line 102 "cssproperties.gperf" #line 102 "cssproperties.gperf"
{"text-align", CSS_PROP_TEXT_ALIGN}, {"text-align", CSS_PROP_TEXT_ALIGN},
#line 109 "cssproperties.gperf" #line 109 "cssproperties.gperf"
{"tqunicode-bidi", CSS_PROP_UNICODE_BIDI}, {"unicode-bidi", CSS_PROP_UNICODE_BIDI},
#line 82 "cssproperties.gperf" #line 82 "cssproperties.gperf"
{"outline-color", CSS_PROP_OUTLINE_COLOR}, {"outline-color", CSS_PROP_OUTLINE_COLOR},
#line 60 "cssproperties.gperf" #line 60 "cssproperties.gperf"
@ -632,7 +632,7 @@ static const char * const propertyList[] = {
"text-shadow", "text-shadow",
"text-transform", "text-transform",
"top", "top",
"tqunicode-bidi", "unicode-bidi",
"vertical-align", "vertical-align",
"visibility", "visibility",
"white-space", "white-space",

@ -871,7 +871,7 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded
if( attr.isNull() ) { if( attr.isNull() ) {
return PseudoNone; return PseudoNone;
} }
TQConstString cu(attr.tqunicode(), attr.length()); TQConstString cu(attr.unicode(), attr.length());
TQString u = cu.string(); TQString u = cu.string();
if ( !u.contains("://") ) { if ( !u.contains("://") ) {
if ( u[0] == '/' ) if ( u[0] == '/' )
@ -1165,8 +1165,8 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
// else the value is longer and can be a list // else the value is longer and can be a list
if ( sel->match == CSSSelector::Class && !e->hasClassList() ) return false; if ( sel->match == CSSSelector::Class && !e->hasClassList() ) return false;
TQChar* sel_uc = sel->value.tqunicode(); TQChar* sel_uc = sel->value.unicode();
TQChar* val_uc = value->tqunicode(); TQChar* val_uc = value->unicode();
TQConstString sel_str(sel_uc, sel_len); TQConstString sel_str(sel_uc, sel_len);
TQConstString val_str(val_uc, val_len); TQConstString val_str(val_uc, val_len);
@ -1187,29 +1187,29 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
case CSSSelector::Contain: case CSSSelector::Contain:
{ {
//kdDebug( 6080 ) << "checking for contains match" << endl; //kdDebug( 6080 ) << "checking for contains match" << endl;
TQConstString val_str(value->tqunicode(), value->length()); TQConstString val_str(value->unicode(), value->length());
TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); TQConstString sel_str(sel->value.unicode(), sel->value.length());
return val_str.string().contains(sel_str.string(), caseSensitive); return val_str.string().contains(sel_str.string(), caseSensitive);
} }
case CSSSelector::Begin: case CSSSelector::Begin:
{ {
//kdDebug( 6080 ) << "checking for beginswith match" << endl; //kdDebug( 6080 ) << "checking for beginswith match" << endl;
TQConstString val_str(value->tqunicode(), value->length()); TQConstString val_str(value->unicode(), value->length());
TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); TQConstString sel_str(sel->value.unicode(), sel->value.length());
return val_str.string().startsWith(sel_str.string(), caseSensitive); return val_str.string().startsWith(sel_str.string(), caseSensitive);
} }
case CSSSelector::End: case CSSSelector::End:
{ {
//kdDebug( 6080 ) << "checking for endswith match" << endl; //kdDebug( 6080 ) << "checking for endswith match" << endl;
TQConstString val_str(value->tqunicode(), value->length()); TQConstString val_str(value->unicode(), value->length());
TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); TQConstString sel_str(sel->value.unicode(), sel->value.length());
return val_str.string().endsWith(sel_str.string(), caseSensitive); return val_str.string().endsWith(sel_str.string(), caseSensitive);
} }
case CSSSelector::Hyphen: case CSSSelector::Hyphen:
{ {
//kdDebug( 6080 ) << "checking for hyphen match" << endl; //kdDebug( 6080 ) << "checking for hyphen match" << endl;
TQConstString val_str(value->tqunicode(), value->length()); TQConstString val_str(value->unicode(), value->length());
TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); TQConstString sel_str(sel->value.unicode(), sel->value.length());
const TQString& str = val_str.string(); const TQString& str = val_str.string();
const TQString& selStr = sel_str.string(); const TQString& selStr = sel_str.string();
if(str.length() < selStr.length()) return false; if(str.length() < selStr.length()) return false;
@ -2079,7 +2079,7 @@ static TQColor colorForCSSValue( int css_value )
KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support
bckgrConfig.setGroup("Desktop0"); bckgrConfig.setGroup("Desktop0");
// Desktop background. // Desktop background.
return bckgrConfig.readColorEntry("Color1", &tqApp->tqpalette().disabled().background()); return bckgrConfig.readColorEntry("Color1", &tqApp->palette().disabled().background());
} }
return TQColor(); return TQColor();
} }
@ -2597,7 +2597,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
} }
case CSS_PROP_UNICODE_BIDI: { case CSS_PROP_UNICODE_BIDI: {
HANDLE_INHERIT_AND_INITIAL(tqunicodeBidi, UnicodeBidi) HANDLE_INHERIT_AND_INITIAL(unicodeBidi, UnicodeBidi)
if(!primitiveValue) break; if(!primitiveValue) break;
switch (primitiveValue->getIdent()) { switch (primitiveValue->getIdent()) {
case CSS_VAL_NORMAL: case CSS_VAL_NORMAL:

@ -486,27 +486,27 @@ a:visited:active { color: red; outline: 1px dotted invert; }
bdo[dir="ltr"] { bdo[dir="ltr"] {
direction: ltr; direction: ltr;
tqunicode-bidi: bidi-override; unicode-bidi: bidi-override;
} }
bdo[dir="rtl"] { bdo[dir="rtl"] {
direction: rtl; direction: rtl;
tqunicode-bidi: bidi-override; unicode-bidi: bidi-override;
} }
/* ### this selector seems to be still broken ... /* ### this selector seems to be still broken ...
*[dir="ltr"] { direction: ltr; tqunicode-bidi: embed } *[dir="ltr"] { direction: ltr; unicode-bidi: embed }
*[dir="rtl"] { direction: rtl; tqunicode-bidi: embed } *[dir="rtl"] { direction: rtl; unicode-bidi: embed }
*/ */
/* elements that are block-level in html4 */ /* elements that are block-level in html4 */
/* ### don't support tqunicode-bidi at the moment /* ### don't support unicode-bidi at the moment
address, blockquote, body, dd, div, dl, dt, fieldset, address, blockquote, body, dd, div, dl, dt, fieldset,
form, frame, frameset, h1, h2, h3, h4, h5, h6, iframe, form, frame, frameset, h1, h2, h3, h4, h5, h6, iframe,
noscript, noframes, object, ol, p, ul, applet, center, noscript, noframes, object, ol, p, ul, applet, center,
dir, hr, menu, pre, li, table, tr, thead, tbody, tfoot, dir, hr, menu, pre, li, table, tr, thead, tbody, tfoot,
col, colgroup, td, th, caption col, colgroup, td, th, caption
{ tqunicode-bidi: embed } { unicode-bidi: embed }
*/ */
/* end bidi settings */ /* end bidi settings */

@ -1881,15 +1881,15 @@ void CSS2Properties::setTop( const DOMString &value )
if(impl) ((ElementImpl *)impl)->setAttribute("top", value); if(impl) ((ElementImpl *)impl)->setAttribute("top", value);
} }
DOMString CSS2Properties::tqunicodeBidi() const DOMString CSS2Properties::unicodeBidi() const
{ {
if(!impl) return 0; if(!impl) return 0;
return ((ElementImpl *)impl)->getAttribute("tqunicodeBidi"); return ((ElementImpl *)impl)->getAttribute("unicodeBidi");
} }
void CSS2Properties::setUnicodeBidi( const DOMString &value ) void CSS2Properties::setUnicodeBidi( const DOMString &value )
{ {
if(impl) ((ElementImpl *)impl)->setAttribute("tqunicodeBidi", value); if(impl) ((ElementImpl *)impl)->setAttribute("unicodeBidi", value);
} }
DOMString CSS2Properties::verticalAlign() const DOMString CSS2Properties::verticalAlign() const

@ -2516,13 +2516,13 @@ public:
/** /**
* See the <a * See the <a
* href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-tqunicode-bidi"> * href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-tqunicode-bidi">
* tqunicode-bidi property definition </a> in CSS2. * unicode-bidi property definition </a> in CSS2.
* *
*/ */
DOM::DOMString tqunicodeBidi() const; DOM::DOMString unicodeBidi() const;
/** /**
* see tqunicodeBidi * see unicodeBidi
*/ */
void setUnicodeBidi( const DOM::DOMString & ); void setUnicodeBidi( const DOM::DOMString & );

@ -39,7 +39,7 @@ DOMString::DOMString(const TQString &str)
return; return;
} }
impl = new DOMStringImpl( str.tqunicode(), str.length() ); impl = new DOMStringImpl( str.unicode(), str.length() );
impl->ref(); impl->ref();
} }
@ -193,10 +193,10 @@ bool DOMString::percentage(int &_percentage) const
return true; return true;
} }
TQChar *DOMString::tqunicode() const TQChar *DOMString::unicode() const
{ {
if(!impl) return 0; if(!impl) return 0;
return impl->tqunicode(); return impl->unicode();
} }
TQString DOMString::string() const TQString DOMString::string() const
@ -225,8 +225,8 @@ bool DOM::strcasecmp( const DOMString &as, const DOMString &bs )
{ {
if ( as.length() != bs.length() ) return true; if ( as.length() != bs.length() ) return true;
const TQChar *a = as.tqunicode(); const TQChar *a = as.unicode();
const TQChar *b = bs.tqunicode(); const TQChar *b = bs.unicode();
if ( a == b ) return false; if ( a == b ) return false;
if ( !( a && b ) ) return true; if ( !( a && b ) ) return true;
int l = as.length(); int l = as.length();
@ -239,7 +239,7 @@ bool DOM::strcasecmp( const DOMString &as, const DOMString &bs )
bool DOM::strcasecmp( const DOMString &as, const char* bs ) bool DOM::strcasecmp( const DOMString &as, const char* bs )
{ {
const TQChar *a = as.tqunicode(); const TQChar *a = as.unicode();
int l = as.length(); int l = as.length();
if ( !bs ) return ( l != 0 ); if ( !bs ) return ( l != 0 );
while ( l-- ) { while ( l-- ) {
@ -265,7 +265,7 @@ bool DOM::operator==( const DOMString &a, const DOMString &b )
if( l != b.length() ) return false; if( l != b.length() ) return false;
if(!memcmp(a.tqunicode(), b.tqunicode(), l*sizeof(TQChar))) if(!memcmp(a.unicode(), b.unicode(), l*sizeof(TQChar)))
return true; return true;
return false; return false;
} }
@ -276,7 +276,7 @@ bool DOM::operator==( const DOMString &a, const TQString &b )
if( l != b.length() ) return false; if( l != b.length() ) return false;
if(!memcmp(a.tqunicode(), b.tqunicode(), l*sizeof(TQChar))) if(!memcmp(a.unicode(), b.unicode(), l*sizeof(TQChar)))
return true; return true;
return false; return false;
} }
@ -291,7 +291,7 @@ bool DOM::operator==( const DOMString &a, const char *b )
const TQChar *aptr = aimpl->s; const TQChar *aptr = aimpl->s;
while ( alen-- ) { while ( alen-- ) {
unsigned char c = *b++; unsigned char c = *b++;
if ( !c || ( *aptr++ ).tqunicode() != c ) if ( !c || ( *aptr++ ).unicode() != c )
return false; return false;
} }
} }

@ -97,7 +97,7 @@ public:
*/ */
DOMString upper() const; DOMString upper() const;
TQChar *tqunicode() const; TQChar *unicode() const;
TQString string() const; TQString string() const;
int toInt() const; int toInt() const;

@ -261,7 +261,7 @@ UString::UString(const TQString &d)
{ {
unsigned int len = d.length(); unsigned int len = d.length();
UChar *dat = new UChar[len]; UChar *dat = new UChar[len];
memcpy(dat, d.tqunicode(), len * sizeof(UChar)); memcpy(dat, d.unicode(), len * sizeof(UChar));
rep = UString::Rep::create(dat, len); rep = UString::Rep::create(dat, len);
} }
@ -277,7 +277,7 @@ UString::UString(const DOM::DOMString &d)
unsigned int len = d.length(); unsigned int len = d.length();
UChar *dat = new UChar[len]; UChar *dat = new UChar[len];
memcpy(dat, d.tqunicode(), len * sizeof(UChar)); memcpy(dat, d.unicode(), len * sizeof(UChar));
rep = UString::Rep::create(dat, len); rep = UString::Rep::create(dat, len);
} }

@ -107,7 +107,7 @@ void SourceDisplay::setSource(SourceFile *sourceFile)
} }
TQString code = sourceFile->getCode(); TQString code = sourceFile->getCode();
const TQChar *chars = code.tqunicode(); const TQChar *chars = code.unicode();
uint len = code.length(); uint len = code.length();
TQChar newLine('\n'); TQChar newLine('\n');
TQChar cr('\r'); TQChar cr('\r');
@ -182,7 +182,7 @@ void SourceDisplay::showEvent(TQShowEvent *)
void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph) void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph)
{ {
if (!m_sourceFile) { if (!m_sourceFile) {
p->fillRect(clipx,clipy,clipw,cliph,tqpalette().active().base()); p->fillRect(clipx,clipy,clipw,cliph,palette().active().base());
return; return;
} }
@ -207,9 +207,9 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw,
TQString linenoStr = TQString().sprintf("%d",lineno+1); TQString linenoStr = TQString().sprintf("%d",lineno+1);
p->fillRect(0,height*lineno,linenoWidth,height,tqpalette().active().mid()); p->fillRect(0,height*lineno,linenoWidth,height,palette().active().mid());
p->setPen(tqpalette().active().text()); p->setPen(palette().active().text());
p->drawText(0,height*lineno,linenoWidth,height,Qt::AlignRight,linenoStr); p->drawText(0,height*lineno,linenoWidth,height,Qt::AlignRight,linenoStr);
TQColor bgColor; TQColor bgColor;
@ -220,13 +220,13 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw,
textColor = tqpalette().active().highlightedText(); textColor = tqpalette().active().highlightedText();
} }
else if (m_debugWin->haveBreakpoint(m_sourceFile,lineno+1,lineno+1)) { else if (m_debugWin->haveBreakpoint(m_sourceFile,lineno+1,lineno+1)) {
bgColor = tqpalette().active().text(); bgColor = palette().active().text();
textColor = tqpalette().active().base(); textColor = palette().active().base();
p->drawPixmap(2,height*lineno+height/2-m_breakpointIcon.height()/2,m_breakpointIcon); p->drawPixmap(2,height*lineno+height/2-m_breakpointIcon.height()/2,m_breakpointIcon);
} }
else { else {
bgColor = tqpalette().active().base(); bgColor = palette().active().base();
textColor = tqpalette().active().text(); textColor = palette().active().text();
} }
p->fillRect(linenoWidth,height*lineno,right-linenoWidth,height,bgColor); p->fillRect(linenoWidth,height*lineno,right-linenoWidth,height,bgColor);
@ -236,10 +236,10 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw,
} }
int remainingTop = height*(lastLine+1); int remainingTop = height*(lastLine+1);
p->fillRect(0,remainingTop,linenoWidth,bottom-remainingTop,tqpalette().active().mid()); p->fillRect(0,remainingTop,linenoWidth,bottom-remainingTop,palette().active().mid());
p->fillRect(linenoWidth,remainingTop, p->fillRect(linenoWidth,remainingTop,
right-linenoWidth,bottom-remainingTop,tqpalette().active().base()); right-linenoWidth,bottom-remainingTop,palette().active().base());
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

@ -223,7 +223,7 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
case ProductSub: case ProductSub:
{ {
int ix = userAgent.find("Gecko"); int ix = userAgent.find("Gecko");
if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.tqunicode()[ix+5] == TQChar('/') && if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.unicode()[ix+5] == TQChar('/') &&
userAgent.find(TQRegExp("\\d{8}"), ix+6) == ix+6) userAgent.find(TQRegExp("\\d{8}"), ix+6) == ix+6)
{ {
// We have Gecko/<productSub> in the UA string // We have Gecko/<productSub> in the UA string

@ -1639,7 +1639,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
if (winargs.height < 100) if (winargs.height < 100)
winargs.height = 100; winargs.height = 100;
} else if (key == "width") { } else if (key == "width") {
winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; winargs.width = (int)val.toFloat() + 2*tqApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.width > screen.width()) // should actually check workspace if (winargs.width > screen.width()) // should actually check workspace
winargs.width = screen.width(); winargs.width = screen.width();
if (winargs.width < 100) if (winargs.width < 100)

@ -235,7 +235,7 @@ HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url)
TQString s; TQString s;
int pos = url.find('#'); int pos = url.find('#');
//kdDebug(0) << "map pos of #:" << pos << endl; //kdDebug(0) << "map pos of #:" << pos << endl;
s = TQString(_url.tqunicode() + pos + 1, _url.length() - pos - 1); s = TQString(_url.unicode() + pos + 1, _url.length() - pos - 1);
TQMapConstIterator<TQString,HTMLMapElementImpl*> it = mapMap.find(s); TQMapConstIterator<TQString,HTMLMapElementImpl*> it = mapMap.find(s);

@ -176,7 +176,7 @@ void HTMLElementImpl::parseAttribute(AttributeImpl *attr)
case ATTR_CLASS: case ATTR_CLASS:
if (attr->val()) { if (attr->val()) {
DOMString v = attr->value(); DOMString v = attr->value();
const TQChar* s = v.tqunicode(); const TQChar* s = v.unicode();
int l = v.length(); int l = v.length();
while( l && !s->isSpace() ) while( l && !s->isSpace() )
l--,s++; l--,s++;
@ -354,11 +354,11 @@ static inline bool isHexDigit( const TQChar &c ) {
static inline int toHex( const TQChar &c ) { static inline int toHex( const TQChar &c ) {
return ( (c >= TQChar('0') && c <= TQChar('9')) return ( (c >= TQChar('0') && c <= TQChar('9'))
? (c.tqunicode() - '0') ? (c.unicode() - '0')
: ( ( c >= TQChar('a') && c <= TQChar('f') ) : ( ( c >= TQChar('a') && c <= TQChar('f') )
? (c.tqunicode() - 'a' + 10) ? (c.unicode() - 'a' + 10)
: ( ( c >= TQChar('A') && c <= TQChar('F') ) : ( ( c >= TQChar('A') && c <= TQChar('F') )
? (c.tqunicode() - 'A' + 10) ? (c.unicode() - 'A' + 10)
: -1 ) ) ); : -1 ) ) );
} }
@ -457,7 +457,7 @@ DOMString HTMLElementImpl::innerHTML() const
TQString result; //Use TQString to accumulate since DOMString is poor for appends TQString result; //Use TQString to accumulate since DOMString is poor for appends
for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) { for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
DOMString kid = child->toString(); DOMString kid = child->toString();
result += TQConstString(kid.tqunicode(), kid.length()).string(); result += TQConstString(kid.unicode(), kid.length()).string();
} }
return result; return result;
} }

@ -193,7 +193,7 @@ inline static TQString escapeUnencodeable(const TQTextCodec* codec, const TQStri
enc_string.append(c); enc_string.append(c);
else { else {
TQString ampersandEscape; TQString ampersandEscape;
ampersandEscape.sprintf("&#%u;", c.tqunicode()); ampersandEscape.sprintf("&#%u;", c.unicode());
enc_string.append(ampersandEscape); enc_string.append(ampersandEscape);
} }
} }
@ -2762,7 +2762,7 @@ static TQString expandLF(const TQString& s)
for(unsigned pos = 0; pos < len; pos++) for(unsigned pos = 0; pos < len; pos++)
{ {
TQChar c = s.at(pos); TQChar c = s.at(pos);
switch(c.tqunicode()) switch(c.unicode())
{ {
case '\n': case '\n':
r[pos2++] = '\r'; r[pos2++] = '\r';

@ -418,8 +418,8 @@ void HTMLMapElementImpl::parseAttribute(AttributeImpl *attr)
case ATTR_NAME: case ATTR_NAME:
{ {
DOMString s = attr->value(); DOMString s = attr->value();
if(*s.tqunicode() == '#') if(*s.unicode() == '#')
name = TQString(s.tqunicode()+1, s.length()-1).lower(); name = TQString(s.unicode()+1, s.length()-1).lower();
else else
name = s.string().lower(); name = s.string().lower();
// ### make this work for XML documents, e.g. in case of <html:map...> // ### make this work for XML documents, e.g. in case of <html:map...>

@ -89,7 +89,7 @@ static const char titleEnd [] = "</title";
#define fixUpChar(x) #define fixUpChar(x)
#else #else
#define fixUpChar(x) \ #define fixUpChar(x) \
switch ((x).tqunicode()) \ switch ((x).unicode()) \
{ \ { \
case 0x80: (x) = 0x20ac; break; \ case 0x80: (x) = 0x20ac; break; \
case 0x82: (x) = 0x201a; break; \ case 0x82: (x) = 0x201a; break; \
@ -471,7 +471,7 @@ void HTMLTokenizer::parseComment(TokenizerString &src)
if (strict) if (strict)
{ {
if (src->tqunicode() == '-') { if (src->unicode() == '-') {
delimiterCount++; delimiterCount++;
if (delimiterCount == 2) { if (delimiterCount == 2) {
delimiterCount = 0; delimiterCount = 0;
@ -482,7 +482,7 @@ void HTMLTokenizer::parseComment(TokenizerString &src)
delimiterCount = 0; delimiterCount = 0;
} }
if ((!strict || canClose) && src->tqunicode() == '>') if ((!strict || canClose) && src->unicode() == '>')
{ {
bool handleBrokenComments = brokenComments && !( script || style ); bool handleBrokenComments = brokenComments && !( script || style );
bool scriptEnd=false; bool scriptEnd=false;
@ -521,7 +521,7 @@ void HTMLTokenizer::parseServer(TokenizerString &src)
checkScriptBuffer(src.length()); checkScriptBuffer(src.length());
while ( !src.isEmpty() ) { while ( !src.isEmpty() ) {
scriptCode[ scriptCodeSize++ ] = *src; scriptCode[ scriptCodeSize++ ] = *src;
if (src->tqunicode() == '>' && if (src->unicode() == '>' &&
scriptCodeSize > 1 && scriptCode[scriptCodeSize-2] == '%') { scriptCodeSize > 1 && scriptCode[scriptCodeSize-2] == '%') {
++src; ++src;
server = false; server = false;
@ -607,7 +607,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start)
while( !src.isEmpty() ) while( !src.isEmpty() )
{ {
ushort cc = src->tqunicode(); ushort cc = src->unicode();
switch(Entity) { switch(Entity) {
case NoEntity: case NoEntity:
return; return;
@ -639,7 +639,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start)
case Hexadecimal: case Hexadecimal:
{ {
int uc = EntityChar.tqunicode(); int uc = EntityChar.unicode();
int ll = kMin<uint>(src.length(), 8); int ll = kMin<uint>(src.length(), 8);
while(ll--) { while(ll--) {
TQChar csrc(src->lower()); TQChar csrc(src->lower());
@ -658,7 +658,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start)
} }
case Decimal: case Decimal:
{ {
int uc = EntityChar.tqunicode(); int uc = EntityChar.unicode();
int ll = kMin(src.length(), 9-cBufferPos); int ll = kMin(src.length(), 9-cBufferPos);
while(ll--) { while(ll--) {
cc = src->cell(); cc = src->cell();
@ -718,7 +718,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start)
} }
case SearchSemicolon: case SearchSemicolon:
#ifdef TOKEN_DEBUG #ifdef TOKEN_DEBUG
kdDebug( 6036 ) << "ENTITY " << EntityChar.tqunicode() << endl; kdDebug( 6036 ) << "ENTITY " << EntityChar.unicode() << endl;
#endif #endif
fixUpChar(EntityChar); fixUpChar(EntityChar);
@ -956,7 +956,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
ushort curchar; ushort curchar;
bool atespace = false; bool atespace = false;
while(!src.isEmpty()) { while(!src.isEmpty()) {
curchar = src->tqunicode(); curchar = src->unicode();
if(curchar > ' ') { if(curchar > ' ') {
if(curchar == '=') { if(curchar == '=') {
#ifdef TOKEN_DEBUG #ifdef TOKEN_DEBUG
@ -988,7 +988,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
{ {
ushort curchar; ushort curchar;
while(!src.isEmpty()) { while(!src.isEmpty()) {
curchar = src->tqunicode(); curchar = src->unicode();
if(curchar > ' ') { if(curchar > ' ') {
if(( curchar == '\'' || curchar == '\"' )) { if(( curchar == '\'' || curchar == '\"' )) {
tquote = curchar == '\"' ? DoubleQuote : SingleQuote; tquote = curchar == '\"' ? DoubleQuote : SingleQuote;
@ -1012,7 +1012,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
while(!src.isEmpty()) { while(!src.isEmpty()) {
checkBuffer(); checkBuffer();
curchar = src->tqunicode(); curchar = src->unicode();
if(curchar <= '\'' && !src.escaped()) { if(curchar <= '\'' && !src.escaped()) {
// ### attributes like '&{blaa....};' are supposed to be treated as jscript. // ### attributes like '&{blaa....};' are supposed to be treated as jscript.
if ( curchar == '&' ) if ( curchar == '&' )
@ -1050,7 +1050,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
ushort curchar; ushort curchar;
while(!src.isEmpty()) { while(!src.isEmpty()) {
checkBuffer(); checkBuffer();
curchar = src->tqunicode(); curchar = src->unicode();
if(curchar <= '>' && !src.escaped()) { if(curchar <= '>' && !src.escaped()) {
// parse Entities // parse Entities
if ( curchar == '&' ) if ( curchar == '&' )
@ -1351,7 +1351,7 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData )
// do we need to enlarge the buffer? // do we need to enlarge the buffer?
checkBuffer(); checkBuffer();
ushort cc = src->tqunicode(); ushort cc = src->unicode();
if (skipLF && (cc != '\n')) if (skipLF && (cc != '\n'))
skipLF = false; skipLF = false;

@ -76,8 +76,8 @@ namespace khtml {
{ {
DOMStringImpl *value = 0; DOMStringImpl *value = 0;
NodeImpl::Id tid = 0; NodeImpl::Id tid = 0;
if(buffer->tqunicode()) { if(buffer->unicode()) {
tid = buffer->tqunicode(); tid = buffer->unicode();
value = v.implementation(); value = v.implementation();
} }
else if ( !attrName.isEmpty() && attrName != "/" ) { else if ( !attrName.isEmpty() && attrName != "/" ) {

@ -1749,7 +1749,7 @@ void EditableCharacterIterator::initFirstChar()
if (_offset == box->maxOffset()) if (_offset == box->maxOffset())
peekNext(); peekNext();
else if (b && !box->isOutside() && b->isInlineTextBox()) else if (b && !box->isOutside() && b->isInlineTextBox())
_char = static_cast<RenderText *>(b->object())->str->s[_offset].tqunicode(); _char = static_cast<RenderText *>(b->object())->str->s[_offset].unicode();
else else
_char = -1; _char = -1;
} }
@ -1849,7 +1849,7 @@ kdDebug(6200) << "_offset " << _offset << endl;
readchar: readchar:
// get character // get character
if (b && !box->isOutside() && b->isInlineTextBox() && _offset < b->maxOffset()) if (b && !box->isOutside() && b->isInlineTextBox() && _offset < b->maxOffset())
_char = static_cast<RenderText *>(b->object())->str->s[_offset].tqunicode(); _char = static_cast<RenderText *>(b->object())->str->s[_offset].unicode();
else else
_char = -1; _char = -1;
}/*end if*/ }/*end if*/
@ -1887,7 +1887,7 @@ kdDebug(6200) << "_offset == minofs: " << _offset << " == " << minofs << endl;
// _peekNext = b; // _peekNext = b;
// get character // get character
if (b && !box->isOutside() && b->isInlineTextBox()) if (b && !box->isOutside() && b->isInlineTextBox())
_char = static_cast<RenderText *>(b->object())->text()[_offset].tqunicode(); _char = static_cast<RenderText *>(b->object())->text()[_offset].unicode();
else else
_char = -1; _char = -1;
@ -1990,9 +1990,9 @@ kdDebug(6200) << "_offset: " << _offset << " _peekNext: " << _peekNext << endl;
#endif #endif
// get character // get character
if (_peekNext && _offset >= box->maxOffset() && _peekNext->isInlineTextBox()) if (_peekNext && _offset >= box->maxOffset() && _peekNext->isInlineTextBox())
_char = static_cast<RenderText *>(_peekNext->object())->text()[_peekNext->minOffset()].tqunicode(); _char = static_cast<RenderText *>(_peekNext->object())->text()[_peekNext->minOffset()].unicode();
else if (b && _offset < b->maxOffset() && b->isInlineTextBox()) else if (b && _offset < b->maxOffset() && b->isInlineTextBox())
_char = static_cast<RenderText *>(b->object())->text()[_offset].tqunicode(); _char = static_cast<RenderText *>(b->object())->text()[_offset].unicode();
else else
_char = -1; _char = -1;
}/*end if*/ }/*end if*/

@ -1034,7 +1034,7 @@ public:
*/ */
int chr() const { return _char; } int chr() const { return _char; }
/** returns the current character as a tqunicode symbol, substituting /** returns the current character as a unicode symbol, substituting
* a blank for a non-text node. * a blank for a non-text node.
*/ */
TQChar operator *() const { return TQChar(_char >= 0 ? _char : ' '); } TQChar operator *() const { return TQChar(_char >= 0 ? _char : ' '); }
@ -1089,7 +1089,7 @@ protected:
CaretBox *box = *copy; CaretBox *box = *copy;
InlineBox *b = box->inlineBox(); InlineBox *b = box->inlineBox();
if (b && !box->isOutside() && b->isInlineTextBox()) if (b && !box->isOutside() && b->isInlineTextBox())
_char = static_cast<RenderText *>(b->object())->str->s[b->minOffset()].tqunicode(); _char = static_cast<RenderText *>(b->object())->str->s[b->minOffset()].unicode();
else else
_char = -1; _char = -1;
} }

@ -112,7 +112,7 @@ void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget )
if ( !m_connectedToClipboard && m_editableFormWidget ) if ( !m_connectedToClipboard && m_editableFormWidget )
{ {
connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
this, TQT_SLOT( updateEditActions() ) ); this, TQT_SLOT( updateEditActions() ) );
if ( m_editableFormWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) || m_editableFormWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) ) if ( m_editableFormWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) || m_editableFormWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) )
@ -135,7 +135,7 @@ void KHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ )
if ( m_connectedToClipboard ) if ( m_connectedToClipboard )
{ {
disconnect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), disconnect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
this, TQT_SLOT( updateEditActions() ) ); this, TQT_SLOT( updateEditActions() ) );
if ( oldWidget ) if ( oldWidget )
@ -223,7 +223,7 @@ void KHTMLPartBrowserExtension::copy()
text.replace( TQChar( 0xa0 ), ' ' ); text.replace( TQChar( 0xa0 ), ' ' );
TQClipboard *cb = TQApplication::tqclipboard(); TQClipboard *cb = TQApplication::clipboard();
disconnect( cb, TQT_SIGNAL( selectionChanged() ), m_part, TQT_SLOT( slotClearSelection() ) ); disconnect( cb, TQT_SIGNAL( selectionChanged() ), m_part, TQT_SLOT( slotClearSelection() ) );
#ifndef QT_NO_MIMECLIPBOARD #ifndef QT_NO_MIMECLIPBOARD
TQString htmltext; TQString htmltext;
@ -335,10 +335,10 @@ void KHTMLPartBrowserExtension::updateEditActions()
// ### duplicated from KonqMainWindow::slotClipboardDataChanged // ### duplicated from KonqMainWindow::slotClipboardDataChanged
#ifndef QT_NO_MIMECLIPBOARD // Handle minimalized versions of Qt Embedded #ifndef QT_NO_MIMECLIPBOARD // Handle minimalized versions of Qt Embedded
TQMimeSource *data = TQApplication::tqclipboard()->data(); TQMimeSource *data = TQApplication::clipboard()->data();
enableAction( "paste", data->provides( "text/plain" ) ); enableAction( "paste", data->provides( "text/plain" ) );
#else #else
TQString data=TQApplication::tqclipboard()->text(); TQString data=TQApplication::clipboard()->text();
enableAction( "paste", data.contains("://")); enableAction( "paste", data.contains("://"));
#endif #endif
bool hasSelection = false; bool hasSelection = false;
@ -715,10 +715,10 @@ void KHTMLPopupGUIClient::slotCopyLinkLocation()
// Set it in both the mouse selection and in the clipboard // Set it in both the mouse selection and in the clipboard
KURL::List lst; KURL::List lst;
lst.append( safeURL ); lst.append( safeURL );
TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard );
TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection );
#else #else
TQApplication::tqclipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
#endif #endif
} }
@ -741,8 +741,8 @@ void KHTMLPopupGUIClient::slotCopyImage()
drag->addDragObject( new KURLDrag(lst, d->m_khtml->view(), "Image URL") ); drag->addDragObject( new KURLDrag(lst, d->m_khtml->view(), "Image URL") );
// Set it in both the mouse selection and in the clipboard // Set it in both the mouse selection and in the clipboard
TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard ); TQApplication::clipboard()->setData( drag, TQClipboard::Clipboard );
TQApplication::tqclipboard()->setData( new KURLDrag(lst), TQClipboard::Selection ); TQApplication::clipboard()->setData( new KURLDrag(lst), TQClipboard::Selection );
#else #else
kdDebug() << "slotCopyImage called when the clipboard does not support this. This should not be possible." << endl; kdDebug() << "slotCopyImage called when the clipboard does not support this. This should not be possible." << endl;
#endif #endif
@ -756,10 +756,10 @@ void KHTMLPopupGUIClient::slotCopyImageLocation()
// Set it in both the mouse selection and in the clipboard // Set it in both the mouse selection and in the clipboard
KURL::List lst; KURL::List lst;
lst.append( safeURL ); lst.append( safeURL );
TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard );
TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection );
#else #else
TQApplication::tqclipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries
#endif #endif
} }

@ -1480,7 +1480,7 @@ void KHTMLPart::clear()
d->m_startOffset = 0; d->m_startOffset = 0;
d->m_endOffset = 0; d->m_endOffset = 0;
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
connect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection()));
#endif #endif
d->m_jobPercent = 0; d->m_jobPercent = 0;
@ -3005,7 +3005,7 @@ void KHTMLPart::findText()
// The lineedit of the dialog would make khtml lose its selection, otherwise // The lineedit of the dialog would make khtml lose its selection, otherwise
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
disconnect( kapp->tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotClearSelection()) ); disconnect( kapp->clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotClearSelection()) );
#endif #endif
// Now show the dialog in which the user can choose options. // Now show the dialog in which the user can choose options.
@ -3036,7 +3036,7 @@ void KHTMLPart::findText( const TQString &str, long options, TQWidget *parent, K
return; return;
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
connect( kapp->tqclipboard(), TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotClearSelection()) ); connect( kapp->clipboard(), TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotClearSelection()) );
#endif #endif
// Create the KFind object // Create the KFind object
@ -6610,9 +6610,9 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
TQString text = selectedText(); TQString text = selectedText();
text.replace(TQChar(0xa0), ' '); text.replace(TQChar(0xa0), ' ');
disconnect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection())); disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection()));
kapp->tqclipboard()->setText(text,TQClipboard::Selection); kapp->clipboard()->setText(text,TQClipboard::Selection);
connect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection()));
#endif #endif
//kdDebug( 6000 ) << "selectedText = " << text << endl; //kdDebug( 6000 ) << "selectedText = " << text << endl;
emitSelectionChanged(); emitSelectionChanged();

@ -662,7 +662,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh )
//kdDebug( 6000 ) << "drawContents this="<< this <<" x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl; //kdDebug( 6000 ) << "drawContents this="<< this <<" x=" << ex << ",y=" << ey << ",w=" << ew << ",h=" << eh << endl;
if(!m_part || !m_part->xmlDocImpl() || !m_part->xmlDocImpl()->renderer()) { if(!m_part || !m_part->xmlDocImpl() || !m_part->xmlDocImpl()->renderer()) {
p->fillRect(ex, ey, ew, eh, tqpalette().active().brush(TQColorGroup::Base)); p->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base));
return; return;
} else if ( d->complete && static_cast<RenderCanvas*>(m_part->xmlDocImpl()->renderer())->needsLayout() ) { } else if ( d->complete && static_cast<RenderCanvas*>(m_part->xmlDocImpl()->renderer())->needsLayout() ) {
// an external update request happens while we have a layout scheduled // an external update request happens while we have a layout scheduled
@ -726,7 +726,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh )
d->vertPaintBuffer->resize(10, visibleHeight()); d->vertPaintBuffer->resize(10, visibleHeight());
d->tp->begin(d->vertPaintBuffer); d->tp->begin(d->vertPaintBuffer);
d->tp->translate(-ex, -ey); d->tp->translate(-ex, -ey);
d->tp->fillRect(ex, ey, ew, eh, tqpalette().active().brush(TQColorGroup::Base)); d->tp->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base));
m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey, ew, eh)); m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey, ew, eh));
d->tp->end(); d->tp->end();
p->drawPixmap(ex, ey, *d->vertPaintBuffer, 0, 0, ew, eh); p->drawPixmap(ex, ey, *d->vertPaintBuffer, 0, 0, ew, eh);
@ -740,7 +740,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh )
int ph = eh-py < PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT; int ph = eh-py < PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT;
d->tp->begin(d->paintBuffer); d->tp->begin(d->paintBuffer);
d->tp->translate(-ex, -ey-py); d->tp->translate(-ex, -ey-py);
d->tp->fillRect(ex, ey+py, ew, ph, tqpalette().active().brush(TQColorGroup::Base)); d->tp->fillRect(ex, ey+py, ew, ph, palette().active().brush(TQColorGroup::Base));
m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey+py, ew, ph)); m_part->xmlDocImpl()->renderer()->layer()->paint(d->tp, TQRect(ex, ey+py, ew, ph));
d->tp->end(); d->tp->end();
@ -756,7 +756,7 @@ static int cnt=0;
kdDebug() << "[" << ++cnt << "]" << " clip region: " << pr << endl; kdDebug() << "[" << ++cnt << "]" << " clip region: " << pr << endl;
// p->setClipRegion(TQRect(0,0,ew,eh)); // p->setClipRegion(TQRect(0,0,ew,eh));
// p->translate(-ex, -ey); // p->translate(-ex, -ey);
p->fillRect(ex, ey, ew, eh, tqpalette().active().brush(TQColorGroup::Base)); p->fillRect(ex, ey, ew, eh, palette().active().brush(TQColorGroup::Base));
m_part->xmlDocImpl()->renderer()->layer()->paint(p, pr); m_part->xmlDocImpl()->renderer()->layer()->paint(p, pr);
#endif // DEBUG_NO_PAINT_BUFFER #endif // DEBUG_NO_PAINT_BUFFER
@ -4430,7 +4430,7 @@ void KHTMLView::placeCaretOnChar(CaretBox *hintBox)
d->m_caretViewContext->origX = d->m_caretViewContext->x; d->m_caretViewContext->origX = d->m_caretViewContext->x;
d->scrollBarMoved = false; d->scrollBarMoved = false;
#if DEBUG_CARETMODE > 3 #if DEBUG_CARETMODE > 3
//if (caretNode->isTextNode()) kdDebug(6200) << "text[0] = " << (int)*((TextImpl *)caretNode)->data().tqunicode() << " text :\"" << ((TextImpl *)caretNode)->data().string() << "\"" << endl; //if (caretNode->isTextNode()) kdDebug(6200) << "text[0] = " << (int)*((TextImpl *)caretNode)->data().unicode() << " text :\"" << ((TextImpl *)caretNode)->data().string() << "\"" << endl;
#endif #endif
ensureNodeHasFocus(m_part->d->caretNode().handle()); ensureNodeHasFocus(m_part->d->caretNode().handle());
caretOn(); caretOn();

@ -46,7 +46,7 @@ public:
DOMStringIt(TQChar *str, uint len) DOMStringIt(TQChar *str, uint len)
{ s = str, l = len; lines = 0; } { s = str, l = len; lines = 0; }
DOMStringIt(const TQString &str) DOMStringIt(const TQString &str)
{ s = str.tqunicode(); l = str.length(); lines = 0; } { s = str.unicode(); l = str.length(); lines = 0; }
DOMStringIt *operator++() DOMStringIt *operator++()
{ {
@ -85,13 +85,13 @@ class TokenizerSubstring
friend class TokenizerString; friend class TokenizerString;
public: public:
TokenizerSubstring() : m_length(0), m_current(0) {} TokenizerSubstring() : m_length(0), m_current(0) {}
TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.tqunicode()) {} TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {}
TokenizerSubstring(const TQChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {} TokenizerSubstring(const TQChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {}
void clear() { m_length = 0; m_current = 0; } void clear() { m_length = 0; m_current = 0; }
void appendTo(TQString &str) const { void appendTo(TQString &str) const {
if (m_string.tqunicode() == m_current) { if (m_string.unicode() == m_current) {
if (str.isEmpty()) if (str.isEmpty())
str = m_string; str = m_string;
else else

@ -242,7 +242,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) { if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) {
next = current->firstChild(); next = current->firstChild();
if ( next && adjustEmbedding ) { if ( next && adjustEmbedding ) {
EUnicodeBidi ub = next->style()->tqunicodeBidi(); EUnicodeBidi ub = next->style()->unicodeBidi();
if ( ub != UBNormal && !emptyRun ) { if ( ub != UBNormal && !emptyRun ) {
EDirection dir = next->style()->direction(); EDirection dir = next->style()->direction();
TQChar::Direction d = ( ub == Embed ? ( dir == RTL ? TQChar::DirRLE : TQChar::DirLRE ) TQChar::Direction d = ( ub == Embed ? ( dir == RTL ? TQChar::DirRLE : TQChar::DirLRE )
@ -261,7 +261,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
while (current && current != par) { while (current && current != par) {
next = current->nextSibling(); next = current->nextSibling();
if (next) break; if (next) break;
if ( adjustEmbedding && current->style()->tqunicodeBidi() != UBNormal && !emptyRun ) { if ( adjustEmbedding && current->style()->unicodeBidi() != UBNormal && !emptyRun ) {
embed( TQChar::DirPDF, bidi ); embed( TQChar::DirPDF, bidi );
} }
current = current->parent(); current = current->parent();
@ -454,7 +454,7 @@ static void checkMidpoints(BidiIterator& lBreak, BidiState &bidi)
// Don't shave a character off the endpoint if it was from a soft hyphen. // Don't shave a character off the endpoint if it was from a soft hyphen.
RenderText* textObj = static_cast<RenderText*>(endpoint.obj); RenderText* textObj = static_cast<RenderText*>(endpoint.obj);
if (endpoint.pos+1 < textObj->length() && if (endpoint.pos+1 < textObj->length() &&
textObj->text()[endpoint.pos+1].tqunicode() == SOFT_HYPHEN) textObj->text()[endpoint.pos+1].unicode() == SOFT_HYPHEN)
return; return;
} }
endpoint.pos--; endpoint.pos--;
@ -1241,7 +1241,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
} }
// this causes the operator ++ to open and close embedding levels as needed // this causes the operator ++ to open and close embedding levels as needed
// for the CSS tqunicode-bidi property // for the CSS unicode-bidi property
adjustEmbedding = true; adjustEmbedding = true;
bidi.current.increment( bidi ); bidi.current.increment( bidi );
adjustEmbedding = false; adjustEmbedding = false;
@ -1611,11 +1611,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// be skipped. // be skipped.
while (!start.atEnd() && (start.obj->isInlineFlow() || (!start.obj->style()->preserveWS() && !start.obj->isBR() && while (!start.atEnd() && (start.obj->isInlineFlow() || (!start.obj->style()->preserveWS() && !start.obj->isBR() &&
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
( (start.current().tqunicode() == (ushort)0x0020) || // ASCII space ( (start.current().unicode() == (ushort)0x0020) || // ASCII space
(start.current().tqunicode() == (ushort)0x0009) || // ASCII tab (start.current().unicode() == (ushort)0x0009) || // ASCII tab
(start.current().tqunicode() == (ushort)0x000A) || // ASCII line feed (start.current().unicode() == (ushort)0x000A) || // ASCII line feed
(start.current().tqunicode() == (ushort)0x000C) || // ASCII form feed (start.current().unicode() == (ushort)0x000C) || // ASCII form feed
(start.current().tqunicode() == (ushort)0x200B) || // Zero-width space (start.current().unicode() == (ushort)0x200B) || // Zero-width space
start.obj->isFloatingOrPositioned() ) start.obj->isFloatingOrPositioned() )
#else #else
( start.current() == ' ' || start.current() == '\n' || start.obj->isFloatingOrPositioned() ) ( start.current() == ' ' || start.current() == '\n' || start.obj->isFloatingOrPositioned() )
@ -1824,7 +1824,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
isLineEmpty = false; isLineEmpty = false;
// Check for soft hyphens. Go ahead and ignore them. // Check for soft hyphens. Go ahead and ignore them.
if (c.tqunicode() == SOFT_HYPHEN && pos > 0) { if (c.unicode() == SOFT_HYPHEN && pos > 0) {
nextIsSoftBreakable = true; nextIsSoftBreakable = true;
if (!ignoringSpaces) { if (!ignoringSpaces) {
// Ignore soft hyphens // Ignore soft hyphens
@ -1911,7 +1911,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
lBreak.endOfInline = false; lBreak.endOfInline = false;
} }
goto end; goto end;
} else if ( (pos > 1 && str[pos-1].tqunicode() == SOFT_HYPHEN) ) } else if ( (pos > 1 && str[pos-1].unicode() == SOFT_HYPHEN) )
// Subtract the width of the soft hyphen out since we fit on a line. // Subtract the width of the soft hyphen out since we fit on a line.
tmpW -= t->width(pos-1, 1, f); tmpW -= t->width(pos-1, 1, f);
} }
@ -2189,7 +2189,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// For soft hyphens on line breaks, we have to chop out the midpoints that made us // For soft hyphens on line breaks, we have to chop out the midpoints that made us
// ignore the hyphen so that it will render at the end of the line. // ignore the hyphen so that it will render at the end of the line.
TQChar c = static_cast<RenderText*>(lBreak.obj)->text()[lBreak.pos-1]; TQChar c = static_cast<RenderText*>(lBreak.obj)->text()[lBreak.pos-1];
if (c.tqunicode() == SOFT_HYPHEN) if (c.unicode() == SOFT_HYPHEN)
chopMidpointsAt(lBreak.obj, lBreak.pos-2); chopMidpointsAt(lBreak.obj, lBreak.pos-2);
} }

@ -6,7 +6,7 @@
namespace khtml { namespace khtml {
/* /*
array of tqunicode codes where breaking shouldn't occur. array of unicode codes where breaking shouldn't occur.
(in sorted order because of using with binary search) (in sorted order because of using with binary search)
these are currently for Japanese, though simply adding these are currently for Japanese, though simply adding
Korean, Chinese ones should work as well Korean, Chinese ones should work as well
@ -122,7 +122,7 @@ namespace khtml {
inline bool isBreakable( const TQChar *str, const int pos, int len ) inline bool isBreakable( const TQChar *str, const int pos, int len )
{ {
const TQChar *c = str+pos; const TQChar *c = str+pos;
unsigned short ch = c->tqunicode(); unsigned short ch = c->unicode();
if ( ch > 0xff ) { if ( ch > 0xff ) {
// not latin1, need to do more sophisticated checks for asian fonts // not latin1, need to do more sophisticated checks for asian fonts
unsigned char row = c->row(); unsigned char row = c->row();
@ -147,8 +147,8 @@ namespace khtml {
return false; return false;
// do binary search in dontbreak[] // do binary search in dontbreak[]
return break_bsearch(dontbreakbefore, c->tqunicode()) && return break_bsearch(dontbreakbefore, c->unicode()) &&
break_bsearch(dontbreakafter, (str+(pos-1))->tqunicode()); break_bsearch(dontbreakafter, (str+(pos-1))->unicode());
} else // no asian font } else // no asian font
return c->isSpace(); return c->isSpace();
} else { } else {

@ -293,7 +293,7 @@ int Font::width( TQChar *chs, int, int pos, int len, int start, int end, int toA
const TQString qstr = cstr.string(); const TQString qstr = cstr.string();
if ( scFont ) { if ( scFont ) {
const TQString upper = qstr.upper(); const TQString upper = qstr.upper();
const TQChar *uc = qstr.tqunicode(); const TQChar *uc = qstr.unicode();
const TQFontMetrics sc_fm( *scFont ); const TQFontMetrics sc_fm( *scFont );
for ( int i = 0; i < len; ++i ) { for ( int i = 0; i < len; ++i ) {
if ( (uc+i)->category() == TQChar::Letter_Lowercase ) if ( (uc+i)->category() == TQChar::Letter_Lowercase )

@ -881,7 +881,7 @@ static inline bool isAnonymousWhitespace( RenderObject* o ) {
return false; return false;
RenderObject *fc = o->firstChild(); RenderObject *fc = o->firstChild();
return fc && fc == o->lastChild() && fc->isText() && static_cast<RenderText *>(fc)->stringLength() == 1 && return fc && fc == o->lastChild() && fc->isText() && static_cast<RenderText *>(fc)->stringLength() == 1 &&
static_cast<RenderText *>(fc)->text()[0].tqunicode() == ' '; static_cast<RenderText *>(fc)->text()[0].unicode() == ' ';
} }
RenderObject* RenderBlock::handleCompactChild(RenderObject* child, CompactInfo& compactInfo, const MarginInfo& marginInfo, bool& handled) RenderObject* RenderBlock::handleCompactChild(RenderObject* child, CompactInfo& compactInfo, const MarginInfo& marginInfo, bool& handled)

@ -346,7 +346,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
} }
if( !bgColor.isValid() && canvas()->view()) if( !bgColor.isValid() && canvas()->view())
bgColor = canvas()->view()->tqpalette().active().color(TQColorGroup::Base); bgColor = canvas()->view()->palette().active().color(TQColorGroup::Base);
int w = width(); int w = width();
int h = height(); int h = height();

@ -329,7 +329,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& paintInfo, int /*_tx*/, int /*
if ((firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view()) if ((firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view())
return; return;
paintInfo.p->fillRect(paintInfo.r, view()->tqpalette().active().color(TQColorGroup::Base)); paintInfo.p->fillRect(paintInfo.r, view()->palette().active().color(TQColorGroup::Base));
} }
void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool f) void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool f)

@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() ); KHTMLAssert( !minMaxKnown() );
TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget ); TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget );
TQSize s( cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorWidth ), TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ),
cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorHeight ) ); cb->style().pixelMetric( TQStyle::PM_IndicatorHeight ) );
setIntrinsicWidth( s.width() ); setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() ); setIntrinsicHeight( s.height() );
@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() ); KHTMLAssert( !minMaxKnown() );
TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget ); TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget );
TQSize s( rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
setIntrinsicWidth( s.width() ); setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() ); setIntrinsicHeight( s.height() );
@ -263,14 +263,14 @@ void RenderSubmitButton::calcMinMaxWidth()
raw = TQString::fromLatin1("X"); raw = TQString::fromLatin1("X");
TQFontMetrics fm = pb->fontMetrics(); TQFontMetrics fm = pb->fontMetrics();
TQSize ts = fm.size( ShowPrefix, raw); TQSize ts = fm.size( ShowPrefix, raw);
TQSize s(pb->tqstyle().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts ) TQSize s(pb->style().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts )
.expandedTo(TQApplication::globalStrut())); .expandedTo(TQApplication::globalStrut()));
int margin = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonMargin, pb) + int margin = pb->style().pixelMetric( TQStyle::PM_ButtonMargin, pb) +
pb->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; pb->style().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
int w = ts.width() + margin; int w = ts.width() + margin;
int h = s.height(); int h = s.height();
if (pb->isDefault() || pb->autoDefault()) { if (pb->isDefault() || pb->autoDefault()) {
int dbw = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; int dbw = pb->style().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
w += dbw; w += dbw;
} }
@ -805,7 +805,7 @@ void RenderFileButton::calcMinMaxWidth()
int h = fm.lineSpacing(); int h = fm.lineSpacing();
int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some" int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some"
KLineEdit* edit = static_cast<KURLRequester*>( m_widget )->lineEdit(); KLineEdit* edit = static_cast<KURLRequester*>( m_widget )->lineEdit();
TQSize s = edit->tqstyle().tqsizeFromContents(TQStyle::CT_LineEdit, TQSize s = edit->style().tqsizeFromContents(TQStyle::CT_LineEdit,
edit, edit,
TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth())) TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth()))
.expandedTo(TQApplication::globalStrut()); .expandedTo(TQApplication::globalStrut());

@ -53,7 +53,7 @@ void RenderCounterBase::calcMinMaxWidth()
generateContent(); generateContent();
if (str) str->deref(); if (str) str->deref();
str = new DOM::DOMStringImpl(m_item.tqunicode(), m_item.length()); str = new DOM::DOMStringImpl(m_item.unicode(), m_item.length());
str->ref(); str->ref();
RenderText::calcMinMaxWidth(); RenderText::calcMinMaxWidth();

@ -266,7 +266,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
if ( !berrorPic ) { if ( !berrorPic ) {
//qDebug("qDrawShadePanel %d/%d/%d/%d", _tx + leftBorder, _ty + topBorder, cWidth, cHeight); //qDebug("qDrawShadePanel %d/%d/%d/%d", _tx + leftBorder, _ty + topBorder, cWidth, cHeight);
qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight, qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight,
KApplication::tqpalette().inactive(), true, 1 ); KApplication::palette().inactive(), true, 1 );
} }
TQPixmap const* pix = i ? &i->pixmap() : 0; TQPixmap const* pix = i ? &i->pixmap() : 0;
if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) ) if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) )

@ -637,7 +637,7 @@ int RenderLayer::verticalScrollbarWidth()
#ifdef APPLE_CHANGES #ifdef APPLE_CHANGES
return m_vBar->width(); return m_vBar->width();
#else #else
return m_vBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); return m_vBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif #endif
} }
@ -650,7 +650,7 @@ int RenderLayer::horizontalScrollbarHeight()
#ifdef APPLE_CHANGES #ifdef APPLE_CHANGES
return m_hBar->height(); return m_hBar->height();
#else #else
return m_hBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); return m_hBar->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif #endif
} }
@ -691,7 +691,7 @@ void RenderLayer::positionScrollbars(const TQRect& absBounds)
TQScrollBar *b = m_hBar; TQScrollBar *b = m_hBar;
if (!m_hBar) if (!m_hBar)
b = m_vBar; b = m_vBar;
int sw = b->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); int sw = b->style().pixelMetric(TQStyle::PM_ScrollBarExtent);
if (m_vBar) { if (m_vBar) {
TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1); TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1);

@ -786,7 +786,7 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
!(noninherited_flags.f._position == other->noninherited_flags.f._position) || !(noninherited_flags.f._position == other->noninherited_flags.f._position) ||
!(noninherited_flags.f._floating == other->noninherited_flags.f._floating) || !(noninherited_flags.f._floating == other->noninherited_flags.f._floating) ||
!(noninherited_flags.f._flowAroundFloats == other->noninherited_flags.f._flowAroundFloats) || !(noninherited_flags.f._flowAroundFloats == other->noninherited_flags.f._flowAroundFloats) ||
!(noninherited_flags.f._tqunicodeBidi == other->noninherited_flags.f._tqunicodeBidi) ) !(noninherited_flags.f._unicodeBidi == other->noninherited_flags.f._unicodeBidi) )
return CbLayout; return CbLayout;
} }

@ -919,7 +919,7 @@ protected:
PseudoId _styleType : 4; PseudoId _styleType : 4;
bool _hasClip : 1; bool _hasClip : 1;
unsigned _pseudoBits : 8; unsigned _pseudoBits : 8;
EUnicodeBidi _tqunicodeBidi : 2; EUnicodeBidi _unicodeBidi : 2;
// non CSS2 non-inherited // non CSS2 non-inherited
bool _textOverflow : 1; // Whether or not lines that spill out should be truncated with "..." bool _textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."
@ -991,7 +991,7 @@ protected:
noninherited_flags.f._styleType = NOPSEUDO; noninherited_flags.f._styleType = NOPSEUDO;
noninherited_flags.f._hasClip = false; noninherited_flags.f._hasClip = false;
noninherited_flags.f._pseudoBits = 0; noninherited_flags.f._pseudoBits = 0;
noninherited_flags.f._tqunicodeBidi = initialUnicodeBidi(); noninherited_flags.f._unicodeBidi = initialUnicodeBidi();
noninherited_flags.f._textOverflow = initialTextOverflow(); noninherited_flags.f._textOverflow = initialTextOverflow();
noninherited_flags.f.unused = 0; noninherited_flags.f.unused = 0;
} }
@ -1108,7 +1108,7 @@ public:
LengthBox clip() const { return visual->clip; } LengthBox clip() const { return visual->clip; }
bool hasClip() const { return noninherited_flags.f._hasClip; } bool hasClip() const { return noninherited_flags.f._hasClip; }
EUnicodeBidi tqunicodeBidi() const { return noninherited_flags.f._tqunicodeBidi; } EUnicodeBidi unicodeBidi() const { return noninherited_flags.f._unicodeBidi; }
EClear clear() const { return noninherited_flags.f._clear; } EClear clear() const { return noninherited_flags.f._clear; }
ETableLayout tableLayout() const { return noninherited_flags.f._table_layout; } ETableLayout tableLayout() const { return noninherited_flags.f._table_layout; }
@ -1272,7 +1272,7 @@ public:
void setClip( Length top, Length right, Length bottom, Length left ); void setClip( Length top, Length right, Length bottom, Length left );
void setHasClip( bool b ) { noninherited_flags.f._hasClip = b; } void setHasClip( bool b ) { noninherited_flags.f._hasClip = b; }
void setUnicodeBidi( EUnicodeBidi b ) { noninherited_flags.f._tqunicodeBidi = b; } void setUnicodeBidi( EUnicodeBidi b ) { noninherited_flags.f._unicodeBidi = b; }
void setClear(EClear v) { noninherited_flags.f._clear = v; } void setClear(EClear v) { noninherited_flags.f._clear = v; }
void setTableLayout(ETableLayout v) { noninherited_flags.f._table_layout = v; } void setTableLayout(ETableLayout v) { noninherited_flags.f._table_layout = v; }

@ -1036,7 +1036,7 @@ void RenderText::calcMinMaxWidth()
bool firstLine = true; bool firstLine = true;
for(int i = 0; i < len; i++) for(int i = 0; i < len; i++)
{ {
unsigned short c = str->s[i].tqunicode(); unsigned short c = str->s[i].unicode();
bool isNewline = false; bool isNewline = false;
// If line-breaks survive to here they are preserved // If line-breaks survive to here they are preserved
@ -1056,7 +1056,7 @@ void RenderText::calcMinMaxWidth()
continue; continue;
int wordlen = 0; int wordlen = 0;
while( i+wordlen < len && (i+wordlen == 0 || str->s[i+wordlen].tqunicode() != SOFT_HYPHEN) && while( i+wordlen < len && (i+wordlen == 0 || str->s[i+wordlen].unicode() != SOFT_HYPHEN) &&
!(isBreakable( str->s, i+wordlen, str->l )) ) !(isBreakable( str->s, i+wordlen, str->l )) )
wordlen++; wordlen++;
@ -1470,7 +1470,7 @@ static TQString quoteAndEscapeNonPrintables(const TQString &s)
} else if (c == '"') { } else if (c == '"') {
result += "\\\""; result += "\\\"";
} else { } else {
ushort u = c.tqunicode(); ushort u = c.unicode();
if (u >= 0x20 && u < 0x7F) { if (u >= 0x20 && u < 0x7F) {
result += c; result += c;
} else { } else {

@ -36,7 +36,7 @@
class TQPainter; class TQPainter;
class TQFontMetrics; class TQFontMetrics;
// Define a constant for soft hyphen's tqunicode value. // Define a constant for soft hyphen's unicode value.
#define SOFT_HYPHEN 173 #define SOFT_HYPHEN 173
const int cNoTruncation = -1; const int cNoTruncation = -1;

@ -1079,8 +1079,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path)
pos++; pos++;
int newpos = absBase.find('/', pos); int newpos = absBase.find('/', pos);
if (newpos == -1) newpos = absBase.length(); if (newpos == -1) newpos = absBase.length();
TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos);
TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos);
// kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl; // kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl;
// kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl; // kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl;
// kdDebug() << "pos: " << pos << " newpos: " << newpos << endl; // kdDebug() << "pos: " << pos << " newpos: " << newpos << endl;
@ -1094,8 +1094,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path)
TQString rel; TQString rel;
{ {
TQConstString relBase(absBase.tqunicode() + basepos, absBase.length() - basepos); TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos);
TQConstString relPath(absPath.tqunicode() + pathpos, absPath.length() - pathpos); TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos);
// generate as many .. as there are path elements in relBase // generate as many .. as there are path elements in relBase
if (relBase.string().length() > 0) { if (relBase.string().length() > 0) {
for (int i = relBase.string().contains('/'); i > 0; --i) for (int i = relBase.string().contains('/'); i > 0; --i)

@ -590,10 +590,10 @@ KeyEventBaseImpl::KeyEventBaseImpl(EventId id, bool canBubbleArg, bool cancelabl
m_keyVal = key->ascii(); m_keyVal = key->ascii();
m_virtKeyVal = virtKeyToQtKey()->toLeft(key->key()); m_virtKeyVal = virtKeyToQtKey()->toLeft(key->key());
// m_keyVal should contain the tqunicode value // m_keyVal should contain the unicode value
// of the pressed key if available. // of the pressed key if available.
if (m_virtKeyVal == DOM_VK_UNDEFINED && !key->text().isEmpty()) if (m_virtKeyVal == DOM_VK_UNDEFINED && !key->text().isEmpty())
m_keyVal = TQString(key->text()).tqunicode()[0]; m_keyVal = TQString(key->text()).unicode()[0];
// key->state returns enum ButtonState, which is ShiftButton, ControlButton and AltButton or'ed together. // key->state returns enum ButtonState, which is ShiftButton, ControlButton and AltButton or'ed together.
m_modifier = key->state(); m_modifier = key->state();
@ -741,8 +741,8 @@ DOMString KeyboardEventImpl::keyIdentifier() const
if (const char* id = keyIdentifiersToVirtKeys()->toLeft(special)) if (const char* id = keyIdentifiersToVirtKeys()->toLeft(special))
return TQString::fromLatin1(id); return TQString::fromLatin1(id);
if (unsigned tqunicode = keyVal()) if (unsigned unicode = keyVal())
return TQString(TQChar(tqunicode)); return TQString(TQChar(unicode));
return "Unidentified"; return "Unidentified";
} }
@ -773,9 +773,9 @@ void KeyboardEventImpl::initKeyboardEvent(const DOMString &typeArg,
//Figure out the code information from the key identifier. //Figure out the code information from the key identifier.
if (keyIdentifierArg.length() == 1) { if (keyIdentifierArg.length() == 1) {
//Likely to be normal tqunicode id, unless it's one of the few //Likely to be normal unicode id, unless it's one of the few
//special values. //special values.
unsigned short code = keyIdentifierArg.tqunicode()[0]; unsigned short code = keyIdentifierArg.unicode()[0];
if (code > 0x20 && code != 0x7F) if (code > 0x20 && code != 0x7F)
keyVal = code; keyVal = code;
} }
@ -819,7 +819,7 @@ int KeyboardEventImpl::keyCode() const
if (m_virtKeyVal != DOM_VK_UNDEFINED) if (m_virtKeyVal != DOM_VK_UNDEFINED)
return m_virtKeyVal; return m_virtKeyVal;
else else
return TQChar((unsigned short)m_keyVal).upper().tqunicode(); return TQChar((unsigned short)m_keyVal).upper().unicode();
} }
int KeyboardEventImpl::charCode() const int KeyboardEventImpl::charCode() const
@ -856,14 +856,14 @@ void TextEventImpl::initTextEvent(const DOMString &typeArg,
//See whether we can get a key out of this. //See whether we can get a key out of this.
unsigned keyCode = 0; unsigned keyCode = 0;
if (text.length() == 1) if (text.length() == 1)
keyCode = text.tqunicode()[0].tqunicode(); keyCode = text.unicode()[0].unicode();
initKeyBaseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, initKeyBaseEvent(typeArg, canBubbleArg, cancelableArg, viewArg,
keyCode, 0, 0); keyCode, 0, 0);
} }
int TextEventImpl::keyCode() const int TextEventImpl::keyCode() const
{ {
//Mozilla returns 0 here unless this is a non-tqunicode key. //Mozilla returns 0 here unless this is a non-unicode key.
//IE stuffs everything here, and so we try to match it.. //IE stuffs everything here, and so we try to match it..
if (m_keyVal) if (m_keyVal)
return m_keyVal; return m_keyVal;
@ -872,8 +872,8 @@ int TextEventImpl::keyCode() const
int TextEventImpl::charCode() const int TextEventImpl::charCode() const
{ {
//On text events, in Mozilla charCode is 0 for non-tqunicode keys, //On text events, in Mozilla charCode is 0 for non-unicode keys,
//and the tqunicode key otherwise... IE doesn't support this. //and the unicode key otherwise... IE doesn't support this.
if (m_virtKeyVal) if (m_virtKeyVal)
return 0; return 0;
return m_keyVal; return m_keyVal;

@ -337,7 +337,7 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v)
m_namespaceMap = new IdNameMapping(1); m_namespaceMap = new IdNameMapping(1);
TQString xhtml(XHTML_NAMESPACE); TQString xhtml(XHTML_NAMESPACE);
m_namespaceMap->names.insert(emptyNamespace, new DOMStringImpl("")); m_namespaceMap->names.insert(emptyNamespace, new DOMStringImpl(""));
m_namespaceMap->names.insert(xhtmlNamespace, new DOMStringImpl(xhtml.tqunicode(), xhtml.length())); m_namespaceMap->names.insert(xhtmlNamespace, new DOMStringImpl(xhtml.unicode(), xhtml.length()));
m_namespaceMap->names[emptyNamespace]->ref(); m_namespaceMap->names[emptyNamespace]->ref();
m_namespaceMap->names[xhtmlNamespace]->ref(); m_namespaceMap->names[xhtmlNamespace]->ref();
m_namespaceMap->count+=2; m_namespaceMap->count+=2;

@ -198,7 +198,7 @@ public:
DocumentFragmentImpl *createDocumentFragment (); DocumentFragmentImpl *createDocumentFragment ();
TextImpl *createTextNode ( DOMStringImpl* data ) { return new TextImpl( docPtr(), data); } TextImpl *createTextNode ( DOMStringImpl* data ) { return new TextImpl( docPtr(), data); }
TextImpl *createTextNode ( const TQString& data ) TextImpl *createTextNode ( const TQString& data )
{ return createTextNode(new DOMStringImpl(data.tqunicode(), data.length())); } { return createTextNode(new DOMStringImpl(data.unicode(), data.length())); }
CommentImpl *createComment ( DOMStringImpl* data ); CommentImpl *createComment ( DOMStringImpl* data );
CDATASectionImpl *createCDATASection ( DOMStringImpl* data ); CDATASectionImpl *createCDATASection ( DOMStringImpl* data );
ProcessingInstructionImpl *createProcessingInstruction ( const DOMString &target, DOMStringImpl* data ); ProcessingInstructionImpl *createProcessingInstruction ( const DOMString &target, DOMStringImpl* data );

@ -855,7 +855,7 @@ DOMString ElementImpl::toString() const
for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) { for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
DOMString kid = child->toString(); DOMString kid = child->toString();
result += TQConstString(kid.tqunicode(), kid.length()).string(); result += TQConstString(kid.unicode(), kid.length()).string();
} }
result += "</"; result += "</";

@ -989,7 +989,7 @@ DOMStringImpl* NodeImpl::textContent() const
delete kidText; delete kidText;
} }
} }
return new DOMStringImpl(out.tqunicode(), out.length()); return new DOMStringImpl(out.unicode(), out.length());
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

@ -61,8 +61,8 @@ bool DOMStringImpl::containsOnlyWhitespace() const
for (uint i = 0; i < l; i++) { for (uint i = 0; i < l; i++) {
TQChar c = s[i]; TQChar c = s[i];
if (c.tqunicode() <= 0x7F) { if (c.unicode() <= 0x7F) {
if (c.tqunicode() > ' ') if (c.unicode() > ' ')
return false; return false;
} else { } else {
if (c.direction() != TQChar::DirWS) if (c.direction() != TQChar::DirWS)
@ -294,10 +294,10 @@ khtml::Length* DOMStringImpl::toCoordsArray(int& len) const
int pos2; int pos2;
while((pos2 = str.find(' ', pos)) != -1) { while((pos2 = str.find(' ', pos)) != -1) {
r[i++] = parseLength((TQChar *) str.tqunicode()+pos, pos2-pos); r[i++] = parseLength((TQChar *) str.unicode()+pos, pos2-pos);
pos = pos2+1; pos = pos2+1;
} }
r[i] = parseLength((TQChar *) str.tqunicode()+pos, str.length()-pos); r[i] = parseLength((TQChar *) str.unicode()+pos, str.length()-pos);
return r; return r;
} }
@ -320,13 +320,13 @@ khtml::Length* DOMStringImpl::toLengthArray(int& len) const
int pos2; int pos2;
while((pos2 = str.find(',', pos)) != -1) { while((pos2 = str.find(',', pos)) != -1) {
r[i++] = parseLength((TQChar *) str.tqunicode()+pos, pos2-pos); r[i++] = parseLength((TQChar *) str.unicode()+pos, pos2-pos);
pos = pos2+1; pos = pos2+1;
} }
/* IE Quirk: If the last comma is the last char skip it and reduce len by one */ /* IE Quirk: If the last comma is the last char skip it and reduce len by one */
if (str.length()-pos > 0) if (str.length()-pos > 0)
r[i] = parseLength((TQChar *) str.tqunicode()+pos, str.length()-pos); r[i] = parseLength((TQChar *) str.unicode()+pos, str.length()-pos);
else else
len--; len--;

@ -92,7 +92,7 @@ public:
DOMStringImpl *capitalize(bool noFirstCap=false) const; DOMStringImpl *capitalize(bool noFirstCap=false) const;
DOMStringImpl *escapeHTML(); DOMStringImpl *escapeHTML();
TQChar *tqunicode() const { return s; } TQChar *unicode() const { return s; }
uint length() const { return l; } uint length() const { return l; }
TQString string() const; TQString string() const;

@ -42,7 +42,7 @@ using namespace DOM;
using namespace khtml; using namespace khtml;
XMLIncrementalSource::XMLIncrementalSource() XMLIncrementalSource::XMLIncrementalSource()
: TQXmlInputSource(), m_pos( 0 ), m_tqunicode( 0 ), : TQXmlInputSource(), m_pos( 0 ), m_unicode( 0 ),
m_finished( false ) m_finished( false )
{ {
} }
@ -59,13 +59,13 @@ TQChar XMLIncrementalSource::next()
else if ( m_data.length() <= m_pos ) else if ( m_data.length() <= m_pos )
return TQXmlInputSource::EndOfData; return TQXmlInputSource::EndOfData;
else else
return m_tqunicode[m_pos++]; return m_unicode[m_pos++];
} }
void XMLIncrementalSource::setData( const TQString& str ) void XMLIncrementalSource::setData( const TQString& str )
{ {
m_data = str; m_data = str;
m_tqunicode = m_data.tqunicode(); m_unicode = m_data.unicode();
m_pos = 0; m_pos = 0;
if ( !str.isEmpty() ) if ( !str.isEmpty() )
m_finished = false; m_finished = false;
@ -78,7 +78,7 @@ void XMLIncrementalSource::setData( const TQByteArray& data )
void XMLIncrementalSource::appendXML( const TQString& str ) void XMLIncrementalSource::appendXML( const TQString& str )
{ {
m_data += str; m_data += str;
m_tqunicode = m_data.tqunicode(); m_unicode = m_data.unicode();
} }
TQString XMLIncrementalSource::data() TQString XMLIncrementalSource::data()
@ -289,7 +289,7 @@ bool XMLHandler::comment(const TQString & ch)
if (currentNode()->nodeType() == Node::TEXT_NODE) if (currentNode()->nodeType() == Node::TEXT_NODE)
exitText(); exitText();
// ### handle exceptions // ### handle exceptions
currentNode()->addChild(m_doc->createComment(new DOMStringImpl(ch.tqunicode(), ch.length()))); currentNode()->addChild(m_doc->createComment(new DOMStringImpl(ch.unicode(), ch.length())));
return true; return true;
} }
@ -299,7 +299,7 @@ bool XMLHandler::processingInstruction(const TQString &target, const TQString &d
exitText(); exitText();
// ### handle exceptions // ### handle exceptions
ProcessingInstructionImpl *pi = ProcessingInstructionImpl *pi =
m_doc->createProcessingInstruction(target, new DOMStringImpl(data.tqunicode(), data.length())); m_doc->createProcessingInstruction(target, new DOMStringImpl(data.unicode(), data.length()));
currentNode()->addChild(pi); currentNode()->addChild(pi);
pi->checkStyleSheet(); pi->checkStyleSheet();
return true; return true;
@ -364,7 +364,7 @@ bool XMLHandler::internalEntityDecl(const TQString &name, const TQString &value)
{ {
EntityImpl *e = new EntityImpl(m_doc,name); EntityImpl *e = new EntityImpl(m_doc,name);
// ### further parse entities inside the value and add them as separate nodes (or entityreferences)? // ### further parse entities inside the value and add them as separate nodes (or entityreferences)?
e->addChild(m_doc->createTextNode(new DOMStringImpl(value.tqunicode(), value.length()))); e->addChild(m_doc->createTextNode(new DOMStringImpl(value.unicode(), value.length())));
if (m_doc->doctype()) if (m_doc->doctype())
static_cast<GenericRONamedNodeMapImpl*>(m_doc->doctype()->entities())->addNode(e); static_cast<GenericRONamedNodeMapImpl*>(m_doc->doctype()->entities())->addNode(e);
return true; return true;

@ -155,7 +155,7 @@ public:
private: private:
TQString m_data; TQString m_data;
uint m_pos; uint m_pos;
const TQChar *m_tqunicode; const TQChar *m_unicode;
bool m_finished; bool m_finished;
}; };

@ -403,9 +403,9 @@ void RMB::slotRMBActionCopyLocation( int val )
if ( !bookmark.isGroup() ) if ( !bookmark.isGroup() )
{ {
kapp->tqclipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), kapp->clipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0),
TQClipboard::Selection ); TQClipboard::Selection );
kapp->tqclipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), kapp->clipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0),
TQClipboard::Clipboard ); TQClipboard::Clipboard );
} }
} }

@ -268,11 +268,11 @@ void KIconDialog::init()
top->setSpacing( spacingHint() ); top->setSpacing( spacingHint() );
TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main); TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main);
bgroup->tqlayout()->setSpacing(KDialog::spacingHint()); bgroup->layout()->setSpacing(KDialog::spacingHint());
bgroup->tqlayout()->setMargin(KDialog::marginHint()); bgroup->layout()->setMargin(KDialog::marginHint());
top->addWidget(bgroup); top->addWidget(bgroup);
connect(bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotButtonClicked(int))); connect(bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotButtonClicked(int)));
TQGridLayout *grid = new TQGridLayout(bgroup->tqlayout(), 3, 2); TQGridLayout *grid = new TQGridLayout(bgroup->layout(), 3, 2);
mpRb1 = new TQRadioButton(i18n("S&ystem icons:"), bgroup); mpRb1 = new TQRadioButton(i18n("S&ystem icons:"), bgroup);
grid->addWidget(mpRb1, 1, 0); grid->addWidget(mpRb1, 1, 0);
mpCombo = new TQComboBox(bgroup); mpCombo = new TQComboBox(bgroup);

@ -279,8 +279,8 @@ void KApplicationTree::slotSelectionChanged(TQListViewItem* i)
void KApplicationTree::resizeEvent( TQResizeEvent * e) void KApplicationTree::resizeEvent( TQResizeEvent * e)
{ {
setColumnWidth(0, width()-TQApplication::tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent) setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)
-2*TQApplication::tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth)); -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth));
KListView::resizeEvent(e); KListView::resizeEvent(e);
} }

@ -859,7 +859,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ ) if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ )
{ {
KIconButton *iconButton = new KIconButton( d->m_frame ); KIconButton *iconButton = new KIconButton( d->m_frame );
int bsize = 66 + 2 * iconButton->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconButton->setFixedSize(bsize, bsize); iconButton->setFixedSize(bsize, bsize);
iconButton->setIconSize(48); iconButton->setIconSize(48);
iconButton->setStrictIconSize(false); iconButton->setStrictIconSize(false);
@ -883,7 +883,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
this, TQT_SLOT( slotIconChanged() ) ); this, TQT_SLOT( slotIconChanged() ) );
} else { } else {
TQLabel *iconLabel = new TQLabel( d->m_frame ); TQLabel *iconLabel = new TQLabel( d->m_frame );
int bsize = 66 + 2 * iconLabel->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconLabel->setFixedSize(bsize, bsize); iconLabel->setFixedSize(bsize, bsize);
iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) );
iconArea = iconLabel; iconArea = iconLabel;
@ -1654,11 +1654,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
/* Group: Access Permissions */ /* Group: Access Permissions */
gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame ); gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame );
gb->tqlayout()->setSpacing(KDialog::spacingHint()); gb->layout()->setSpacing(KDialog::spacingHint());
gb->tqlayout()->setMargin(KDialog::marginHint()); gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb); box->addWidget (gb);
gl = new TQGridLayout (gb->tqlayout(), 7, 2); gl = new TQGridLayout (gb->layout(), 7, 2);
gl->setColStretch(1, 1); gl->setColStretch(1, 1);
l = d->explanationLabel = new TQLabel( "", gb ); l = d->explanationLabel = new TQLabel( "", gb );
@ -1723,11 +1723,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
/**** Group: Ownership ****/ /**** Group: Ownership ****/
gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame ); gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame );
gb->tqlayout()->setSpacing(KDialog::spacingHint()); gb->layout()->setSpacing(KDialog::spacingHint());
gb->tqlayout()->setMargin(KDialog::marginHint()); gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb); box->addWidget (gb);
gl = new TQGridLayout (gb->tqlayout(), 4, 3); gl = new TQGridLayout (gb->layout(), 4, 3);
gl->addRowSpacing(0, 10); gl->addRowSpacing(0, 10);
/*** Set Owner ***/ /*** Set Owner ***/
@ -1915,10 +1915,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
// Group: Access Permissions // Group: Access Permissions
gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox ); gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox );
gb->tqlayout()->setSpacing(KDialog::spacingHint()); gb->layout()->setSpacing(KDialog::spacingHint());
gb->tqlayout()->setMargin(KDialog::marginHint()); gb->layout()->setMargin(KDialog::marginHint());
gl = new TQGridLayout (gb->tqlayout(), 6, 6); gl = new TQGridLayout (gb->layout(), 6, 6);
gl->addRowSpacing(0, 10); gl->addRowSpacing(0, 10);
TQValueVector<TQWidget*> theNotSpecials; TQValueVector<TQWidget*> theNotSpecials;
@ -2916,7 +2916,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
layout->addMultiCellWidget(sep, 6, 6, 0, 1); layout->addMultiCellWidget(sep, 6, 6, 0, 1);
unmounted = new KIconButton( d->m_frame ); unmounted = new KIconButton( d->m_frame );
int bsize = 66 + 2 * unmounted->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin);
unmounted->setFixedSize(bsize, bsize); unmounted->setFixedSize(bsize, bsize);
unmounted->setIconType(KIcon::Desktop, KIcon::Device); unmounted->setIconType(KIcon::Desktop, KIcon::Device);
layout->addWidget(unmounted, 7, 0); layout->addWidget(unmounted, 7, 0);
@ -3635,7 +3635,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
mainlayout->addWidget(tmpQGroupBox); mainlayout->addWidget(tmpQGroupBox);
TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 2, 2); TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing( KDialog::spacingHint() ); grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1); grid->setColStretch(1, 1);
@ -3662,7 +3662,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
mainlayout->addWidget(tmpQGroupBox); mainlayout->addWidget(tmpQGroupBox);
grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 3, 2); grid = new TQGridLayout(tmpQGroupBox->layout(), 3, 2);
grid->setSpacing( KDialog::spacingHint() ); grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1); grid->setColStretch(1, 1);
@ -3701,7 +3701,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
mainlayout->addWidget(tmpQGroupBox); mainlayout->addWidget(tmpQGroupBox);
grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 2, 2); grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing(KDialog::spacingHint()); grid->setSpacing(KDialog::spacingHint());
grid->setColStretch(1, 1); grid->setColStretch(1, 1);

@ -121,7 +121,7 @@ inline TQString extract(const TQString &buf, int &pos, TQChar c1,
TQChar c2 = '\0', TQChar c3 = '\0') { TQChar c2 = '\0', TQChar c3 = '\0') {
int oldpos = pos; int oldpos = pos;
pos = find(buf,oldpos,c1,c2,c3); pos = find(buf,oldpos,c1,c2,c3);
return TQString(buf.tqunicode() + oldpos, pos - oldpos); return TQString(buf.unicode() + oldpos, pos - oldpos);
} }
/** ignores all whitespaces /** ignores all whitespaces

@ -388,13 +388,13 @@ TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List
if (!re.search( exec )) { if (!re.search( exec )) {
exec = TQString(re.cap( 1 )).stripWhiteSpace(); exec = TQString(re.cap( 1 )).stripWhiteSpace();
for (uint pos = 0; pos < exec.length(); ) { for (uint pos = 0; pos < exec.length(); ) {
TQChar c = exec.tqunicode()[pos]; TQChar c = exec.unicode()[pos];
if (c != '\'' && c != '"') if (c != '\'' && c != '"')
goto synerr; // what else can we do? after normal parsing the substs would be insecure goto synerr; // what else can we do? after normal parsing the substs would be insecure
int pos2 = exec.find( c, pos + 1 ) - 1; int pos2 = exec.find( c, pos + 1 ) - 1;
if (pos2 < 0) if (pos2 < 0)
goto synerr; // quoting error goto synerr; // quoting error
memcpy( (void *)(exec.tqunicode() + pos), exec.tqunicode() + pos + 1, (pos2 - pos) * sizeof(TQChar)); memcpy( (void *)(exec.unicode() + pos), exec.unicode() + pos + 1, (pos2 - pos) * sizeof(TQChar));
pos = pos2; pos = pos2;
exec.remove( pos, 2 ); exec.remove( pos, 2 );
} }

@ -135,7 +135,7 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data,
// if "data" came from TQClipboard, then it was deleted already - by a nice 0-seconds timer // if "data" came from TQClipboard, then it was deleted already - by a nice 0-seconds timer
// In that case, get it again. Let's hope the user didn't copy something else meanwhile :/ // In that case, get it again. Let's hope the user didn't copy something else meanwhile :/
if ( clipboard ) { if ( clipboard ) {
data = TQApplication::tqclipboard()->data(); data = TQApplication::clipboard()->data();
} }
const TQByteArray ba = data->encodedData( chosenFormat ); const TQByteArray ba = data->encodedData( chosenFormat );
return pasteDataAsyncTo( new_url, ba ); return pasteDataAsyncTo( new_url, ba );
@ -146,13 +146,13 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data,
KIO_EXPORT bool KIO::isClipboardEmpty() KIO_EXPORT bool KIO::isClipboardEmpty()
{ {
#ifndef QT_NO_MIMECLIPBOARD #ifndef QT_NO_MIMECLIPBOARD
TQMimeSource *data = TQApplication::tqclipboard()->data(); TQMimeSource *data = TQApplication::clipboard()->data();
if ( data->provides( "text/uri-list" ) && data->encodedData( "text/uri-list" ).size() > 0 ) if ( data->provides( "text/uri-list" ) && data->encodedData( "text/uri-list" ).size() > 0 )
return false; return false;
#else #else
// Happens with some versions of Qt Embedded... :/ // Happens with some versions of Qt Embedded... :/
// Guess. // Guess.
TQString data = TQApplication::tqclipboard()->text(); TQString data = TQApplication::clipboard()->text();
if(data.contains("://")) if(data.contains("://"))
return false; return false;
#endif #endif
@ -215,7 +215,7 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
} }
#ifndef QT_NO_MIMECLIPBOARD #ifndef QT_NO_MIMECLIPBOARD
TQMimeSource *data = TQApplication::tqclipboard()->data(); TQMimeSource *data = TQApplication::clipboard()->data();
// First check for URLs. // First check for URLs.
KURL::List urls; KURL::List urls;
@ -233,14 +233,14 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
// If moving, erase the clipboard contents, the original files don't exist anymore // If moving, erase the clipboard contents, the original files don't exist anymore
if ( move ) if ( move )
TQApplication::tqclipboard()->clear(); TQApplication::clipboard()->clear();
return res; return res;
} }
return pasteMimeSource( data, dest_url, TQString::null, 0 /*TODO parent widget*/, true /*clipboard*/ ); return pasteMimeSource( data, dest_url, TQString::null, 0 /*TODO parent widget*/, true /*clipboard*/ );
#else #else
TQByteArray ba; TQByteArray ba;
TQTextStream txtStream( ba, IO_WriteOnly ); TQTextStream txtStream( ba, IO_WriteOnly );
TQStringList data = TQStringList::split("\n", TQApplication::tqclipboard()->text()); TQStringList data = TQStringList::split("\n", TQApplication::clipboard()->text());
KURL::List urls; KURL::List urls;
KURLDrag::decode(data, urls); KURLDrag::decode(data, urls);
TQStringList::Iterator end(data.end()); TQStringList::Iterator end(data.end());
@ -290,7 +290,7 @@ KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray&
KIO_EXPORT TQString KIO::pasteActionText() KIO_EXPORT TQString KIO::pasteActionText()
{ {
TQMimeSource *data = TQApplication::tqclipboard()->data(); TQMimeSource *data = TQApplication::clipboard()->data();
KURL::List urls; KURL::List urls;
if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) { if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) {
if ( urls.isEmpty() ) if ( urls.isEmpty() )

@ -62,7 +62,7 @@ KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label,
m_clipboardChanged = false; m_clipboardChanged = false;
if ( clipboard ) if ( clipboard )
connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
this, TQT_SLOT( slotClipboardDataChanged() ) ); this, TQT_SLOT( slotClipboardDataChanged() ) );
} }

@ -32,7 +32,7 @@
#include "des.h" #include "des.h"
#include "kntlm.h" #include "kntlm.h"
TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tqunicode ) TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode )
{ {
//watch for buffer overflows //watch for buffer overflows
TQ_UINT32 offset; TQ_UINT32 offset;
@ -45,7 +45,7 @@ TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tq
TQString str; TQString str;
const char *c = buf.data() + offset; const char *c = buf.data() + offset;
if ( tqunicode ) { if ( unicode ) {
str = UnicodeLE2TQString( (TQChar*) c, len >> 1 ); str = UnicodeLE2TQString( (TQChar*) c, len >> 1 );
} else { } else {
str = TQString::fromLatin1( c, len ); str = TQString::fromLatin1( c, len );
@ -67,11 +67,11 @@ TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf )
return ret; return ret;
} }
void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool tqunicode ) void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode )
{ {
TQByteArray tmp; TQByteArray tmp;
if ( tqunicode ) { if ( unicode ) {
tmp = QString2UnicodeLE( str ); tmp = QString2UnicodeLE( str );
addBuf( buf, secbuf, tmp ); addBuf( buf, secbuf, tmp );
} else { } else {
@ -126,15 +126,15 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt
Challenge *ch = (Challenge *) challenge.data(); Challenge *ch = (Challenge *) challenge.data();
TQByteArray response; TQByteArray response;
uint chsize = challenge.size(); uint chsize = challenge.size();
bool tqunicode = false; bool unicode = false;
TQString dom; TQString dom;
//challenge structure too small //challenge structure too small
if ( chsize < 32 ) return false; if ( chsize < 32 ) return false;
tqunicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; unicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode;
if ( domain.isEmpty() ) if ( domain.isEmpty() )
dom = getString( challenge, ch->targetName, tqunicode ); dom = getString( challenge, ch->targetName, unicode );
else else
dom = domain; dom = domain;
@ -164,10 +164,10 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt
addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response ); addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response );
// } // }
if ( !dom.isEmpty() ) if ( !dom.isEmpty() )
addString( rbuf, ((Auth*) rbuf.data())->domain, dom, tqunicode ); addString( rbuf, ((Auth*) rbuf.data())->domain, dom, unicode );
addString( rbuf, ((Auth*) rbuf.data())->user, user, tqunicode ); addString( rbuf, ((Auth*) rbuf.data())->user, user, unicode );
if ( !workstation.isEmpty() ) if ( !workstation.isEmpty() )
addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, tqunicode ); addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, unicode );
auth = rbuf; auth = rbuf;
@ -241,10 +241,10 @@ TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned cha
TQByteArray KNTLM::ntlmHash( const TQString &password ) TQByteArray KNTLM::ntlmHash( const TQString &password )
{ {
KMD4::Digest digest; KMD4::Digest digest;
TQByteArray ret, tqunicode; TQByteArray ret, unicode;
tqunicode = QString2UnicodeLE( password ); unicode = QString2UnicodeLE( password );
KMD4 md4( tqunicode ); KMD4 md4( unicode );
md4.rawDigest( digest ); md4.rawDigest( digest );
ret.duplicate( (const char*) digest, sizeof( digest ) ); ret.duplicate( (const char*) digest, sizeof( digest ) );
return ret; return ret;
@ -372,18 +372,18 @@ void KNTLM::convertKey( unsigned char *key_56, void* ks )
TQByteArray KNTLM::QString2UnicodeLE( const TQString &target ) TQByteArray KNTLM::QString2UnicodeLE( const TQString &target )
{ {
TQByteArray tqunicode( target.length() * 2 ); TQByteArray unicode( target.length() * 2 );
for ( uint i = 0; i < target.length(); i++ ) { for ( uint i = 0; i < target.length(); i++ ) {
((TQ_UINT16*)tqunicode.data())[ i ] = KFromToLittleEndian( target[i].tqunicode() ); ((TQ_UINT16*)unicode.data())[ i ] = KFromToLittleEndian( target[i].unicode() );
} }
return tqunicode; return unicode;
} }
TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len ) TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len )
{ {
TQString ret; TQString ret;
for ( uint i = 0; i < len; i++ ) { for ( uint i = 0; i < len; i++ ) {
ret += KFromToLittleEndian( data[ i ].tqunicode() ); ret += KFromToLittleEndian( data[ i ].unicode() );
} }
return ret; return ret;
} }

@ -212,7 +212,7 @@ public:
/** /**
* Extracts a string field from an NTLM structure. * Extracts a string field from an NTLM structure.
*/ */
static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool tqunicode ); static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode );
/** /**
* Extracts a byte array from an NTLM structure. * Extracts a byte array from an NTLM structure.
*/ */
@ -226,7 +226,7 @@ private:
static TQString UnicodeLE2TQString( const TQChar* data, uint len ); static TQString UnicodeLE2TQString( const TQChar* data, uint len );
static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ); static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data );
static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool tqunicode = false ); static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode = false );
static void convertKey( unsigned char *key_56, void* ks ); static void convertKey( unsigned char *key_56, void* ks );
}; };

@ -49,7 +49,7 @@ TQString UString::qstring() const
UString::UString( const TQString &s ) UString::UString( const TQString &s )
{ {
UChar* data = new UChar[ s.length() ]; UChar* data = new UChar[ s.length() ];
std::memcpy( data, s.tqunicode(), s.length() * sizeof( UChar ) ); std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) );
rep = Rep::create( data, s.length() ); rep = Rep::create( data, s.length() );
} }

@ -604,7 +604,7 @@ bool Lexer::isIdentLetter(unsigned short c)
// Uppercase letter (Lu), Lowercase letter (Ll), // Uppercase letter (Lu), Lowercase letter (Ll),
// Titlecase letter (Lt)", Modifier letter (Lm), // Titlecase letter (Lt)", Modifier letter (Lm),
// Other letter (Lo), or Letter number (Nl). // Other letter (Lo), or Letter number (Nl).
// Also see: http://www.tqunicode.org/Public/UNIDATA/UnicodeData.txt */ // Also see: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt */
return (c >= 'a' && c <= 'z' || return (c >= 'a' && c <= 'z' ||
c >= 'A' && c <= 'Z' || c >= 'A' && c <= 'Z' ||
// A with grave - O with diaeresis // A with grave - O with diaeresis

@ -144,7 +144,7 @@ namespace KJS {
int bol; // begin of line int bol; // begin of line
#endif #endif
// current and following tqunicode characters (int to allow for -1 for end-of-file marker) // current and following unicode characters (int to allow for -1 for end-of-file marker)
int current, next1, next2, next3; int current, next1, next2, next3;
UString **strings; UString **strings;

@ -38,7 +38,7 @@ RegExp::UTF8SupportState RegExp::utf8Support = RegExp::Unknown;
RegExp::RegExp(const UString &p, int f) RegExp::RegExp(const UString &p, int f)
: pat(p), flgs(f), m_notEmpty(false), valid(true), buffer(0), originalPos(0) : pat(p), flgs(f), m_notEmpty(false), valid(true), buffer(0), originalPos(0)
{ {
// Determine whether libpcre has tqunicode support if need be.. // Determine whether libpcre has unicode support if need be..
#ifdef PCRE_CONFIG_UTF8 #ifdef PCRE_CONFIG_UTF8
if (utf8Support == Unknown) { if (utf8Support == Unknown) {
int supported; int supported;
@ -64,13 +64,13 @@ RegExp::RegExp(const UString &p, int f)
escape = false; escape = false;
// we only care about \u // we only care about \u
if (c == 'u') { if (c == 'u') {
// standard tqunicode escape sequence looks like \uxxxx but // standard unicode escape sequence looks like \uxxxx but
// other browsers also accept less then 4 hex digits // other browsers also accept less then 4 hex digits
unsigned short u = 0; unsigned short u = 0;
int j = 0; int j = 0;
for (j = 0; j < 4; ++j) { for (j = 0; j < 4; ++j) {
if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].tqunicode())) { if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].unicode())) {
u = (u << 4) + Lexer::convertHex(p[i + 1].tqunicode()); u = (u << 4) + Lexer::convertHex(p[i + 1].unicode());
++i; ++i;
} else { } else {
// sequence incomplete. restore index. // sequence incomplete. restore index.
@ -222,7 +222,7 @@ void RegExp::prepareUtf8(const UString& s)
int *posOut = originalPos; int *posOut = originalPos;
const UChar *d = s.data(); const UChar *d = s.data();
for (int i = 0; i != length; ++i) { for (int i = 0; i != length; ++i) {
unsigned short c = d[i].tqunicode(); unsigned short c = d[i].unicode();
int sequenceLen; int sequenceLen;
if (c < 0x80) { if (c < 0x80) {

@ -292,7 +292,7 @@ RegExp* RegExpObjectImp::makeEngine(ExecState *exec, const UString &p, const Val
// Check for validity of flags // Check for validity of flags
for (int pos = 0; pos < flags.size(); ++pos) { for (int pos = 0; pos < flags.size(); ++pos) {
switch (flags[pos].tqunicode()) { switch (flags[pos].unicode()) {
case 'g': case 'g':
case 'i': case 'i':
case 'm': case 'm':

@ -134,7 +134,7 @@ static int statBufferSize = 0;
UChar UChar::toLower() const UChar UChar::toLower() const
{ {
// ### properly support tqunicode tolower // ### properly support unicode tolower
if (uc >= 256) if (uc >= 256)
return *this; return *this;
@ -746,7 +746,7 @@ unsigned int UString::toStrictUInt32(bool *ok) const
if (len == 0) if (len == 0)
return 0; return 0;
const UChar *p = rep->dat; const UChar *p = rep->dat;
unsigned short c = p->tqunicode(); unsigned short c = p->unicode();
// If the first digit is 0, only 0 itself is OK. // If the first digit is 0, only 0 itself is OK.
if (c == '0') { if (c == '0') {
@ -782,7 +782,7 @@ unsigned int UString::toStrictUInt32(bool *ok) const
} }
// Get next character. // Get next character.
c = (++p)->tqunicode(); c = (++p)->unicode();
} }
} }

@ -79,7 +79,7 @@ namespace KJS {
/** /**
* @return the 16 bit Unicode value of the character * @return the 16 bit Unicode value of the character
*/ */
unsigned short tqunicode() const { return uc; } unsigned short unicode() const { return uc; }
public: public:
/** /**
* @return The character converted to lower case. * @return The character converted to lower case.
@ -132,7 +132,7 @@ namespace KJS {
/** /**
* @return Unicode value. * @return Unicode value.
*/ */
unsigned short tqunicode() const { return ref().uc; } unsigned short unicode() const { return ref().uc; }
/** /**
* @return Lower byte. * @return Lower byte.
*/ */
@ -158,7 +158,7 @@ namespace KJS {
int offset; int offset;
}; };
inline UChar::UChar(const UCharReference &c) : uc(c.tqunicode()) { } inline UChar::UChar(const UCharReference &c) : uc(c.unicode()) { }
/** /**
* @short 8 bit char based string class * @short 8 bit char based string class

@ -534,9 +534,9 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// restore client min / max size / layout behavior // restore client min / max size / layout behavior
m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() ); m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() );
m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() ); m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() );
if ( m_pClient->tqlayout() != 0L ) if ( m_pClient->layout() != 0L )
{ {
m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode ); m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode );
} }
m_pMinimize->setPixmap( *m_pMinButtonPixmap ); m_pMinimize->setPixmap( *m_pMinButtonPixmap );
m_pMaximize->setPixmap( *m_pMaxButtonPixmap ); m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
@ -558,9 +558,9 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// restore client min / max size / layout behavior // restore client min / max size / layout behavior
m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() ); m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() );
m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() ); m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() );
if ( m_pClient->tqlayout() != 0L ) if ( m_pClient->layout() != 0L )
{ {
m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode ); m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode );
} }
setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX ); setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX );
// reset to maximize-captionbar // reset to maximize-captionbar
@ -610,15 +610,15 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// save client min / max size / layout behavior // save client min / max size / layout behavior
m_oldClientMinSize = m_pClient->minimumSize(); m_oldClientMinSize = m_pClient->minimumSize();
m_oldClientMaxSize = m_pClient->maximumSize(); m_oldClientMaxSize = m_pClient->maximumSize();
if ( m_pClient->tqlayout() != 0L ) if ( m_pClient->layout() != 0L )
{ {
m_oldLayoutResizeMode = m_pClient->tqlayout() ->resizeMode(); m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode();
} }
m_pClient->setMinimumSize( 0, 0 ); m_pClient->setMinimumSize( 0, 0 );
m_pClient->setMaximumSize( 0, 0 ); m_pClient->setMaximumSize( 0, 0 );
if ( m_pClient->tqlayout() != 0L ) if ( m_pClient->layout() != 0L )
{ {
m_pClient->tqlayout() ->setResizeMode( TQLayout::FreeResize ); m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
} }
switchToMinimizeLayout(); switchToMinimizeLayout();
m_pManager->childMinimized( this, true ); m_pManager->childMinimized( this, true );
@ -629,16 +629,16 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// save client min / max size / layout behavior // save client min / max size / layout behavior
m_oldClientMinSize = m_pClient->minimumSize(); m_oldClientMinSize = m_pClient->minimumSize();
m_oldClientMaxSize = m_pClient->maximumSize(); m_oldClientMaxSize = m_pClient->maximumSize();
if ( m_pClient->tqlayout() != 0L ) if ( m_pClient->layout() != 0L )
{ {
m_oldLayoutResizeMode = m_pClient->tqlayout() ->resizeMode(); m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode();
} }
m_restoredRect = geometry(); m_restoredRect = geometry();
m_pClient->setMinimumSize( 0, 0 ); m_pClient->setMinimumSize( 0, 0 );
m_pClient->setMaximumSize( 0, 0 ); m_pClient->setMaximumSize( 0, 0 );
if ( m_pClient->tqlayout() != 0L ) if ( m_pClient->layout() != 0L )
{ {
m_pClient->tqlayout() ->setResizeMode( TQLayout::FreeResize ); m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
} }
switchToMinimizeLayout(); switchToMinimizeLayout();
m_pManager->childMinimized( this, false ); m_pManager->childMinimized( this, false );

@ -341,8 +341,8 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
// if there's enough space, use actual width // if there's enough space, use actual width
int buttonCount = m_pButtonList->count(); int buttonCount = m_pButtonList->count();
int tbHandlePixel; int tbHandlePixel;
tbHandlePixel = tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); tbHandlePixel = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this );
int buttonAreaWidth = taskBarWidth - tbHandlePixel - tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5; int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5;
if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) ) if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) )
{ {
for ( b = m_pButtonList->first();b;b = m_pButtonList->next() ) for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )

@ -452,7 +452,7 @@ void BrowserExtension::slotCompleted()
void BrowserExtension::pasteRequest() void BrowserExtension::pasteRequest()
{ {
TQCString plain( "plain" ); TQCString plain( "plain" );
TQString url = TQApplication::tqclipboard()->text(plain, TQClipboard::Selection).stripWhiteSpace(); TQString url = TQApplication::clipboard()->text(plain, TQClipboard::Selection).stripWhiteSpace();
// Remove linefeeds and any whitespace surrounding it. // Remove linefeeds and any whitespace surrounding it.
url.remove(TQRegExp("[\\ ]*\\n+[\\ ]*")); url.remove(TQRegExp("[\\ ]*\\n+[\\ ]*"));

@ -106,9 +106,9 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name )
TQGroupBox *groupBox = new TQGroupBox( i18n( "Resources" ), this ); TQGroupBox *groupBox = new TQGroupBox( i18n( "Resources" ), this );
groupBox->setColumnLayout(0, Qt::Vertical ); groupBox->setColumnLayout(0, Qt::Vertical );
groupBox->tqlayout()->setSpacing( 6 ); groupBox->layout()->setSpacing( 6 );
groupBox->tqlayout()->setMargin( 11 ); groupBox->layout()->setMargin( 11 );
TQGridLayout *groupBoxLayout = new TQGridLayout( groupBox->tqlayout(), 2, 2 ); TQGridLayout *groupBoxLayout = new TQGridLayout( groupBox->layout(), 2, 2 );
mFamilyCombo = new KComboBox( false, groupBox ); mFamilyCombo = new KComboBox( false, groupBox );
groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 ); groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 );
@ -130,7 +130,7 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name )
mEditButton->setEnabled( false ); mEditButton->setEnabled( false );
mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), TQT_TQOBJECT(this), TQT_SLOT(slotStandard()) ); mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), TQT_TQOBJECT(this), TQT_SLOT(slotStandard()) );
mStandardButton->setEnabled( false ); mStandardButton->setEnabled( false );
buttonBox->tqlayout(); buttonBox->layout();
groupBoxLayout->addWidget( buttonBox, 1, 1 ); groupBoxLayout->addWidget( buttonBox, 1, 1 );

@ -121,13 +121,13 @@ RsyncConfigDialog::RsyncConfigDialog(TQWidget* parent, const char* name,
mCancelText = actionButton(KDialogBase::Cancel)->text(); mCancelText = actionButton(KDialogBase::Cancel)->text();
TQFrame* mainWidget = plainPage(); TQFrame* mainWidget = plainPage();
TQVBoxLayout* tqlayout = new TQVBoxLayout(mainWidget, 10); TQVBoxLayout* layout = new TQVBoxLayout(mainWidget, 10);
mLabel = new TQLabel(TQString("<b>") + text + TQString("</b><br>")+i18n("Setting up synchronization for local folder")+TQString("<br><i>") + localfolder, mainWidget); mLabel = new TQLabel(TQString("<b>") + text + TQString("</b><br>")+i18n("Setting up synchronization for local folder")+TQString("<br><i>") + localfolder, mainWidget);
tqlayout->addWidget(mLabel); layout->addWidget(mLabel);
// Create an exclusive button group // Create an exclusive button group
TQButtonGroup *layoutg = new TQButtonGroup( 1, Qt::Horizontal, i18n("Synchronization Method")+TQString(":"), mainWidget); TQButtonGroup *layoutg = new TQButtonGroup( 1, Qt::Horizontal, i18n("Synchronization Method")+TQString(":"), mainWidget);
tqlayout->addWidget( layoutg ); layout->addWidget( layoutg );
layoutg->setExclusive( TRUE ); layoutg->setExclusive( TRUE );
// Insert radiobuttons // Insert radiobuttons
@ -147,7 +147,7 @@ RsyncConfigDialog::RsyncConfigDialog(TQWidget* parent, const char* name,
// Create an exclusive button group // Create an exclusive button group
TQButtonGroup *layoutm = new TQButtonGroup( 1, Qt::Horizontal, i18n("Remote Folder")+TQString(":"), mainWidget); TQButtonGroup *layoutm = new TQButtonGroup( 1, Qt::Horizontal, i18n("Remote Folder")+TQString(":"), mainWidget);
tqlayout->addWidget( layoutm ); layout->addWidget( layoutm );
layoutg->setExclusive( TRUE ); layoutg->setExclusive( TRUE );
m_rsync_txt = new TQLineEdit(layoutm); m_rsync_txt = new TQLineEdit(layoutm);
@ -157,7 +157,7 @@ RsyncConfigDialog::RsyncConfigDialog(TQWidget* parent, const char* name,
// Create an exclusive button group // Create an exclusive button group
TQButtonGroup *layouta = new TQButtonGroup( 1, Qt::Horizontal, i18n("Automatic Synchronization")+TQString(":"), mainWidget); TQButtonGroup *layouta = new TQButtonGroup( 1, Qt::Horizontal, i18n("Automatic Synchronization")+TQString(":"), mainWidget);
tqlayout->addWidget( layouta ); layout->addWidget( layouta );
layouta->setExclusive( FALSE ); layouta->setExclusive( FALSE );
m_sync_auto_logout_cb = new TQCheckBox(layouta); m_sync_auto_logout_cb = new TQCheckBox(layouta);

@ -112,7 +112,7 @@ private:
/* /*
HACK: macros replaced with function implementations HACK: macros replaced with function implementations
so we could do a side-effect-free check for tqunicode so we could do a side-effect-free check for unicode
characters which aren't in hashheader characters which aren't in hashheader
*/ */
char myupper(ichar_t c); char myupper(ichar_t c);

@ -903,7 +903,7 @@ ISpellChecker::findfiletype (const char *name, int searchnames, int *deformatter
/* /*
HACK: macros replaced with function implementations HACK: macros replaced with function implementations
so we could do a side-effect-free check for tqunicode so we could do a side-effect-free check for unicode
characters which aren't in hashheader characters which aren't in hashheader
TODO: this is just a workaround to keep us from crashing. TODO: this is just a workaround to keep us from crashing.

@ -108,7 +108,7 @@ void AsteroidStyle::polish(TQWidget *w)
{ {
/* Screwing with the palette is fun! and required in order to make it feel /* Screwing with the palette is fun! and required in order to make it feel
authentic. -clee */ authentic. -clee */
TQPalette wp = w->tqpalette(); TQPalette wp = w->palette();
//wp.setColor(TQColorGroup::Dark, wp.active().color(TQColorGroup::Button).dark(350)); //wp.setColor(TQColorGroup::Dark, wp.active().color(TQColorGroup::Button).dark(350));
wp.setColor(TQColorGroup::Dark, TQColor(128, 128, 128)); wp.setColor(TQColorGroup::Dark, TQColor(128, 128, 128));
wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to? wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to?
@ -149,7 +149,7 @@ void AsteroidStyle::unPolish(TQWidget *w)
void void
AsteroidStyle::polish( TQApplication* app) AsteroidStyle::polish( TQApplication* app)
{ {
TQPalette wp = TQApplication::tqpalette(); TQPalette wp = TQApplication::palette();
wp.setColor(TQColorGroup::Dark, TQColor(128, 128, 128)); wp.setColor(TQColorGroup::Dark, TQColor(128, 128, 128));
wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to? wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to?
TQApplication::setPalette( wp, TRUE ); TQApplication::setPalette( wp, TRUE );
@ -1425,7 +1425,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
} }
if (!pb->text().isNull()) { if (!pb->text().isNull()) {
p->setPen(POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():(enabled ? cg.buttonText() : pb->tqpalette().disabled().buttonText())); p->setPen(POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():(enabled ? cg.buttonText() : pb->palette().disabled().buttonText()));
if (pb->iconSet() && !pb->iconSet()->isNull()) { if (pb->iconSet() && !pb->iconSet()->isNull()) {
TQRect tpr(dx, r.y(), r.width()-dx, r.height()); TQRect tpr(dx, r.y(), r.width()-dx, r.height());
TQRect tr(p->boundingRect(tpr, text_flags, pb->text())); TQRect tr(p->boundingRect(tpr, text_flags, pb->text()));

@ -317,7 +317,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( sunken ) if ( sunken )
kDrawBeButton( p, x, y, w, h, cg, true, kDrawBeButton( p, x, y, w, h, cg, true,
&cg.tqbrush(TQColorGroup::Mid) ); &cg.brush(TQColorGroup::Mid) );
else if ( flags & Style_MouseOver && !flat ) { else if ( flags & Style_MouseOver && !flat ) {
TQBrush brush(cg.button().light(110)); TQBrush brush(cg.button().light(110));
@ -367,7 +367,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe,
cg.button(), false); cg.button(), false);
} else } else
kDrawBeButton(p, x, y, w, h, cg, false, kDrawBeButton(p, x, y, w, h, cg, false,
&cg.tqbrush(TQColorGroup::Button)); &cg.brush(TQColorGroup::Button));
break; break;
} }

@ -1928,7 +1928,7 @@ void KeramikStyle::drawControlMask( TQ_ControlElement element,
{ {
p->fillRect(r, color1); p->fillRect(r, color1);
maskMode = true; maskMode = true;
drawControl( element, p, widget, r, TQApplication::tqpalette().active(), TQStyle::Style_Default, opt); drawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt);
maskMode = false; maskMode = false;
} }
@ -2330,7 +2330,7 @@ void KeramikStyle::drawComplexControlMask( TQ_ComplexControl control,
{ {
maskMode = true; maskMode = true;
drawComplexControl(CC_ComboBox, p, widget, r, drawComplexControl(CC_ComboBox, p, widget, r,
TQApplication::tqpalette().active(), Style_Default, TQApplication::palette().active(), Style_Default,
SC_ComboBoxFrame,SC_None, opt); SC_ComboBoxFrame,SC_None, opt);
maskMode = false; maskMode = false;
@ -2778,7 +2778,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
TQWidget* widget = TQT_TQWIDGET( object ); TQWidget* widget = TQT_TQWIDGET( object );
TQPainter p( widget ); TQPainter p( widget );
Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, widget->rect(), Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, widget->rect(),
widget->tqpalette().color( TQPalette::Normal, TQColorGroup::Button ), widget->palette().color( TQPalette::Normal, TQColorGroup::Button ),
Qt::black, false, Keramik::TilePainter::PaintFullBlend); Qt::black, false, Keramik::TilePainter::PaintFullBlend);
recursion = false; recursion = false;
return true; return true;
@ -2825,8 +2825,8 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{ {
TQPainter p( listbox ); TQPainter p( listbox );
Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(), Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(),
listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Button ), listbox->palette().color( TQPalette::Normal, TQColorGroup::Button ),
listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Background ) ); listbox->palette().color( TQPalette::Normal, TQColorGroup::Background ) );
TQPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() ); TQPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() );
recursion = true; recursion = true;

@ -1100,12 +1100,12 @@ TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 ); lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 );
return ( new TQColorGroup( fg, bg, bg.light( highlightVal ), return ( new TQColorGroup( fg, bg, bg.light( highlightVal ),
bg.dark( lowlightVal ), bg.dark( 120 ), bg.dark( lowlightVal ), bg.dark( 120 ),
fg, TQApplication::tqpalette().active().base() ) ); fg, TQApplication::palette().active().base() ) );
} }
else else
return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(), return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(),
bg.dark( 120 ), fg, bg.dark( 120 ), fg,
TQApplication::tqpalette().active().base() ) ); TQApplication::palette().active().base() ) );
} }
@ -1273,12 +1273,12 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
// Gradient low color or blend background // Gradient low color or blend background
if ( keys.contains( "GradientLow" ) ) if ( keys.contains( "GradientLow" ) )
prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(), prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(),
&TQApplication::tqpalette().active().background() ).name(); &TQApplication::palette().active().background() ).name();
// Gradient high color // Gradient high color
if ( keys.contains( "GradientHigh" ) ) if ( keys.contains( "GradientHigh" ) )
prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(), prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(),
&TQApplication::tqpalette().active().foreground() ).name(); &TQApplication::palette().active().foreground() ).name();
// Extended color attributes // Extended color attributes
if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) ) if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) )
@ -1429,7 +1429,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 ) if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 )
grLowColors[ i ] = grLowColors[ i ] =
new TQColor( readColorEntry( prop, "GrLow", new TQColor( readColorEntry( prop, "GrLow",
TQApplication::tqpalette().active(). TQApplication::palette().active().
background() ) ); background() ) );
else else
grLowColors[ i ] = NULL; grLowColors[ i ] = NULL;
@ -1438,7 +1438,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( gradients[ i ] != GrNone ) if ( gradients[ i ] != GrNone )
grHighColors[ i ] = grHighColors[ i ] =
new TQColor( readColorEntry( prop, "GrHigh", new TQColor( readColorEntry( prop, "GrHigh",
TQApplication::tqpalette().active(). TQApplication::palette().active().
background() ) ); background() ) );
else else
grHighColors[ i ] = NULL; grHighColors[ i ] = NULL;
@ -1450,9 +1450,9 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( fg.isValid() || bg.isValid() ) if ( fg.isValid() || bg.isValid() )
{ {
if ( !fg.isValid() ) if ( !fg.isValid() )
fg = TQApplication::tqpalette().active().foreground(); fg = TQApplication::palette().active().foreground();
if ( !bg.isValid() ) if ( !bg.isValid() )
bg = TQApplication::tqpalette().active().background(); bg = TQApplication::palette().active().background();
colors[ i ] = makeColorGroup( fg, bg, TQt::WindowsStyle ); colors[ i ] = makeColorGroup( fg, bg, TQt::WindowsStyle );
} }
else else

@ -1087,7 +1087,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
return menuCache; return menuCache;
} }
const TQColorGroup *g = colorGroup( TQApplication::tqpalette().active(), MenuBar); const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar);
menuCache = new TQPixmap ( w, h ); menuCache = new TQPixmap ( w, h );
TQPainter p(menuCache); TQPainter p(menuCache);
@ -1253,7 +1253,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( !selected ) if ( !selected )
{ {
p->fillRect( x, y, x2 - x + 1, 2, p->fillRect( x, y, x2 - x + 1, 2,
tb->tqpalette().active().brush( TQColorGroup::Background ) ); tb->palette().active().brush( TQColorGroup::Background ) );
y += 2; y += 2;
} }
p->setPen( cg->text() ); p->setPen( cg->text() );
@ -1326,7 +1326,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( !selected ) if ( !selected )
{ {
p->fillRect( x, y2 - 2, x2 - x + 1, 2, p->fillRect( x, y2 - 2, x2 - x + 1, 2,
tb->tqpalette().active().brush( TQColorGroup::Background ) ); tb->palette().active().brush( TQColorGroup::Background ) );
y2 -= 2; y2 -= 2;
} }
p->setPen( cg->text() ); p->setPen( cg->text() );

@ -160,11 +160,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
if (flags & (TQStyle::Style_Down | if (flags & (TQStyle::Style_Down |
TQStyle::Style_On | TQStyle::Style_On |
TQStyle::Style_Sunken)) TQStyle::Style_Sunken))
fill = &cg.tqbrush(TQColorGroup::Midlight); fill = &cg.brush(TQColorGroup::Midlight);
else else
fill = &cg.tqbrush(TQColorGroup::Button); fill = &cg.brush(TQColorGroup::Button);
} else } else
fill = &cg.tqbrush(TQColorGroup::Background); fill = &cg.brush(TQColorGroup::Background);
drawLightBevel(p, r, cg, flags, fill); drawLightBevel(p, r, cg, flags, fill);
break; break;
} }
@ -177,11 +177,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
if (flags & TQStyle::Style_Enabled) { if (flags & TQStyle::Style_Enabled) {
if (sunken) if (sunken)
thefill = cg.tqbrush(TQColorGroup::Midlight); thefill = cg.brush(TQColorGroup::Midlight);
else else
thefill = cg.tqbrush(TQColorGroup::Button); thefill = cg.brush(TQColorGroup::Button);
} else } else
thefill = cg.tqbrush(TQColorGroup::Background); thefill = cg.brush(TQColorGroup::Background);
p->setPen(cg.dark()); p->setPen(cg.dark());
p->drawLine(r.topLeft(), r.topRight()); p->drawLine(r.topLeft(), r.topRight());
@ -225,11 +225,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
case PE_Indicator: case PE_Indicator:
const TQBrush *fill; const TQBrush *fill;
if (! (flags & Style_Enabled)) if (! (flags & Style_Enabled))
fill = &cg.tqbrush(TQColorGroup::Background); fill = &cg.brush(TQColorGroup::Background);
else if (flags & Style_Down) else if (flags & Style_Down)
fill = &cg.tqbrush(TQColorGroup::Mid); fill = &cg.brush(TQColorGroup::Mid);
else else
fill = &cg.tqbrush(TQColorGroup::Base); fill = &cg.brush(TQColorGroup::Base);
drawLightBevel(p, r, cg, flags | Style_Sunken, fill); drawLightBevel(p, r, cg, flags | Style_Sunken, fill);
p->setPen(cg.text()); p->setPen(cg.text());
@ -266,7 +266,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
cr.addCoords(2, 2, -2, -2); cr.addCoords(2, 2, -2, -2);
ir.addCoords(3, 3, -3, -3); ir.addCoords(3, 3, -3, -3);
p->fillRect(r, cg.tqbrush(TQColorGroup::Background)); p->fillRect(r, cg.brush(TQColorGroup::Background));
p->setPen(cg.dark()); p->setPen(cg.dark());
p->drawArc(r, 0, 16*360); p->drawArc(r, 0, 16*360);
@ -308,7 +308,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
TQPixmap pm(r.height(), r.width()); TQPixmap pm(r.height(), r.width());
TQPainter p2(&pm); TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(), p2.fillRect(0, 0, pm.width(), pm.height(),
cg.tqbrush(TQColorGroup::Highlight)); cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText()); p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title); p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end(); p2.end();
@ -332,7 +332,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
} }
} else { } else {
if (drawTitle) { if (drawTitle) {
p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight)); p->fillRect(r, cg.brush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText()); p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title); p->drawText(r, AlignCenter, title);
} else { } else {
@ -424,7 +424,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
if (lw == 2) if (lw == 2)
drawLightBevel(p, r, cg, flags | Style_Raised, drawLightBevel(p, r, cg, flags | Style_Raised,
&cg.tqbrush(TQColorGroup::Button)); &cg.brush(TQColorGroup::Button));
else else
TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data); TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break; break;
@ -436,7 +436,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth(); pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
if (lw == 2) if (lw == 2)
drawLightBevel(p, r, cg, flags, &cg.tqbrush(TQColorGroup::Button)); drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button));
else else
TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data); TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break; break;
@ -460,7 +460,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
pe = PE_ArrowUp; pe = PE_ArrowUp;
} }
p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? p->fillRect(fr, cg.brush((flags & Style_Down) ?
TQColorGroup::Midlight : TQColorGroup::Midlight :
TQColorGroup::Background)); TQColorGroup::Background));
tqdrawPrimitive(pe, p, ar, cg, flags); tqdrawPrimitive(pe, p, ar, cg, flags);
@ -485,7 +485,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
pe = PE_ArrowDown; pe = PE_ArrowDown;
} }
p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? p->fillRect(fr, cg.brush((flags & Style_Down) ?
TQColorGroup::Midlight : TQColorGroup::Midlight :
TQColorGroup::Background)); TQColorGroup::Background));
tqdrawPrimitive(pe, p, ar, cg, flags); tqdrawPrimitive(pe, p, ar, cg, flags);
@ -511,7 +511,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
fr.addCoords(2, 0, 0, 0); fr.addCoords(2, 0, 0, 0);
} }
p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? p->fillRect(fr, cg.brush((flags & Style_Down) ?
TQColorGroup::Midlight : TQColorGroup::Midlight :
TQColorGroup::Mid)); TQColorGroup::Mid));
break; break;
@ -538,7 +538,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
drawLightBevel(p, fr, cg, ((flags | Style_Down) ^ Style_Down) | drawLightBevel(p, fr, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default), ((flags & Style_Enabled) ? Style_Raised : Style_Default),
&cg.tqbrush(TQColorGroup::Button)); &cg.brush(TQColorGroup::Button));
break; break;
} }
@ -790,7 +790,7 @@ void LightStyleV2::drawControl( TQ_ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else else
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
p->setPen(cg.mid().dark(120)); p->setPen(cg.mid().dark(120));
p->drawLine(r.left() + 12, r.top() + 1, p->drawLine(r.left() + 12, r.top() + 1,
@ -803,11 +803,11 @@ void LightStyleV2::drawControl( TQ_ControlElement control,
if (flags & Style_Active) if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1, qDrawShadePanel(p, r, cg, true, 1,
&cg.tqbrush(TQColorGroup::Midlight)); &cg.brush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else else
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
if ( !mi ) if ( !mi )
break; break;
@ -835,7 +835,7 @@ void LightStyleV2::drawControl( TQ_ControlElement control,
if (mi->isChecked() && if (mi->isChecked() &&
! (flags & Style_Active) & ! (flags & Style_Active) &
(flags & Style_Enabled)) (flags & Style_Enabled))
qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
if (mi->iconSet()) { if (mi->iconSet()) {
TQIconSet::Mode mode = TQIconSet::Mode mode =
@ -936,13 +936,13 @@ void LightStyleV2::drawControl( TQ_ControlElement control,
case CE_MenuBarEmptyArea: case CE_MenuBarEmptyArea:
{ {
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
break; break;
} }
case CE_DockWindowEmptyArea: case CE_DockWindowEmptyArea:
{ {
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
break; break;
} }
@ -950,9 +950,9 @@ void LightStyleV2::drawControl( TQ_ControlElement control,
case CE_MenuBarItem: case CE_MenuBarItem:
{ {
if (flags & Style_Active) if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else else
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
if (data.isDefault()) if (data.isDefault())
break; break;
@ -965,7 +965,7 @@ void LightStyleV2::drawControl( TQ_ControlElement control,
} }
case CE_ProgressBarGroove: case CE_ProgressBarGroove:
drawLightBevel(p, r, cg, Style_Sunken, &cg.tqbrush(TQColorGroup::Background)); drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(TQColorGroup::Background));
break; break;
default: default:
@ -1049,11 +1049,11 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control,
if ((controls & SC_ComboBoxFrame) && frame.isValid()) if ((controls & SC_ComboBoxFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Raised, drawLightBevel(p, frame, cg, flags | Style_Raised,
&cg.tqbrush(TQColorGroup::Button)); &cg.brush(TQColorGroup::Button));
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) { if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
if (active == SC_ComboBoxArrow) if (active == SC_ComboBoxArrow)
p->fillRect(arrow, cg.tqbrush(TQColorGroup::Mid)); p->fillRect(arrow, cg.brush(TQColorGroup::Mid));
arrow.addCoords(4, 2, -2, -2); arrow.addCoords(4, 2, -2, -2);
tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags); tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
} }
@ -1069,7 +1069,7 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control,
if (flags & Style_HasFocus) { if (flags & Style_HasFocus) {
if (! combobox->editable()) { if (! combobox->editable()) {
p->fillRect( field, cg.tqbrush( TQColorGroup::Highlight ) ); p->fillRect( field, cg.brush( TQColorGroup::Highlight ) );
TQRect fr = TQRect fr =
TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget ); widget );
@ -1098,7 +1098,7 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control,
if ((controls & SC_SpinWidgetFrame) && frame.isValid()) if ((controls & SC_SpinWidgetFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Sunken, drawLightBevel(p, frame, cg, flags | Style_Sunken,
&cg.tqbrush(TQColorGroup::Base)); &cg.brush(TQColorGroup::Base));
if ((controls & SC_SpinWidgetUp) && up.isValid()) { if ((controls & SC_SpinWidgetUp) && up.isValid()) {
TQ_PrimitiveElement pe = PE_SpinWidgetUp; TQ_PrimitiveElement pe = PE_SpinWidgetUp;
@ -1109,7 +1109,7 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control,
p->drawLine(up.topLeft(), up.bottomLeft()); p->drawLine(up.topLeft(), up.bottomLeft());
up.addCoords(1, 0, 0, 0); up.addCoords(1, 0, 0, 0);
p->fillRect(up, cg.tqbrush(TQColorGroup::Button)); p->fillRect(up, cg.brush(TQColorGroup::Button));
if (active == SC_SpinWidgetUp) if (active == SC_SpinWidgetUp)
p->setPen(cg.mid()); p->setPen(cg.mid());
else else
@ -1142,7 +1142,7 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control,
p->drawLine(down.topLeft(), down.bottomLeft()); p->drawLine(down.topLeft(), down.bottomLeft());
down.addCoords(1, 0, 0, 0); down.addCoords(1, 0, 0, 0);
p->fillRect(down, cg.tqbrush(TQColorGroup::Button)); p->fillRect(down, cg.brush(TQColorGroup::Button));
if (active == SC_SpinWidgetDown) if (active == SC_SpinWidgetDown)
p->setPen(cg.mid()); p->setPen(cg.mid());
else else
@ -1274,13 +1274,13 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control,
drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) | drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) |
((flags & Style_Enabled) ? Style_Sunken : Style_Default), ((flags & Style_Enabled) ? Style_Sunken : Style_Default),
&cg.tqbrush(TQColorGroup::Midlight)); &cg.brush(TQColorGroup::Midlight));
} }
if ((controls & SC_SliderHandle) && handle.isValid()) { if ((controls & SC_SliderHandle) && handle.isValid()) {
drawLightBevel(p, handle, cg, ((flags | Style_Down) ^ Style_Down) | drawLightBevel(p, handle, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default), ((flags & Style_Enabled) ? Style_Raised : Style_Default),
&cg.tqbrush(TQColorGroup::Button)); &cg.brush(TQColorGroup::Button));
} }

@ -249,7 +249,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
// fill the header // fill the header
if ( ! br.isValid() ) if ( ! br.isValid() )
break; break;
p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
TQColorGroup::Midlight : TQColorGroup::Button ) ); TQColorGroup::Midlight : TQColorGroup::Button ) );
// the taskbuttons in kicker seem to allow the style to set the pencolor // the taskbuttons in kicker seem to allow the style to set the pencolor
@ -266,11 +266,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if (flags & (TQStyle::Style_Down | if (flags & (TQStyle::Style_Down |
TQStyle::Style_On | TQStyle::Style_On |
TQStyle::Style_Sunken)) TQStyle::Style_Sunken))
fill = &cg.tqbrush(TQColorGroup::Midlight); fill = &cg.brush(TQColorGroup::Midlight);
else else
fill = &cg.tqbrush(TQColorGroup::Button); fill = &cg.brush(TQColorGroup::Button);
} else } else
fill = &cg.tqbrush(TQColorGroup::Background); fill = &cg.brush(TQColorGroup::Background);
bool etch = true; bool etch = true;
if ( flags & Style_ButtonDefault ) { if ( flags & Style_ButtonDefault ) {
@ -289,11 +289,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if (flags & (TQStyle::Style_Down | if (flags & (TQStyle::Style_Down |
TQStyle::Style_On | TQStyle::Style_On |
TQStyle::Style_Sunken)) TQStyle::Style_Sunken))
fill = &cg.tqbrush(TQColorGroup::Midlight); fill = &cg.brush(TQColorGroup::Midlight);
else else
fill = &cg.tqbrush(TQColorGroup::Button); fill = &cg.brush(TQColorGroup::Button);
} else } else
fill = &cg.tqbrush(TQColorGroup::Background); fill = &cg.brush(TQColorGroup::Background);
drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ), drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ),
false, true, fill ); false, true, fill );
break; break;
@ -306,11 +306,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if (flags & TQStyle::Style_Enabled) { if (flags & TQStyle::Style_Enabled) {
if (sunken) if (sunken)
thefill = cg.tqbrush(TQColorGroup::Midlight); thefill = cg.brush(TQColorGroup::Midlight);
else else
thefill = cg.tqbrush(TQColorGroup::Button); thefill = cg.brush(TQColorGroup::Button);
} else } else
thefill = cg.tqbrush(TQColorGroup::Background); thefill = cg.brush(TQColorGroup::Background);
p->setPen( cg.dark() ); p->setPen( cg.dark() );
p->drawLine(r.topLeft(), r.topRight()); p->drawLine(r.topLeft(), r.topRight());
@ -353,11 +353,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
case PE_Indicator: case PE_Indicator:
const TQBrush *fill; const TQBrush *fill;
if (! (flags & Style_Enabled)) if (! (flags & Style_Enabled))
fill = &cg.tqbrush(TQColorGroup::Background); fill = &cg.brush(TQColorGroup::Background);
else if (flags & Style_Down) else if (flags & Style_Down)
fill = &cg.tqbrush(TQColorGroup::Mid); fill = &cg.brush(TQColorGroup::Mid);
else else
fill = &cg.tqbrush(TQColorGroup::Base); fill = &cg.brush(TQColorGroup::Base);
drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill ); drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill );
p->setPen(cg.text()); p->setPen(cg.text());
@ -395,7 +395,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
cr.addCoords( 2, 2, -2, -2 ); cr.addCoords( 2, 2, -2, -2 );
ir.addCoords( 3, 3, -3, -3 ); ir.addCoords( 3, 3, -3, -3 );
p->fillRect( r, cg.tqbrush( TQColorGroup::Background ) ); p->fillRect( r, cg.brush( TQColorGroup::Background ) );
p->setPen( flags & Style_Down ? cg.mid() : p->setPen( flags & Style_Down ? cg.mid() :
( flags & Style_Enabled ? cg.base() : cg.background() ) ); ( flags & Style_Enabled ? cg.base() : cg.background() ) );
@ -440,7 +440,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
TQPixmap pm(r.height(), r.width()); TQPixmap pm(r.height(), r.width());
TQPainter p2(&pm); TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(), p2.fillRect(0, 0, pm.width(), pm.height(),
cg.tqbrush(TQColorGroup::Highlight)); cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText()); p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title); p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end(); p2.end();
@ -461,7 +461,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
} }
} else { } else {
if (drawTitle) { if (drawTitle) {
p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight)); p->fillRect(r, cg.brush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText()); p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title); p->drawText(r, AlignCenter, title);
} else { } else {
@ -526,7 +526,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( ! br.isValid() ) if ( ! br.isValid() )
break; break;
p->fillRect( br, cg.tqbrush( TQColorGroup::Button ) ); p->fillRect( br, cg.brush( TQColorGroup::Button ) );
break; break;
} }
@ -575,14 +575,14 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
drawLightBevel( p, r, cg, flags, ( data.isDefault() ? drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
pixelMetric(PM_DefaultFrameWidth) : pixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, false, data.lineWidth() ), false, false,
&cg.tqbrush( TQColorGroup::Button ) ); &cg.brush( TQColorGroup::Button ) );
break; break;
case PE_PanelMenuBar: case PE_PanelMenuBar:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ? drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
pixelMetric(PM_MenuBarFrameWidth) : pixelMetric(PM_MenuBarFrameWidth) :
data.lineWidth() ), false, false, data.lineWidth() ), false, false,
&cg.tqbrush( TQColorGroup::Button ) ); &cg.brush( TQColorGroup::Button ) );
break; break;
case PE_ScrollBarSubLine: case PE_ScrollBarSubLine:
@ -608,7 +608,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( ! br.isValid() ) if ( ! br.isValid() )
break; break;
p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
TQColorGroup::Midlight : TQColorGroup::Midlight :
TQColorGroup::Button ) ); TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 ); br.addCoords( 2, 2, -2, -2 );
@ -642,7 +642,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( ! br.isValid() ) if ( ! br.isValid() )
break; break;
p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
TQColorGroup::Midlight : TQColorGroup::Midlight :
TQColorGroup::Button ) ); TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 ); br.addCoords( 2, 2, -2, -2 );
@ -673,7 +673,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( ! br.isValid() ) if ( ! br.isValid() )
break; break;
p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
TQColorGroup::Midlight : TQColorGroup::Midlight :
TQColorGroup::Button ) ); TQColorGroup::Button ) );
break; break;
@ -699,7 +699,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( ! br.isValid() ) if ( ! br.isValid() )
break; break;
p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
TQColorGroup::Midlight : TQColorGroup::Midlight :
TQColorGroup::Button ) ); TQColorGroup::Button ) );
break; break;
@ -729,7 +729,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
p->drawLine( br.topRight(), br.bottomRight() ); p->drawLine( br.topRight(), br.bottomRight() );
br.addCoords( 1, 1, -1, -1 ); br.addCoords( 1, 1, -1, -1 );
p->fillRect( br, cg.tqbrush( TQColorGroup::Highlight ) ); p->fillRect( br, cg.brush( TQColorGroup::Highlight ) );
break; break;
} }
@ -911,7 +911,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else else
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
p->setPen( cg.mid() ); p->setPen( cg.mid() );
p->drawLine(r.left() + 12, r.top() + 1, p->drawLine(r.left() + 12, r.top() + 1,
r.right() - 12, r.top() + 1); r.right() - 12, r.top() + 1);
@ -923,11 +923,11 @@ void LightStyleV3::drawControl( TQ_ControlElement control,
if (flags & Style_Active) if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1, qDrawShadePanel(p, r, cg, true, 1,
&cg.tqbrush(TQColorGroup::Midlight)); &cg.brush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else else
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
if ( !mi ) if ( !mi )
break; break;
@ -955,7 +955,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control,
if (mi->isChecked() && if (mi->isChecked() &&
! (flags & Style_Active) & ! (flags & Style_Active) &
(flags & Style_Enabled)) (flags & Style_Enabled))
qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
if (mi->iconSet()) { if (mi->iconSet()) {
TQIconSet::Mode mode = TQIconSet::Mode mode =
@ -1057,16 +1057,16 @@ void LightStyleV3::drawControl( TQ_ControlElement control,
case CE_MenuBarEmptyArea: case CE_MenuBarEmptyArea:
{ {
p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->fillRect(r, cg.brush(TQColorGroup::Button));
break; break;
} }
case CE_MenuBarItem: case CE_MenuBarItem:
{ {
if ( flags & Style_Active ) if ( flags & Style_Active )
qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else else
p->fillRect( r, cg.tqbrush( TQColorGroup::Button ) ); p->fillRect( r, cg.brush( TQColorGroup::Button ) );
if (data.isDefault()) if (data.isDefault())
break; break;
@ -1080,7 +1080,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control,
case CE_ProgressBarGroove: case CE_ProgressBarGroove:
drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ), drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ),
true, true, &cg.tqbrush( TQColorGroup::Background ) ); true, true, &cg.brush( TQColorGroup::Background ) );
break; break;
default: default:
@ -1185,7 +1185,7 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control,
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) { if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
drawLightEtch( p, arrow, cg.button(), ( active == SC_ComboBoxArrow ) ); drawLightEtch( p, arrow, cg.button(), ( active == SC_ComboBoxArrow ) );
arrow.addCoords( 1, 1, -1, -1 ); arrow.addCoords( 1, 1, -1, -1 );
p->fillRect( arrow, cg.tqbrush( TQColorGroup::Button ) ); p->fillRect( arrow, cg.brush( TQColorGroup::Button ) );
arrow.addCoords(3, 1, -1, -1); arrow.addCoords(3, 1, -1, -1);
tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags); tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
} }
@ -1196,7 +1196,7 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control,
TQRect fr = TQRect fr =
TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget ); widget );
p->fillRect( fr, cg.tqbrush( TQColorGroup::Highlight ) ); p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) );
tqdrawPrimitive( PE_FocusRect, p, fr, cg, tqdrawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder, flags | Style_FocusAtBorder,
TQStyleOption(cg.highlight())); TQStyleOption(cg.highlight()));
@ -1205,8 +1205,8 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control,
p->setPen(cg.highlightedText()); p->setPen(cg.highlightedText());
} else { } else {
p->fillRect( field, ( ( flags & Style_Enabled ) ? p->fillRect( field, ( ( flags & Style_Enabled ) ?
cg.tqbrush( TQColorGroup::Base ) : cg.brush( TQColorGroup::Base ) :
cg.tqbrush( TQColorGroup::Background ) ) ); cg.brush( TQColorGroup::Background ) ) );
p->setPen( cg.text() ); p->setPen( cg.text() );
} }
} }
@ -1236,7 +1236,7 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control,
p->drawLine( up.topLeft(), up.bottomLeft() ); p->drawLine( up.topLeft(), up.bottomLeft() );
up.addCoords( 1, 0, 0, 0 ); up.addCoords( 1, 0, 0, 0 );
p->fillRect( up, cg.tqbrush( TQColorGroup::Button ) ); p->fillRect( up, cg.brush( TQColorGroup::Button ) );
drawLightEtch( p, up, cg.button(), ( active == SC_SpinWidgetUp ) ); drawLightEtch( p, up, cg.button(), ( active == SC_SpinWidgetUp ) );
up.addCoords( 1, 0, 0, 0 ); up.addCoords( 1, 0, 0, 0 );
@ -1254,7 +1254,7 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control,
p->drawLine( down.topLeft(), down.bottomLeft() ); p->drawLine( down.topLeft(), down.bottomLeft() );
down.addCoords( 1, 0, 0, 0 ); down.addCoords( 1, 0, 0, 0 );
p->fillRect( down, cg.tqbrush( TQColorGroup::Button ) ); p->fillRect( down, cg.brush( TQColorGroup::Button ) );
drawLightEtch( p, down, cg.button(), ( active == SC_SpinWidgetDown ) ); drawLightEtch( p, down, cg.button(), ( active == SC_SpinWidgetDown ) );
down.addCoords( 1, 0, 0, 0 ); down.addCoords( 1, 0, 0, 0 );

@ -117,9 +117,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha
topLayout->setMargin( 0 ); topLayout->setMargin( 0 );
m_findGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page); m_findGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page);
m_findGrp->tqlayout()->setSpacing( KDialog::spacingHint() ); m_findGrp->layout()->setSpacing( KDialog::spacingHint() );
// m_findGrp->tqlayout()->setMargin( KDialog::marginHint() ); // m_findGrp->layout()->setMargin( KDialog::marginHint() );
m_findLayout = new TQGridLayout(m_findGrp->tqlayout()); m_findLayout = new TQGridLayout(m_findGrp->layout());
m_findLayout->setSpacing( KDialog::spacingHint() ); m_findLayout->setSpacing( KDialog::spacingHint() );
// m_findLayout->setMargin( KDialog::marginHint() ); // m_findLayout->setMargin( KDialog::marginHint() );
@ -138,9 +138,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha
topLayout->addWidget(m_findGrp); topLayout->addWidget(m_findGrp);
m_replaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page); m_replaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page);
m_replaceGrp->tqlayout()->setSpacing( KDialog::spacingHint() ); m_replaceGrp->layout()->setSpacing( KDialog::spacingHint() );
// m_replaceGrp->tqlayout()->setMargin( KDialog::marginHint() ); // m_replaceGrp->layout()->setMargin( KDialog::marginHint() );
m_replaceLayout = new TQGridLayout(m_replaceGrp->tqlayout()); m_replaceLayout = new TQGridLayout(m_replaceGrp->layout());
m_replaceLayout->setSpacing( KDialog::spacingHint() ); m_replaceLayout->setSpacing( KDialog::spacingHint() );
// m_replaceLayout->setMargin( KDialog::marginHint() ); // m_replaceLayout->setMargin( KDialog::marginHint() );
@ -159,9 +159,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha
topLayout->addWidget(m_replaceGrp); topLayout->addWidget(m_replaceGrp);
m_optionGrp = new TQGroupBox(0, Qt::Vertical, i18n("Options"), page); m_optionGrp = new TQGroupBox(0, Qt::Vertical, i18n("Options"), page);
m_optionGrp->tqlayout()->setSpacing(KDialog::spacingHint()); m_optionGrp->layout()->setSpacing(KDialog::spacingHint());
// m_optionGrp->tqlayout()->setMargin(KDialog::marginHint()); // m_optionGrp->layout()->setMargin(KDialog::marginHint());
optionsLayout = new TQGridLayout(m_optionGrp->tqlayout()); optionsLayout = new TQGridLayout(m_optionGrp->layout());
optionsLayout->setSpacing( KDialog::spacingHint() ); optionsLayout->setSpacing( KDialog::spacingHint() );
// optionsLayout->setMargin( KDialog::marginHint() ); // optionsLayout->setMargin( KDialog::marginHint() );

@ -472,7 +472,7 @@ TQSize KMultiTabBarButton::sizeHint() const
} }
#endif #endif
if ( isMenuButton() ) if ( isMenuButton() )
w += tqstyle().pixelMetric(TQStyle::PM_MenuButtonIndicator, this); w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this);
if ( pixmap() ) { if ( pixmap() ) {
TQPixmap *pm = (TQPixmap *)pixmap(); TQPixmap *pm = (TQPixmap *)pixmap();
@ -491,7 +491,7 @@ TQSize KMultiTabBarButton::sizeHint() const
h = QMAX(h, sz.height()); h = QMAX(h, sz.height());
} }
return (tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)). return (style().tqsizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)).
expandedTo(TQApplication::globalStrut())); expandedTo(TQApplication::globalStrut()));
} }

@ -684,9 +684,9 @@ static int heb2num(const TQString& str, int & iLength) {
{ {
if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) && if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) &&
s[pos + 1] <= TQChar(0x05EA)) s[pos + 1] <= TQChar(0x05EA))
result += (c.tqunicode() - 0x05D0 + 1) * 1000; result += (c.unicode() - 0x05D0 + 1) * 1000;
else else
result += c.tqunicode() - 0x05D0 + 1; result += c.unicode() - 0x05D0 + 1;
} }
else if (c == TQChar(0x05D8)) else if (c == TQChar(0x05D8))
{ {
@ -702,11 +702,11 @@ static int heb2num(const TQString& str, int & iLength) {
if (s.length() > pos && s[pos + 1] >= TQChar(0x05D9)) if (s.length() > pos && s[pos + 1] >= TQChar(0x05D9))
return -1; return -1;
else else
result += decadeValues[c.tqunicode() - 0x05D9]; result += decadeValues[c.unicode() - 0x05D9];
} }
else if (c >= TQChar(0x05E7) && c <= TQChar(0x05EA)) else if (c >= TQChar(0x05E7) && c <= TQChar(0x05EA))
{ {
result += (c.tqunicode() - 0x05E7 + 1) * 100; result += (c.unicode() - 0x05E7 + 1) * 100;
} }
else else
{ {

@ -202,7 +202,7 @@ static struct Builtin
{ "ascii", "iso 8859-1" }, { "ascii", "iso 8859-1" },
{ "x-utf-8", "utf-8" }, { "x-utf-8", "utf-8" },
{ "x-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt { "x-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt
{ "tqunicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt { "unicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt
{ "utf-16", "iso-10646-ucs-2" }, { "utf-16", "iso-10646-ucs-2" },
{ "utf16", "iso-10646-ucs-2" }, { "utf16", "iso-10646-ucs-2" },
{ "ucs2", "iso-10646-ucs-2" }, { "ucs2", "iso-10646-ucs-2" },
@ -381,11 +381,11 @@ TQChar KCharsets::fromEntity(const TQString &str)
if (str[pos] == (QChar)'x' || str[pos] == (QChar)'X') { if (str[pos] == (QChar)'x' || str[pos] == (QChar)'X') {
pos++; pos++;
// '&#x0000', hexadeciaml character reference // '&#x0000', hexadeciaml character reference
TQString tmp(str.tqunicode()+pos, str.length()-pos); TQString tmp(str.unicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 16); res = tmp.toInt(&ok, 16);
} else { } else {
// '&#0000', decimal character reference // '&#0000', decimal character reference
TQString tmp(str.tqunicode()+pos, str.length()-pos); TQString tmp(str.unicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 10); res = tmp.toInt(&ok, 10);
} }
return res; return res;
@ -422,14 +422,14 @@ TQChar KCharsets::fromEntity(const TQString &str, int &len)
TQString KCharsets::toEntity(const TQChar &ch) TQString KCharsets::toEntity(const TQChar &ch)
{ {
TQString ent; TQString ent;
ent.sprintf("&#0x%x;", ch.tqunicode()); ent.sprintf("&#0x%x;", ch.unicode());
return ent; return ent;
} }
TQString KCharsets::resolveEntities( const TQString &input ) TQString KCharsets::resolveEntities( const TQString &input )
{ {
TQString text = input; TQString text = input;
const TQChar *p = text.tqunicode(); const TQChar *p = text.unicode();
const TQChar *end = p + text.length(); const TQChar *end = p + text.length();
const TQChar *ampersand = 0; const TQChar *ampersand = 0;
bool scanForSemicolon = false; bool scanForSemicolon = false;
@ -460,12 +460,12 @@ TQString KCharsets::resolveEntities( const TQString &input )
if ( entityValue.isNull() ) if ( entityValue.isNull() )
continue; continue;
const uint ampersandPos = ampersand - text.tqunicode(); const uint ampersandPos = ampersand - text.unicode();
text[ (int)ampersandPos ] = entityValue; text[ (int)ampersandPos ] = entityValue;
text.remove( ampersandPos + 1, entityLength + 1 ); text.remove( ampersandPos + 1, entityLength + 1 );
p = text.tqunicode() + ampersandPos; p = text.unicode() + ampersandPos;
end = text.tqunicode() + text.length(); end = text.unicode() + text.length();
ampersand = 0; ampersand = 0;
} }

@ -123,7 +123,7 @@ KClipboardSynchronizer::~KClipboardSynchronizer()
void KClipboardSynchronizer::setupSignals() void KClipboardSynchronizer::setupSignals()
{ {
TQClipboard *clip = TQApplication::tqclipboard(); TQClipboard *clip = TQApplication::clipboard();
disconnect( clip, NULL, this, NULL ); disconnect( clip, NULL, this, NULL );
if( s_sync ) if( s_sync )
connect( clip, TQT_SIGNAL( selectionChanged() ), connect( clip, TQT_SIGNAL( selectionChanged() ),
@ -135,7 +135,7 @@ void KClipboardSynchronizer::setupSignals()
void KClipboardSynchronizer::slotSelectionChanged() void KClipboardSynchronizer::slotSelectionChanged()
{ {
TQClipboard *clip = TQApplication::tqclipboard(); TQClipboard *clip = TQApplication::clipboard();
// qDebug("*** sel changed: %i", s_blocked); // qDebug("*** sel changed: %i", s_blocked);
if ( s_blocked || !clip->ownsSelection() ) if ( s_blocked || !clip->ownsSelection() )
@ -147,7 +147,7 @@ void KClipboardSynchronizer::slotSelectionChanged()
void KClipboardSynchronizer::slotClipboardChanged() void KClipboardSynchronizer::slotClipboardChanged()
{ {
TQClipboard *clip = TQApplication::tqclipboard(); TQClipboard *clip = TQApplication::clipboard();
// qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection()); // qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection());
if ( s_blocked || !clip->ownsClipboard() ) if ( s_blocked || !clip->ownsClipboard() )
@ -161,7 +161,7 @@ void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode
{ {
// qDebug("---> setting clipboard: %p", data); // qDebug("---> setting clipboard: %p", data);
TQClipboard *clip = TQApplication::tqclipboard(); TQClipboard *clip = TQApplication::clipboard();
s_blocked = true; s_blocked = true;

@ -119,7 +119,7 @@ class TQPopupMenu;
* tell the user) where a completion comes from. * tell the user) where a completion comes from.
* *
* Note: KCompletion does not work with strings that contain 0x0 characters * Note: KCompletion does not work with strings that contain 0x0 characters
* (tqunicode nul), as this is used internally as a delimiter. * (unicode nul), as this is used internally as a delimiter.
* *
* You may inherit from KCompletion and override makeCompletion() in * You may inherit from KCompletion and override makeCompletion() in
* special cases (like reading directories/urls and then supplying the * special cases (like reading directories/urls and then supplying the

@ -262,7 +262,7 @@ static TQString literalString( const TQString &s )
{ {
bool isAscii = true; bool isAscii = true;
for(int i = s.length(); i--;) for(int i = s.length(); i--;)
if (s[i].tqunicode() > 127) isAscii = false; if (s[i].unicode() > 127) isAscii = false;
if (isAscii) if (isAscii)
return "TQString::fromLatin1( " + quoteString(s) + " )"; return "TQString::fromLatin1( " + quoteString(s) + " )";

@ -373,7 +373,7 @@ kdbgstream& kdbgstream::operator << (TQChar ch)
{ {
if (!print) return *this; if (!print) return *this;
if (!ch.isPrint()) if (!ch.isPrint())
output += "\\x" + TQString::number( ch.tqunicode(), 16 ).rightJustify(2, '0'); output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0');
else { else {
output += ch; output += ch;
if (ch == (QChar)'\n') flush(); if (ch == (QChar)'\n') flush();

@ -406,7 +406,7 @@ bool Sym::initQt( int keyQt )
int symQt = keyQt & 0xffff; int symQt = keyQt & 0xffff;
if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) { if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) {
m_sym = TQChar(symQt).lower().tqunicode(); m_sym = TQChar(symQt).lower().unicode();
return true; return true;
} }
@ -434,9 +434,9 @@ bool Sym::initQt( int keyQt )
bool Sym::init( const TQString& s ) bool Sym::init( const TQString& s )
{ {
// If it's a single character, get tqunicode value. // If it's a single character, get unicode value.
if( s.length() == 1 ) { if( s.length() == 1 ) {
m_sym = s[0].lower().tqunicode(); m_sym = s[0].lower().unicode();
return true; return true;
} }
@ -498,7 +498,7 @@ TQString Sym::toString( bool bUserSpace ) const
if( m_sym == 0 ) if( m_sym == 0 )
return TQString::null; return TQString::null;
// If it's a tqunicode character, // If it's a unicode character,
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
else if( m_sym < 0x1000 ) { else if( m_sym < 0x1000 ) {
#else #else
@ -542,7 +542,7 @@ uint Sym::getModsRequired() const
if( m_sym < 0x3000 ) { if( m_sym < 0x3000 ) {
TQChar c(m_sym); TQChar c(m_sym);
if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().tqunicode() ) if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().unicode() )
return KKey::SHIFT; return KKey::SHIFT;
} }
@ -823,7 +823,7 @@ uint stringUserToMod( const TQString& mod )
// Get code of just the primary key // Get code of just the primary key
keySymQt = keyCombQt & 0xffff; keySymQt = keyCombQt & 0xffff;
// If tqunicode value beneath 0x1000 (special Qt codes begin thereafter), // If unicode value beneath 0x1000 (special Qt codes begin thereafter),
if( keySymQt < 0x1000 ) { if( keySymQt < 0x1000 ) {
// For reasons unbeknownst to me, Qt converts 'a-z' to 'A-Z'. // For reasons unbeknownst to me, Qt converts 'a-z' to 'A-Z'.
// So convert it back to lowercase if SHIFT isn't held down. // So convert it back to lowercase if SHIFT isn't held down.
@ -1041,7 +1041,7 @@ void KKey::simplify()
// If this is a letter, don't remove any modifiers. // If this is a letter, don't remove any modifiers.
if( m_sym < 0x3000 && TQChar(m_sym).isLetter() ) if( m_sym < 0x3000 && TQChar(m_sym).isLetter() )
m_sym = TQChar(m_sym).lower().tqunicode(); m_sym = TQChar(m_sym).lower().unicode();
// Remove modifers from modifier list which are implicit in the symbol. // Remove modifers from modifier list which are implicit in the symbol.
// Ex. Shift+Plus => Plus (en) // Ex. Shift+Plus => Plus (en)

@ -549,17 +549,17 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
We need to make sure to clear the clipboard before unloading a DSO We need to make sure to clear the clipboard before unloading a DSO
because the DSO could have defined an object derived from QMimeSource because the DSO could have defined an object derived from QMimeSource
and placed that on the clipboard. */ and placed that on the clipboard. */
/*kapp->tqclipboard()->clear();*/ /*kapp->clipboard()->clear();*/
/* Well.. let's do something more subtle... convert the clipboard context /* Well.. let's do something more subtle... convert the clipboard context
to text. That should be safe as it only uses objects defined by Qt. */ to text. That should be safe as it only uses objects defined by Qt. */
if( kapp->tqclipboard()->ownsSelection()) { if( kapp->clipboard()->ownsSelection()) {
kapp->tqclipboard()->setText( kapp->clipboard()->setText(
kapp->tqclipboard()->text( TQClipboard::Selection ), TQClipboard::Selection ); kapp->clipboard()->text( TQClipboard::Selection ), TQClipboard::Selection );
} }
if( kapp->tqclipboard()->ownsClipboard()) { if( kapp->clipboard()->ownsClipboard()) {
kapp->tqclipboard()->setText( kapp->clipboard()->setText(
kapp->tqclipboard()->text( TQClipboard::Clipboard ), TQClipboard::Clipboard ); kapp->clipboard()->text( TQClipboard::Clipboard ), TQClipboard::Clipboard );
} }
} }

@ -1352,14 +1352,14 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
{ {
if ( !escape ) if ( !escape )
{ {
if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) if ( (TQChar(rst.at( format_index )).unicode()) == '%' )
escape = true; escape = true;
else else
buffer.append(rst.at(format_index)); buffer.append(rst.at(format_index));
} }
else else
{ {
switch ( TQChar(rst.at( format_index )).tqunicode() ) switch ( TQChar(rst.at( format_index )).unicode() )
{ {
case '%': case '%':
buffer.append('%'); buffer.append('%');
@ -1876,14 +1876,14 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
{ {
if ( !escape ) if ( !escape )
{ {
if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) if ( (TQChar(rst.at( format_index )).unicode()) == '%' )
escape = true; escape = true;
else else
buffer[index++] = rst.at( format_index ); buffer[index++] = rst.at( format_index );
} }
else else
{ {
switch ( TQChar(rst.at( format_index )).tqunicode() ) switch ( TQChar(rst.at( format_index )).unicode() )
{ {
case '%': case '%':
buffer[index++] = (QChar)'%'; buffer[index++] = (QChar)'%';
@ -1915,7 +1915,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
number = pTime.hour(); number = pTime.hour();
case 'l': case 'l':
// to share the code // to share the code
if ( (TQChar(rst.at( format_index )).tqunicode()) == 'l' ) if ( (TQChar(rst.at( format_index )).unicode()) == 'l' )
number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1; number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1;
if ( number / 10 ) if ( number / 10 )
buffer[index++] = number / 10 + '0'; buffer[index++] = number / 10 + '0';

@ -56,7 +56,7 @@ void KMacroExpanderBase::expandMacros( TQString &str )
for (pos = 0; pos < str.length(); ) { for (pos = 0; pos < str.length(); ) {
if (ec != (QChar)0) { if (ec != (QChar)0) {
if (str.tqunicode()[pos] != ec) if (str.unicode()[pos] != ec)
goto nohit; goto nohit;
if (!(len = expandEscapedMacro( str, pos, rst ))) if (!(len = expandEscapedMacro( str, pos, rst )))
goto nohit; goto nohit;
@ -109,7 +109,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
TQString rsts; TQString rsts;
while (pos < str.length()) { while (pos < str.length()) {
TQChar cc( str.tqunicode()[pos] ); TQChar cc( str.unicode()[pos] );
if (ec != (QChar)0) { if (ec != (QChar)0) {
if (cc != ec) if (cc != ec)
goto nohit; goto nohit;
@ -205,7 +205,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
pos = pos2; pos = pos2;
return false; return false;
} }
cc = str.tqunicode()[pos2]; cc = str.unicode()[pos2];
if (cc == (QChar)'`') if (cc == (QChar)'`')
break; break;
if (cc == (QChar)'\\') { if (cc == (QChar)'\\') {
@ -383,14 +383,14 @@ template<class VT>
int int
KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{ {
if (isIdentifier( str[pos - 1].tqunicode() )) if (isIdentifier( str[pos - 1].unicode() ))
return 0; return 0;
uint sl; uint sl;
for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
if (!sl) if (!sl)
return 0; return 0;
TQMapConstIterator<TQString,VT> it = TQMapConstIterator<TQString,VT> it =
macromap.find( TQConstString( str.tqunicode() + pos, sl ).string() ); macromap.find( TQConstString( str.unicode() + pos, sl ).string() );
if (it != macromap.end()) { if (it != macromap.end()) {
ret += it.data(); ret += it.data();
return sl; return sl;
@ -415,13 +415,13 @@ KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint po
rsl = sl + 3; rsl = sl + 3;
} else { } else {
rpos = pos + 1; rpos = pos + 1;
for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++);
rsl = sl + 1; rsl = sl + 1;
} }
if (!sl) if (!sl)
return 0; return 0;
TQMapConstIterator<TQString,VT> it = TQMapConstIterator<TQString,VT> it =
macromap.find( TQConstString( str.tqunicode() + rpos, sl ).string() ); macromap.find( TQConstString( str.unicode() + rpos, sl ).string() );
if (it != macromap.end()) { if (it != macromap.end()) {
ret += it.data(); ret += it.data();
return rsl; return rsl;
@ -454,13 +454,13 @@ KCharMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL
int int
KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{ {
if (isIdentifier( str[pos - 1].tqunicode() )) if (isIdentifier( str[pos - 1].unicode() ))
return 0; return 0;
uint sl; uint sl;
for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
if (!sl) if (!sl)
return 0; return 0;
if (expandMacro( TQConstString( str.tqunicode() + pos, sl ).string(), ret )) if (expandMacro( TQConstString( str.unicode() + pos, sl ).string(), ret ))
return sl; return sl;
return 0; return 0;
} }
@ -481,12 +481,12 @@ KWordMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL
rsl = sl + 3; rsl = sl + 3;
} else { } else {
rpos = pos + 1; rpos = pos + 1;
for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++);
rsl = sl + 1; rsl = sl + 1;
} }
if (!sl) if (!sl)
return 0; return 0;
if (expandMacro( TQConstString( str.tqunicode() + rpos, sl ).string(), ret )) if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret ))
return rsl; return rsl;
return 0; return 0;
} }

@ -35,7 +35,7 @@ class TQTextCodec;
* buffer and maintained/freed appropriately. There is no need * buffer and maintained/freed appropriately. There is no need
* to be concerned with wroteStdin() signals _at_all_. * to be concerned with wroteStdin() signals _at_all_.
* @li readln() reads a line of data and buffers any leftovers. * @li readln() reads a line of data and buffers any leftovers.
* @li Conversion from/to tqunicode. * @li Conversion from/to unicode.
* *
* Basically, KProcIO gives you buffered I/O similar to fgets()/fputs(). * Basically, KProcIO gives you buffered I/O similar to fgets()/fputs().
* *

@ -30,7 +30,7 @@ class KRegExpPrivate;
* *
* This was implemented * This was implemented
* because TQRegExp did not support back-references. It now does and * because TQRegExp did not support back-references. It now does and
* is recommended over KRegExp because of the tqunicode support and the * is recommended over KRegExp because of the unicode support and the
* more powerful API. * more powerful API.
* *
* Back-references are parts of a regexp grouped with parentheses. If a * Back-references are parts of a regexp grouped with parentheses. If a
@ -53,7 +53,7 @@ class KRegExpPrivate;
* Weis * Weis
* \endcode * \endcode
* *
* Please notice that KRegExp does @em not support tqunicode. * Please notice that KRegExp does @em not support unicode.
* *
* @author Torben Weis <weis@kde.org> * @author Torben Weis <weis@kde.org>
*/ */

@ -72,7 +72,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
do { do {
if (pos >= args.length()) if (pos >= args.length())
goto okret; goto okret;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
} while (c.isSpace()); } while (c.isSpace());
TQString cret; TQString cret;
if ((flags & TildeExpand) && c == (QChar)'~') { if ((flags & TildeExpand) && c == (QChar)'~') {
@ -80,7 +80,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
for (; ; pos++) { for (; ; pos++) {
if (pos >= args.length()) if (pos >= args.length())
break; break;
c = args.tqunicode()[pos]; c = args.unicode()[pos];
if (c == (QChar)'/' || c.isSpace()) if (c == (QChar)'/' || c.isSpace())
break; break;
if (isQuoteMeta( c )) { if (isQuoteMeta( c )) {
@ -91,7 +91,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
if ((flags & AbortOnMeta) && isMeta( c )) if ((flags & AbortOnMeta) && isMeta( c ))
goto metaerr; goto metaerr;
} }
TQString ccret = homeDir( TQConstString( args.tqunicode() + opos, pos - opos ).string() ); TQString ccret = homeDir( TQConstString( args.unicode() + opos, pos - opos ).string() );
if (ccret.isEmpty()) { if (ccret.isEmpty()) {
pos = opos; pos = opos;
c = (QChar)'~'; c = (QChar)'~';
@ -129,20 +129,20 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
do { do {
if (pos >= args.length()) if (pos >= args.length())
goto quoteerr; goto quoteerr;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
} while (c != (QChar)'\''); } while (c != (QChar)'\'');
cret += TQConstString( args.tqunicode() + spos, pos - spos - 1 ).string(); cret += TQConstString( args.unicode() + spos, pos - spos - 1 ).string();
} else if (c == (QChar)'"') { } else if (c == (QChar)'"') {
for (;;) { for (;;) {
if (pos >= args.length()) if (pos >= args.length())
goto quoteerr; goto quoteerr;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
if (c == (QChar)'"') if (c == (QChar)'"')
break; break;
if (c == (QChar)'\\') { if (c == (QChar)'\\') {
if (pos >= args.length()) if (pos >= args.length())
goto quoteerr; goto quoteerr;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
if (c != (QChar)'"' && c != (QChar)'\\' && if (c != (QChar)'"' && c != (QChar)'\\' &&
!((flags & AbortOnMeta) && (c == (QChar)'$' || c == (QChar)'`'))) !((flags & AbortOnMeta) && (c == (QChar)'$' || c == (QChar)'`')))
cret += (QChar)'\\'; cret += (QChar)'\\';
@ -155,13 +155,13 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
for (;;) { for (;;) {
if (pos >= args.length()) if (pos >= args.length())
goto quoteerr; goto quoteerr;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
if (c == (QChar)'\'') if (c == (QChar)'\'')
break; break;
if (c == (QChar)'\\') { if (c == (QChar)'\\') {
if (pos >= args.length()) if (pos >= args.length())
goto quoteerr; goto quoteerr;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
switch (c) { switch (c) {
case 'a': cret += (QChar)'\a'; break; case 'a': cret += (QChar)'\a'; break;
case 'b': cret += (QChar)'\b'; break; case 'b': cret += (QChar)'\b'; break;
@ -212,7 +212,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
if (c == (QChar)'\\') { if (c == (QChar)'\\') {
if (pos >= args.length()) if (pos >= args.length())
goto quoteerr; goto quoteerr;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
if (!c.isSpace() && if (!c.isSpace() &&
!((flags & AbortOnMeta) ? isMeta( c ) : isQuoteMeta( c ))) !((flags & AbortOnMeta) ? isMeta( c ) : isQuoteMeta( c )))
cret += '\\'; cret += '\\';
@ -222,7 +222,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
} }
if (pos >= args.length()) if (pos >= args.length())
break; break;
c = args.tqunicode()[pos++]; c = args.unicode()[pos++];
} while (!c.isSpace()); } while (!c.isSpace());
ret += cret; ret += cret;
firstword = false; firstword = false;
@ -265,7 +265,7 @@ TQString KShell::joinArgs( const TQStringList &args )
ret.append( q ).append( q ); ret.append( q ).append( q );
else { else {
for (uint i = 0; i < (*it).length(); i++) for (uint i = 0; i < (*it).length(); i++)
if (isSpecial((*it).tqunicode()[i])) { if (isSpecial((*it).unicode()[i])) {
TQString tmp(*it); TQString tmp(*it);
tmp.replace( q, "'\\''" ); tmp.replace( q, "'\\''" );
ret += q; ret += q;
@ -294,7 +294,7 @@ TQString KShell::joinArgs( const char * const *args, int nargs )
else { else {
TQString tmp( TQFile::decodeName( *argp ) ); TQString tmp( TQFile::decodeName( *argp ) );
for (uint i = 0; i < tmp.length(); i++) for (uint i = 0; i < tmp.length(); i++)
if (isSpecial(tmp.tqunicode()[i])) { if (isSpecial(tmp.unicode()[i])) {
tmp.replace( q, "'\\''" ); tmp.replace( q, "'\\''" );
ret += q; ret += q;
tmp += q; tmp += q;
@ -319,10 +319,10 @@ TQString KShell::joinArgsDQ( const TQStringList &args )
ret.append( q ).append( q ); ret.append( q ).append( q );
else { else {
for (uint i = 0; i < (*it).length(); i++) for (uint i = 0; i < (*it).length(); i++)
if (isSpecial((*it).tqunicode()[i])) { if (isSpecial((*it).unicode()[i])) {
ret.append( '$' ).append( q ); ret.append( '$' ).append( q );
for (uint pos = 0; pos < (*it).length(); pos++) { for (uint pos = 0; pos < (*it).length(); pos++) {
int c = (*it).tqunicode()[pos]; int c = (*it).unicode()[pos];
if (c < 32) { if (c < 32) {
ret += bs; ret += bs;
switch (c) { switch (c) {
@ -357,10 +357,10 @@ TQString KShell::tildeExpand( const TQString &fname )
if (fname[0] == (QChar)'~') { if (fname[0] == (QChar)'~') {
int pos = fname.find( '/' ); int pos = fname.find( '/' );
if (pos < 0) if (pos < 0)
return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() ); return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() );
TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() ); TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() );
if (!ret.isNull()) if (!ret.isNull())
ret += TQConstString( fname.tqunicode() + pos, fname.length() - pos ).string(); ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string();
return ret; return ret;
} }
return fname; return fname;

@ -425,8 +425,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa
return filename.find(pattern.mid(1, pattern_len - 2)) != -1; return filename.find(pattern.mid(1, pattern_len - 2)) != -1;
} }
const TQChar *c1 = pattern.tqunicode(); const TQChar *c1 = pattern.unicode();
const TQChar *c2 = filename.tqunicode(); const TQChar *c2 = filename.unicode();
int cnt = 1; int cnt = 1;
while ( cnt < pattern_len && *c1++ == *c2++ ) while ( cnt < pattern_len && *c1++ == *c2++ )
++cnt; ++cnt;
@ -436,8 +436,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa
// Patterns like "*~", "*.extension" // Patterns like "*~", "*.extension"
if ( pattern[ 0 ] == (QChar)'*' && len + 1 >= pattern_len ) if ( pattern[ 0 ] == (QChar)'*' && len + 1 >= pattern_len )
{ {
const TQChar *c1 = pattern.tqunicode() + pattern_len - 1; const TQChar *c1 = pattern.unicode() + pattern_len - 1;
const TQChar *c2 = filename.tqunicode() + len - 1; const TQChar *c2 = filename.unicode() + len - 1;
int cnt = 1; int cnt = 1;
while ( cnt < pattern_len && *c1-- == *c2-- ) while ( cnt < pattern_len && *c1-- == *c2-- )
++cnt; ++cnt;
@ -556,10 +556,10 @@ KStringHandler::tagURLs( const TQString& text )
TQString KStringHandler::obscure( const TQString &str ) TQString KStringHandler::obscure( const TQString &str )
{ {
TQString result; TQString result;
const TQChar *tqunicode = str.tqunicode(); const TQChar *unicode = str.unicode();
for ( uint i = 0; i < str.length(); ++i ) for ( uint i = 0; i < str.length(); ++i )
result += ( tqunicode[ i ].tqunicode() < 0x21 ) ? tqunicode[ i ] : result += ( unicode[ i ].unicode() < 0x21 ) ? unicode[ i ] :
TQChar( 0x1001F - tqunicode[ i ].tqunicode() ); TQChar( 0x1001F - unicode[ i ].unicode() );
return result; return result;
} }

@ -483,7 +483,7 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str )
else if ( bytes > 0 ) { // not empty else if ( bytes > 0 ) { // not empty
int bt = bytes/2; int bt = bytes/2;
str.setLength( bt ); str.setLength( bt );
TQChar* ch = (TQChar *) str.tqunicode(); TQChar* ch = (TQChar *) str.unicode();
char t[8192]; char t[8192];
char *b = t; char *b = t;
s.readRawBytes( b, bytes ); s.readRawBytes( b, bytes );

@ -29,7 +29,7 @@ namespace
{ {
struct string_entry { struct string_entry {
string_entry(TQString _key, KSycocaEntry *_payload) string_entry(TQString _key, KSycocaEntry *_payload)
{ keyStr = _key; key = keyStr.tqunicode(); length = keyStr.length(); payload = _payload; hash = 0; } { keyStr = _key; key = keyStr.unicode(); length = keyStr.length(); payload = _payload; hash = 0; }
uint hash; uint hash;
int length; int length;
const TQChar *key; const TQChar *key;

@ -172,14 +172,14 @@ static TQString lazy_encode( const TQString& segment, bool encodeAt=true )
for ( int i = 0; i < old_length; i++ ) for ( int i = 0; i < old_length; i++ )
{ {
unsigned int character = segment[i].tqunicode(); // Don't use latin1() unsigned int character = segment[i].unicode(); // Don't use latin1()
// It returns 0 for non-latin1 values // It returns 0 for non-latin1 values
// Small set of really ambiguous chars // Small set of really ambiguous chars
if ((character < 32) || // Low ASCII if ((character < 32) || // Low ASCII
((character == '%') && // The escape character itself ((character == '%') && // The escape character itself
(i+2 < old_length) && // But only if part of a valid escape sequence! (i+2 < old_length) && // But only if part of a valid escape sequence!
(hex2int(segment[i+1].tqunicode())!= -1) && (hex2int(segment[i+1].unicode())!= -1) &&
(hex2int(segment[i+2].tqunicode())!= -1)) || (hex2int(segment[i+2].unicode())!= -1)) ||
(character == '?') || // Start of query delimiter (character == '?') || // Start of query delimiter
((character == '@') && encodeAt) || // Username delimiter ((character == '@') && encodeAt) || // Username delimiter
(character == '#') || // Start of reference delimiter (character == '#') || // Start of reference delimiter
@ -404,7 +404,7 @@ bool KURL::isRelativeURL(const TQString &_url)
{ {
int len = _url.length(); int len = _url.length();
if (!len) return true; // Very short relative URL. if (!len) return true; // Very short relative URL.
const TQChar *str = _url.tqunicode(); const TQChar *str = _url.unicode();
// Absolute URL must start with alpha-character // Absolute URL must start with alpha-character
if (!isalpha(str[0].latin1())) if (!isalpha(str[0].latin1()))
@ -643,7 +643,7 @@ void KURL::parse( const TQString& _url, int encoding_hint )
return; return;
} }
const TQChar* buf = _url.tqunicode(); const TQChar* buf = _url.unicode();
const TQChar* orig = buf; const TQChar* orig = buf;
uint len = _url.length(); uint len = _url.length();
uint pos = 0; uint pos = 0;
@ -707,7 +707,7 @@ NodeErr:
void KURL::parseRawURI( const TQString& _url, int encoding_hint ) void KURL::parseRawURI( const TQString& _url, int encoding_hint )
{ {
uint len = _url.length(); uint len = _url.length();
const TQChar* buf = _url.tqunicode(); const TQChar* buf = _url.unicode();
uint pos = 0; uint pos = 0;
@ -762,7 +762,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
bool badHostName = false; bool badHostName = false;
int start = 0; int start = 0;
uint len = _url.length(); uint len = _url.length();
const TQChar* buf = _url.tqunicode(); const TQChar* buf = _url.unicode();
TQChar delim; TQChar delim;
TQString tmp; TQString tmp;

@ -1586,7 +1586,7 @@ public:
* *
* Convenience function. * Convenience function.
* *
* Convert tqunicoded string to local encoding and use %%-style * Convert unicoded string to local encoding and use %%-style
* encoding for all common delimiters / non-ascii characters. * encoding for all common delimiters / non-ascii characters.
* *
* @param str the string to encode (can be @c TQString::null) * @param str the string to encode (can be @c TQString::null)
@ -1605,7 +1605,7 @@ public:
* *
* Convenience function. * Convenience function.
* *
* Convert tqunicoded string to local encoding and use %%-style * Convert unicoded string to local encoding and use %%-style
* encoding for all common delimiters and non-ascii characters * encoding for all common delimiters and non-ascii characters
* as well as the slash @c '/'. * as well as the slash @c '/'.
* *
@ -1623,7 +1623,7 @@ public:
* *
* Convenience function. * Convenience function.
* *
* Decode %-style encoding and convert from local encoding to tqunicode. * Decode %-style encoding and convert from local encoding to unicode.
* *
* Reverse of encode_string() * Reverse of encode_string()
* *

@ -30,7 +30,7 @@ class KURLDragPrivate;
/** /**
* This class is to be used instead of TQUriDrag when using KURL. * This class is to be used instead of TQUriDrag when using KURL.
* The reason is: TQUriDrag (and the XDND/W3C standards) expect URLs to * The reason is: TQUriDrag (and the XDND/W3C standards) expect URLs to
* be encoded in UTF-8 (tqunicode), but KURL uses the current locale * be encoded in UTF-8 (unicode), but KURL uses the current locale
* by default. * by default.
* The other reasons for using this class are: * The other reasons for using this class are:
* @li it exports text/plain (for dropping/pasting into lineedits, mails etc.) * @li it exports text/plain (for dropping/pasting into lineedits, mails etc.)

@ -934,7 +934,7 @@ TQString KResolver::localHostName()
// forward declaration // forward declaration
static TQStringList splitLabels(const TQString& tqunicodeDomain); static TQStringList splitLabels(const TQString& unicodeDomain);
static TQCString ToASCII(const TQString& label); static TQCString ToASCII(const TQString& label);
static TQString ToUnicode(const TQString& label); static TQString ToUnicode(const TQString& label);
@ -947,7 +947,7 @@ static TQStringList *KResolver_initIdnDomains()
} }
// implement the ToAscii function, as described by IDN documents // implement the ToAscii function, as described by IDN documents
TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
{ {
if (!idnDomains) if (!idnDomains)
idnDomains = KResolver_initIdnDomains(); idnDomains = KResolver_initIdnDomains();
@ -958,7 +958,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain)
// 2) split the domain into individual labels, without // 2) split the domain into individual labels, without
// separators. // separators.
TQStringList input = splitLabels(tqunicodeDomain); TQStringList input = splitLabels(unicodeDomain);
// Do we allow IDN names for this TLD? // Do we allow IDN names for this TLD?
if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* )
// RFC 3492 - Punycode: A Bootstring encoding of Unicode // RFC 3492 - Punycode: A Bootstring encoding of Unicode
// for Internationalized Domain Names in Applications (IDNA) // for Internationalized Domain Names in Applications (IDNA)
static TQStringList splitLabels(const TQString& tqunicodeDomain) static TQStringList splitLabels(const TQString& unicodeDomain)
{ {
// From RFC 3490 section 3.1: // From RFC 3490 section 3.1:
// "Whenever dots are used as label separators, the following characters // "Whenever dots are used as label separators, the following characters
@ -1060,9 +1060,9 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain)
TQStringList lst; TQStringList lst;
int start = 0; int start = 0;
uint i; uint i;
for (i = 0; i < tqunicodeDomain.length(); i++) for (i = 0; i < unicodeDomain.length(); i++)
{ {
unsigned int c = tqunicodeDomain[i].tqunicode(); unsigned int c = unicodeDomain[i].unicode();
if (c == separators[0] || if (c == separators[0] ||
c == separators[1] || c == separators[1] ||
@ -1070,13 +1070,13 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain)
c == separators[3]) c == separators[3])
{ {
// found a separator! // found a separator!
lst << tqunicodeDomain.mid(start, i - start); lst << unicodeDomain.mid(start, i - start);
start = i + 1; start = i + 1;
} }
} }
if ((long)i >= start) if ((long)i >= start)
// there is still one left // there is still one left
lst << tqunicodeDomain.mid(start, i - start); lst << unicodeDomain.mid(start, i - start);
return lst; return lst;
} }
@ -1101,7 +1101,7 @@ static TQCString ToASCII(const TQString& label)
uint i; uint i;
for (i = 0; i < label.length(); i++) for (i = 0; i < label.length(); i++)
ucs4[i] = (unsigned long)label[i].tqunicode(); ucs4[i] = (unsigned long)label[i].unicode();
ucs4[i] = 0; // terminate with NUL, just to be on the safe side ucs4[i] = 0; // terminate with NUL, just to be on the safe side
if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS) if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS)
@ -1126,7 +1126,7 @@ static TQString ToUnicode(const TQString& label)
ucs4_input = new TQ_UINT32[label.length() + 1]; ucs4_input = new TQ_UINT32[label.length() + 1];
for (uint i = 0; i < label.length(); i++) for (uint i = 0; i < label.length(); i++)
ucs4_input[i] = (unsigned long)label[i].tqunicode(); ucs4_input[i] = (unsigned long)label[i].unicode();
// try the same length for output // try the same length for output
ucs4_output = new TQ_UINT32[outlen = label.length()]; ucs4_output = new TQ_UINT32[outlen = label.length()];

@ -796,11 +796,11 @@ public:
* Note that the encoding is illegible and, thus, should not be presented * Note that the encoding is illegible and, thus, should not be presented
* to the user, except if requested. * to the user, except if requested.
* *
* @param tqunicodeDomain the domain name to be encoded * @param unicodeDomain the domain name to be encoded
* @return the ACE-encoded suitable for DNS queries if successful, a null * @return the ACE-encoded suitable for DNS queries if successful, a null
* TQCString if failure. * TQCString if failure.
*/ */
static TQCString domainToAscii(const TQString& tqunicodeDomain); static TQCString domainToAscii(const TQString& unicodeDomain);
/** /**
* Does the inverse of @ref domainToAscii and return an Unicode domain * Does the inverse of @ref domainToAscii and return an Unicode domain

@ -87,13 +87,13 @@ KMCupsConfigWidget::KMCupsConfigWidget(TQWidget *parent, const char *name)
TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
lay0->addWidget(m_hostbox,1); lay0->addWidget(m_hostbox,1);
lay0->addWidget(m_loginbox,1); lay0->addWidget(m_loginbox,1);
TQGridLayout *lay2 = new TQGridLayout(m_hostbox->tqlayout(), 2, 2, 10); TQGridLayout *lay2 = new TQGridLayout(m_hostbox->layout(), 2, 2, 10);
lay2->setColStretch(1,1); lay2->setColStretch(1,1);
lay2->addWidget(m_hostlabel,0,0); lay2->addWidget(m_hostlabel,0,0);
lay2->addWidget(m_portlabel,1,0); lay2->addWidget(m_portlabel,1,0);
lay2->addWidget(m_host,0,1); lay2->addWidget(m_host,0,1);
lay2->addWidget(m_port,1,1); lay2->addWidget(m_port,1,1);
TQGridLayout *lay3 = new TQGridLayout(m_loginbox->tqlayout(), 4, 2, 10); TQGridLayout *lay3 = new TQGridLayout(m_loginbox->layout(), 4, 2, 10);
lay3->setColStretch(1,1); lay3->setColStretch(1,1);
lay3->addWidget(m_loginlabel,0,0); lay3->addWidget(m_loginlabel,0,0);
lay3->addWidget(m_passwordlabel,1,0); lay3->addWidget(m_passwordlabel,1,0);

@ -353,7 +353,7 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name)
l0->addWidget(sizebox, 1, 0); l0->addWidget(sizebox, 1, 0);
l0->addWidget(positionbox, 1, 1); l0->addWidget(positionbox, 1, 1);
l0->setColStretch(0, 1); l0->setColStretch(0, 1);
TQGridLayout *l1 = new TQGridLayout(colorbox->tqlayout(), 5, 2, 10); TQGridLayout *l1 = new TQGridLayout(colorbox->layout(), 5, 2, 10);
l1->addWidget(m_brightness, 0, 0); l1->addWidget(m_brightness, 0, 0);
l1->addWidget(m_hue, 1, 0); l1->addWidget(m_hue, 1, 0);
l1->addWidget(m_saturation, 2, 0); l1->addWidget(m_saturation, 2, 0);
@ -361,14 +361,14 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name)
l1->addWidget(m_gamma, 4, 0); l1->addWidget(m_gamma, 4, 0);
l1->addMultiCellWidget(m_preview, 0, 3, 1, 1); l1->addMultiCellWidget(m_preview, 0, 3, 1, 1);
l1->addWidget(defbtn, 4, 1); l1->addWidget(defbtn, 4, 1);
TQVBoxLayout *l2 = new TQVBoxLayout(TQT_TQLAYOUT(sizebox->tqlayout()), 3); TQVBoxLayout *l2 = new TQVBoxLayout(TQT_TQLAYOUT(sizebox->layout()), 3);
l2->addStretch(1); l2->addStretch(1);
l2->addWidget(lab); l2->addWidget(lab);
l2->addWidget(m_sizetype); l2->addWidget(m_sizetype);
l2->addSpacing(10); l2->addSpacing(10);
l2->addWidget(m_size); l2->addWidget(m_size);
l2->addStretch(1); l2->addStretch(1);
TQGridLayout *l3 = new TQGridLayout(positionbox->tqlayout(), 2, 2, 10); TQGridLayout *l3 = new TQGridLayout(positionbox->layout(), 2, 2, 10);
TQHBoxLayout *l4 = new TQHBoxLayout(0, 0, 10); TQHBoxLayout *l4 = new TQHBoxLayout(0, 0, 10);
TQVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10); TQVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10);
l3->addLayout(l4, 0, 1); l3->addLayout(l4, 0, 1);

@ -220,7 +220,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name)
l1->setColStretch(1,1); l1->setColStretch(1,1);
l1->addWidget(m_pagebox,0,0); l1->addWidget(m_pagebox,0,0);
l1->addWidget(m_copybox,0,1); l1->addWidget(m_copybox,0,1);
TQVBoxLayout *l3 = new TQVBoxLayout(TQT_TQLAYOUT(m_pagebox->tqlayout()), 5); TQVBoxLayout *l3 = new TQVBoxLayout(TQT_TQLAYOUT(m_pagebox->layout()), 5);
l3->addWidget(m_all); l3->addWidget(m_all);
l3->addWidget(m_current); l3->addWidget(m_current);
TQHBoxLayout *l4 = new TQHBoxLayout(0, 0, 5); TQHBoxLayout *l4 = new TQHBoxLayout(0, 0, 5);
@ -233,7 +233,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name)
l3->addLayout(l2); l3->addLayout(l2);
l2->addWidget(m_pagesetlabel,0); l2->addWidget(m_pagesetlabel,0);
l2->addWidget(m_pageset,1); l2->addWidget(m_pageset,1);
TQGridLayout *l5 = new TQGridLayout(m_copybox->tqlayout(), 4, 2, 10); TQGridLayout *l5 = new TQGridLayout(m_copybox->layout(), 4, 2, 10);
l5->setRowStretch(4,1); l5->setRowStretch(4,1);
l5->addWidget(m_copieslabel,0,0); l5->addWidget(m_copieslabel,0,0);
l5->addWidget(m_copies,0,1); l5->addWidget(m_copies,0,1);

@ -347,27 +347,27 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const
lay2->addWidget(m_nupbox, 1, 1); lay2->addWidget(m_nupbox, 1, 1);
lay2->setColStretch(0, 1); lay2->setColStretch(0, 1);
lay2->setColStretch(1, 1); lay2->setColStretch(1, 1);
TQGridLayout *lay3 = new TQGridLayout(m_orientbox->tqlayout(), 4, 2, TQGridLayout *lay3 = new TQGridLayout(m_orientbox->layout(), 4, 2,
KDialog::spacingHint()); KDialog::spacingHint());
lay3->addWidget(m_portrait, 0, 0); lay3->addWidget(m_portrait, 0, 0);
lay3->addWidget(m_landscape, 1, 0); lay3->addWidget(m_landscape, 1, 0);
lay3->addWidget(m_revland, 2, 0); lay3->addWidget(m_revland, 2, 0);
lay3->addWidget(m_revport, 3, 0); lay3->addWidget(m_revport, 3, 0);
lay3->addMultiCellWidget(m_orientpix, 0, 3, 1, 1); lay3->addMultiCellWidget(m_orientpix, 0, 3, 1, 1);
TQGridLayout *lay4 = new TQGridLayout(m_duplexbox->tqlayout(), 3, 2, TQGridLayout *lay4 = new TQGridLayout(m_duplexbox->layout(), 3, 2,
KDialog::spacingHint()); KDialog::spacingHint());
lay4->addWidget(m_dupnone, 0, 0); lay4->addWidget(m_dupnone, 0, 0);
lay4->addWidget(m_duplong, 1, 0); lay4->addWidget(m_duplong, 1, 0);
lay4->addWidget(m_dupshort, 2, 0); lay4->addWidget(m_dupshort, 2, 0);
lay4->addMultiCellWidget(m_duplexpix, 0, 2, 1, 1); lay4->addMultiCellWidget(m_duplexpix, 0, 2, 1, 1);
lay4->setRowStretch( 0, 1 ); lay4->setRowStretch( 0, 1 );
TQGridLayout *lay5 = new TQGridLayout(m_nupbox->tqlayout(), 3, 2, TQGridLayout *lay5 = new TQGridLayout(m_nupbox->layout(), 3, 2,
KDialog::spacingHint()); KDialog::spacingHint());
lay5->addWidget(m_nup1, 0, 0); lay5->addWidget(m_nup1, 0, 0);
lay5->addWidget(m_nup2, 1, 0); lay5->addWidget(m_nup2, 1, 0);
lay5->addWidget(m_nup4, 2, 0); lay5->addWidget(m_nup4, 2, 0);
lay5->addMultiCellWidget(m_nuppix, 0, 2, 1, 1); lay5->addMultiCellWidget(m_nuppix, 0, 2, 1, 1);
TQGridLayout *lay6 = new TQGridLayout(m_bannerbox->tqlayout(), 2, 2, TQGridLayout *lay6 = new TQGridLayout(m_bannerbox->layout(), 2, 2,
KDialog::spacingHint()); KDialog::spacingHint());
lay6->addWidget(m_startbannerlabel, 0, 0); lay6->addWidget(m_startbannerlabel, 0, 0);
lay6->addWidget(m_endbannerlabel, 1, 0); lay6->addWidget(m_endbannerlabel, 1, 0);

@ -164,15 +164,15 @@ void KPQtPage::init()
lay0->addWidget(m_orientbox,1,0); lay0->addWidget(m_orientbox,1,0);
lay0->addWidget(m_colorbox,1,1); lay0->addWidget(m_colorbox,1,1);
lay0->addWidget(m_nupbox,2,0); lay0->addWidget(m_nupbox,2,0);
TQGridLayout *lay1 = new TQGridLayout(m_orientbox->tqlayout(), 2, 2, 10); TQGridLayout *lay1 = new TQGridLayout(m_orientbox->layout(), 2, 2, 10);
lay1->addWidget(m_portrait,0,0); lay1->addWidget(m_portrait,0,0);
lay1->addWidget(m_landscape,1,0); lay1->addWidget(m_landscape,1,0);
lay1->addMultiCellWidget(m_orientpix,0,1,1,1); lay1->addMultiCellWidget(m_orientpix,0,1,1,1);
TQGridLayout *lay2 = new TQGridLayout(m_colorbox->tqlayout(), 2, 2, 10); TQGridLayout *lay2 = new TQGridLayout(m_colorbox->layout(), 2, 2, 10);
lay2->addWidget(m_color,0,0); lay2->addWidget(m_color,0,0);
lay2->addWidget(m_grayscale,1,0); lay2->addWidget(m_grayscale,1,0);
lay2->addMultiCellWidget(m_colorpix,0,1,1,1); lay2->addMultiCellWidget(m_colorpix,0,1,1,1);
TQGridLayout *lay3 = new TQGridLayout(m_nupbox->tqlayout(), 4, 2, 5); TQGridLayout *lay3 = new TQGridLayout(m_nupbox->layout(), 4, 2, 5);
lay3->addWidget(m_nup1,0,0); lay3->addWidget(m_nup1,0,0);
lay3->addWidget(m_nup2,1,0); lay3->addWidget(m_nup2,1,0);
lay3->addWidget(m_nup4,2,0); lay3->addWidget(m_nup4,2,0);

@ -361,7 +361,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name)
l2->addStretch(1); l2->addStretch(1);
l2->addWidget(d->m_ok,0); l2->addWidget(d->m_ok,0);
l2->addWidget(m_cancel,0); l2->addWidget(m_cancel,0);
TQGridLayout *l3 = new TQGridLayout(m_pbox->tqlayout(),3,3,7); TQGridLayout *l3 = new TQGridLayout(m_pbox->layout(),3,3,7);
l3->setColStretch(1,1); l3->setColStretch(1,1);
l3->setRowStretch(0,1); l3->setRowStretch(0,1);
TQGridLayout *l4 = new TQGridLayout(0, 5, 2, 0, 5); TQGridLayout *l4 = new TQGridLayout(0, 5, 2, 0, 5);

@ -138,7 +138,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name)
l0->addWidget(sep); l0->addWidget(sep);
l0->addWidget(m_gb); l0->addWidget(m_gb);
l0->addWidget(m_outfile_gb); l0->addWidget(m_outfile_gb);
TQGridLayout *l6 = new TQGridLayout(m_outfile_gb->tqlayout(), 3, 2, 10); TQGridLayout *l6 = new TQGridLayout(m_outfile_gb->layout(), 3, 2, 10);
l6->addMultiCellWidget( m_usefile, 0, 0, 0, 1 ); l6->addMultiCellWidget( m_usefile, 0, 0, 0, 1 );
l6->addWidget(m_mimetypelabel, 1, 0); l6->addWidget(m_mimetypelabel, 1, 0);
l6->addWidget(m_mimetype, 1, 1); l6->addWidget(m_mimetype, 1, 1);

@ -230,9 +230,9 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam
l5->addWidget(m_edit1, 0, 1); l5->addWidget(m_edit1, 0, 1);
l5->addWidget(m_edit2, 1, 1); l5->addWidget(m_edit2, 1, 1);
TQGridLayout *l8 = new TQGridLayout(gb_input->tqlayout(), 2, 2, TQGridLayout *l8 = new TQGridLayout(gb_input->layout(), 2, 2,
KDialog::spacingHint()); KDialog::spacingHint());
TQGridLayout *l9 = new TQGridLayout(gb_output->tqlayout(), 2, 2, TQGridLayout *l9 = new TQGridLayout(gb_output->layout(), 2, 2,
KDialog::spacingHint()); KDialog::spacingHint());
l8->addWidget(m_inputfilelab, 0, 0); l8->addWidget(m_inputfilelab, 0, 0);
l8->addWidget(m_inputpipelab, 1, 0); l8->addWidget(m_inputpipelab, 1, 0);
@ -243,7 +243,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam
l9->addWidget(m_outputfile, 0, 1); l9->addWidget(m_outputfile, 0, 1);
l9->addWidget(m_outputpipe, 1, 1); l9->addWidget(m_outputpipe, 1, 1);
TQVBoxLayout *l11 = new TQVBoxLayout(TQT_TQLAYOUT(gb->tqlayout())); TQVBoxLayout *l11 = new TQVBoxLayout(TQT_TQLAYOUT(gb->layout()));
l11->addWidget(m_stack); l11->addWidget(m_stack);
TQVBoxLayout *l12 = new TQVBoxLayout( 0, 0, 0 ); TQVBoxLayout *l12 = new TQVBoxLayout( 0, 0, 0 );
@ -895,14 +895,14 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name)
l6->addWidget(m_mimetypelab, 0); l6->addWidget(m_mimetypelab, 0);
l6->addWidget(m_mimetype, 1); l6->addWidget(m_mimetype, 1);
l7->addWidget(m_gb1); l7->addWidget(m_gb1);
TQGridLayout *l2 = new TQGridLayout(TQT_TQLAYOUT(m_gb1->tqlayout()), 4, 3, 10); TQGridLayout *l2 = new TQGridLayout(TQT_TQLAYOUT(m_gb1->layout()), 4, 3, 10);
l2->addMultiCellWidget(m_availablemime, 0, 3, 2, 2); l2->addMultiCellWidget(m_availablemime, 0, 3, 2, 2);
l2->addMultiCellWidget(m_selectedmime, 0, 3, 0, 0); l2->addMultiCellWidget(m_selectedmime, 0, 3, 0, 0);
l2->addWidget(m_addmime, 1, 1); l2->addWidget(m_addmime, 1, 1);
l2->addWidget(m_removemime, 2, 1); l2->addWidget(m_removemime, 2, 1);
l2->setRowStretch(0, 1); l2->setRowStretch(0, 1);
l2->setRowStretch(3, 1); l2->setRowStretch(3, 1);
TQHBoxLayout *l4 = new TQHBoxLayout(TQT_TQLAYOUT(m_gb2->tqlayout()), 10); TQHBoxLayout *l4 = new TQHBoxLayout(TQT_TQLAYOUT(m_gb2->layout()), 10);
l4->addWidget(m_requirements); l4->addWidget(m_requirements);
TQVBoxLayout *l8 = new TQVBoxLayout(0, 0, 0); TQVBoxLayout *l8 = new TQVBoxLayout(0, 0, 0);
l4->addLayout(l8); l4->addLayout(l8);

@ -46,7 +46,7 @@ KMProxyWidget::KMProxyWidget(TQWidget *parent, const char *name)
m_proxyhost->setEnabled(false); m_proxyhost->setEnabled(false);
m_proxyport->setEnabled(false); m_proxyport->setEnabled(false);
TQGridLayout *lay0 = new TQGridLayout(tqlayout(), 3, 2, 10); TQGridLayout *lay0 = new TQGridLayout(layout(), 3, 2, 10);
lay0->setColStretch(1,1); lay0->setColStretch(1,1);
lay0->addMultiCellWidget(m_useproxy,0,0,0,1); lay0->addMultiCellWidget(m_useproxy,0,0,0,1);
lay0->addWidget(m_hostlabel,1,0); lay0->addWidget(m_hostlabel,1,0);

@ -2326,7 +2326,7 @@ void KPasteTextAction::menuAboutToShow()
if (reply.isValid()) if (reply.isValid())
list = reply; list = reply;
} }
TQString clipboardText = tqApp->tqclipboard()->text(TQClipboard::Clipboard); TQString clipboardText = tqApp->clipboard()->text(TQClipboard::Clipboard);
if (list.isEmpty()) if (list.isEmpty())
list << clipboardText; list << clipboardText;
bool found = false; bool found = false;
@ -2354,7 +2354,7 @@ void KPasteTextAction::menuItemActivated( int id)
TQString clipboardText = reply; TQString clipboardText = reply;
reply = klipper.call("setClipboardContents(TQString)", clipboardText); reply = klipper.call("setClipboardContents(TQString)", clipboardText);
if (reply.isValid()) if (reply.isValid())
kdDebug(129) << "Clipboard: " << TQString(tqApp->tqclipboard()->text(TQClipboard::Clipboard)) << endl; kdDebug(129) << "Clipboard: " << TQString(tqApp->clipboard()->text(TQClipboard::Clipboard)) << endl;
} }
TQTimer::singleShot(20, this, TQT_SLOT(slotActivated())); TQTimer::singleShot(20, this, TQT_SLOT(slotActivated()));
} }
@ -2363,7 +2363,7 @@ void KPasteTextAction::slotActivated()
{ {
if (!m_mixedMode) { if (!m_mixedMode) {
TQWidget *w = tqApp->widgetAt(TQCursor::pos(), true); TQWidget *w = tqApp->widgetAt(TQCursor::pos(), true);
TQMimeSource *data = TQApplication::tqclipboard()->data(); TQMimeSource *data = TQApplication::clipboard()->data();
if (!data->provides("text/plain") && w) { if (!data->provides("text/plain") && w) {
m_popup->popup(w->mapToGlobal(TQPoint(0, w->height()))); m_popup->popup(w->mapToGlobal(TQPoint(0, w->height())));
} else } else

@ -63,7 +63,7 @@ void KArrowButton::drawButton(TQPainter *p)
const unsigned int margin = 2; const unsigned int margin = 2;
p->fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) ); p->fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) );
tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ), style().tqdrawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ),
colorGroup(), colorGroup(),
isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Default, isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Default,
TQStyleOption( 2, 0 ) ); TQStyleOption( 2, 0 ) );
@ -103,7 +103,7 @@ void KArrowButton::drawButton(TQPainter *p)
int flags = TQStyle::Style_Enabled; int flags = TQStyle::Style_Enabled;
if ( isDown() ) if ( isDown() )
flags |= TQStyle::Style_Down; flags |= TQStyle::Style_Down;
tqstyle().tqdrawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ), style().tqdrawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ),
colorGroup(), flags ); colorGroup(), flags );
} }

@ -45,7 +45,7 @@
class KCharSelect::KCharSelectPrivate class KCharSelect::KCharSelectPrivate
{ {
public: public:
TQLineEdit *tqunicodeLine; TQLineEdit *unicodeLine;
}; };
TQFontDatabase * KCharSelect::fontDataBase = 0; TQFontDatabase * KCharSelect::fontDataBase = 0;
@ -155,7 +155,7 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col )
c += row * numCols(); c += row * numCols();
c += col; c += col;
if ( c == vChr.tqunicode() ) { if ( c == vChr.unicode() ) {
p->setBrush( TQBrush( colorGroup().highlight() ) ); p->setBrush( TQBrush( colorGroup().highlight() ) );
p->setPen( NoPen ); p->setPen( NoPen );
p->drawRect( 0, 0, w, h ); p->drawRect( 0, 0, w, h );
@ -172,8 +172,8 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col )
p->setPen( colorGroup().text() ); p->setPen( colorGroup().text() );
} }
if ( c == focusItem.tqunicode() && hasFocus() ) { if ( c == focusItem.unicode() && hasFocus() ) {
tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ), style().tqdrawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ),
colorGroup() ); colorGroup() );
focusPos = TQPoint( col, row ); focusPos = TQPoint( col, row );
} }
@ -409,13 +409,13 @@ KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_f
const TQRegExp rx( "[a-fA-F0-9]{1,4}" ); const TQRegExp rx( "[a-fA-F0-9]{1,4}" );
TQValidator* const validator = new TQRegExpValidator( rx, TQT_TQOBJECT(this) ); TQValidator* const validator = new TQRegExpValidator( rx, TQT_TQOBJECT(this) );
d->tqunicodeLine = new KLineEdit( bar ); d->unicodeLine = new KLineEdit( bar );
d->tqunicodeLine->setValidator(validator); d->unicodeLine->setValidator(validator);
lUnicode->setBuddy(d->tqunicodeLine); lUnicode->setBuddy(d->unicodeLine);
d->tqunicodeLine->resize( d->tqunicodeLine->sizeHint() ); d->unicodeLine->resize( d->unicodeLine->sizeHint() );
slotUpdateUnicode(_chr); slotUpdateUnicode(_chr);
connect( d->tqunicodeLine, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotUnicodeEntered() ) ); connect( d->unicodeLine, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotUnicodeEntered() ) );
charTable = new KCharSelectTable( this, name, _font.isEmpty() ? TQString(TQVBox::font().family()) : _font, _chr, _tableNum ); charTable = new KCharSelectTable( this, name, _font.isEmpty() ? TQString(TQVBox::font().family()) : _font, _chr, _tableNum );
const TQSize sz( charTable->contentsWidth() + 4 , const TQSize sz( charTable->contentsWidth() + 4 ,
@ -513,7 +513,7 @@ void KCharSelect::tableChanged( int _value )
//================================================================== //==================================================================
void KCharSelect::slotUnicodeEntered( ) void KCharSelect::slotUnicodeEntered( )
{ {
const TQString s = d->tqunicodeLine->text(); const TQString s = d->unicodeLine->text();
if (s.isEmpty()) if (s.isEmpty())
return; return;
@ -532,10 +532,10 @@ void KCharSelect::slotUnicodeEntered( )
void KCharSelect::slotUpdateUnicode( const TQChar &c ) void KCharSelect::slotUpdateUnicode( const TQChar &c )
{ {
const int uc = c.tqunicode(); const int uc = c.unicode();
TQString s; TQString s;
s.sprintf("%04X", uc); s.sprintf("%04X", uc);
d->tqunicodeLine->setText(s); d->unicodeLine->setText(s);
} }
void KCharSelectTable::virtual_hook( int, void*) void KCharSelectTable::virtual_hook( int, void*)

@ -105,18 +105,18 @@ void KColorButton::setDefaultColor( const TQColor &c )
void KColorButton::drawButtonLabel( TQPainter *painter ) void KColorButton::drawButtonLabel( TQPainter *painter )
{ {
int x, y, w, h; int x, y, w, h;
TQRect r = tqstyle().subRect( TQStyle::SR_PushButtonContents, this ); TQRect r = style().subRect( TQStyle::SR_PushButtonContents, this );
r.rect(&x, &y, &w, &h); r.rect(&x, &y, &w, &h);
int margin = tqstyle().pixelMetric( TQStyle::PM_ButtonMargin, this ); int margin = style().pixelMetric( TQStyle::PM_ButtonMargin, this );
x += margin; x += margin;
y += margin; y += margin;
w -= 2*margin; w -= 2*margin;
h -= 2*margin; h -= 2*margin;
if (isOn() || isDown()) { if (isOn() || isDown()) {
x += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); x += style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this );
y += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical, this ); y += style().pixelMetric( TQStyle::PM_ButtonShiftVertical, this );
} }
TQColor fillCol = isEnabled() ? col : backgroundColor(); TQColor fillCol = isEnabled() ? col : backgroundColor();
@ -125,14 +125,14 @@ void KColorButton::drawButtonLabel( TQPainter *painter )
painter->fillRect( x+1, y+1, w-2, h-2, fillCol ); painter->fillRect( x+1, y+1, w-2, h-2, fillCol );
if ( hasFocus() ) { if ( hasFocus() ) {
TQRect focusRect = tqstyle().subRect( TQStyle::SR_PushButtonFocusRect, this ); TQRect focusRect = style().subRect( TQStyle::SR_PushButtonFocusRect, this );
tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() ); style().tqdrawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() );
} }
} }
TQSize KColorButton::sizeHint() const TQSize KColorButton::sizeHint() const
{ {
return tqstyle().tqsizeFromContents(TQStyle::CT_PushButton, this, TQSize(40, 15)). return style().tqsizeFromContents(TQStyle::CT_PushButton, this, TQSize(40, 15)).
expandedTo(TQApplication::globalStrut()); expandedTo(TQApplication::globalStrut());
} }
@ -155,11 +155,11 @@ void KColorButton::keyPressEvent( TQKeyEvent *e )
if ( KStdAccel::copy().contains( key ) ) { if ( KStdAccel::copy().contains( key ) ) {
TQMimeSource* mime = new KColorDrag( color() ); TQMimeSource* mime = new KColorDrag( color() );
TQApplication::tqclipboard()->setData( mime, TQClipboard::Clipboard ); TQApplication::clipboard()->setData( mime, TQClipboard::Clipboard );
} }
else if ( KStdAccel::paste().contains( key ) ) { else if ( KStdAccel::paste().contains( key ) ) {
TQColor color; TQColor color;
KColorDrag::decode( TQApplication::tqclipboard()->data( TQClipboard::Clipboard ), color ); KColorDrag::decode( TQApplication::clipboard()->data( TQClipboard::Clipboard ), color );
setColor( color ); setColor( color );
} }
else else

@ -361,7 +361,7 @@ TQRect KCompletionBox::calculateGeometry() const
comboCorner.y() - parentCorner.y(); comboCorner.y() - parentCorner.y();
//Ask the style to refine this a bit //Ask the style to refine this a bit
TQRect styleAdj = tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, TQRect styleAdj = style().querySubControlMetrics(TQStyle::CC_ComboBox,
cb, TQStyle::SC_ComboBoxListBoxPopup, cb, TQStyle::SC_ComboBoxListBoxPopup,
TQStyleOption(x, y, w, h)); TQStyleOption(x, y, w, h));
//TQCommonStyle returns TQRect() by default, so this is what we get if the //TQCommonStyle returns TQRect() by default, so this is what we get if the

@ -507,7 +507,7 @@ KDatePicker::setFontSize(int s)
maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height())); maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height()));
} }
TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, TQSize metricBound = style().tqsizeFromContents(TQStyle::CT_ToolButton,
selectMonth, selectMonth,
maxMonthRect); maxMonthRect);
selectMonth->setMinimumSize(metricBound); selectMonth->setMinimumSize(metricBound);

@ -405,7 +405,7 @@ KSMModalDialog::KSMModalDialog(TQWidget* parent)
TQFrame* frame = new TQFrame( this ); TQFrame* frame = new TQFrame( this );
frame->setFrameStyle( TQFrame::NoFrame ); frame->setFrameStyle( TQFrame::NoFrame );
frame->setLineWidth( tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) ); frame->setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) );
// we need to set the minimum size for the window // we need to set the minimum size for the window
frame->setMinimumWidth(400); frame->setMinimumWidth(400);
vbox->addWidget( frame ); vbox->addWidget( frame );

@ -203,7 +203,7 @@ void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* )
paint.begin( this ); paint.begin( this );
tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); style().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end(); paint.end();
} }
@ -228,7 +228,7 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
closeButton = new KDockButton_Private( this, "DockCloseButton" ); closeButton = new KDockButton_Private( this, "DockCloseButton" );
TQToolTip::add( closeButton, i18n("Close") ); TQToolTip::add( closeButton, i18n("Close") );
closeButton->setPixmap( tqstyle().stylePixmap (TQStyle::SP_TitleBarCloseButton , this)); closeButton->setPixmap( style().stylePixmap (TQStyle::SP_TitleBarCloseButton , this));
closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked())); connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked()));
connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock())); connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock()));
@ -574,7 +574,7 @@ void KDockWidget::paintEvent(TQPaintEvent* pe)
TQWidget::paintEvent(pe); TQWidget::paintEvent(pe);
TQPainter paint; TQPainter paint;
paint.begin( this ); paint.begin( this );
tqstyle().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup()); style().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end(); paint.end();
} }
@ -601,7 +601,7 @@ void KDockWidget::mousePressEvent(TQMouseEvent* mme)
int styleheight; int styleheight;
TQPoint mp; TQPoint mp;
mp=mme->pos(); mp=mme->pos();
styleheight=2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight; bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight; btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight; bleft=mp.x()<=styleheight;
@ -689,7 +689,7 @@ void KDockWidget::mouseMoveEvent(TQMouseEvent* mme)
int styleheight; int styleheight;
TQPoint mp; TQPoint mp;
mp=mme->pos(); mp=mme->pos();
styleheight=2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight; bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight; btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight; bleft=mp.x()<=styleheight;
@ -791,7 +791,7 @@ void KDockWidget::updateHeader()
header->setTopLevel( true ); header->setTopLevel( true );
header->show(); header->show();
#ifdef BORDERLESS_WINDOWS #ifdef BORDERLESS_WINDOWS
layout->setMargin(2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this)); layout->setMargin(2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this));
setMouseTracking(true); setMouseTracking(true);
#endif #endif
} }

@ -140,7 +140,7 @@ KEdit::insertText(TQTextStream *stream)
// TQString str = text(); // TQString str = text();
// for (int i = 0; i < (int) str.length(); i++) // for (int i = 0; i < (int) str.length(); i++)
// printf("KEdit: U+%04X\n", str[i].tqunicode()); // printf("KEdit: U+%04X\n", str[i].unicode());
} }
@ -471,7 +471,7 @@ void KEdit::keyPressEvent ( TQKeyEvent *e)
else if ( isReadOnly() ) else if ( isReadOnly() )
TQMultiLineEdit::keyPressEvent( e ); TQMultiLineEdit::keyPressEvent( e );
// If this is an unmodified printable key, send it directly to TQMultiLineEdit. // If this is an unmodified printable key, send it directly to TQMultiLineEdit.
else if ( !(key.keyCodeQt() & (CTRL | ALT)) && !e->text().isEmpty() && TQString(e->text()).tqunicode()->isPrint() ) else if ( !(key.keyCodeQt() & (CTRL | ALT)) && !e->text().isEmpty() && TQString(e->text()).unicode()->isPrint() )
TQMultiLineEdit::keyPressEvent( e ); TQMultiLineEdit::keyPressEvent( e );
else if ( KStdAccel::paste().contains( key ) ) { else if ( KStdAccel::paste().contains( key ) ) {
paste(); paste();

@ -464,7 +464,7 @@ void KFontChooser::toggled_checkbox()
void KFontChooser::family_chosen_slot(const TQString& family) void KFontChooser::family_chosen_slot(const TQString& family)
{ {
TQFontDatabase dbase; TQFontDatabase dbase;
TQStringList styles = TQStringList(dbase.tqstyles(family)); TQStringList styles = TQStringList(dbase.styles(family));
styleListBox->clear(); styleListBox->clear();
currentStyles.clear(); currentStyles.clear();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {

@ -135,7 +135,7 @@ TQString KGuiItem::plainText() const
int resultLength = 0; int resultLength = 0;
stripped.setLength(len); stripped.setLength(len);
const TQChar* data = d->m_text.tqunicode(); const TQChar* data = d->m_text.unicode();
for ( int pos = 0; pos < len; ++pos ) for ( int pos = 0; pos < len; ++pos )
{ {
if ( data[ pos ] != '&' ) if ( data[ pos ] != '&' )

@ -769,7 +769,7 @@ TQSize KJanusWidget::minimumSizeHint() const
if( mFace == TreeList ) if( mFace == TreeList )
{ {
s1.rwidth() += tqstyle().pixelMetric( TQStyle::PM_SplitterWidth ); s1.rwidth() += style().pixelMetric( TQStyle::PM_SplitterWidth );
s2 = mTreeList->minimumSize(); s2 = mTreeList->minimumSize();
} }
else else

@ -420,9 +420,9 @@ bool KLineEdit::copySqueezedText(bool clipboard) const
return false; return false;
TQString t = d->squeezedText; TQString t = d->squeezedText;
t = t.mid(start, end - start); t = t.mid(start, end - start);
disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0); disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
TQApplication::tqclipboard()->setText( t, clipboard ? TQClipboard::Clipboard : TQClipboard::Selection ); TQApplication::clipboard()->setText( t, clipboard ? TQClipboard::Clipboard : TQClipboard::Selection );
connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this,
TQT_SLOT(clipboardChanged()) ); TQT_SLOT(clipboardChanged()) );
return true; return true;
} }
@ -453,7 +453,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e )
} }
else if ( KStdAccel::pasteSelection().contains( key ) ) else if ( KStdAccel::pasteSelection().contains( key ) )
{ {
TQString text = TQApplication::tqclipboard()->text( TQClipboard::Selection); TQString text = TQApplication::clipboard()->text( TQClipboard::Selection);
insert( text ); insert( text );
deselect(); deselect();
return; return;
@ -575,7 +575,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e )
mode == KGlobalSettings::CompletionMan) && noModifier ) mode == KGlobalSettings::CompletionMan) && noModifier )
{ {
TQString keycode = e->text(); TQString keycode = e->text();
if ( !keycode.isEmpty() && (keycode.tqunicode()->isPrint() || if ( !keycode.isEmpty() && (keycode.unicode()->isPrint() ||
e->key() == Key_Backspace || e->key() == Key_Delete ) ) e->key() == Key_Backspace || e->key() == Key_Delete ) )
{ {
bool hasUserSelection=d->userSelection; bool hasUserSelection=d->userSelection;
@ -658,7 +658,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e )
// as if there was no selection. After processing the key event, we // as if there was no selection. After processing the key event, we
// can set the new autocompletion again. // can set the new autocompletion again.
if (hadSelection && !hasUserSelection && start>cPos && if (hadSelection && !hasUserSelection && start>cPos &&
( (!keycode.isEmpty() && keycode.tqunicode()->isPrint()) || ( (!keycode.isEmpty() && keycode.unicode()->isPrint()) ||
e->key() == Key_Backspace || e->key() == Key_Delete ) ) e->key() == Key_Backspace || e->key() == Key_Delete ) )
{ {
del(); del();
@ -679,7 +679,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e )
int len = txt.length(); int len = txt.length();
if ( txt != old_txt && len/* && ( cursorPosition() == len || force )*/ && if ( txt != old_txt && len/* && ( cursorPosition() == len || force )*/ &&
( (!keycode.isEmpty() && keycode.tqunicode()->isPrint()) || ( (!keycode.isEmpty() && keycode.unicode()->isPrint()) ||
e->key() == Key_Backspace || e->key() == Key_Delete) ) e->key() == Key_Backspace || e->key() == Key_Delete) )
{ {
if ( e->key() == Key_Backspace ) if ( e->key() == Key_Backspace )
@ -840,7 +840,7 @@ void KLineEdit::mousePressEvent( TQMouseEvent* e )
void KLineEdit::mouseReleaseEvent( TQMouseEvent* e ) void KLineEdit::mouseReleaseEvent( TQMouseEvent* e )
{ {
TQLineEdit::mouseReleaseEvent( e ); TQLineEdit::mouseReleaseEvent( e );
if (TQApplication::tqclipboard()->supportsSelection() ) { if (TQApplication::clipboard()->supportsSelection() ) {
if ( e->button() == Qt::LeftButton ) { if ( e->button() == Qt::LeftButton ) {
// Fix copying of squeezed text if needed // Fix copying of squeezed text if needed
copySqueezedText( false ); copySqueezedText( false );

@ -1358,7 +1358,7 @@ TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item)
r = itemRect(item); r = itemRect(item);
r.setLeft(r.left()+(item->depth()+(rootIsDecorated() ? 1 : 0))*treeStepSize()); r.setLeft(r.left()+(item->depth()+(rootIsDecorated() ? 1 : 0))*treeStepSize());
if (painter) if (painter)
tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(), style().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(),
TQStyle::Style_FocusAtBorder, colorGroup().highlight()); TQStyle::Style_FocusAtBorder, colorGroup().highlight());
} }
@ -1940,7 +1940,7 @@ void KListView::viewportPaintEvent(TQPaintEvent *e)
TQPainter painter(viewport()); TQPainter painter(viewport());
// This is where we actually draw the drop-highlighter // This is where we actually draw the drop-highlighter
tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(), style().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(),
TQStyle::Style_FocusAtBorder); TQStyle::Style_FocusAtBorder);
} }
d->painting = false; d->painting = false;

@ -1197,7 +1197,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size)
break; break;
case KToolBar::Flat: case KToolBar::Flat:
size += TQSize(0, 3+kapp->tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); size += TQSize(0, 3+kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
break; break;
default: default:
@ -1207,7 +1207,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size)
KMenuBar *mb = internalMenuBar(); KMenuBar *mb = internalMenuBar();
if (mb && !mb->isHidden()) { if (mb && !mb->isHidden()) {
size += TQSize(0,mb->heightForWidth(size.width())); size += TQSize(0,mb->heightForWidth(size.width()));
if (tqstyle().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this)) if (style().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this))
size += TQSize( 0, dockWindowsMovable() ? 1 : 2); size += TQSize( 0, dockWindowsMovable() ? 1 : 2);
} }
TQStatusBar *sb = internalStatusBar(); TQStatusBar *sb = internalStatusBar();

@ -135,7 +135,7 @@ int KMainWindowInterface::getWinID()
} }
void KMainWindowInterface::grabWindowToClipBoard() void KMainWindowInterface::grabWindowToClipBoard()
{ {
TQClipboard *clipboard = TQApplication::tqclipboard(); TQClipboard *clipboard = TQApplication::clipboard();
clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow)); clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow));
} }
void KMainWindowInterface::hide() void KMainWindowInterface::hide()

@ -528,10 +528,10 @@ void KMenuBar::drawContents( TQPainter* p )
e = mi->isEnabledAndVisible(); e = mi->isEnabledAndVisible();
if ( e ) if ( e )
g = isEnabled() ? ( isActiveWindow() ? tqpalette().active() : g = isEnabled() ? ( isActiveWindow() ? palette().active() :
tqpalette().inactive() ) : tqpalette().disabled(); palette().inactive() ) : palette().disabled();
else else
g = tqpalette().disabled(); g = palette().disabled();
bool item_active = ( actItem == i ); bool item_active = ( actItem == i );
@ -548,12 +548,12 @@ void KMenuBar::drawContents( TQPainter* p )
flags |= TQStyle::Style_Down; flags |= TQStyle::Style_Down;
flags |= TQStyle::Style_HasFocus; flags |= TQStyle::Style_HasFocus;
tqstyle().drawControl(TQStyle::CE_MenuBarItem, p, this, style().drawControl(TQStyle::CE_MenuBarItem, p, this,
r, g, flags, TQStyleOption(mi)); r, g, flags, TQStyleOption(mi));
} }
else else
{ {
tqstyle().drawItem(p, r, AlignCenter | AlignVCenter | ShowPrefix, style().drawItem(p, r, AlignCenter | AlignVCenter | ShowPrefix,
g, e, mi->pixmap(), mi->text()); g, e, mi->pixmap(), mi->text());
} }
} }

@ -90,14 +90,14 @@ void KPopupTitle::paintEvent(TQPaintEvent *)
{ {
TQRect r(rect()); TQRect r(rect());
TQPainter p(this); TQPainter p(this);
kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSectionMenu, &p, r, tqpalette().active()); kapp->style().tqdrawPrimitive(TQStyle::PE_HeaderSectionMenu, &p, r, palette().active());
if (!miniicon.isNull()) if (!miniicon.isNull())
p.drawPixmap(4, (r.height()-miniicon.height())/2, miniicon); p.drawPixmap(4, (r.height()-miniicon.height())/2, miniicon);
if (!titleStr.isNull()) if (!titleStr.isNull())
{ {
p.setPen(tqpalette().active().text()); p.setPen(palette().active().text());
TQFont f = p.font(); TQFont f = p.font();
f.setBold(true); f.setBold(true);
p.setFont(f); p.setFont(f);

@ -53,7 +53,7 @@ KXYSelector::~KXYSelector()
void KXYSelector::setRange( int _minX, int _minY, int _maxX, int _maxY ) void KXYSelector::setRange( int _minX, int _minY, int _maxX, int _maxY )
{ {
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
px = w; px = w;
py = w; py = w;
minX = _minX; minX = _minX;
@ -74,7 +74,7 @@ void KXYSelector::setYValue( int _yPos )
void KXYSelector::setValues( int _xPos, int _yPos ) void KXYSelector::setValues( int _xPos, int _yPos )
{ {
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5; if (w < 5) w = 5;
xPos = _xPos; xPos = _xPos;
@ -98,7 +98,7 @@ void KXYSelector::setValues( int _xPos, int _yPos )
TQRect KXYSelector::contentsRect() const TQRect KXYSelector::contentsRect() const
{ {
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) { if (w < 5) {
w = 5; w = 5;
} }
@ -113,7 +113,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev )
TQRect paintRect = ev->rect(); TQRect paintRect = ev->rect();
TQRect borderRect = rect(); TQRect borderRect = rect();
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) { if (w < 5) {
w = 5 - w; w = 5 - w;
} }
@ -122,7 +122,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev )
TQPainter painter; TQPainter painter;
painter.begin( this ); painter.begin( this );
tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, style().tqdrawPrimitive(TQStyle::PE_Panel, &painter,
borderRect, colorGroup(), borderRect, colorGroup(),
TQStyle::Style_Sunken); TQStyle::Style_Sunken);
@ -150,7 +150,7 @@ void KXYSelector::mouseMoveEvent( TQMouseEvent *e )
{ {
int xVal, yVal; int xVal, yVal;
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
valuesFromPosition( e->pos().x() - w, e->pos().y() - w, xVal, yVal ); valuesFromPosition( e->pos().x() - w, e->pos().y() - w, xVal, yVal );
setValues( xVal, yVal ); setValues( xVal, yVal );
@ -170,7 +170,7 @@ void KXYSelector::wheelEvent( TQWheelEvent *e )
void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
{ {
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5; if (w < 5) w = 5;
xVal = ( (maxX-minX) * (x-w) ) / ( width()-2*w ); xVal = ( (maxX-minX) * (x-w) ) / ( width()-2*w );
yVal = maxY - ( ( (maxY-minY) * (y-w) ) / ( height()-2*w ) ); yVal = maxY - ( ( (maxY-minY) * (y-w) ) / ( height()-2*w ) );
@ -188,7 +188,7 @@ void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
void KXYSelector::setPosition( int xp, int yp ) void KXYSelector::setPosition( int xp, int yp )
{ {
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5; if (w < 5) w = 5;
if ( xp < w ) if ( xp < w )
xp = w; xp = w;
@ -256,7 +256,7 @@ KSelector::~KSelector()
TQRect KSelector::contentsRect() const TQRect KSelector::contentsRect() const
{ {
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w; int iw = (w < 5) ? 5 : w;
if ( orientation() == Qt::Vertical ) if ( orientation() == Qt::Vertical )
return TQRect( w, iw, width() - w * 2 - 5, height() - 2 * iw ); return TQRect( w, iw, width() - w * 2 - 5, height() - 2 * iw );
@ -267,7 +267,7 @@ TQRect KSelector::contentsRect() const
void KSelector::paintEvent( TQPaintEvent * ) void KSelector::paintEvent( TQPaintEvent * )
{ {
TQPainter painter; TQPainter painter;
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w; int iw = (w < 5) ? 5 : w;
painter.begin( this ); painter.begin( this );
@ -281,7 +281,7 @@ void KSelector::paintEvent( TQPaintEvent * )
r.addCoords(0, iw - w, -iw, w - iw); r.addCoords(0, iw - w, -iw, w - iw);
else else
r.addCoords(iw - w, 0, w - iw, -iw); r.addCoords(iw - w, 0, w - iw, -iw);
tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, style().tqdrawPrimitive(TQStyle::PE_Panel, &painter,
r, colorGroup(), r, colorGroup(),
TQStyle::Style_Sunken); TQStyle::Style_Sunken);
} }
@ -329,7 +329,7 @@ void KSelector::valueChange()
void KSelector::moveArrow( const TQPoint &pos ) void KSelector::moveArrow( const TQPoint &pos )
{ {
int val; int val;
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w; int iw = (w < 5) ? 5 : w;
if ( orientation() == Qt::Vertical ) if ( orientation() == Qt::Vertical )
@ -346,7 +346,7 @@ TQPoint KSelector::calcArrowPos( int val )
{ {
TQPoint p; TQPoint p;
int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w; int iw = (w < 5) ? 5 : w;
if ( orientation() == Qt::Vertical ) if ( orientation() == Qt::Vertical )
{ {

@ -95,7 +95,7 @@ void KSeparator::drawFrame(TQPainter *p)
} }
TQStyleOption opt( lineWidth(), midLineWidth() ); TQStyleOption opt( lineWidth(), midLineWidth() );
tqstyle().tqdrawPrimitive( TQStyle::PE_Separator, p, TQRect( p1, p2 ), g, style().tqdrawPrimitive( TQStyle::PE_Separator, p, TQRect( p1, p2 ), g,
TQStyle::Style_Sunken, opt ); TQStyle::Style_Sunken, opt );
} }

@ -172,8 +172,8 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e )
int xoff = 0, yoff = 0; int xoff = 0, yoff = 0;
// The additional offsets were found by try and error, TODO: find the rational behind them // The additional offsets were found by try and error, TODO: find the rational behind them
if ( t == tab( currentTab() ) ) { if ( t == tab( currentTab() ) ) {
xoff = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3; xoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
yoff = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4; yoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4;
} }
else { else {
xoff = 7; xoff = 7;
@ -341,8 +341,8 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br,
r.setLeft( r.left() + pixw + 4 ); r.setLeft( r.left() + pixw + 4 );
r.setRight( r.right() + 2 ); r.setRight( r.right() + 2 );
int inactiveXShift = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ); int inactiveXShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this );
int inactiveYShift = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ); int inactiveYShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this );
int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2; int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2;
@ -362,8 +362,8 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br,
if ( mTabColors.contains( t->identifier() ) ) if ( mTabColors.contains( t->identifier() ) )
cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] ); cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] );
tqstyle().drawControl( TQStyle::CE_TabBarLabel, p, this, r, style().drawControl( TQStyle::CE_TabBarLabel, p, this, r,
t->isEnabled() ? cg : tqpalette().disabled(), t->isEnabled() ? cg : palette().disabled(),
flags, TQStyleOption(t) ); flags, TQStyleOption(t) );
} }

@ -163,8 +163,8 @@ bool KTabWidget::tabCloseActivatePrevious() const
unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength ) unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
{ {
int hframe, overlap; int hframe, overlap;
hframe = tabBar()->tqstyle().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() ); hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() );
overlap = tabBar()->tqstyle().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() ); overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() );
TQFontMetrics fm = tabBar()->fontMetrics(); TQFontMetrics fm = tabBar()->fontMetrics();
int x = 0; int x = 0;
@ -177,7 +177,7 @@ unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
int iw = 0; int iw = 0;
if ( tab->iconSet() ) if ( tab->iconSet() )
iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
x += ( tabBar()->tqstyle().tqsizeFromContents( TQStyle::CT_TabBarTab, this, x += ( tabBar()->style().tqsizeFromContents( TQStyle::CT_TabBarTab, this,
TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ), TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ),
TQStyleOption( tab ) ) ).width(); TQStyleOption( tab ) ) ).width();
} }

@ -172,7 +172,7 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e )
} }
else if ( KStdAccel::pasteSelection().contains( key ) ) else if ( KStdAccel::pasteSelection().contains( key ) )
{ {
TQString text = TQApplication::tqclipboard()->text( TQClipboard::Selection); TQString text = TQApplication::clipboard()->text( TQClipboard::Selection);
if ( !text.isEmpty() ) if ( !text.isEmpty() )
insert( text ); insert( text );
e->accept(); e->accept();

@ -169,7 +169,7 @@ void KToolBarSeparator::drawContents( TQPainter* p )
if ( orientation() == Qt::Horizontal ) if ( orientation() == Qt::Horizontal )
flags = flags | TQStyle::Style_Horizontal; flags = flags | TQStyle::Style_Horizontal;
tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, p, style().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, p,
contentsRect(), colorGroup(), flags); contentsRect(), colorGroup(), flags);
} else { } else {
TQFrame::drawContents(p); TQFrame::drawContents(p);
@ -183,7 +183,7 @@ void KToolBarSeparator::styleChange( TQStyle& )
TQSize KToolBarSeparator::sizeHint() const TQSize KToolBarSeparator::sizeHint() const
{ {
int dim = tqstyle().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); int dim = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this );
return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 );
} }
@ -1371,7 +1371,7 @@ TQSize KToolBar::sizeHint() const
minSize += TQSize(2, 0); // A little bit extra spacing behind it. minSize += TQSize(2, 0); // A little bit extra spacing behind it.
} }
minSize += TQSize(TQApplication::tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0); minSize += TQSize(TQApplication::style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0);
minSize += TQSize(margin*2, margin*2); minSize += TQSize(margin*2, margin*2);
break; break;
@ -1390,7 +1390,7 @@ TQSize KToolBar::sizeHint() const
minSize = minSize.expandedTo(TQSize(sh.width(), 0)); minSize = minSize.expandedTo(TQSize(sh.width(), 0));
minSize += TQSize(0, sh.height()+1); minSize += TQSize(0, sh.height()+1);
} }
minSize += TQSize(0, TQApplication::tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); minSize += TQSize(0, TQApplication::style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
minSize += TQSize(margin*2, margin*2); minSize += TQSize(margin*2, margin*2);
break; break;

@ -246,7 +246,7 @@ void KToolBarButton::modeChange()
break; break;
} }
mysize = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, this, mysize). mysize = style().tqsizeFromContents(TQStyle::CT_ToolButton, this, mysize).
expandedTo(TQApplication::globalStrut()); expandedTo(TQApplication::globalStrut());
// make sure that this isn't taller then it is wide // make sure that this isn't taller then it is wide
@ -494,7 +494,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
if (hasFocus()) flags |= TQStyle::Style_HasFocus; if (hasFocus()) flags |= TQStyle::Style_HasFocus;
// Draw a styled toolbutton // Draw a styled toolbutton
tqstyle().drawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(), style().drawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(),
colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption()); colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption());
int dx, dy; int dx, dy;
@ -513,7 +513,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
{ {
dx = ( width() - pixmap.width() ) / 2; dx = ( width() - pixmap.width() ) / 2;
dy = ( height() - pixmap.height() ) / 2; dy = ( height() - pixmap.height() ) / 2;
if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{ {
++dx; ++dx;
++dy; ++dy;
@ -531,7 +531,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
{ {
dx = 4; dx = 4;
dy = ( height() - pixmap.height() ) / 2; dy = ( height() - pixmap.height() ) / 2;
if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{ {
++dx; ++dx;
++dy; ++dy;
@ -547,7 +547,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
else else
dx = 4; dx = 4;
dy = 0; dy = 0;
if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{ {
++dx; ++dx;
++dy; ++dy;
@ -562,7 +562,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
textFlags = AlignVCenter|AlignLeft; textFlags = AlignVCenter|AlignLeft;
dx = (width() - fm.width(textLabel())) / 2; dx = (width() - fm.width(textLabel())) / 2;
dy = (height() - fm.lineSpacing()) / 2; dy = (height() - fm.lineSpacing()) / 2;
if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{ {
++dx; ++dx;
++dy; ++dy;
@ -580,7 +580,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
{ {
dx = (width() - pixmap.width()) / 2; dx = (width() - pixmap.width()) / 2;
dy = (height() - fm.lineSpacing() - pixmap.height()) / 2; dy = (height() - fm.lineSpacing() - pixmap.height()) / 2;
if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{ {
++dx; ++dx;
++dy; ++dy;
@ -594,7 +594,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
dx = (width() - fm.width(textLabel())) / 2; dx = (width() - fm.width(textLabel())) / 2;
dy = height() - fm.lineSpacing() - 4; dy = height() - fm.lineSpacing() - 4;
if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{ {
++dx; ++dx;
++dy; ++dy;
@ -608,7 +608,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
{ {
_painter->setFont(KGlobalSettings::toolBarFont()); _painter->setFont(KGlobalSettings::toolBarFont());
if (!isEnabled()) if (!isEnabled())
_painter->setPen(tqpalette().disabled().dark()); _painter->setPen(palette().disabled().dark());
else if(d->m_isRaised) else if(d->m_isRaised)
_painter->setPen(KGlobalSettings::toolBarHighlightColor()); _painter->setPen(KGlobalSettings::toolBarHighlightColor());
else else
@ -623,7 +623,7 @@ void KToolBarButton::drawButton( TQPainter *_painter )
if (isDown()) arrowFlags |= TQStyle::Style_Down; if (isDown()) arrowFlags |= TQStyle::Style_Down;
if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled;
tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, style().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter,
TQRect(width()-7, height()-7, 7, 7), colorGroup(), TQRect(width()-7, height()-7, 7, 7), colorGroup(),
arrowFlags, TQStyleOption() ); arrowFlags, TQStyleOption() );
} }

@ -356,7 +356,7 @@ bool KURLLabel::event (TQEvent *e)
// use parentWidget() unless you are a toplevel widget, then try qAapp // use parentWidget() unless you are a toplevel widget, then try qAapp
TQPalette p = parentWidget() ? parentWidget()->palette() : tqApp->palette(); TQPalette p = parentWidget() ? parentWidget()->palette() : tqApp->palette();
p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background)); p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
p.setColor(TQColorGroup::Foreground, tqpalette().active().foreground()); p.setColor(TQColorGroup::Foreground, palette().active().foreground());
setPalette(p); setPalette(p);
d->LinkColor = KGlobalSettings::linkColor(); d->LinkColor = KGlobalSettings::linkColor();
setLinkColor(d->LinkColor); setLinkColor(d->LinkColor);
@ -367,7 +367,7 @@ bool KURLLabel::event (TQEvent *e)
if (result && hasFocus()) { if (result && hasFocus()) {
TQPainter p(this); TQPainter p(this);
TQRect r( activeRect() ); TQRect r( activeRect() );
tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() ); style().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() );
} }
return result; return result;
} }

@ -760,9 +760,9 @@ TQString KXMLGUIClient::findVersionNumber( const TQString &xml )
unsigned int endpos; unsigned int endpos;
for (endpos = pos; endpos < xml.length(); endpos++) for (endpos = pos; endpos < xml.length(); endpos++)
{ {
if (xml[endpos].tqunicode() >= '0' && xml[endpos].tqunicode() <= '9') if (xml[endpos].unicode() >= '0' && xml[endpos].unicode() <= '9')
continue; //Number.. continue; //Number..
if (xml[endpos].tqunicode() == '"') //End of parameter if (xml[endpos].unicode() == '"') //End of parameter
break; break;
else //This shouldn't be here.. else //This shouldn't be here..
{ {

Loading…
Cancel
Save