Rename obsolete tq methods to standard names

(cherry picked from commit d654b1079f)
v3.5.13-sru
Timothy Pearson 13 years ago committed by Slávek Banko
parent 917939bd57
commit 69423a5349

@ -557,7 +557,7 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic
m_lmppData.m_v.resize( m_normalData.m_vSize ); m_lmppData.m_v.resize( m_normalData.m_vSize );
for(int i=m_lmppData.m_vSize; i<m_normalData.m_vSize; ++i ) for(int i=m_lmppData.m_vSize; i<m_normalData.m_vSize; ++i )
{ // Set all empty lines to point to the end of the buffer. { // Set all empty lines to point to the end of the buffer.
m_lmppData.m_v[i].pLine = m_lmppData.m_tqunicodeBuf.tqunicode()+m_lmppData.m_tqunicodeBuf.length(); m_lmppData.m_v[i].pLine = m_lmppData.m_unicodeBuf.unicode()+m_lmppData.m_unicodeBuf.length();
} }
m_lmppData.m_vSize = m_normalData.m_vSize; m_lmppData.m_vSize = m_normalData.m_vSize;
@ -567,8 +567,8 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic
if ( m_pOptionDialog->m_bIgnoreCase ) if ( m_pOptionDialog->m_bIgnoreCase )
{ {
int i; int i;
TQChar* pBuf = const_cast<TQChar*>(m_lmppData.m_tqunicodeBuf.tqunicode()); TQChar* pBuf = const_cast<TQChar*>(m_lmppData.m_unicodeBuf.unicode());
int ucSize = m_lmppData.m_tqunicodeBuf.length(); int ucSize = m_lmppData.m_unicodeBuf.length();
for(i=0; i<ucSize; ++i) for(i=0; i<ucSize; ++i)
{ {
pBuf[i] = pBuf[i].upper(); pBuf[i] = pBuf[i].upper();
@ -604,7 +604,7 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic
/** Prepare the linedata vector for every input line.*/ /** Prepare the linedata vector for every input line.*/
void SourceData::FileData::preprocess( bool bPreserveCR, TQTextCodec* pEncoding ) void SourceData::FileData::preprocess( bool bPreserveCR, TQTextCodec* pEncoding )
{ {
//m_tqunicodeBuf = decodeString( m_pBuf, m_size, eEncoding ); //m_unicodeBuf = decodeString( m_pBuf, m_size, eEncoding );
long skipBytes = 0; long skipBytes = 0;
TQTextCodec* pCodec = ::detectEncoding( m_pBuf, m_size, skipBytes ); TQTextCodec* pCodec = ::detectEncoding( m_pBuf, m_size, skipBytes );
@ -616,11 +616,11 @@ void SourceData::FileData::preprocess( bool bPreserveCR, TQTextCodec* pEncoding
TQTextStream ts( ba, IO_ReadOnly ); TQTextStream ts( ba, IO_ReadOnly );
ts.setCodec( pEncoding); ts.setCodec( pEncoding);
//ts.setAutoDetectUnicode( false ); //ts.setAutoDetectUnicode( false );
m_tqunicodeBuf = ts.read(); m_unicodeBuf = ts.read();
ba.resetRawData( m_pBuf+skipBytes, m_size-skipBytes ); ba.resetRawData( m_pBuf+skipBytes, m_size-skipBytes );
int ucSize = m_tqunicodeBuf.length(); int ucSize = m_unicodeBuf.length();
const TQChar* p = m_tqunicodeBuf.tqunicode(); const TQChar* p = m_unicodeBuf.unicode();
m_bIsText = true; m_bIsText = true;
int lines = 1; int lines = 1;
@ -770,9 +770,9 @@ static void checkLineForComments(
void SourceData::FileData::removeComments() void SourceData::FileData::removeComments()
{ {
int line=0; int line=0;
TQChar* p = const_cast<TQChar*>(m_tqunicodeBuf.tqunicode()); TQChar* p = const_cast<TQChar*>(m_unicodeBuf.unicode());
bool bWithinComment=false; bool bWithinComment=false;
int size = m_tqunicodeBuf.length(); int size = m_unicodeBuf.length();
for(int i=0; i<size; ++i ) for(int i=0; i<size; ++i )
{ {
// std::cout << "2 " << std::string(&p[i], m_v[line].size) << std::endl; // std::cout << "2 " << std::string(&p[i], m_v[line].size) << std::endl;

@ -293,7 +293,7 @@ private:
const char* m_pBuf; const char* m_pBuf;
int m_size; int m_size;
int m_vSize; // Nr of lines in m_pBuf1 and size of m_v1, m_dv12 and m_dv13 int m_vSize; // Nr of lines in m_pBuf1 and size of m_v1, m_dv12 and m_dv13
TQString m_tqunicodeBuf; TQString m_unicodeBuf;
std::vector<LineData> m_v; std::vector<LineData> m_v;
bool m_bIsText; bool m_bIsText;
bool readFile( const TQString& filename ); bool readFile( const TQString& filename );

@ -1088,7 +1088,7 @@ void CvsIgnoreList::addEntry(const TQString& pattern)
unsigned int nofMetaCharacters = 0; unsigned int nofMetaCharacters = 0;
const TQChar* pos; const TQChar* pos;
pos = pattern.tqunicode(); pos = pattern.unicode();
const TQChar* posEnd; const TQChar* posEnd;
posEnd=pos + pattern.length(); posEnd=pos + pattern.length();
while (pos < posEnd) while (pos < posEnd)
@ -1454,27 +1454,27 @@ ProgressDialog::ProgressDialog( TQWidget* pParent )
: TQDialog( pParent, 0, true ) : TQDialog( pParent, 0, true )
{ {
m_bStayHidden = false; m_bStayHidden = false;
TQVBoxLayout* tqlayout = new TQVBoxLayout(this); TQVBoxLayout* layout = new TQVBoxLayout(this);
m_pInformation = new TQLabel( " ", this ); m_pInformation = new TQLabel( " ", this );
tqlayout->addWidget( m_pInformation ); layout->addWidget( m_pInformation );
m_pProgressBar = new KProgress(1000, this); m_pProgressBar = new KProgress(1000, this);
tqlayout->addWidget( m_pProgressBar ); layout->addWidget( m_pProgressBar );
m_pSubInformation = new TQLabel( " ", this); m_pSubInformation = new TQLabel( " ", this);
tqlayout->addWidget( m_pSubInformation ); layout->addWidget( m_pSubInformation );
m_pSubProgressBar = new KProgress(1000, this); m_pSubProgressBar = new KProgress(1000, this);
tqlayout->addWidget( m_pSubProgressBar ); layout->addWidget( m_pSubProgressBar );
m_pSlowJobInfo = new TQLabel( " ", this); m_pSlowJobInfo = new TQLabel( " ", this);
tqlayout->addWidget( m_pSlowJobInfo ); layout->addWidget( m_pSlowJobInfo );
TQHBoxLayout* htqlayout = new TQHBoxLayout( tqlayout ); TQHBoxLayout* hlayout = new TQHBoxLayout( layout );
htqlayout->addStretch(1); hlayout->addStretch(1);
m_pAbortButton = new TQPushButton( i18n("&Cancel"), this); m_pAbortButton = new TQPushButton( i18n("&Cancel"), this);
htqlayout->addWidget( m_pAbortButton ); hlayout->addWidget( m_pAbortButton );
connect( m_pAbortButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAbort()) ); connect( m_pAbortButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAbort()) );
m_progressDelayTimer = 0; m_progressDelayTimer = 0;

@ -169,7 +169,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current)
while ( p<bufend && (c = *p) != '\n' ) while ( p<bufend && (c = *p) != '\n' )
{ {
if (! (isWhite(c) || bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) )) if (! (isWhite(c) || bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) ))
h = HASH (h, c.lower().tqunicode()); h = HASH (h, c.lower().unicode());
++p; ++p;
} }
break; break;
@ -177,7 +177,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current)
default: default:
while ( p<bufend && (c = *p) != '\n' ) while ( p<bufend && (c = *p) != '\n' )
{ {
h = HASH (h, c.lower().tqunicode()); h = HASH (h, c.lower().unicode());
++p; ++p;
} }
break; break;
@ -189,7 +189,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current)
while ( p<bufend && (c = *p) != '\n') while ( p<bufend && (c = *p) != '\n')
{ {
if (! (isWhite(c)|| bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) )) if (! (isWhite(c)|| bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) ))
h = HASH (h, c.tqunicode()); h = HASH (h, c.unicode());
++p; ++p;
} }
break; break;
@ -197,7 +197,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current)
default: default:
while ( p<bufend && (c = *p) != '\n') while ( p<bufend && (c = *p) != '\n')
{ {
h = HASH (h, c.tqunicode()); h = HASH (h, c.unicode());
++p; ++p;
} }
break; break;

@ -2613,10 +2613,10 @@ void MergeResultWindow::pasteClipboard( bool bFromSelection )
TQString str = melIt->getString( this ); TQString str = melIt->getString( this );
int x = convertToPosInText( str, m_cursorXPos, m_pOptionDialog->m_tabSize ); int x = convertToPosInText( str, m_cursorXPos, m_pOptionDialog->m_tabSize );
if ( !TQApplication::tqclipboard()->supportsSelection() ) if ( !TQApplication::clipboard()->supportsSelection() )
bFromSelection = false; bFromSelection = false;
TQString clipBoard = TQApplication::tqclipboard()->text( bFromSelection ? TQClipboard::Selection : TQClipboard::Clipboard ); TQString clipBoard = TQApplication::clipboard()->text( bFromSelection ? TQClipboard::Selection : TQClipboard::Clipboard );
TQString currentLine = str.left(x); TQString currentLine = str.left(x);
TQString endOfLine = str.mid(x); TQString endOfLine = str.mid(x);

@ -610,13 +610,13 @@ void KDiff3App::sourceMask( int srcMask, int enabledMask )
// Function uses setMinSize( sizeHint ) before adding the widget. // Function uses setMinSize( sizeHint ) before adding the widget.
// void addWidget(TQBoxLayout* tqlayout, TQWidget* widget); // void addWidget(TQBoxLayout* layout, TQWidget* widget);
template <class W, class L> template <class W, class L>
void addWidget( L* tqlayout, W* widget) void addWidget( L* layout, W* widget)
{ {
TQSize s = widget->sizeHint(); TQSize s = widget->sizeHint();
widget->setMinimumSize( TQSize(max2(s.width(),0),max2(s.height(),0) ) ); widget->setMinimumSize( TQSize(max2(s.width(),0),max2(s.height(),0) ) );
tqlayout->addWidget( widget ); layout->addWidget( widget );
} }
void KDiff3App::initView() void KDiff3App::initView()
@ -1174,7 +1174,7 @@ void KDiff3App::slotEditCut()
if ( !s.isNull() ) if ( !s.isNull() )
{ {
TQApplication::tqclipboard()->setText( s, TQClipboard::Clipboard ); TQApplication::clipboard()->setText( s, TQClipboard::Clipboard );
} }
slotStatusMsg(i18n("Ready.")); slotStatusMsg(i18n("Ready."));
@ -1190,7 +1190,7 @@ void KDiff3App::slotEditCopy()
if ( s.isNull() && m_pMergeResultWindow!=0 ) s = m_pMergeResultWindow->getSelection(); if ( s.isNull() && m_pMergeResultWindow!=0 ) s = m_pMergeResultWindow->getSelection();
if ( !s.isNull() ) if ( !s.isNull() )
{ {
TQApplication::tqclipboard()->setText( s, TQClipboard::Clipboard ); TQApplication::clipboard()->setText( s, TQClipboard::Clipboard );
} }
slotStatusMsg(i18n("Ready.")); slotStatusMsg(i18n("Ready."));
@ -1208,17 +1208,17 @@ void KDiff3App::slotEditPaste()
{ {
if ( m_pDiffTextWindow1->hasFocus() ) if ( m_pDiffTextWindow1->hasFocus() )
{ {
m_sd1.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) ); m_sd1.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) );
init(); init();
} }
else if ( m_pDiffTextWindow2->hasFocus() ) else if ( m_pDiffTextWindow2->hasFocus() )
{ {
m_sd2.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) ); m_sd2.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) );
init(); init();
} }
else if ( m_pDiffTextWindow3->hasFocus() ) else if ( m_pDiffTextWindow3->hasFocus() )
{ {
m_sd3.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) ); m_sd3.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) );
init(); init();
} }
} }
@ -1465,7 +1465,7 @@ void KDiff3App::slotSelectionEnd()
} }
else else
{ {
TQClipboard *clipBoard = TQApplication::tqclipboard(); TQClipboard *clipBoard = TQApplication::clipboard();
if (clipBoard->supportsSelection ()) if (clipBoard->supportsSelection ())
{ {
@ -1484,7 +1484,7 @@ void KDiff3App::slotSelectionEnd()
void KDiff3App::slotClipboardChanged() void KDiff3App::slotClipboardChanged()
{ {
TQString s = TQApplication::tqclipboard()->text(); TQString s = TQApplication::clipboard()->text();
//editPaste->setEnabled(!s.isEmpty()); //editPaste->setEnabled(!s.isEmpty());
} }

@ -339,47 +339,47 @@ void OpenDialog::slotSwapCopyNames( int id ) // id selected in the popup menu
FindDialog::FindDialog(TQWidget* pParent) FindDialog::FindDialog(TQWidget* pParent)
: TQDialog( pParent ) : TQDialog( pParent )
{ {
TQGridLayout* tqlayout = new TQGridLayout( this ); TQGridLayout* layout = new TQGridLayout( this );
tqlayout->setMargin(5); layout->setMargin(5);
tqlayout->setSpacing(5); layout->setSpacing(5);
int line=0; int line=0;
tqlayout->addMultiCellWidget( new TQLabel(i18n("Search text:"),this), line,line,0,1 ); layout->addMultiCellWidget( new TQLabel(i18n("Search text:"),this), line,line,0,1 );
++line; ++line;
m_pSearchString = new TQLineEdit( this ); m_pSearchString = new TQLineEdit( this );
tqlayout->addMultiCellWidget( m_pSearchString, line,line,0,1 ); layout->addMultiCellWidget( m_pSearchString, line,line,0,1 );
++line; ++line;
m_pCaseSensitive = new TQCheckBox(i18n("Case sensitive"),this); m_pCaseSensitive = new TQCheckBox(i18n("Case sensitive"),this);
tqlayout->addWidget( m_pCaseSensitive, line, 1 ); layout->addWidget( m_pCaseSensitive, line, 1 );
m_pSearchInA = new TQCheckBox(i18n("Search A"),this); m_pSearchInA = new TQCheckBox(i18n("Search A"),this);
tqlayout->addWidget( m_pSearchInA, line, 0 ); layout->addWidget( m_pSearchInA, line, 0 );
m_pSearchInA->setChecked( true ); m_pSearchInA->setChecked( true );
++line; ++line;
m_pSearchInB = new TQCheckBox(i18n("Search B"),this); m_pSearchInB = new TQCheckBox(i18n("Search B"),this);
tqlayout->addWidget( m_pSearchInB, line, 0 ); layout->addWidget( m_pSearchInB, line, 0 );
m_pSearchInB->setChecked( true ); m_pSearchInB->setChecked( true );
++line; ++line;
m_pSearchInC = new TQCheckBox(i18n("Search C"),this); m_pSearchInC = new TQCheckBox(i18n("Search C"),this);
tqlayout->addWidget( m_pSearchInC, line, 0 ); layout->addWidget( m_pSearchInC, line, 0 );
m_pSearchInC->setChecked( true ); m_pSearchInC->setChecked( true );
++line; ++line;
m_pSearchInOutput = new TQCheckBox(i18n("Search output"),this); m_pSearchInOutput = new TQCheckBox(i18n("Search output"),this);
tqlayout->addWidget( m_pSearchInOutput, line, 0 ); layout->addWidget( m_pSearchInOutput, line, 0 );
m_pSearchInOutput->setChecked( true ); m_pSearchInOutput->setChecked( true );
++line; ++line;
TQPushButton* pButton = new TQPushButton( i18n("&Search"), this ); TQPushButton* pButton = new TQPushButton( i18n("&Search"), this );
tqlayout->addWidget( pButton, line, 0 ); layout->addWidget( pButton, line, 0 );
connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
pButton = new TQPushButton( i18n("&Cancel"), this ); pButton = new TQPushButton( i18n("&Cancel"), this );
tqlayout->addWidget( pButton, line, 1 ); layout->addWidget( pButton, line, 1 );
connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
hide(); hide();

Loading…
Cancel
Save