diff options
918 files changed, 5008 insertions, 5008 deletions
diff --git a/KDE2PORTING.html b/KDE2PORTING.html index d8c3c0ab2..8c174889c 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -189,7 +189,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P> to klocale->translate with i18n.<P> 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> diff --git a/KDE3PORTING.html b/KDE3PORTING.html index e5849d74c..167d4aed6 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -647,13 +647,13 @@ For more details please consult the HOWTO file in the kcontrol directory. <p>The API for Kicker panel applets and extensions has changed. Panels can now be left/top, center, or right/bottom aligned, and applets and extensions may receive -notification about a change in tqalignment. +notification about a change in alignment. <H4>KPanelApplet</H4> <p>The virtual methods orientationChange() and popupDirectionChange() are deprecated. Instead you should reimplement positionChange() and alignmentChange() to be -notified of changes in the position and tqalignment of the panel on which your applet +notified of changes in the position and alignment of the panel on which your applet resides. In addition, the popupDirection() method and the Direction enum are deprecated. Instead you should use the position() method and Position enum. Applets that use the deprecated methods will still work with KDE 3, but may not compile or work with @@ -662,7 +662,7 @@ a future version. <H4>KPanelExtension</H4> <p>There is a new method alignmentChange() that your extension should reimplement if -it needs to know about changes in tqalignment. +it needs to know about changes in alignment. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> <p> diff --git a/arts/kde/kartsserver.cpp b/arts/kde/kartsserver.cpp index 50e8b3a2a..e030cb411 100644 --- a/arts/kde/kartsserver.cpp +++ b/arts/kde/kartsserver.cpp @@ -77,12 +77,12 @@ Arts::SoundServerV2 KArtsServer::server(void) X11CommConfig.sync(); - proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("tdeinit_wrapper"))).data(); + proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("tdeinit_wrapper"))).data(); if(rt) - proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("artswrapper"))).data(); + proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artswrapper"))).data(); else - proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("artsd"))).data(); + proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artsd"))).data(); proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) ); diff --git a/arts/kde/kioinputstream_impl.cpp b/arts/kde/kioinputstream_impl.cpp index 15994625e..8c131bfd1 100644 --- a/arts/kde/kioinputstream_impl.cpp +++ b/arts/kde/kioinputstream_impl.cpp @@ -78,7 +78,7 @@ void KIOInputStream_impl::streamStart() m_job = KIO::get(m_url, false, false); m_job->addMetaData("accept", "audio/x-mp3, video/mpeg, application/ogg"); - m_job->addMetaData("UserAgent", TQString::tqfromLatin1("aRts/") + TQString::tqfromLatin1(ARTS_VERSION)); + m_job->addMetaData("UserAgent", TQString::fromLatin1("aRts/") + TQString::fromLatin1(ARTS_VERSION)); TQObject::connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); diff --git a/arts/kde/kplayobject.cc b/arts/kde/kplayobject.cc index 7c71be31f..becb20a58 100644 --- a/arts/kde/kplayobject.cc +++ b/arts/kde/kplayobject.cc @@ -65,7 +65,7 @@ void KPlayObject::halt() TQString KPlayObject::description() { - return TQString::tqfromLatin1(object().description().c_str()); + return TQString::fromLatin1(object().description().c_str()); } Arts::poTime KPlayObject::currentTime() @@ -85,7 +85,7 @@ Arts::poCapabilities KPlayObject::capabilities() TQString KPlayObject::mediaName() { - return TQString::tqfromLatin1(object().mediaName().c_str()); + return TQString::fromLatin1(object().mediaName().c_str()); } Arts::poState KPlayObject::state() @@ -243,7 +243,7 @@ TQString KDE::PlayObject::description() { if ( object().isNull() ) return TQString(); - return TQString::tqfromLatin1(object().description().c_str()); + return TQString::fromLatin1(object().description().c_str()); } Arts::poTime KDE::PlayObject::currentTime() @@ -271,7 +271,7 @@ TQString KDE::PlayObject::mediaName() { if ( object().isNull() ) return TQString(); - return TQString::tqfromLatin1(object().mediaName().c_str()); + return TQString::fromLatin1(object().mediaName().c_str()); } Arts::poState KDE::PlayObject::state() diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp index 8ea6d4cf4..7199a55a6 100644 --- a/arts/kde/kvideowidget.cpp +++ b/arts/kde/kvideowidget.cpp @@ -147,7 +147,7 @@ void KVideoWidget::embed( Arts::VideoPlayObject vpo ) } setBackgroundMode( PaletteBackground ); - tqrepaint(); + repaint(); // Resize GUI videoWidth = 0; diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index b8d5b8d26..047b3bf63 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -40,7 +40,7 @@ #include <tqfile.h> #include <tqfileinfo.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> // KDE headers #include <dcopclient.h> @@ -642,7 +642,7 @@ bool KNotify::notifyByLogfile(const TQString &text, const TQString &file) // append msg TQTextStream strm( &logFile ); - strm << "- KNotify " << TQDateTime::tqcurrentDateTime().toString() << ": "; + strm << "- KNotify " << TQDateTime::currentDateTime().toString() << ": "; strm << text << endl; // close file @@ -660,7 +660,7 @@ bool KNotify::notifyByStderr(const TQString &text) TQTextStream strm( stderr, IO_WriteOnly ); // output msg - strm << "KNotify " << TQDateTime::tqcurrentDateTime().toString() << ": "; + strm << "KNotify " << TQDateTime::currentDateTime().toString() << ": "; strm << text << endl; return true; diff --git a/dcop/KDE-ICE/ICEmsg.h b/dcop/KDE-ICE/ICEmsg.h index 666d776b6..cf4d98975 100644 --- a/dcop/KDE-ICE/ICEmsg.h +++ b/dcop/KDE-ICE/ICEmsg.h @@ -221,7 +221,7 @@ extern void _IceErrorBadValue ( /* - * Write pad bytes. Used to force 32 or 64 bit tqalignment. + * Write pad bytes. Used to force 32 or 64 bit alignment. * A maxium of 7 pad bytes can be specified. */ @@ -306,7 +306,7 @@ extern void _IceErrorBadValue ( /* - * Read pad bytes (for 32 or 64 bit tqalignment). + * Read pad bytes (for 32 or 64 bit alignment). * A maxium of 7 pad bytes can be specified. */ diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp index 0eafb5055..46a6e64bf 100644 --- a/dcop/client/dcop.cpp +++ b/dcop/client/dcop.cpp @@ -38,7 +38,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqimage.h> #include <tqmap.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvariant.h> #include "../dcopclient.h" @@ -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 ) { - 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 right = f.find( ')' ); @@ -262,7 +262,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt } if ( s == static_cast<int>(partl.count())-1) { - partl.remove(partl.tqat(s)); + partl.remove(partl.at(s)); } lt = partl.join(" "); diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp index bde116f65..cd3e4d517 100644 --- a/dcop/client/dcopfind.cpp +++ b/dcop/client/dcopfind.cpp @@ -40,7 +40,7 @@ static bool bLaunchApp = 0; 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 right = f.find( ')' ); @@ -98,7 +98,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis } if (s==(int)partl.count()-1) { - partl.remove(partl.tqat(s)); + partl.remove(partl.at(s)); } lt = partl.join(" "); diff --git a/dcop/client/dcopstart.cpp b/dcop/client/dcopstart.cpp index f46531735..5741ef775 100644 --- a/dcop/client/dcopstart.cpp +++ b/dcop/client/dcopstart.cpp @@ -33,7 +33,7 @@ static DCOPClient* dcop = 0; void startApp(const char *_app, int argc, const char **args) { const char *function = 0; - TQString app = TQString::tqfromLatin1(_app); + TQString app = TQString::fromLatin1(_app); if (app.endsWith(".desktop")) function = "start_service_by_desktop_path(TQString,TQStringList)"; else diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp index ae1b85f9f..1cb439b5e 100644 --- a/dcop/dcopclient.cpp +++ b/dcop/dcopclient.cpp @@ -54,7 +54,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define QT_CLEAN_NAMESPACE #endif #include <tqguardedptr.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqfile.h> #include <tqdir.h> #include <tqapplication.h> @@ -764,7 +764,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) DCOPAuthCount, const_cast<char **>(DCOPAuthNames), DCOPClientAuthProcs, 0L)) < 0) { - emit attachFailed(TQString::tqfromLatin1( "Communications could not be established." )); + emit attachFailed(TQString::fromLatin1( "Communications could not be established." )); return false; } @@ -779,7 +779,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) TQCString fName = dcopServerFile(); TQFile f(TQFile::decodeName(fName)); if (!f.open(IO_ReadOnly)) { - emit attachFailed(TQString::tqfromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName)); + emit attachFailed(TQString::fromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName)); return false; } int size = TQMIN( (qint64)1024, f.size() ); // protection against a huge file @@ -819,7 +819,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) delete [] d->serverAddr; d->serverAddr = 0; } - emit attachFailed(TQString::tqfromLatin1( errBuf )); + emit attachFailed(TQString::fromLatin1( errBuf )); return false; } fcntl(socket(), F_SETFL, FD_CLOEXEC); @@ -845,7 +845,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) delete [] d->serverAddr; d->serverAddr = 0; } - emit attachFailed(TQString::tqfromLatin1( errBuf )); + emit attachFailed(TQString::fromLatin1( errBuf )); return false; } else if (setupstat == IceProtocolAlreadyActive) { if (bClearServerAddr) { @@ -853,7 +853,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) d->serverAddr = 0; } /* should not happen because 3rd arg to IceOpenConnection was 0. */ - emit attachFailed(TQString::tqfromLatin1( "internal error in IceOpenConnection" )); + emit attachFailed(TQString::fromLatin1( "internal error in IceOpenConnection" )); return false; } @@ -863,7 +863,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) delete [] d->serverAddr; d->serverAddr = 0; } - emit attachFailed(TQString::tqfromLatin1( "DCOP server did not accept the connection." )); + emit attachFailed(TQString::fromLatin1( "DCOP server did not accept the connection." )); return false; } @@ -1470,10 +1470,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const l << "QCStringList properties()"; l << "bool setProperty(TQCString,TQVariant)"; l << "TQVariant property(TQCString)"; - TQStrList lst = o->tqmetaObject()->slotNames( true ); + TQStrList lst = o->metaObject()->slotNames( true ); int i = 0; for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { - if ( o->tqmetaObject()->slot( i++, true )->tqt_mo_access != TQMetaData::Public ) + if ( o->metaObject()->slot( i++, true )->tqt_mo_access != TQMetaData::Public ) continue; TQCString slot = it.current(); if ( slot.contains( "()" ) ) { @@ -1487,10 +1487,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const replyType = "QCStringList"; TQDataStream reply( replyData, IO_WriteOnly ); QCStringList l; - TQMetaObject *meta = o->tqmetaObject(); + TQMetaObject *meta = o->metaObject(); while ( meta ) { l.prepend( meta->className() ); - meta = meta->tqsuperClass(); + meta = meta->superClass(); } reply << l; return true; @@ -1498,9 +1498,9 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const replyType = "QCStringList"; TQDataStream reply( replyData, IO_WriteOnly ); QCStringList l; - TQStrList lst = o->tqmetaObject()->propertyNames( true ); + TQStrList lst = o->metaObject()->propertyNames( true ); for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { - TQMetaObject *mo = o->tqmetaObject(); + TQMetaObject *mo = o->metaObject(); const TQMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true ); if ( !p ) continue; @@ -1532,7 +1532,7 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const reply << (TQ_INT8) o->setProperty( name, value ); return true; } else { - int slot = o->tqmetaObject()->findSlot( fun, true ); + int slot = o->metaObject()->findSlot( fun, true ); if ( slot != -1 ) { replyType = "void"; TQUObject uo[ 1 ]; diff --git a/dcop/dcopidl2cpp/main.cpp b/dcop/dcopidl2cpp/main.cpp index 5e0f27525..b4df274a9 100644 --- a/dcop/dcopidl2cpp/main.cpp +++ b/dcop/dcopidl2cpp/main.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ #include <tqdom.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstring.h> #include <string.h> diff --git a/dcop/dcopidl2cpp/skel.cpp b/dcop/dcopidl2cpp/skel.cpp index 5cc30de3e..b8612eac4 100644 --- a/dcop/dcopidl2cpp/skel.cpp +++ b/dcop/dcopidl2cpp/skel.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ #include <tqdom.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstring.h> #include <tqstringlist.h> diff --git a/dcop/dcopidl2cpp/stub.cpp b/dcop/dcopidl2cpp/stub.cpp index 887945262..445c468e0 100644 --- a/dcop/dcopidl2cpp/stub.cpp +++ b/dcop/dcopidl2cpp/stub.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ #include <tqdom.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstring.h> #include <tqstringlist.h> diff --git a/dcop/dcopidl2cpp/stubimpl.cpp b/dcop/dcopidl2cpp/stubimpl.cpp index 5cdd2a00d..700437f2a 100644 --- a/dcop/dcopidl2cpp/stubimpl.cpp +++ b/dcop/dcopidl2cpp/stubimpl.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ #include <tqdom.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstring.h> #include <tqstringlist.h> diff --git a/dcop/dcopidl2cpp/type.h b/dcop/dcopidl2cpp/type.h index 2a99c83a9..173b7fca0 100644 --- a/dcop/dcopidl2cpp/type.h +++ b/dcop/dcopidl2cpp/type.h @@ -1,7 +1,7 @@ #ifndef TYPE_H #define TYPE_H -#include <tqtextstream.h> +#include <textstream.h> #include <tqdom.h> static TQString writeType( TQTextStream& str, const TQDomElement& r ) diff --git a/dcop/dcopref.h b/dcop/dcopref.h index f1f2f5af5..46116124d 100644 --- a/dcop/dcopref.h +++ b/dcop/dcopref.h @@ -396,7 +396,7 @@ public: * Flag for allowing entering the event loop if the call blocks too long. * @p NoEventLoop disables entering the event loop. * @p UseEventLoop allows entering the event loop while waiting for long - * blocking DCOP call, thus making the GUI tqrepaint if needed, and possibly + * blocking DCOP call, thus making the GUI repaint if needed, and possibly * allowing also other code in the application to be executed. * @see DCOPClient::call() */ diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp index 8da59df04..fe08871bf 100644 --- a/dcop/dcopserver.cpp +++ b/dcop/dcopserver.cpp @@ -49,7 +49,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define QT_CLEAN_NAMESPACE 1 #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqdatastream.h> #include <tqptrstack.h> #include <tqtimer.h> @@ -126,8 +126,8 @@ static TQCString readQCString(TQDataStream &ds) TQCString result; TQ_UINT32 len; ds >> len; - TQIODevice *device = ds.tqdevice(); - int bytesLeft = device->size()-device->tqat(); + TQIODevice *device = ds.device(); + int bytesLeft = device->size()-device->at(); if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) { qWarning("Corrupt data!\n"); @@ -145,8 +145,8 @@ static TQByteArray readQByteArray(TQDataStream &ds) TQByteArray result; TQ_UINT32 len; ds >> len; - TQIODevice *device = ds.tqdevice(); - int bytesLeft = device->size()-device->tqat(); + TQIODevice *device = ds.device(); + int bytesLeft = device->size()-device->at(); if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) { qWarning("Corrupt data!\n"); diff --git a/interfaces/khexedit/byteseditinterface.h b/interfaces/khexedit/byteseditinterface.h index 4a78d59b8..3bff35095 100644 --- a/interfaces/khexedit/byteseditinterface.h +++ b/interfaces/khexedit/byteseditinterface.h @@ -143,7 +143,7 @@ class BytesEditInterface virtual bool isModified() const = 0; public: // call for action - /** tqrepaint the indizes from i1 to i2 */ + /** repaint the indizes from i1 to i2 */ virtual void repaintRange( int i1, int i2 ) = 0; }; @@ -221,7 +221,7 @@ inline BytesEditInterface *bytesEditInterface( T *t ) inline TQWidget *createBytesEditWidget( TQWidget *Parent = 0, const char *Name = 0 ) { return KParts::ComponentFactory::createInstanceFromQuery<TQWidget> - ( TQString::tqfromLatin1("KHexEdit/KBytesEdit"), TQString::null, TQT_TQOBJECT(Parent), Name ); + ( TQString::fromLatin1("KHexEdit/KBytesEdit"), TQString::null, TQT_TQOBJECT(Parent), Name ); } } diff --git a/interfaces/kimproxy/interface/kimiface.h b/interfaces/kimproxy/interface/kimiface.h index a41172fdf..f3212df6d 100644 --- a/interfaces/kimproxy/interface/kimiface.h +++ b/interfaces/kimproxy/interface/kimiface.h @@ -467,7 +467,7 @@ k_dcop_signals: /** * @brief Indicates that a contact's presence has changed * - * Notifies connected DCOP tqreceivers about a change in a contact's + * Notifies connected DCOP receivers about a change in a contact's * presence. * * Implementations just have to call this method with the appropriate diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp index 639be9bf1..4dbf8851a 100644 --- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp +++ b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp @@ -2,7 +2,7 @@ #include <tqcheckbox.h> #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvgroupbox.h> #include <kglobal.h> diff --git a/interfaces/ktexteditor/editinterfaceext.h b/interfaces/ktexteditor/editinterfaceext.h index b025d9807..a4fcb414c 100644 --- a/interfaces/ktexteditor/editinterfaceext.h +++ b/interfaces/ktexteditor/editinterfaceext.h @@ -44,7 +44,7 @@ class KTEXTEDITOR_EXPORT EditInterfaceExt /** * Begin an editing sequence. Edit commands during this sequence will be * bunched together such that they represent a single undo command in the - * editor, and so that tqrepaint events do not occur inbetween. + * editor, and so that repaint events do not occur inbetween. * * Your application should not return control to the event loop while it * has an unterminated (no matching editEnd() call) editing sequence diff --git a/interfaces/ktexteditor/editorchooser.cpp b/interfaces/ktexteditor/editorchooser.cpp index ed0ab0cbb..c80fe7bfe 100644 --- a/interfaces/ktexteditor/editorchooser.cpp +++ b/interfaces/ktexteditor/editorchooser.cpp @@ -9,7 +9,7 @@ #include <klocale.h> #include <tqlabel.h> #include <kapplication.h> -#include <tqlayout.h> +#include <layout.h> #include "editorchooser_ui.h" @@ -95,7 +95,7 @@ void EditorChooser::writeAppSetting(const TQString& postfix){ cfg->setGroup("KTEXTEDITOR:"+postfix); cfg->writeEntry("DEVELOPER_INFO","NEVER TRY TO USE VALUES FROM THAT GROUP, THEY ARE SUBJECT TO CHANGES"); cfg->writePathEntry("editor", (d->chooser->editorCombo->currentItem()==0) ? - TQString::null : (*d->elements.tqat(d->chooser->editorCombo->currentItem()-1))); + TQString::null : (*d->elements.at(d->chooser->editorCombo->currentItem()-1))); cfg->sync(); cfg->setGroup(previousGroup); diff --git a/interfaces/ktexteditor/editorchooser_ui.ui b/interfaces/ktexteditor/editorchooser_ui.ui index 816a1d194..e2bc82adb 100644 --- a/interfaces/ktexteditor/editorchooser_ui.ui +++ b/interfaces/ktexteditor/editorchooser_ui.ui @@ -31,7 +31,7 @@ <property name="name"> <cstring>TextLabel1</cstring> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>460</width> <height>0</height> @@ -40,7 +40,7 @@ <property name="text"> <string>Please choose the default text editing component that you wish to use in this application. If you choose <B>System Default</B>, the application will honor your changes in the Control Center. All other choices will override that setting.</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> </widget> diff --git a/interfaces/ktexteditor/templateinterface.cpp b/interfaces/ktexteditor/templateinterface.cpp index c5ea93931..0cb52db75 100644 --- a/interfaces/ktexteditor/templateinterface.cpp +++ b/interfaces/ktexteditor/templateinterface.cpp @@ -74,7 +74,7 @@ bool TemplateInterface::expandMacros( TQMap<TQString, TQString> &map, TQWidget * { KABC::StdAddressBook *addrBook = 0; KABC::Addressee userAddress; - TQDateTime datetime = TQDateTime::tqcurrentDateTime(); + TQDateTime datetime = TQDateTime::currentDateTime(); TQDate date = TQT_TQDATE_OBJECT(datetime.date()); TQTime time = TQT_TQTIME_OBJECT(datetime.time()); diff --git a/kab/addressbook.h b/kab/addressbook.h index af8eeb92c..f87c25124 100644 --- a/kab/addressbook.h +++ b/kab/addressbook.h @@ -127,7 +127,7 @@ class CategoriesMap : public TQMap<int, TQString> * keys). Of course, in different files a key might be used twice. <BR> * The keys are objects of the type KabKey and define the section in the * addressbook database where the entry is stored (see QConfigDB - * reference). Keys tqinvalidate on file changes, so keep track of the + * reference). Keys invalidate on file changes, so keep track of the * signal ::changed. <BR> * kab watches file changes. If the opened file changes on disk, it is * automatically reloaded and ::changed() is emitted. diff --git a/kab/kabapi.cc b/kab/kabapi.cc index 6ec29028e..0cf97905c 100644 --- a/kab/kabapi.cc +++ b/kab/kabapi.cc @@ -74,7 +74,7 @@ int KabAPI::exec() } listbox->setMinimumSize(listbox->sizeHint()); adjustSize(); - resize(tqminimumSize()); + resize(minimumSize()); return KDialogBase::exec(); } else { kdDebug(KAB_KDEBUG_AREA) << "KabAPI::exec: error creating interface." diff --git a/kab/qconfigDB.cc b/kab/qconfigDB.cc index b084ccab0..debd7a01d 100644 --- a/kab/qconfigDB.cc +++ b/kab/qconfigDB.cc @@ -25,7 +25,7 @@ extern "C" { } // #include <tqstring.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqfile.h> #include <tqtimer.h> #include <tqdatetime.h> @@ -1188,7 +1188,7 @@ KeyValueMap::insert(const TQCString& key, const TQStrList& values, bool force) // ----- create coded string list: for(count=0; count<values.count(); ++count) { // create strings like "abc\efgh\eijk": - temp=makeComplexString(((TQStrList)values).tqat(count)); + temp=makeComplexString(((TQStrList)values).at(count)); temp.remove(0, 1); // remove the leading "\"" temp.remove(temp.length()-1, 1); // the trailing "\"" value+=temp; @@ -1231,7 +1231,7 @@ KeyValueMap::get(const TQCString& key, TQStringList& values) const // ----- do the conversion: for(count=0; count<temp.count(); ++count) { - values.append(TQString::fromUtf8(temp.tqat(count))); + values.append(TQString::fromUtf8(temp.at(count))); } // ----- kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::get[QStringList]: done." << endl; @@ -1252,7 +1252,7 @@ KeyValueMap::insert(const TQCString& key, const TQStringList& values, bool force // ----- create TQCString list: for(count=0; count<values.count(); ++count) { - utf8strings.append((*values.tqat(count)).utf8()); + utf8strings.append((*values.at(count)).utf8()); } kdDebug(GUARD, KAB_KDEBUG_AREA) << "KeyValueMap::insert[QStringList]: done." << endl; return insert(key, utf8strings, force); diff --git a/kabc/address.cpp b/kabc/address.cpp index 714dd571e..0787bcc4e 100644 --- a/kabc/address.cpp +++ b/kabc/address.cpp @@ -521,7 +521,7 @@ TQString Address::countryToISO( const TQString &cname ) return it.data(); TQString mapfile = KGlobal::dirs()->findResource( "data", - TQString::tqfromLatin1( "kabc/countrytransl.map" ) ); + TQString::fromLatin1( "kabc/countrytransl.map" ) ); TQFile file( mapfile ); if ( file.open( IO_ReadOnly ) ) { @@ -551,7 +551,7 @@ TQString Address::ISOtoCountry( const TQString &ISOname ) return TQString::null; TQString mapfile = KGlobal::dirs()->findResource( "data", - TQString::tqfromLatin1( "kabc/countrytransl.map" ) ); + TQString::fromLatin1( "kabc/countrytransl.map" ) ); TQFile file( mapfile ); if ( file.open( IO_ReadOnly ) ) { diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 29bbd0f1f..bf6d0d17a 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -527,7 +527,7 @@ void AddressBook::insertAddressee( const Addressee &a ) Addressee addr( a ); if ( !fAddr.isEmpty() ) { if ( fAddr != a ) - addr.setRevision( TQDateTime::tqcurrentDateTime() ); + addr.setRevision( TQDateTime::currentDateTime() ); else { if ( fAddr.resource() == 0 ) { fAddr.setResource( resource ); diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index ec8e7be05..052f2599b 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqgroupbox.h> #include <tqregexp.h> diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp index b00b14d42..0bad0041e 100644 --- a/kabc/distributionlistdialog.cpp +++ b/kabc/distributionlistdialog.cpp @@ -19,7 +19,7 @@ */ #include <tqlistview.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqpushbutton.h> #include <tqcombobox.h> diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp index 573f0970a..d3575aed3 100644 --- a/kabc/distributionlisteditor.cpp +++ b/kabc/distributionlisteditor.cpp @@ -19,7 +19,7 @@ */ #include <tqlistview.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqcombobox.h> #include <tqbuttongroup.h> diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp index f9d0d705d..a82a017a3 100644 --- a/kabc/formats/binaryformat.cpp +++ b/kabc/formats/binaryformat.cpp @@ -113,7 +113,7 @@ void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) } // set real number of entries - stream.tqdevice()->tqat( 2 * sizeof( TQ_UINT32 ) ); + stream.device()->at( 2 * sizeof( TQ_UINT32 ) ); stream << counter; } diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp index 2a3683597..f350371b5 100644 --- a/kabc/kab2kabc.cpp +++ b/kabc/kab2kabc.cpp @@ -19,7 +19,7 @@ */ #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kabapi.h> #include <kaboutdata.h> @@ -57,12 +57,12 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) TQString name; TQString comment; - if ( entry.tqat( entry.length() -1 ) == ')' ) { + if ( entry.at( entry.length() -1 ) == ')' ) { int br = entry.findRev( '(' ); if ( br >= 0 ) { comment = entry.mid( br + 1, entry.length() - br - 2 ); entry.truncate( br ); - if ( entry.tqat( entry.length() - 1 ).isSpace() ) { + if ( entry.at( entry.length() - 1 ).isSpace() ) { entry.truncate( br - 1 ); } } @@ -80,22 +80,22 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) name = entry.left( posSpace ); } - if ( email.tqat( 0 ) == '<' && email.tqat( email.length() - 1) == '>' ) { + if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { email = email.mid( 1, email.length() - 2 ); } - if ( name.tqat( 0 ) == '"' && name.tqat( name.length() - 1) == '"' ) { + if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { name = name.mid( 1, name.length() - 2 ); } - if ( name.tqat( 0 ) == '\'' && name.tqat( name.length() - 1) == '\'' ) { + if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { name = name.mid( 1, name.length() - 2 ); } - if ( name.tqat( name.length() -1 ) == ')' ) { + if ( name.at( name.length() -1 ) == ')' ) { int br = name.findRev( '(' ); if ( br >= 0 ) { comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; name.truncate( br ); - if ( name.tqat( name.length() - 1 ).isSpace() ) { + if ( name.at( name.length() - 1 ).isSpace() ) { name.truncate( br - 1 ); } } @@ -148,16 +148,16 @@ void importKMailAddressBook( KABC::AddressBook *ab ) TQStringList::ConstIterator it; for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { - if ( (*it).tqat( 0 ) == '#' ) continue; + if ( (*it).at( 0 ) == '#' ) continue; bool insideQuote = false; int end = (*it).length() - 1; for ( int i = end; i; i-- ) { - if ( (*it).tqat( i ) == '"' ) { + if ( (*it).at( i ) == '"' ) { if ( insideQuote ) insideQuote = false; else insideQuote = true; - } else if ( (*it).tqat( i ) == ',' && !insideQuote ) { + } else if ( (*it).at( i ) == ',' && !insideQuote ) { readKMailEntry( (*it).mid( i + 1, end - i ), ab ); end = i - 1; } diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 6ce467a46..5ca506be8 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -26,7 +26,7 @@ #include <tqimage.h> #include <tqlabel.h> #include <tqpixmap.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqurl.h> #include <kapplication.h> @@ -50,7 +50,7 @@ public: TQString LdapObject::toString() const { - TQString result = TQString::tqfromLatin1( "\ndn: %1\n" ).arg( dn ); + TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn ); for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) { TQString attr = it.key(); for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) { diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp index b0a899d8c..bb1ed3ad5 100644 --- a/kabc/ldapconfigwidget.cpp +++ b/kabc/ldapconfigwidget.cpp @@ -22,7 +22,7 @@ #include <tqobjectlist.h> #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqspinbox.h> #include <tqvgroupbox.h> diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp index d4c7b22df..96024a0e7 100644 --- a/kabc/ldifconverter.cpp +++ b/kabc/ldifconverter.cpp @@ -36,7 +36,7 @@ #include <tqstring.h> #include <tqstringlist.h> #include <tqregexp.h> -#include <tqtextstream.h> +#include <textstream.h> #include <klocale.h> #include <kdebug.h> @@ -183,7 +183,7 @@ bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrLis data.setRawData( latinstr, latinstrlen ); ldif.setLDIF( data ); if (!dt.isValid()) - dt = TQDateTime::tqcurrentDateTime(); + dt = TQDateTime::currentDateTime(); a.setRevision(dt); homeAddr = Address( Address::Home ); workAddr = Address( Address::Work ); @@ -235,7 +235,7 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr, TQString &fieldname, TQString &value ) { - if ( fieldname == TQString::tqfromLatin1( "dn" ) ) // ignore & return false! + if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false! return false; if ( fieldname.startsWith("#") ) { @@ -249,56 +249,56 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, return true; } - if ( fieldname == TQString::tqfromLatin1( "givenname" ) ) { + if ( fieldname == TQString::fromLatin1( "givenname" ) ) { a.setGivenName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "xmozillanickname") || - fieldname == TQString::tqfromLatin1( "nickname") ) { + if ( fieldname == TQString::fromLatin1( "xmozillanickname") || + fieldname == TQString::fromLatin1( "nickname") ) { a.setNickName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "sn" ) ) { + if ( fieldname == TQString::fromLatin1( "sn" ) ) { a.setFamilyName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "uid" ) ) { + if ( fieldname == TQString::fromLatin1( "uid" ) ) { a.setUid( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mail" ) || - fieldname == TQString::tqfromLatin1( "mozillasecondemail" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mail" ) || + fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla if ( a.emails().findIndex( value ) == -1 ) a.insertEmail( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "title" ) ) { + if ( fieldname == TQString::fromLatin1( "title" ) ) { a.setTitle( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "vocation" ) ) { + if ( fieldname == TQString::fromLatin1( "vocation" ) ) { a.setPrefix( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "cn" ) ) { + if ( fieldname == TQString::fromLatin1( "cn" ) ) { a.setFormattedName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "o" ) || - fieldname == TQString::tqfromLatin1( "organization" ) || // Exchange - fieldname == TQString::tqfromLatin1( "organizationname" ) ) { // Exchange + if ( fieldname == TQString::fromLatin1( "o" ) || + fieldname == TQString::fromLatin1( "organization" ) || // Exchange + fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange a.setOrganization( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "description" ) ) { + if ( fieldname == TQString::fromLatin1( "description" ) ) { addComment: if ( !a.note().isEmpty() ) a.setNote( a.note() + "\n" ); @@ -306,15 +306,15 @@ addComment: return true; } - if ( fieldname == TQString::tqfromLatin1( "custom1" ) || - fieldname == TQString::tqfromLatin1( "custom2" ) || - fieldname == TQString::tqfromLatin1( "custom3" ) || - fieldname == TQString::tqfromLatin1( "custom4" ) ) { + if ( fieldname == TQString::fromLatin1( "custom1" ) || + fieldname == TQString::fromLatin1( "custom2" ) || + fieldname == TQString::fromLatin1( "custom3" ) || + fieldname == TQString::fromLatin1( "custom4" ) ) { goto addComment; } - if ( fieldname == TQString::tqfromLatin1( "homeurl" ) || - fieldname == TQString::tqfromLatin1( "workurl" ) ) { + if ( fieldname == TQString::fromLatin1( "homeurl" ) || + fieldname == TQString::fromLatin1( "workurl" ) ) { if (a.url().isEmpty()) { a.setUrl( KURL( value ) ); return true; @@ -325,139 +325,139 @@ addComment: // TODO: change this with KDE 4 } - if ( fieldname == TQString::tqfromLatin1( "homephone" ) ) { + if ( fieldname == TQString::fromLatin1( "homephone" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "telephonenumber" ) ) { + if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mobile" ) ) { // mozilla/Netscape 7 + if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7 a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "cellphone" ) ) { + if ( fieldname == TQString::fromLatin1( "cellphone" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "pager" ) || // mozilla - fieldname == TQString::tqfromLatin1( "pagerphone" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla + fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "facsimiletelephonenumber" ) ) { + if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "xmozillaanyphone" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "street" ) || - fieldname == TQString::tqfromLatin1( "streethomeaddress" ) ) { + if ( fieldname == TQString::fromLatin1( "street" ) || + fieldname == TQString::fromLatin1( "streethomeaddress" ) ) { homeAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postaladdress" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla workAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillapostaladdress2" ) ) { // mozilla - workAddr.setStreet( workAddr.street() + TQString::tqfromLatin1( "\n" ) + value ); + if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla + workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postalcode" ) ) { + if ( fieldname == TQString::fromLatin1( "postalcode" ) ) { workAddr.setPostalCode( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postofficebox" ) ) { + if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) { workAddr.setPostOfficeBox( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "homepostaladdress" ) ) { // Netscape 7 + if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7 homeAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla - homeAddr.setStreet( homeAddr.street() + TQString::tqfromLatin1( "\n" ) + value ); + if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla + homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomelocalityname" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla homeAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomestate" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla homeAddr.setRegion( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomepostalcode" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla homeAddr.setPostalCode( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomecountryname" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla if ( value.length() <= 2 ) value = Address::ISOtoCountry(value); homeAddr.setCountry( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "locality" ) ) { + if ( fieldname == TQString::fromLatin1( "locality" ) ) { workAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "streetaddress" ) ) { // Netscape 4.x + if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x workAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "countryname" ) || - fieldname == TQString::tqfromLatin1( "c" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "countryname" ) || + fieldname == TQString::fromLatin1( "c" ) ) { // mozilla if ( value.length() <= 2 ) value = Address::ISOtoCountry(value); workAddr.setCountry( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "l" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla workAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "st" ) ) { + if ( fieldname == TQString::fromLatin1( "st" ) ) { workAddr.setRegion( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "ou" ) ) { + if ( fieldname == TQString::fromLatin1( "ou" ) ) { a.setRole( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "department" ) ) { + if ( fieldname == TQString::fromLatin1( "department" ) ) { a.setDepartment( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "member" ) ) { + if ( fieldname == TQString::fromLatin1( "member" ) ) { // this is a mozilla list member (cn=xxx, mail=yyy) TQStringList list( TQStringList::split( ',', value ) ); TQString name, email; @@ -476,8 +476,8 @@ addComment: return true; } - if ( fieldname == TQString::tqfromLatin1( "modifytimestamp" ) ) { - if (value == TQString::tqfromLatin1("0Z")) // ignore + if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) { + if (value == TQString::fromLatin1("0Z")) // ignore return true; TQDateTime dt = VCardStringToDate( value ); if ( dt.isValid() ) { @@ -486,7 +486,7 @@ addComment: } } - if ( fieldname == TQString::tqfromLatin1( "objectclass" ) ) // ignore + if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore return true; kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") diff --git a/kabc/ldifconverter.h b/kabc/ldifconverter.h index a2225ad2d..a8052a65f 100644 --- a/kabc/ldifconverter.h +++ b/kabc/ldifconverter.h @@ -44,7 +44,7 @@ namespace KABC { * @param dt The date & time value of the last modification (e.g. file modification time). * @since 3.2 */ - KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::tqcurrentDateTime() ); + KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() ); /** * Converts a list of addressees to a LDIF string. diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp index 819d75d96..cb2bd3109 100644 --- a/kabc/plugins/dir/resourcedirconfig.cpp +++ b/kabc/plugins/dir/resourcedirconfig.cpp @@ -19,7 +19,7 @@ */ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kdebug.h> #include <klocale.h> diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp index 92b07594f..ae8bdbfa3 100644 --- a/kabc/plugins/file/resourcefileconfig.cpp +++ b/kabc/plugins/file/resourcefileconfig.cpp @@ -19,7 +19,7 @@ */ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kdebug.h> #include <klocale.h> diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp index 271328525..fa8176a21 100644 --- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp +++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp @@ -21,7 +21,7 @@ #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqspinbox.h> #include <tqvbox.h> diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp index b441fbd98..af2e3ba98 100644 --- a/kabc/plugins/net/resourcenetconfig.cpp +++ b/kabc/plugins/net/resourcenetconfig.cpp @@ -19,7 +19,7 @@ */ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kdebug.h> #include <klocale.h> diff --git a/kabc/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp index ef1651cde..1b750a120 100644 --- a/kabc/plugins/sql/resourcesqlconfig.cpp +++ b/kabc/plugins/sql/resourcesqlconfig.cpp @@ -19,7 +19,7 @@ */ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqspinbox.h> #include <tqvbox.h> diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp index 3d01bfc8e..d548b52ab 100644 --- a/kabc/resourceselectdialog.cpp +++ b/kabc/resourceselectdialog.cpp @@ -24,7 +24,7 @@ #include <kstdguiitem.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include "resource.h" #include "addressbook.h" @@ -64,7 +64,7 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, c uint counter = 0; TQPtrList<Resource> list = ab->resources(); for ( uint i = 0; i < list.count(); ++i ) { - Resource *resource = list.tqat( i ); + Resource *resource = list.at( i ); if ( resource && !resource->readOnly() ) { mResourceMap.insert( counter, resource ); mResourceId->insertItem( resource->resourceName() ); diff --git a/kabc/tests/kabcargl.cpp b/kabc/tests/kabcargl.cpp index b57724c15..4a6322d51 100644 --- a/kabc/tests/kabcargl.cpp +++ b/kabc/tests/kabcargl.cpp @@ -19,7 +19,7 @@ */ #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <kaboutdata.h> diff --git a/kabc/tests/testaddresseelist.cpp b/kabc/tests/testaddresseelist.cpp index 7075dcdd8..e7cc123f1 100644 --- a/kabc/tests/testaddresseelist.cpp +++ b/kabc/tests/testaddresseelist.cpp @@ -64,12 +64,12 @@ int main(int /*argc*/,char /* **argv*/) list.append(f); list.sortBy(FamilyName); - if ( !( (*list.tqat(0)).uid()=="78ze" - && (*list.tqat(1)).uid()=="Rsdf" - && (*list.tqat(2)).uid()=="Fhwn" - && (*list.tqat(3)).uid()=="kk45" - && (*list.tqat(4)).uid()=="Asdf" - && (*list.tqat(5)).uid()=="Z2hk" + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Rsdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="kk45" + && (*list.at(4)).uid()=="Asdf" + && (*list.at(5)).uid()=="Z2hk" ) ) { kdError() << "SORTING BY FAMILY NAME NOT CORRECT!" << endl; kdDebug() << "list sorted by family name:" << endl; @@ -79,12 +79,12 @@ int main(int /*argc*/,char /* **argv*/) } list.setReverseSorting(true); list.sort(); - if ( !( (*list.tqat(5)).uid()=="78ze" - && (*list.tqat(4)).uid()=="Rsdf" - && (*list.tqat(3)).uid()=="Fhwn" - && (*list.tqat(2)).uid()=="kk45" - && (*list.tqat(1)).uid()=="Asdf" - && (*list.tqat(0)).uid()=="Z2hk" + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Rsdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="kk45" + && (*list.at(1)).uid()=="Asdf" + && (*list.at(0)).uid()=="Z2hk" ) ) { kdError() << "REVERSE SORTING BY FAMILY NAME NOT CORRECT!" << endl; kdDebug() << "list reverse sorted by family name:" << endl; @@ -95,12 +95,12 @@ int main(int /*argc*/,char /* **argv*/) list.setReverseSorting(false); list.sortBy(FormattedName); - if ( !( (*list.tqat(0)).uid()=="78ze" - && (*list.tqat(1)).uid()=="Rsdf" - && (*list.tqat(2)).uid()=="Fhwn" - && (*list.tqat(3)).uid()=="kk45" - && (*list.tqat(4)).uid()=="Z2hk" - && (*list.tqat(5)).uid()=="Asdf" + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Rsdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="kk45" + && (*list.at(4)).uid()=="Z2hk" + && (*list.at(5)).uid()=="Asdf" ) ) { kdError() << "SORTING BY FORMATTED NAME NOT CORRECT!" << endl; kdDebug() << "list sorted by formatted name:" << endl; @@ -110,12 +110,12 @@ int main(int /*argc*/,char /* **argv*/) } list.setReverseSorting(true); list.sort(); - if ( !( (*list.tqat(5)).uid()=="78ze" - && (*list.tqat(4)).uid()=="Rsdf" - && (*list.tqat(3)).uid()=="Fhwn" - && (*list.tqat(2)).uid()=="kk45" - && (*list.tqat(1)).uid()=="Z2hk" - && (*list.tqat(0)).uid()=="Asdf" + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Rsdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="kk45" + && (*list.at(1)).uid()=="Z2hk" + && (*list.at(0)).uid()=="Asdf" ) ) { kdError() << "REVERSE SORTING BY FORMATTED NAME NOT CORRECT!" << endl; kdDebug() << "list reverse sorted by formatted name:" << endl; @@ -127,12 +127,12 @@ int main(int /*argc*/,char /* **argv*/) list.setReverseSorting(false); list.sortBy(Uid); - if ( !( (*list.tqat(0)).uid()=="78ze" - && (*list.tqat(1)).uid()=="Asdf" - && (*list.tqat(2)).uid()=="Fhwn" - && (*list.tqat(3)).uid()=="Rsdf" - && (*list.tqat(4)).uid()=="Z2hk" - && (*list.tqat(5)).uid()=="kk45" + if ( !( (*list.at(0)).uid()=="78ze" + && (*list.at(1)).uid()=="Asdf" + && (*list.at(2)).uid()=="Fhwn" + && (*list.at(3)).uid()=="Rsdf" + && (*list.at(4)).uid()=="Z2hk" + && (*list.at(5)).uid()=="kk45" ) ) { kdError() << "SORTING BY UID NOT CORRECT!" << endl; kdDebug() << "list sorted by Uid:" << endl; @@ -142,12 +142,12 @@ int main(int /*argc*/,char /* **argv*/) } list.setReverseSorting(true); list.sortBy(Uid); - if ( !( (*list.tqat(5)).uid()=="78ze" - && (*list.tqat(4)).uid()=="Asdf" - && (*list.tqat(3)).uid()=="Fhwn" - && (*list.tqat(2)).uid()=="Rsdf" - && (*list.tqat(1)).uid()=="Z2hk" - && (*list.tqat(0)).uid()=="kk45" + if ( !( (*list.at(5)).uid()=="78ze" + && (*list.at(4)).uid()=="Asdf" + && (*list.at(3)).uid()=="Fhwn" + && (*list.at(2)).uid()=="Rsdf" + && (*list.at(1)).uid()=="Z2hk" + && (*list.at(0)).uid()=="kk45" ) ) { kdError() << "REVERSE SORTING BY UID NOT CORRECT!" << endl; kdDebug() << "list sorted by Uid:" << endl; @@ -170,8 +170,8 @@ int main(int /*argc*/,char /* **argv*/) list2.append(f); list2.setReverseSorting(false); list2.sort(); - if ( !( (*list2.tqat(0)).uid()=="78ze" - && (*list2.tqat(1)).uid()=="Asdf" + if ( !( (*list2.at(0)).uid()=="78ze" + && (*list2.at(1)).uid()=="Asdf" ) ) { kdError() << "SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; kdDebug() << "list sorted by formatted name, two entries:" << endl; @@ -181,8 +181,8 @@ int main(int /*argc*/,char /* **argv*/) } list2.setReverseSorting(true); list2.sort(); - if ( !( (*list2.tqat(1)).uid()=="78ze" - && (*list2.tqat(0)).uid()=="Asdf" + if ( !( (*list2.at(1)).uid()=="78ze" + && (*list2.at(0)).uid()=="Asdf" ) ) { kdError() << "REVERSE SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; kdDebug() << "list reverse sorted by formatted name, two entries:" << endl; diff --git a/kabc/tests/testlock.cpp b/kabc/tests/testlock.cpp index 4674606e0..2d72317ad 100644 --- a/kabc/tests/testlock.cpp +++ b/kabc/tests/testlock.cpp @@ -35,7 +35,7 @@ #include <tqwidget.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqlistview.h> #include <tqdir.h> diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp index dc6384417..535ba6980 100644 --- a/kabc/vcard/AdrValue.cpp +++ b/kabc/vcard/AdrValue.cpp @@ -112,13 +112,13 @@ AdrValue::_parse() switch (i) { - case 0: poBox_ = l.tqat(0); break; - case 1: extAddress_ = l.tqat(1); break; - case 2: street_ = l.tqat(2); break; - case 3: locality_ = l.tqat(3); break; - case 4: region_ = l.tqat(4); break; - case 5: postCode_ = l.tqat(5); break; - case 6: countryName_ = l.tqat(6); break; + case 0: poBox_ = l.at(0); break; + case 1: extAddress_ = l.at(1); break; + case 2: street_ = l.at(2); break; + case 3: locality_ = l.at(3); break; + case 4: region_ = l.at(4); break; + case 5: postCode_ = l.at(5); break; + case 6: countryName_ = l.at(6); break; default: break; } } diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index 034cb1d32..52bcdf4f5 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp @@ -174,7 +174,7 @@ ContentLine::_parse() return; } - name_ = l.tqat(0); + name_ = l.at(0); // Now we have the name, so the rest of 'l' is the params. // Remove the name part. diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp index d41c61d96..f7e5a759e 100644 --- a/kabc/vcard/LangValue.cpp +++ b/kabc/vcard/LangValue.cpp @@ -79,7 +79,7 @@ LangValue::_parse() if (l.count() == 0) return; - primary_ = l.tqat(0); + primary_ = l.at(0); l.remove(0u); diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp index 7bcfa1397..e63268134 100644 --- a/kabc/vcard/NValue.cpp +++ b/kabc/vcard/NValue.cpp @@ -106,11 +106,11 @@ NValue::_parse() for (unsigned int i = 0; i < l.count(); i++) { switch (i) { - case 0: family_ = l.tqat(0); break; - case 1: given_ = l.tqat(1); break; - case 2: middle_ = l.tqat(2); break; - case 3: prefix_ = l.tqat(3); break; - case 4: suffix_ = l.tqat(4); break; + case 0: family_ = l.at(0); break; + case 1: given_ = l.at(1); break; + case 2: middle_ = l.at(2); break; + case 3: prefix_ = l.at(3); break; + case 4: suffix_ = l.at(4); break; default: break; } } diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp index d3fb93ac7..94ca18243 100644 --- a/kabc/vcard/OrgValue.cpp +++ b/kabc/vcard/OrgValue.cpp @@ -102,6 +102,6 @@ OrgValue::numValues() OrgValue::value(unsigned int i) { parse(); - return valueList_.tqat(i); + return valueList_.at(i); } diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp index ef2b5d07d..2bec2e181 100644 --- a/kabc/vcard/TextListValue.cpp +++ b/kabc/vcard/TextListValue.cpp @@ -102,6 +102,6 @@ TextListValue::numValues() TextListValue::value(unsigned int i) { parse(); - return valueList_.tqat(i); + return valueList_.at(i); } diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp index a1a9d1ba1..50c25da59 100644 --- a/kabc/vcard/VCard.cpp +++ b/kabc/vcard/VCard.cpp @@ -95,7 +95,7 @@ VCard::_parse() } // Get the first line - TQCString beginLine = TQCString(l.tqat(0)).stripWhiteSpace(); + TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace(); vDebug("Begin line == \"" + beginLine + "\""); diff --git a/kabc/vcard/testread.cpp b/kabc/vcard/testread.cpp index 3a33c7d54..d1341fb49 100644 --- a/kabc/vcard/testread.cpp +++ b/kabc/vcard/testread.cpp @@ -3,7 +3,7 @@ #include <assert.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <VCard.h> diff --git a/kabc/vcardparser/testread.cpp b/kabc/vcardparser/testread.cpp index bad2ceb78..8926e5bc2 100644 --- a/kabc/vcardparser/testread.cpp +++ b/kabc/vcardparser/testread.cpp @@ -21,7 +21,7 @@ #include <stdlib.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kprocess.h> #include <kdebug.h> diff --git a/kabc/vcardparser/testwrite.cpp b/kabc/vcardparser/testwrite.cpp index f24f1ad25..04d72f537 100644 --- a/kabc/vcardparser/testwrite.cpp +++ b/kabc/vcardparser/testwrite.cpp @@ -29,7 +29,7 @@ #include <kcmdlineargs.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include "vcardconverter.h" @@ -60,7 +60,7 @@ int main( int argc, char **argv ) addressee.setOrganization( "KDE" ); addressee.setNote( "nerver\ntouch a running system" ); addressee.setProductId( "testId" ); - addressee.setRevision( TQDateTime::tqcurrentDateTime() ); + addressee.setRevision( TQDateTime::currentDateTime() ); addressee.setSortString( "koenig" ); addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index 82ab96714..8fb9ab10f 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -19,7 +19,7 @@ */ #include <tqregexp.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kmdcodec.h> @@ -144,7 +144,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) } else if ( vCardLine.parameter( "encoding" ).lower() == "quoted-printable" ) { // join any qp-folded lines - while ( value.tqat( value.length() - 1 ) == '=' && it != linesEnd ) { + while ( value.at( value.length() - 1 ) == '=' && it != linesEnd ) { value = value.remove( value.length() - 1, 1 ) + (*it); ++it; } diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp index 08bcf93e4..295360a03 100644 --- a/kabc/vcardtool.cpp +++ b/kabc/vcardtool.cpp @@ -36,7 +36,7 @@ static bool needsEncoding( const TQString &value ) { uint length = value.length(); for ( uint i = 0; i < length; ++i ) { - char c = value.tqat( i ).latin1(); + char c = value.at( i ).latin1(); if ( (c < 33 || c > 126) && c != ' ' && c != '=' ) return true; } diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index 0aabde874..ed9a6169b 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -223,7 +223,7 @@ void KateNormalIndent::updateConfig () for (uint i=0; i<items.count(); i++) { - TQString name = items.tqat(i)->name; + TQString name = items.at(i)->name; if (name.find("Comment") != -1 && commentAttrib == 255) { commentAttrib = i; @@ -748,7 +748,7 @@ void KateCSmartIndent::processChar(TQChar c) if (c == 'n') { - if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::tqfromLatin1("regio")) + if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::fromLatin1("regio")) return; } @@ -1411,7 +1411,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, uint pos, len = text.length(); bool seenOpen = false; for(pos = 0; pos < len; ++pos) { - int ch = text.tqat(pos).tqunicode(); + int ch = text.at(pos).unicode(); switch(ch) { case '<': seenOpen = true; @@ -1467,11 +1467,11 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, if(unclosedTag) { // find the start of the next attribute, so we can align with it do { - lastCh = text.tqat(++attrCol).tqunicode(); + lastCh = text.at(++attrCol).unicode(); }while(lastCh && lastCh != ' ' && lastCh != '\t'); while(lastCh == ' ' || lastCh == '\t') { - lastCh = text.tqat(++attrCol).tqunicode(); + lastCh = text.at(++attrCol).unicode(); } attrCol = prevLine->cursorX(attrCol, tabWidth); @@ -1917,8 +1917,8 @@ TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin) // if the line starts with # (but isn't a c# region thingy), no indentation at all. if( currLineFirst >= 0 && currLine->getChar(currLineFirst) == '#' ) { - if( !currLine->stringAtPos( currLineFirst+1, TQString::tqfromLatin1("region") ) && - !currLine->stringAtPos( currLineFirst+1, TQString::tqfromLatin1("endregion") ) ) + if( !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("region") ) && + !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("endregion") ) ) return TQString::null; } @@ -1974,10 +1974,10 @@ TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin) { #define ARRLEN( array ) ( sizeof(array)/sizeof(array[0]) ) for( uint n = 0; n < ARRLEN(scopeKeywords); ++n ) - if( textLine->stringAtPos(pos, TQString::tqfromLatin1(scopeKeywords[n]) ) ) + if( textLine->stringAtPos(pos, TQString::fromLatin1(scopeKeywords[n]) ) ) return calcIndentAfterKeyword( begin, cur, pos, false ); for( uint n = 0; n < ARRLEN(blockScopeKeywords); ++n ) - if( textLine->stringAtPos(pos, TQString::tqfromLatin1(blockScopeKeywords[n]) ) ) + if( textLine->stringAtPos(pos, TQString::fromLatin1(blockScopeKeywords[n]) ) ) return calcIndentAfterKeyword( begin, cur, pos, true ); #undef ARRLEN } @@ -2070,7 +2070,7 @@ TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, // beginning 'namespace'. that's 99% of usage, I'd guess. { if( braceFirst >= 0 && braceLine->attribute(braceFirst) == keywordAttrib && - braceLine->stringAtPos( braceFirst, TQString::tqfromLatin1( "namespace" ) ) ) + braceLine->stringAtPos( braceFirst, TQString::fromLatin1( "namespace" ) ) ) return continuationIndent(indentCursor) + whitespaceToOpenBrace; if( braceCursor.line() > 0 ) @@ -2078,7 +2078,7 @@ TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, KateTextLine::Ptr prevLine = doc->plainKateTextLine(braceCursor.line() - 1); int firstPrev = prevLine->firstChar(); if( firstPrev >= 0 && prevLine->attribute(firstPrev) == keywordAttrib && - prevLine->stringAtPos( firstPrev, TQString::tqfromLatin1( "namespace" ) ) ) + prevLine->stringAtPos( firstPrev, TQString::fromLatin1( "namespace" ) ) ) return continuationIndent(indentCursor) + whitespaceToOpenBrace; } } @@ -2384,7 +2384,7 @@ void KateVarIndent::slotVariableChanged( const TQString &var, const TQString &va for (uint i=0; i<items.count(); i++) { - if ( items.tqat(i)->name.section( ':', 1 ) == val ) + if ( items.at(i)->name.section( ':', 1 ) == val ) { d->coupleAttrib = i; break; diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp index 6498d9936..ac1ee73d9 100644 --- a/kate/part/katebookmarks.cpp +++ b/kate/part/katebookmarks.cpp @@ -128,7 +128,7 @@ void KateBookmarks::clearBookmarks () TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks(); for (uint i=0; i < m.count(); i++) - m_view->getDoc()->removeMark( m.tqat(i)->line, KTextEditor::MarkInterface::markType01 ); + m_view->getDoc()->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 ); // just to be sure ;) marksChanged (); @@ -255,8 +255,8 @@ void KateBookmarks::goNext() int found = -1; for (uint z=0; z < m.count(); z++) - if ( (m.tqat(z)->line > line) && ((found == -1) || (uint(found) > m.tqat(z)->line)) ) - found = m.tqat(z)->line; + if ( (m.at(z)->line > line) && ((found == -1) || (uint(found) > m.at(z)->line)) ) + found = m.at(z)->line; if (found != -1) m_view->gotoLineNumber ( found ); @@ -272,8 +272,8 @@ void KateBookmarks::goPrevious() int found = -1; for (uint z=0; z < m.count(); z++) - if ((m.tqat(z)->line < line) && ((found == -1) || (uint(found) < m.tqat(z)->line))) - found = m.tqat(z)->line; + if ((m.at(z)->line < line) && ((found == -1) || (uint(found) < m.at(z)->line))) + found = m.at(z)->line; if (found != -1) m_view->gotoLineNumber ( found ); diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp index 05af27ff8..2ffc8f50e 100644 --- a/kate/part/katebuffer.cpp +++ b/kate/part/katebuffer.cpp @@ -36,9 +36,9 @@ #include <tqpopupmenu.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqtimer.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqcstring.h> #include <tqdatetime.h> @@ -172,10 +172,10 @@ class KateFileLoader // should spaces be ignored at end of line? inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; } - // internal tqunicode data array - inline const TQChar *tqunicode () const { return m_text.tqunicode(); } + // internal unicode data array + 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) { length = 0; @@ -543,7 +543,7 @@ bool KateBuffer::canEncode () 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")) return true; @@ -860,12 +860,12 @@ void KateBuffer::setHighlight(uint hlMode) // aha, hl will change if (h != m_highlight) { - bool tqinvalidate = !h->noHighlighting(); + bool invalidate = !h->noHighlighting(); if (m_highlight) { m_highlight->release(); - tqinvalidate = true; + invalidate = true; } h->use(); @@ -880,7 +880,7 @@ void KateBuffer::setHighlight(uint hlMode) m_highlight = h; - if (tqinvalidate) + if (invalidate) invalidateHighlighting(); // inform the document that the hl was really changed @@ -949,7 +949,7 @@ void KateBuffer::addIndentBasedFoldingInformation(TQMemArray<uint> &foldingList, } } -bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, bool tqinvalidate) +bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, bool invalidate) { // no hl around, no stuff to do if (!m_highlight) @@ -971,7 +971,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b //kdDebug (13020) << "HL UNTIL LINE: " << m_lineHighlighted << " MAX: " << m_lineHighlightedMax << endl; //kdDebug (13020) << "HL DYN COUNT: " << KateHlManager::self()->countDynamicCtxs() << " MAX: " << m_maxDynamicContexts << endl; - // see if there are too many dynamic contexts; if yes, tqinvalidate HL of all documents + // see if there are too many dynamic contexts; if yes, invalidate HL of all documents if (KateHlManager::self()->countDynamicCtxs() >= m_maxDynamicContexts) { { @@ -1240,7 +1240,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b buf->markDirty (); // tag the changed lines ! - if (tqinvalidate) + if (invalidate) emit tagLines (startLine, current_line + buf->startLine()); // emit that we have changed the folding @@ -1353,14 +1353,14 @@ void KateBufBlock::fillBlock (KateFileLoader *stream) { uint offset = 0, length = 0; stream->readLine(offset, length); - const TQChar *tqunicodeData = stream->tqunicode () + offset; + const TQChar *unicodeData = stream->unicode () + offset; // strip spaces at end of line if ( stream->removeTrailingSpaces() ) { while (length > 0) { - if (tqunicodeData[length-1].isSpace()) + if (unicodeData[length-1].isSpace()) --length; else break; @@ -1391,13 +1391,13 @@ void KateBufBlock::fillBlock (KateFileLoader *stream) memcpy(buf+pos, (char *) &length, 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; } else { KateTextLine::Ptr textLine = new KateTextLine (); - textLine->insertText (0, length, tqunicodeData); + textLine->insertText (0, length, unicodeData); m_stringList.push_back (textLine); } diff --git a/kate/part/katebuffer.h b/kate/part/katebuffer.h index 450f260ab..04ee264e8 100644 --- a/kate/part/katebuffer.h +++ b/kate/part/katebuffer.h @@ -116,7 +116,7 @@ class KateBufBlock void removeLine(uint i); /** - * mark this block as dirty, will tqinvalidate the swap data + * mark this block as dirty, will invalidate the swap data * insert/removeLine will mark the block dirty itself */ void markDirty (); @@ -611,7 +611,7 @@ class KateBuffer : public TQObject * @returns true when the highlighting in the next block needs to be updated, * false otherwise. */ - bool doHighlight (KateBufBlock *buf, uint from, uint to, bool tqinvalidate); + bool doHighlight (KateBufBlock *buf, uint from, uint to, bool invalidate); signals: /** diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp index d4879cfda..c5feb5071 100644 --- a/kate/part/katecmds.cpp +++ b/kate/part/katecmds.cpp @@ -408,7 +408,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, TQString rep=repOld; // now set the backreferences in the replacement - TQStringList backrefs=matcher.tqcapturedTexts(); + TQStringList backrefs=matcher.capturedTexts(); int refnum=1; TQStringList::Iterator i = backrefs.begin(); @@ -578,7 +578,7 @@ bool KateCommands::Character::exec (Kate::View *view, const TQString &_cmd, TQSt view->insertText(TQString(buf)); } else - { // do the tqunicode thing + { // do the unicode thing TQChar c(number); view->insertText(TQString(&c, 1)); } @@ -593,10 +593,10 @@ bool KateCommands::Date::exec (Kate::View *view, const TQString &cmd, TQString & if (cmd.left(4) != "date") return false; - if (TQDateTime::tqcurrentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0) - view->insertText(TQDateTime::tqcurrentDateTime().toString(cmd.mid(5, cmd.length()-5))); + if (TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0) + view->insertText(TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5))); else - view->insertText(TQDateTime::tqcurrentDateTime().toString("yyyy-MM-dd hh:mm:ss")); + view->insertText(TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); return true; } diff --git a/kate/part/katecmds.h b/kate/part/katecmds.h index e55e2ac8b..55c8d807b 100644 --- a/kate/part/katecmds.h +++ b/kate/part/katecmds.h @@ -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 * hex: 0x1234 or x1234 * octal: 01231 diff --git a/kate/part/katecodecompletion.cpp b/kate/part/katecodecompletion.cpp index 1bff647f6..99fb1925a 100644 --- a/kate/part/katecodecompletion.cpp +++ b/kate/part/katecodecompletion.cpp @@ -42,7 +42,7 @@ #include <tqapplication.h> #include <tqsizegrip.h> #include <tqfontmetrics.h> -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> /** @@ -384,7 +384,7 @@ void KateCodeCompletion::showComment() m_completionListBox->ensureCurrentVisible(); finalPoint.setY( - m_completionListBox->viewport()->mapToGlobal(m_completionListBox->tqitemRect( + m_completionListBox->viewport()->mapToGlobal(m_completionListBox->itemRect( m_completionListBox->item(m_completionListBox->currentItem())).topLeft()).y()); m_commentLabel->move(finalPoint); diff --git a/kate/part/katecodefoldinghelpers.cpp b/kate/part/katecodefoldinghelpers.cpp index 15ba05cb7..ab571d9d0 100644 --- a/kate/part/katecodefoldinghelpers.cpp +++ b/kate/part/katecodefoldinghelpers.cpp @@ -1259,7 +1259,7 @@ void KateCodeFoldingTree::cleanupUnneededNodes(unsigned int line) for (int i=0; i<(int)markedForDeleting.count(); i++) { - KateCodeFoldingNode *node = markedForDeleting.tqat(i); + KateCodeFoldingNode *node = markedForDeleting.at(i); if (node->deleteOpening) kdDebug(13000)<<"DELETE OPENING SET"<<endl; if (node->deleteEnding) @@ -1335,7 +1335,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line) findAllNodesOpenedOrClosedAt(line); for (int i=0; i<(int)nodesForLine.count(); i++) { - KateCodeFoldingNode *node=nodesForLine.tqat(i); + KateCodeFoldingNode *node=nodesForLine.at(i); if ( (!node->startLineValid) || (getStartLine(node) != line) ) { nodesForLine.remove(i); @@ -1346,10 +1346,10 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line) if (nodesForLine.isEmpty()) return; - nodesForLine.tqat(0)->visible = !nodesForLine.tqat(0)->visible; + nodesForLine.at(0)->visible = !nodesForLine.at(0)->visible; - if (!nodesForLine.tqat(0)->visible) - addHiddenLineBlock(nodesForLine.tqat(0),line); + if (!nodesForLine.at(0)->visible) + addHiddenLineBlock(nodesForLine.at(0),line); else { for (TQValueList<KateHiddenLineBlock>::Iterator it=hiddenLines.begin(); it!=hiddenLines.end();++it) @@ -1359,7 +1359,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line) break; } - updateHiddenSubNodes(nodesForLine.tqat(0)); + updateHiddenSubNodes(nodesForLine.at(0)); } emit regionVisibilityChangedAt(line); diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp index 5bfe55fbc..7929f781d 100644 --- a/kate/part/kateconfig.cpp +++ b/kate/part/kateconfig.cpp @@ -38,7 +38,7 @@ #include <kstaticdeleter.h> #include <tqpopupmenu.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kdebug.h> @@ -237,7 +237,7 @@ void KateDocumentConfig::updateConfig () { for (uint z=0; z < KateFactory::self()->documents()->count(); z++) { - KateFactory::self()->documents()->tqat(z)->updateConfig (); + KateFactory::self()->documents()->at(z)->updateConfig (); } } } @@ -422,7 +422,7 @@ TQTextCodec *KateDocumentConfig::codec () if (m_encodingSet || isGlobal()) { if (m_encoding.isEmpty() && isGlobal()) - return KGlobal::charsets()->codecForName (TQString::tqfromLatin1(KGlobal::locale()->encoding())); + return KGlobal::charsets()->codecForName (TQString::fromLatin1(KGlobal::locale()->encoding())); else if (m_encoding.isEmpty()) return s_global->codec (); else @@ -570,8 +570,8 @@ bool KateDocumentConfig::plugin (uint index) const if (index >= m_plugins.size()) return false; - if (m_pluginsSet.tqat(index) || isGlobal()) - return m_plugins.tqat(index); + if (m_pluginsSet.at(index) || isGlobal()) + return m_plugins.at(index); return s_global->plugin (index); } @@ -734,7 +734,7 @@ void KateViewConfig::updateConfig () { for (uint z=0; z < KateFactory::self()->views()->count(); z++) { - KateFactory::self()->views()->tqat(z)->updateConfig (); + KateFactory::self()->views()->at(z)->updateConfig (); } } } @@ -1088,7 +1088,7 @@ void KateRendererConfig::updateConfig () { for (uint z=0; z < KateFactory::self()->renderers()->count(); z++) { - KateFactory::self()->renderers()->tqat(z)->updateConfig (); + KateFactory::self()->renderers()->at(z)->updateConfig (); } } } @@ -1114,7 +1114,7 @@ void KateRendererConfig::reloadSchema() { if ( isGlobal() ) for ( uint z=0; z < KateFactory::self()->renderers()->count(); z++ ) - KateFactory::self()->renderers()->tqat(z)->config()->reloadSchema(); + KateFactory::self()->renderers()->at(z)->config()->reloadSchema(); else if ( m_renderer && m_schemaSet ) setSchemaInternal( m_schema ); diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index f9c5dadb1..d341603dd 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -86,7 +86,7 @@ #include <tqheader.h> #include <tqhgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlistbox.h> #include <tqlistview.h> @@ -101,7 +101,7 @@ #include <tqspinbox.h> #include <tqstringlist.h> #include <tqtabwidget.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqtoolbutton.h> #include <tqvbox.h> #include <tqvgroupbox.h> @@ -712,7 +712,7 @@ KateViewDefaultsConfig::KateViewDefaultsConfig(TQWidget *parent) "you to set a maximum width of the screen, as a percentage, after which " "dynamically wrapped lines will no longer be vertically aligned. For " "example, at 50%, lines whose indentation levels are deeper than 50% of " - "the width of the screen will not have vertical tqalignment applied to " + "the width of the screen will not have vertical alignment applied to " "subsequent wrapped lines.</p>")); TQWhatsThis::add(m_line,i18n( "If this option is checked, every new view will display line numbers " @@ -819,7 +819,7 @@ void KateEditKeyConfiguration::showEvent ( TQShowEvent * ) if (!m_ready) { (new TQVBoxLayout(this))->setAutoAdd(true); - KateView* view = (KateView*)m_doc->views().tqat(0); + KateView* view = (KateView*)m_doc->views().at(0); m_ac = view->editActionCollection(); m_keyChooser = new KKeyChooser( m_ac, this, false ); connect( m_keyChooser, TQT_SIGNAL( keyChange() ), this, TQT_SLOT( slotChanged() ) ); @@ -1154,7 +1154,7 @@ void KatePartPluginConfigPage::apply () KateDocumentConfig::global()->configStart (); for (uint i=0; i < m_items.count(); i++) - KateDocumentConfig::global()->setPlugin (m_items.tqat(i)->pluginIndex(), m_items.tqat(i)->isOn()); + KateDocumentConfig::global()->setPlugin (m_items.at(i)->pluginIndex(), m_items.at(i)->isOn()); KateDocumentConfig::global()->configEnd (); } @@ -1243,7 +1243,7 @@ void KatePartPluginConfigPage::slotConfigure() for( uint i=0; i<editorPages.count(); i++ ) { - editorPages.tqat( i )->apply(); + editorPages.at( i )->apply(); } } diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index 938758852..81d05b21a 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -72,9 +72,9 @@ #include <tqtimer.h> #include <tqfile.h> -#include <tqclipboard.h> -#include <tqtextstream.h> -#include <tqtextcodec.h> +#include <clipboard.h> +#include <textstream.h> +#include <textcodec.h> #include <tqmap.h> //END includes @@ -323,7 +323,7 @@ void KateDocument::enablePluginGUI (KTextEditor::Plugin *plugin) if (!KTextEditor::pluginViewInterface(plugin)) return; for (uint i=0; i< m_views.count(); i++) - enablePluginGUI (plugin, m_views.tqat(i)); + enablePluginGUI (plugin, m_views.at(i)); } void KateDocument::disablePluginGUI (KTextEditor::Plugin *plugin, KateView *view) @@ -347,7 +347,7 @@ void KateDocument::disablePluginGUI (KTextEditor::Plugin *plugin) if (!KTextEditor::pluginViewInterface(plugin)) return; for (uint i=0; i< m_views.count(); i++) - disablePluginGUI (plugin, m_views.tqat(i)); + disablePluginGUI (plugin, m_views.at(i)); } //END @@ -641,7 +641,7 @@ bool KateDocument::setText(const TQString &s) TQValueList<KTextEditor::Mark> msave; for (uint i=0; i < m.count(); i++) - msave.append (*m.tqat(i)); + msave.append (*m.at(i)); editStart (); @@ -924,7 +924,7 @@ void KateDocument::editStart (bool withUndo) for (uint z = 0; z < m_views.count(); z++) { - m_views.tqat(z)->editStart (); + m_views.at(z)->editStart (); } m_buffer->editStart (); @@ -1029,7 +1029,7 @@ void KateDocument::editEnd () // edit end for all views !!!!!!!!! for (uint z = 0; z < m_views.count(); z++) - m_views.tqat(z)->editEnd (m_buffer->editTagStart(), m_buffer->editTagEnd(), m_buffer->editTagFrom()); + m_views.at(z)->editEnd (m_buffer->editTagStart(), m_buffer->editTagEnd(), m_buffer->editTagFrom()); if (m_buffer->editChanged()) { @@ -1187,7 +1187,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const TQString &str ) 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? m_buffer->changeLine(line); @@ -1410,7 +1410,7 @@ bool KateDocument::editInsertLine ( uint line, const TQString &s ) removeTrailingSpace( line ); // old line 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->changeLine(line); @@ -2011,7 +2011,7 @@ void KateDocument::configDialog() for (uint i=0; i<editorPages.count(); i++) { - editorPages.tqat(i)->apply(); + editorPages.at(i)->apply(); } KateDocumentConfig::global()->configEnd (); @@ -2316,7 +2316,7 @@ bool KateDocument::openURL( const KURL &url ) w = m_views.first(); if (w) - m_job->setWindow (w->tqtopLevelWidget()); + m_job->setWindow (w->topLevelWidget()); emit started( m_job ); @@ -2589,7 +2589,7 @@ bool KateDocument::saveFile() // if (!m_buffer->canEncode () && (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; } @@ -2869,7 +2869,7 @@ void KateDocument::setModified(bool m) { void KateDocument::makeAttribs(bool needInvalidate) { for (uint z = 0; z < m_views.count(); z++) - m_views.tqat(z)->renderer()->updateAttributes (); + m_views.at(z)->renderer()->updateAttributes (); if (needInvalidate) m_buffer->invalidateHighlighting(); @@ -3195,7 +3195,7 @@ void KateDocument::backspace( KateView *view, const KateTextCursor& c ) if (!textLine) return; - if (config()->wordWrap() && textLine->endingWith(TQString::tqfromLatin1(" "))) + if (config()->wordWrap() && textLine->endingWith(TQString::fromLatin1(" "))) { // gg: in hard wordwrap mode, backspace must also eat the trailing space removeText (line-1, textLine->length()-1, line, 0); @@ -3227,7 +3227,7 @@ void KateDocument::del( KateView *view, const KateTextCursor& c ) void KateDocument::paste ( KateView* view ) { - TQString s = TQApplication::tqclipboard()->text(); + TQString s = TQApplication::clipboard()->text(); if (s.isEmpty()) return; @@ -3981,9 +3981,9 @@ void KateDocument::transform( KateView *v, const KateTextCursor &c, if ( ( ! start && ! p ) || ( ( ln == selstart.line() || v->blockSelectionMode() ) && ! p && ! highlight()->isInWord( l->getChar( start - 1 )) ) || - ( p && ! highlight()->isInWord( s.tqat( p-1 ) ) ) + ( p && ! highlight()->isInWord( s.at( p-1 ) ) ) ) - s[p] = s.tqat(p).upper(); + s[p] = s.at(p).upper(); p++; } } @@ -4096,7 +4096,7 @@ TQString KateDocument::getWord( const KateTextCursor& cursor ) { void KateDocument::tagLines(int start, int end) { for (uint z = 0; z < m_views.count(); z++) - m_views.tqat(z)->tagLines (start, end, true); + m_views.at(z)->tagLines (start, end, true); } void KateDocument::tagLines(KateTextCursor start, KateTextCursor end) @@ -4109,21 +4109,21 @@ void KateDocument::tagLines(KateTextCursor start, KateTextCursor end) } for (uint z = 0; z < m_views.count(); z++) - m_views.tqat(z)->tagLines(start, end, true); + m_views.at(z)->tagLines(start, end, true); } void KateDocument::repaintViews(bool paintOnlyDirty) { for (uint z = 0; z < m_views.count(); z++) - m_views.tqat(z)->repaintText(paintOnlyDirty); + m_views.at(z)->repaintText(paintOnlyDirty); } void KateDocument::tagAll() { for (uint z = 0; z < m_views.count(); z++) { - m_views.tqat(z)->tagAll(); - m_views.tqat(z)->updateView (true); + m_views.at(z)->tagAll(); + m_views.at(z)->updateView (true); } } @@ -4287,9 +4287,9 @@ void KateDocument::setDocName (TQString name ) for (uint z=0; z < KateFactory::self()->documents()->count(); z++) { - if ( (KateFactory::self()->documents()->tqat(z) != this) && (KateFactory::self()->documents()->tqat(z)->url().filename() == url().filename()) ) - if ( KateFactory::self()->documents()->tqat(z)->m_docNameNumber > count ) - count = KateFactory::self()->documents()->tqat(z)->m_docNameNumber; + if ( (KateFactory::self()->documents()->at(z) != this) && (KateFactory::self()->documents()->at(z)->url().filename() == url().filename()) ) + if ( KateFactory::self()->documents()->at(z)->m_docNameNumber > count ) + count = KateFactory::self()->documents()->at(z)->m_docNameNumber; } m_docNameNumber = count + 1; @@ -4437,14 +4437,14 @@ void KateDocument::reloadFile() TQValueList<int> lines, cols; for ( uint i=0; i < m_views.count(); i++ ) { - lines.append( m_views.tqat( i )->cursorLine() ); - cols.append( m_views.tqat( i )->cursorColumn() ); + lines.append( m_views.at( i )->cursorLine() ); + cols.append( m_views.at( i )->cursorColumn() ); } KateDocument::openURL( url() ); for ( uint i=0; i < m_views.count(); i++ ) - m_views.tqat( i )->setCursorPositionInternal( lines[ i ], cols[ i ], m_config->tabWidth(), false ); + m_views.at( i )->setCursorPositionInternal( lines[ i ], cols[ i ], m_config->tabWidth(), false ); m_reloading = false; diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp index c42f698a3..64bde8718 100644 --- a/kate/part/katefactory.cpp +++ b/kate/part/katefactory.cpp @@ -267,7 +267,7 @@ KateIndentScript KateFactory::indentScript (const TQString &scriptname) KateIndentScript result; for(uint i=0;i<m_indentScriptManagers.count();i++) { - result=m_indentScriptManagers.tqat(i)->script(scriptname); + result=m_indentScriptManagers.at(i)->script(scriptname); if (!result.isNull()) return result; } return result; diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index c29b8641e..c18961ac4 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -43,7 +43,7 @@ #include <tqheader.h> #include <tqhgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqpushbutton.h> #include <tqtoolbutton.h> @@ -106,20 +106,20 @@ void KateFileTypeManager::save (TQPtrList<KateFileType> *v) TQStringList newg; for (uint z=0; z < v->count(); z++) { - config.setGroup (v->tqat(z)->name); + config.setGroup (v->at(z)->name); - config.writeEntry ("Section", v->tqat(z)->section); - config.writeEntry ("Wildcards", v->tqat(z)->wildcards, ';'); - config.writeEntry ("Mimetypes", v->tqat(z)->mimetypes, ';'); - config.writeEntry ("Priority", v->tqat(z)->priority); + config.writeEntry ("Section", v->at(z)->section); + config.writeEntry ("Wildcards", v->at(z)->wildcards, ';'); + config.writeEntry ("Mimetypes", v->at(z)->mimetypes, ';'); + config.writeEntry ("Priority", v->at(z)->priority); - TQString varLine = v->tqat(z)->varLine; + TQString varLine = v->at(z)->varLine; if (TQRegExp("kate:(.*)").search(varLine) < 0) varLine.prepend ("kate: "); config.writeEntry ("Variables", varLine); - newg << v->tqat(z)->name; + newg << v->at(z)->name; } TQStringList g (config.groupList()); @@ -187,8 +187,8 @@ int KateFileTypeManager::fileType (KateDocument *doc) for (uint z=0; z < m_types.count(); z++) { - if (m_types.tqat(z)->mimetypes.findIndex (mt->name()) > -1) - types.append (m_types.tqat(z)); + if (m_types.at(z)->mimetypes.findIndex (mt->name()) > -1) + types.append (m_types.at(z)); } if ( !types.isEmpty() ) @@ -218,13 +218,13 @@ int KateFileTypeManager::wildcardsFind (const TQString &fileName) for (uint z=0; z < m_types.count(); z++) { - for( TQStringList::Iterator it = m_types.tqat(z)->wildcards.begin(); it != m_types.tqat(z)->wildcards.end(); ++it ) + for( TQStringList::Iterator it = m_types.at(z)->wildcards.begin(); it != m_types.at(z)->wildcards.end(); ++it ) { // anders: we need to be sure to match the end of string, as eg a css file // would otherwise end up with the c hl TQRegExp re(*it, true, true); if ( ( re.search( fileName ) > -1 ) && ( re.matchedLength() == (int)fileName.length() ) ) - types.append (m_types.tqat(z)); + types.append (m_types.at(z)); } } @@ -251,7 +251,7 @@ int KateFileTypeManager::wildcardsFind (const TQString &fileName) const KateFileType *KateFileTypeManager::fileType (uint number) { if (number < m_types.count()) - return m_types.tqat(number); + return m_types.at(number); return 0; } @@ -373,7 +373,7 @@ void KateFileTypeConfigTab::reload() { KateFileType *type = new KateFileType (); - *type = *KateFactory::self()->fileTypeManager()->list()->tqat(z); + *type = *KateFactory::self()->fileTypeManager()->list()->at(z); m_types.append (type); } @@ -398,10 +398,10 @@ void KateFileTypeConfigTab::update () typeCombo->clear (); for( uint i = 0; i < m_types.count(); i++) { - if (m_types.tqat(i)->section.length() > 0) - typeCombo->insertItem(m_types.tqat(i)->section + TQString ("/") + m_types.tqat(i)->name); + if (m_types.at(i)->section.length() > 0) + typeCombo->insertItem(m_types.at(i)->section + TQString ("/") + m_types.at(i)->name); else - typeCombo->insertItem(m_types.tqat(i)->name); + typeCombo->insertItem(m_types.at(i)->name); } typeCombo->setCurrentItem (0); @@ -427,7 +427,7 @@ void KateFileTypeConfigTab::newType () TQString newN = i18n("New Filetype"); for( uint i = 0; i < m_types.count(); i++) { - if (m_types.tqat(i)->name == newN) + if (m_types.at(i)->name == newN) { typeCombo->setCurrentItem (i); typeChanged (i); @@ -464,7 +464,7 @@ void KateFileTypeConfigTab::typeChanged (int type) KateFileType *t = 0; if ((type > -1) && ((uint)type < m_types.count())) - t = m_types.tqat(type); + t = m_types.at(type); if (t) { @@ -536,8 +536,8 @@ void KateViewFileTypeAction::slotAboutToShow() for (int z=0; z<count; z++) { - TQString hlName = KateFactory::self()->fileTypeManager()->list()->tqat(z)->name; - TQString hlSection = KateFactory::self()->fileTypeManager()->list()->tqat(z)->section; + TQString hlName = KateFactory::self()->fileTypeManager()->list()->at(z)->name; + TQString hlSection = KateFactory::self()->fileTypeManager()->list()->at(z)->section; if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) ) { @@ -551,7 +551,7 @@ void KateViewFileTypeAction::slotAboutToShow() int m = subMenusName.findIndex (hlSection); names << hlName; - subMenus.tqat(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); + subMenus.at(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); } else if (names.contains(hlName) < 1) { @@ -564,8 +564,8 @@ void KateViewFileTypeAction::slotAboutToShow() for (uint i=0;i<subMenus.count();i++) { - for (uint i2=0;i2<subMenus.tqat(i)->count();i2++) - subMenus.tqat(i)->setItemChecked(subMenus.tqat(i)->idAt(i2),false); + for (uint i2=0;i2<subMenus.at(i)->count();i2++) + subMenus.at(i)->setItemChecked(subMenus.at(i)->idAt(i2),false); } popupMenu()->setItemChecked (0, false); @@ -577,8 +577,8 @@ void KateViewFileTypeAction::slotAboutToShow() if ((t = KateFactory::self()->fileTypeManager()->fileType (doc->fileType()))) { int i = subMenusName.findIndex (t->section); - if (i >= 0 && subMenus.tqat(i)) - subMenus.tqat(i)->setItemChecked (doc->fileType()+1, true); + if (i >= 0 && subMenus.at(i)) + subMenus.at(i)->setItemChecked (doc->fileType()+1, true); else popupMenu()->setItemChecked (0, true); } diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index 7f5bcc882..31b33677c 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -47,7 +47,7 @@ #include <kapplication.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> //END //BEGIN defines @@ -65,10 +65,10 @@ static const int KATE_DYNAMIC_CONTEXTS_RESET_DELAY = 30 * 1000; inline bool kateInsideString (const TQString &str, TQChar ch) { - const TQChar *tqunicode = str.tqunicode(); + const TQChar *unicode = str.unicode(); const uint len = str.length(); for (uint i=0; i < len; i++) - if (tqunicode[i] == ch) + if (unicode[i] == ch) return true; return false; @@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const TQString& text, int offset, int len) 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 0; @@ -815,7 +815,7 @@ int KateHlCOct::checkHgl(const TQString& text, int offset, int len) int offset2 = offset; - while ((len > 0) && (text.tqat(offset2) >= TQChar('0') && text.tqat(offset2) <= TQChar('7'))) + while ((len > 0) && (text.at(offset2) >= TQChar('0') && text.at(offset2) <= TQChar('7'))) { offset2++; len--; @@ -958,7 +958,7 @@ int KateHlRegExpr::checkHgl(const TQString& text, int offset, int /*len*/) TQStringList *KateHlRegExpr::capturedTexts() { - return new TQStringList(Expr->tqcapturedTexts()); + return new TQStringList(Expr->capturedTexts()); } KateHlItem *KateHlRegExpr::clone(const TQStringList *args) @@ -1038,7 +1038,7 @@ static int checkEscapedChar(const TQString& text, int offset, int& len) // replaced with something else but // for right now they work // check for hexdigits - for (i = 0; (len > 0) && (i < 2) && (static_cast<const char>(text.tqat(offset)) >= '0' && static_cast<const char>(text.tqat(offset)) <= '9' || (text[offset] & 0xdf) >= 'A' && (text[offset] & 0xdf) <= 'F'); i++) + for (i = 0; (len > 0) && (i < 2) && (static_cast<const char>(text.at(offset)) >= '0' && static_cast<const char>(text.at(offset)) <= '9' || (text[offset] & 0xdf) >= 'A' && (text[offset] & 0xdf) <= 'F'); i++) { offset++; len--; @@ -1051,7 +1051,7 @@ static int checkEscapedChar(const TQString& text, int offset, int& len) case '0': case '1': case '2': case '3' : case '4': case '5': case '6': case '7' : - for (i = 0; (len > 0) && (i < 3) && (static_cast<const char>(text.tqat(offset)) >= '0' && static_cast<const char>(text.tqat(offset)) <= '7'); i++) + for (i = 0; (len > 0) && (i < 3) && (static_cast<const char>(text.at(offset)) >= '0' && static_cast<const char>(text.at(offset)) <= '7'); i++) { offset++; len--; @@ -1890,7 +1890,7 @@ void KateHighlighting::addToKateHlItemDataList() int KateHighlighting::lookupAttrName(const TQString& name, KateHlItemDataList &iDl) { for (uint i = 0; i < iDl.count(); i++) - if (iDl.tqat(i)->name == buildPrefix+name) + if (iDl.at(i)->name == buildPrefix+name) return i; kdDebug(13010)<<"Couldn't resolve itemDataName:"<<name<<endl; @@ -2885,13 +2885,13 @@ void KateHighlighting::clearAttributeArrays () for (uint z = 0; z < nAttribs; z++) { - KateHlItemData *itemData = itemDataList.tqat(z); - KateAttribute n = *defaultStyleList.tqat(itemData->defStyleNum); + KateHlItemData *itemData = itemDataList.at(z); + KateAttribute n = *defaultStyleList.at(itemData->defStyleNum); if (itemData && itemData->isSomethingSet()) n += *itemData; - array->tqat(z) = n; + array->at(z) = n; } } } @@ -2924,13 +2924,13 @@ TQMemArray<KateAttribute> *KateHighlighting::attributes (uint schema) for (uint z = 0; z < nAttribs; z++) { - KateHlItemData *itemData = itemDataList.tqat(z); - KateAttribute n = *defaultStyleList.tqat(itemData->defStyleNum); + KateHlItemData *itemData = itemDataList.at(z); + KateAttribute n = *defaultStyleList.at(itemData->defStyleNum); if (itemData && itemData->isSomethingSet()) n += *itemData; - array->tqat(z) = n; + array->at(z) = n; } m_attributeArrays.insert(schema, array); @@ -2946,7 +2946,7 @@ void KateHighlighting::getKateHlItemDataListCopy (uint schema, KateHlItemDataLis outlist.clear (); outlist.setAutoDelete (true); for (uint z=0; z < itemDataList.count(); z++) - outlist.append (new KateHlItemData (*itemDataList.tqat(z))); + outlist.append (new KateHlItemData (*itemDataList.at(z))); } //END @@ -2974,7 +2974,7 @@ KateHlManager::KateHlManager() if (insert == hlList.count()) break; - if ( TQString(hlList.tqat(insert)->section() + hlList.tqat(insert)->nameTranslated()).lower() + if ( TQString(hlList.at(insert)->section() + hlList.at(insert)->nameTranslated()).lower() > TQString(hl->section() + hl->nameTranslated()).lower() ) break; } @@ -3011,14 +3011,14 @@ KateHighlighting *KateHlManager::getHl(int n) if (n < 0 || n >= (int) hlList.count()) n = 0; - return hlList.tqat(n); + return hlList.at(n); } int KateHlManager::nameFind(const TQString &name) { int z (hlList.count() - 1); for (; z > 0; z--) - if (hlList.tqat(z)->name() == name) + if (hlList.at(z)->name() == name) return z; return z; @@ -3269,7 +3269,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list) for (uint z = 0; z < defaultStyles(); z++) { - KateAttribute *i = list.tqat(z); + KateAttribute *i = list.at(z); TQStringList s = config->readListEntry(defaultStyleName(z)); if (!s.isEmpty()) { @@ -3323,7 +3323,7 @@ void KateHlManager::setDefaults(uint schema, KateAttributeList &list) for (uint z = 0; z < defaultStyles(); z++) { TQStringList settings; - KateAttribute *i = list.tqat(z); + KateAttribute *i = list.at(z); settings<<(i->itemSet(KateAttribute::TextColor)?TQString::number(i->textColor().rgb(),16):""); settings<<(i->itemSet(KateAttribute::SelectedTextColor)?TQString::number(i->selectedTextColor().rgb(),16):""); @@ -3348,22 +3348,22 @@ int KateHlManager::highlights() TQString KateHlManager::hlName(int n) { - return hlList.tqat(n)->name(); + return hlList.at(n)->name(); } TQString KateHlManager::hlNameTranslated(int n) { - return hlList.tqat(n)->nameTranslated(); + return hlList.at(n)->nameTranslated(); } TQString KateHlManager::hlSection(int n) { - return hlList.tqat(n)->section(); + return hlList.at(n)->section(); } bool KateHlManager::hlHidden(int n) { - return hlList.tqat(n)->hidden(); + return hlList.at(n)->hidden(); } TQString KateHlManager::identifierForName(const TQString& name) @@ -3433,7 +3433,7 @@ void KateViewHighlightAction::slotAboutToShow() int m = subMenusName.findIndex (hlSection); names << hlName; - subMenus.tqat(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); + subMenus.at(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); } else if (names.contains(hlName) < 1) { @@ -3447,16 +3447,16 @@ void KateViewHighlightAction::slotAboutToShow() for (uint i=0;i<subMenus.count();i++) { - for (uint i2=0;i2<subMenus.tqat(i)->count();i2++) + for (uint i2=0;i2<subMenus.at(i)->count();i2++) { - subMenus.tqat(i)->setItemChecked(subMenus.tqat(i)->idAt(i2),false); + subMenus.at(i)->setItemChecked(subMenus.at(i)->idAt(i2),false); } } popupMenu()->setItemChecked (0, false); int i = subMenusName.findIndex (KateHlManager::self()->hlSection(doc->hlMode())); - if (i >= 0 && subMenus.tqat(i)) - subMenus.tqat(i)->setItemChecked (doc->hlMode(), true); + if (i >= 0 && subMenus.at(i)) + subMenus.at(i)->setItemChecked (doc->hlMode(), true); else popupMenu()->setItemChecked (0, true); } diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp index 615adab01..dda470037 100644 --- a/kate/part/katejscript.cpp +++ b/kate/part/katejscript.cpp @@ -47,7 +47,7 @@ #include <tqfileinfo.h> #include <tqpopupmenu.h> #include <tqregexp.h> -#include <tqtextstream.h> +#include <textstream.h> namespace KJS { @@ -62,7 +62,7 @@ UString::UString(const TQString &d) { unsigned int len = d.length(); 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); } @@ -416,10 +416,10 @@ KJS::Value KJS::KateJSDocumentProtoFunc::call(KJS::ExecState *exec, KJS::Object return KJS::Null (); case KateJSDocument::IsInWord: - return KJS::Boolean( doc->highlight()->isInWord( args[0].toString(exec).qstring().tqat(0), args[1].toUInt32(exec) ) ); + return KJS::Boolean( doc->highlight()->isInWord( args[0].toString(exec).qstring().at(0), args[1].toUInt32(exec) ) ); case KateJSDocument::CanBreakAt: - return KJS::Boolean( doc->highlight()->canBreakAt( args[0].toString(exec).qstring().tqat(0), args[1].toUInt32(exec) ) ); + return KJS::Boolean( doc->highlight()->canBreakAt( args[0].toString(exec).qstring().at(0), args[1].toUInt32(exec) ) ); case KateJSDocument::CanComment: return KJS::Boolean( doc->highlight()->canComment( args[0].toUInt32(exec), args[1].toUInt32(exec) ) ); @@ -1135,7 +1135,7 @@ void KateIndentJScriptManager::parseScriptHeader(const TQString &filePath, if (currentState==NOTHING) { if (keyValue.exactMatch(line)) { - TQStringList sl=keyValue.tqcapturedTexts(); + TQStringList sl=keyValue.capturedTexts(); kdDebug(13050)<<"key:"<<sl[1]<<endl<<"value:"<<sl[2]<<endl; kdDebug(13050)<<"key-length:"<<sl[1].length()<<endl<<"value-length:"<<sl[2].length()<<endl; TQString key=sl[1]; diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index 925c99e1a..b6847dcc5 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -48,7 +48,7 @@ #include <tqgroupbox.h> #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqspinbox.h> #include <tqstringlist.h> @@ -184,7 +184,7 @@ bool KatePrinter::print (KateDocument *doc) // This retrieves all tags, ued or not, but // none of theese operations should be expensive, // and searcing each tag in the format strings is avoided. - TQDateTime dt = TQDateTime::tqcurrentDateTime(); + TQDateTime dt = TQDateTime::currentDateTime(); TQMap<TQString,TQString> tags; KUser u (KUser::UseRealUserID); @@ -505,7 +505,7 @@ bool KatePrinter::print (KateDocument *doc) // use color of dsNormal for the title string and the hline KateAttributeList _dsList; KateHlManager::self()->getDefaults ( renderer.config()->schema(), _dsList ); - paint.setPen( _dsList.tqat(0)->textColor() ); + paint.setPen( _dsList.at(0)->textColor() ); int _marg = 0; // this could be available globally!?? if ( useBox ) { diff --git a/kate/part/katerenderer.cpp b/kate/part/katerenderer.cpp index 143d24f6d..48b73d7e5 100644 --- a/kate/part/katerenderer.cpp +++ b/kate/part/katerenderer.cpp @@ -69,9 +69,9 @@ void KateRenderer::updateAttributes () KateAttribute* KateRenderer::attribute(uint pos) { if (pos < m_attributes->size()) - return &m_attributes->tqat(pos); + return &m_attributes->at(pos); - return &m_attributes->tqat(0); + return &m_attributes->at(0); } void KateRenderer::setDrawCaret(bool drawCaret) @@ -537,13 +537,13 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i if (isIMSel && !isTab) { // input method selection - fillColor = m_view->tqcolorGroup().color(TQColorGroup::Foreground); + fillColor = m_view->colorGroup().color(TQColorGroup::Foreground); } else if (isIMEdit && !isTab) { // XIM support // input method edit area - const TQColorGroup& cg = m_view->tqcolorGroup(); + const TQColorGroup& cg = m_view->colorGroup(); int h1, s1, v1, h2, s2, v2; TQColor(cg.color( TQColorGroup::Base )).hsv( &h1, &s1, &v1 ); TQColor(cg.color( TQColorGroup::Background )).hsv( &h2, &s2, &v2 ); @@ -576,7 +576,7 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i if (isIMSel && paintBackground && !isTab) { paint.save(); - paint.setPen( m_view->tqcolorGroup().color( TQColorGroup::BrightText ) ); + paint.setPen( m_view->colorGroup().color( TQColorGroup::BrightText ) ); } // Draw indentation markers. @@ -745,7 +745,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol) KateFontStruct *fs = config()->fontStruct(); - const TQChar *tqunicode = textLine->text(); + const TQChar *unicode = textLine->text(); const TQString &textString = textLine->string(); int x = 0; @@ -763,7 +763,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, int cursorCol) x += width; - if (z < len && tqunicode[z] == TQChar('\t')) + if (z < len && unicode[z] == TQChar('\t')) x -= x % width; } @@ -787,7 +787,7 @@ uint KateRenderer::textWidth(const KateTextLine::Ptr &textLine, uint startcol, u *needWrap = false; const uint len = textLine->length(); - const TQChar *tqunicode = textLine->text(); + const TQChar *unicode = textLine->text(); const TQString &textString = textLine->string(); 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? // 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; - if (tqunicode[z].isSpace()) + if (unicode[z].isSpace()) { lastWhiteSpace = z+1; lastWhiteSpaceX = x; @@ -887,7 +887,7 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol) if (!textLine) return 0; const uint len = textLine->length(); - const TQChar *tqunicode = textLine->text(); + const TQChar *unicode = textLine->text(); const TQString &textString = textLine->string(); x = oldX = 0; @@ -906,7 +906,7 @@ uint KateRenderer::textWidth( KateTextCursor &cursor, int xPos, uint startCol) x += width; - if (z < len && tqunicode[z] == TQChar('\t')) + if (z < len && unicode[z] == TQChar('\t')) x -= x % width; z++; diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 704e2776c..f4f0c5526 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -49,8 +49,8 @@ #include <tqgrid.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqtextcodec.h> -#include <tqlayout.h> +#include <textcodec.h> +#include <layout.h> #include <tqlineedit.h> #include <tqheader.h> #include <tqlistbox.h> @@ -643,14 +643,14 @@ void KateSchemaConfigFontColorTab::schemaChanged (uint schema) p.setColor( TQColorGroup::Highlight, KateFactory::self()->schemaManager()->schema(schema)-> readColorEntry( "Color Selection", &_c ) ); - _c = l->tqat(0)->textColor(); // not quite as much of an assumption ;) + _c = l->at(0)->textColor(); // not quite as much of an assumption ;) p.setColor( TQColorGroup::Text, _c ); m_defaultStyles->viewport()->setPalette( p ); // insert the default styles backwards to get them in the right order for ( int i = KateHlManager::self()->defaultStyles() - 1; i >= 0; i-- ) { - new KateStyleListItem( m_defaultStyles, KateHlManager::self()->defaultStyleName(i, true), l->tqat( i ) ); + new KateStyleListItem( m_defaultStyles, KateHlManager::self()->defaultStyleName(i, true), l->at( i ) ); } } @@ -770,7 +770,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) p.setColor( TQColorGroup::Highlight, KateFactory::self()->schemaManager()->schema(m_schema)-> readColorEntry( "Color Selection", &_c ) ); - _c = l->tqat(0)->textColor(); // not quite as much of an assumption ;) + _c = l->at(0)->textColor(); // not quite as much of an assumption ;) p.setColor( TQColorGroup::Text, _c ); m_styles->viewport()->setPalette( p ); @@ -795,9 +795,9 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) parent->setOpen(true); prefixes.insert( prefix, parent ); } - new KateStyleListItem( parent, name, l->tqat(itemData->defStyleNum), itemData ); + new KateStyleListItem( parent, name, l->at(itemData->defStyleNum), itemData ); } else { - new KateStyleListItem( m_styles, itemData->name, l->tqat(itemData->defStyleNum), itemData ); + new KateStyleListItem( m_styles, itemData->name, l->at(itemData->defStyleNum), itemData ); } } } @@ -1088,9 +1088,9 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &glob TQPixmap scl(16,16); scl.fill( i->style()->selectedTextColor() ); TQPixmap bgcl(16,16); - bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->tqcolorGroup().base() ); + bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->colorGroup().base() ); TQPixmap sbgcl(16,16); - sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->tqcolorGroup().base() ); + sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->colorGroup().base() ); if ( showtitle ) m.insertTitle( i->contextName(), KateStyleListItem::ContextName ); @@ -1156,7 +1156,7 @@ void KateStyleListView::slotMousePressed(int btn, TQListViewItem* i, const TQPoi if ( dynamic_cast<KateStyleListItem*>(i) ) { if ( btn == Qt::LeftButton && c > 0 ) { // map pos to item/column and call KateStyleListItem::activate(col, pos) - ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, tqitemRect(i).top() ) ); + ((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, itemRect(i).top() ) ); } } } @@ -1357,7 +1357,7 @@ void KateStyleListItem::toggleDefStyle() delete is; is = new KateAttribute( *ds ); updateStyle(); - tqrepaint(); + repaint(); } } @@ -1441,7 +1441,7 @@ void KateStyleListItem::setColor( int column ) break; } - tqrepaint(); + repaint(); } void KateStyleListItem::unsetColor( int c ) @@ -1465,7 +1465,7 @@ void KateStyleListItem::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int Q_ASSERT( lv ); //### // use a private color group and set the text/highlighted text colors - TQColorGroup mcg = lv->viewport()->tqcolorGroup(); + TQColorGroup mcg = lv->viewport()->colorGroup(); if ( col ) // col 0 is drawn by the superclass method p->fillRect( 0, 0, width, height(), TQBrush( mcg.base() ) ); @@ -1602,7 +1602,7 @@ void KateStyleListCaption::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, Q_ASSERT( lv ); //### // use the same colorgroup as the other items in the viewport - TQColorGroup mcg = lv->viewport()->tqcolorGroup(); + TQColorGroup mcg = lv->viewport()->colorGroup(); TQListViewItem::paintCell( p, mcg, col, width, align ); } diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index 5b3629347..57b8b1e9e 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -40,7 +40,7 @@ #include <kreplacedialog.h> #include <kpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> //BEGIN KateSearch @@ -386,7 +386,7 @@ void KateSearch::replaceOne() int ncaps = m_re.numCaptures(); while ( pos >= 0 ) { TQString substitute; - TQChar argument = TQString(br.cap(1)).tqat(0); + TQChar argument = TQString(br.cap(1)).at(0); if ( argument.isDigit() ) { // the second character is a digit, this is a backreference int ccap = argument.digitValue(); @@ -639,9 +639,9 @@ bool KateSearch::doSearch( const TQString& text ) { found = ( ( foundCol == 0 || - ! doc()->highlight()->isInWord( doc()->textLine( foundLine ).tqat( foundCol - 1 ) ) ) && + ! doc()->highlight()->isInWord( doc()->textLine( foundLine ).at( foundCol - 1 ) ) ) && ( foundCol + matchLen == doc()->lineLength( foundLine ) || - ! doc()->highlight()->isInWord( doc()->textLine( foundLine ).tqat( foundCol + matchLen ) ) ) + ! doc()->highlight()->isInWord( doc()->textLine( foundLine ).at( foundCol + matchLen ) ) ) ); if ( found ) { diff --git a/kate/part/katetemplatehandler.cpp b/kate/part/katetemplatehandler.cpp index e9124e77f..52e07a2e4 100644 --- a/kate/part/katetemplatehandler.cpp +++ b/kate/part/katetemplatehandler.cpp @@ -173,7 +173,7 @@ void KateTemplateHandler::generateRangeTable( uint insertLine, uint insertCol, c { ++col; - if ( insertString.tqat( colInText ) == '\n' ) + if ( insertString.at( colInText ) == '\n' ) { col = 0; line++; @@ -216,7 +216,7 @@ void KateTemplateHandler::slotTextInserted( int line, int col ) if ( !m_currentRange ) return ; - KateTemplatePlaceHolder *ph = m_tabOrder.tqat( m_currentTabStop ); + KateTemplatePlaceHolder *ph = m_tabOrder.at( m_currentTabStop ); TQString sourceText = m_doc->text ( m_currentRange->start().line(), m_currentRange->start().col(), m_currentRange->end().line(), m_currentRange->end().col(), false ); @@ -257,7 +257,7 @@ void KateTemplateHandler::locateRange( const KateTextCursor& cursor ) for ( uint i = 0;i < m_tabOrder.count();i++ ) { - KateTemplatePlaceHolder *ph = m_tabOrder.tqat( i ); + KateTemplatePlaceHolder *ph = m_tabOrder.at( i ); for ( KateSuperRangeList::const_iterator it = ph->ranges.begin();it != ph->ranges.end();++it ) { @@ -297,9 +297,9 @@ bool KateTemplateHandler::operator() ( KKey key ) if ( m_currentTabStop < 0 ) m_currentTabStop = m_tabOrder.count() - 1; } - m_currentRange = m_tabOrder.tqat( m_currentTabStop ) ->ranges.tqat( 0 ); + m_currentRange = m_tabOrder.at( m_currentTabStop ) ->ranges.at( 0 ); - if ( m_tabOrder.tqat( m_currentTabStop ) ->isInitialValue ) + if ( m_tabOrder.at( m_currentTabStop ) ->isInitialValue ) { m_doc->activeView()->setSelection( m_currentRange->start(), m_currentRange->end() ); } diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp index dbb827003..6c701e1ed 100644 --- a/kate/part/katetextline.cpp +++ b/kate/part/katetextline.cpp @@ -110,11 +110,11 @@ void KateTextLine::truncate(uint newLen) int KateTextLine::nextNonSpaceChar(uint pos) const { 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++) { - if(!tqunicode[i].isSpace()) + if(!unicode[i].isSpace()) return i; } @@ -128,11 +128,11 @@ int KateTextLine::previousNonSpaceChar(uint pos) const if (pos >= (uint)len) pos = len - 1; - const TQChar *tqunicode = m_text.tqunicode(); + const TQChar *unicode = m_text.unicode(); for(int i = pos; i >= 0; i--) { - if(!tqunicode[i].isSpace()) + if(!unicode[i].isSpace()) return i; } @@ -152,20 +152,20 @@ int KateTextLine::lastChar() const const TQChar *KateTextLine::firstNonSpace() const { 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 d = 0; 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++) { - if(tqunicode[i].isSpace()) + if(unicode[i].isSpace()) { - if (tqunicode[i] == TQChar('\t')) + if (unicode[i] == TQChar('\t')) d += tabwidth - (d % tabwidth); else 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 Q_ASSERT(pos < len); - const TQChar *tqunicode = m_text.tqunicode(); - const TQChar *matchUnicode = match.tqunicode(); + const TQChar *unicode = m_text.unicode(); + const TQChar *matchUnicode = match.unicode(); for (uint i=0; i < matchlen; i++) - if (tqunicode[i+pos] != matchUnicode[i]) + if (unicode[i+pos] != matchUnicode[i]) return false; return true; @@ -206,11 +206,11 @@ bool KateTextLine::startingWith(const TQString& match) const if (matchlen > m_text.length()) return false; - const TQChar *tqunicode = m_text.tqunicode(); - const TQChar *matchUnicode = match.tqunicode(); + const TQChar *unicode = m_text.unicode(); + const TQChar *matchUnicode = match.unicode(); for (uint i=0; i < matchlen; i++) - if (tqunicode[i] != matchUnicode[i]) + if (unicode[i] != matchUnicode[i]) return false; return true; @@ -223,12 +223,12 @@ bool KateTextLine::endingWith(const TQString& match) const if (matchlen > m_text.length()) return false; - const TQChar *tqunicode = m_text.tqunicode(); - const TQChar *matchUnicode = match.tqunicode(); + const TQChar *unicode = m_text.unicode(); + const TQChar *matchUnicode = match.unicode(); uint start = m_text.length() - matchlen; for (uint i=0; i < matchlen; i++) - if (tqunicode[start+i] != matchUnicode[i]) + if (unicode[start+i] != matchUnicode[i]) return false; return true; @@ -239,11 +239,11 @@ int KateTextLine::cursorX(uint pos, uint tabChars) const uint x = 0; 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++) { - if (tqunicode[z] == TQChar('\t')) + if (unicode[z] == TQChar('\t')) x += tabChars - (x % tabChars); else x++; @@ -257,11 +257,11 @@ uint KateTextLine::lengthWithTabs (uint tabChars) const { uint x = 0; 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++) { - if (tqunicode[z] == TQChar('\t')) + if (unicode[z] == TQChar('\t')) x += tabChars - (x % tabChars); else x++; @@ -346,7 +346,7 @@ char *KateTextLine::dump (char *buf, bool withHighlighting) const memcpy(buf, &l, 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; if (!withHighlighting) diff --git a/kate/part/katetextline.h b/kate/part/katetextline.h index 84df82908..3922d04d0 100644 --- a/kate/part/katetextline.h +++ b/kate/part/katetextline.h @@ -145,10 +145,10 @@ class KateTextLine : public KShared 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 */ - inline const TQChar *text() const { return m_text.tqunicode(); } + inline const TQChar *text() const { return m_text.unicode(); } /** * Highlighting array @@ -419,7 +419,7 @@ class KateTextLine : public KShared */ private: /** - * text of line as tqunicode + * text of line as unicode */ TQString m_text; diff --git a/kate/part/kateundo.cpp b/kate/part/kateundo.cpp index 81901d9f8..379df16f0 100644 --- a/kate/part/kateundo.cpp +++ b/kate/part/kateundo.cpp @@ -296,9 +296,9 @@ void KateUndoGroup::undo () if (m_doc->activeView()) { for (uint z=0; z < m_items.count(); z++) - if (m_items.tqat(z)->type() != KateUndoGroup::editMarkLineAutoWrapped) + if (m_items.at(z)->type() != KateUndoGroup::editMarkLineAutoWrapped) { - m_doc->activeView()->editSetCursor (m_items.tqat(z)->cursorBefore()); + m_doc->activeView()->editSetCursor (m_items.at(z)->cursorBefore()); break; } } @@ -319,9 +319,9 @@ void KateUndoGroup::redo () if (m_doc->activeView()) { for (uint z=0; z < m_items.count(); z++) - if (m_items.tqat(z)->type() != KateUndoGroup::editMarkLineAutoWrapped) + if (m_items.at(z)->type() != KateUndoGroup::editMarkLineAutoWrapped) { - m_doc->activeView()->editSetCursor (m_items.tqat(z)->cursorAfter()); + m_doc->activeView()->editSetCursor (m_items.at(z)->cursorAfter()); break; } } diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index a0310ecb5..8acad1f26 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -76,9 +76,9 @@ #include <tqstyle.h> #include <tqevent.h> #include <tqpopupmenu.h> -#include <tqlayout.h> -#include <tqclipboard.h> -#include <tqstylesheet.h> +#include <layout.h> +#include <clipboard.h> +#include <stylesheet.h> //END includes KateView::KateView( KateDocument *doc, TQWidget *parent, const char * name ) @@ -793,7 +793,7 @@ void KateView::contextMenuEvent( TQContextMenuEvent *ev ) if ( !m_doc || !m_doc->browserExtension() ) return; emit m_doc->browserExtension()->popupMenu( /*this, */ev->globalPos(), m_doc->url(), - TQString::tqfromLatin1( "text/plain" ) ); + TQString::fromLatin1( "text/plain" ) ); ev->accept(); } @@ -1233,11 +1233,11 @@ void KateView::updateRendererConfig() // update the text area m_viewInternal->updateView (true); - m_viewInternal->tqrepaint (); + m_viewInternal->repaint (); // update the left border right, for example linenumbers m_viewInternal->leftBorder->updateFont(); - m_viewInternal->leftBorder->tqrepaint (); + m_viewInternal->leftBorder->repaint (); // @@ showIndentLines is not cached anymore. // m_renderer->setShowIndentLines (m_renderer->config()->showIndentationLines()); @@ -1596,7 +1596,7 @@ void KateView::paste() { m_doc->paste( this ); emit selectionChanged(); - m_viewInternal->tqrepaint(); + m_viewInternal->repaint(); } void KateView::cut() @@ -1613,7 +1613,7 @@ void KateView::copy() const if (!hasSelection()) return; - TQApplication::tqclipboard()->setText(selection ()); + TQApplication::clipboard()->setText(selection ()); } void KateView::copyHTML() @@ -1629,7 +1629,7 @@ void KateView::copyHTML() drag->addDragObject( htmltextdrag); drag->addDragObject( new TQTextDrag( selection())); - TQApplication::tqclipboard()->setData(drag); + TQApplication::clipboard()->setData(drag); } TQString KateView::selectionAsHtml() diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp index 2b717d5cd..d4b47ccc9 100644 --- a/kate/part/kateviewhelpers.cpp +++ b/kate/part/kateviewhelpers.cpp @@ -47,7 +47,7 @@ #include <tqtimer.h> #include <tqwhatsthis.h> #include <tqregexp.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <math.h> diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp index 831866ef0..33e0826f8 100644 --- a/kate/part/kateviewinternal.cpp +++ b/kate/part/kateviewinternal.cpp @@ -46,8 +46,8 @@ #include <tqpopupmenu.h> #include <tqdropsite.h> #include <tqpainter.h> -#include <tqlayout.h> -#include <tqclipboard.h> +#include <layout.h> +#include <clipboard.h> #include <tqpixmap.h> #include <tqvbox.h> @@ -89,7 +89,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc) // cursor cursor.setMoveOnInsert (true); - // tqinvalidate selStartCached, or keyb selection is screwed initially + // invalidate selStartCached, or keyb selection is screwed initially selStartCached.setLine( -1 ); // // scrollbar for lines @@ -2649,9 +2649,9 @@ void KateViewInternal::keyReleaseEvent( TQKeyEvent* e ) if (m_selChangedByUser) { - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); m_selChangedByUser = false; } @@ -2711,9 +2711,9 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) m_view->selectLine( cursor ); } - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); // Keep the line at the select anchor selected during further // mouse selection @@ -2759,7 +2759,7 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) } else { - selStartCached.setLine( -1 ); // tqinvalidate + selStartCached.setLine( -1 ); // invalidate } if( !( e->state() & TQt::ShiftButton ) && isTargetSelected( e->pos() ) ) @@ -2889,9 +2889,9 @@ void KateViewInternal::mouseDoubleClickEvent(TQMouseEvent *e) // Move cursor to end (or beginning) of selected word if (m_view->hasSelection()) { - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); // Shift+DC before the "cached" word should move the cursor to the // beginning of the selection, not the end @@ -2933,9 +2933,9 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e ) if (m_selChangedByUser) { - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); // Set cursor to edge of selection... which edge depends on what // "direction" the selection was made in if ( m_view->selectStart < selectAnchor ) @@ -2961,9 +2961,9 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e ) if( m_doc->isReadWrite() ) { - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); m_view->paste (); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); } e->accept (); diff --git a/kate/part/kateviewinternal.h b/kate/part/kateviewinternal.h index 0d706ffc3..4dbc08bf8 100644 --- a/kate/part/kateviewinternal.h +++ b/kate/part/kateviewinternal.h @@ -222,7 +222,7 @@ class KateViewInternal : public TQWidget int scrollX; int scrollY; - TQt::tqCursorShape m_mouseCursor; + TQt::CursorShape m_mouseCursor; KateSuperCursor cursor; KateTextCursor displayCursor; diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index 6d440922e..073886898 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -56,7 +56,7 @@ #include <tqscrollview.h> #include <tqstring.h> #include <tqregexp.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvaluelist.h> #include <tqwidget.h> #include <tqfileinfo.h> @@ -871,8 +871,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) pos++; int newpos = absBase.find('/', pos); if (newpos == -1) newpos = absBase.length(); - TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); - TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); + TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos); + TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos); // kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl; // kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl; // kdDebug() << "pos: " << pos << " newpos: " << newpos << endl; @@ -886,8 +886,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) TQString rel; { - TQConstString relBase(absBase.tqunicode() + basepos, absBase.length() - basepos); - TQConstString relPath(absPath.tqunicode() + pathpos, absPath.length() - pathpos); + TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos); + TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos); // generate as many .. as there are path elements in relBase if (relBase.string().length() > 0) { for (int i = relBase.string().contains('/'); i > 0; --i) @@ -935,7 +935,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures ) if ( failures & ResultFailure ) { domDiff += "<pre>"; - FILE *pipe = popen( TQString::tqfromLatin1( "diff -u baseline/%1-result %3/%2-result" ) + FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-result %3/%2-result" ) .arg ( test, test, relOutputDir ).latin1(), "r" ); TQTextIStream *is = new TQTextIStream( pipe ); for ( int line = 0; line < 100 && !is->eof(); ++line ) { diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index 3f1e7fc2a..002d7f778 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -44,7 +44,7 @@ #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlistview.h> #include <tqpopupmenu.h> @@ -235,7 +235,7 @@ void ABGlobal::writeConfig() // fill in the current list for ( uint i = 0; i < m_ents->count(); i++ ) { - AutoBookmarkEnt *e = m_ents->tqat( i ); + AutoBookmarkEnt *e = m_ents->at( i ); config->setGroup( TQString("autobookmark%1").arg( i ) ); config->writeEntry( "pattern", e->pattern ); config->writeEntry( "filemask", e->filemask, ';' ); diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index df8c31cad..2dd2eb5c2 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -35,7 +35,7 @@ #include <kurl.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> K_EXPORT_COMPONENT_FACTORY( ktexteditor_insertfile, KGenericFactory<InsertFilePlugin>( "ktexteditor_insertfile" ) ) @@ -59,9 +59,9 @@ void InsertFilePlugin::addView(KTextEditor::View *view) void InsertFilePlugin::removeView(KTextEditor::View *view) { for (uint z=0; z < m_views.count(); z++) - if (m_views.tqat(z)->parentClient() == view) + if (m_views.at(z)->parentClient() == view) { - InsertFilePluginView *nview = m_views.tqat(z); + InsertFilePluginView *nview = m_views.at(z); m_views.remove (nview); delete nview; } diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index fef94b1dd..249abf9f2 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -485,9 +485,9 @@ void ISearchPlugin::removeView(KTextEditor::View *view) { for (uint z=0; z < m_views.count(); z++) { - if (m_views.tqat(z)->parentClient() == view) + if (m_views.at(z)->parentClient() == view) { - ISearchPluginView *nview = m_views.tqat(z); + ISearchPluginView *nview = m_views.at(z); m_views.remove (nview); delete nview; } diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index 3678c26f4..e78bb4228 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -58,9 +58,9 @@ void KDataToolPlugin::removeView(KTextEditor::View *view) { for (uint z=0; z < m_views.count(); z++) { - if (m_views.tqat(z)->parentClient() == view) + if (m_views.at(z)->parentClient() == view) { - KDataToolPluginView *nview = m_views.tqat(z); + KDataToolPluginView *nview = m_views.at(z); m_views.remove (nview); delete nview; } @@ -126,7 +126,7 @@ void KDataToolPluginView::aboutToShow() // find begin of word: m_singleWord_start = 0; for(int i = col; i >= 0; i--) { - TQChar ch = tmp_line.tqat(i); + TQChar ch = tmp_line.at(i); if( ! (ch.isLetter() || ch == '-' || ch == '\'') ) { m_singleWord_start = i+1; @@ -137,7 +137,7 @@ void KDataToolPluginView::aboutToShow() // find end of word: m_singleWord_end = tmp_line.length(); for(uint i = col+1; i < tmp_line.length(); i++) { - TQChar ch = tmp_line.tqat(i); + TQChar ch = tmp_line.at(i); if( ! (ch.isLetter() || ch == '-' || ch == '\'') ) { m_singleWord_end = i; diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index 435578d6d..81af51f08 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -48,7 +48,7 @@ #include <tqdict.h> #include <tqspinbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqhbox.h> #include <tqwhatsthis.h> #include <tqcheckbox.h> @@ -91,9 +91,9 @@ void DocWordCompletionPlugin::addView(KTextEditor::View *view) void DocWordCompletionPlugin::removeView(KTextEditor::View *view) { for (uint z=0; z < m_views.count(); z++) - if (m_views.tqat(z)->parentClient() == view) + if (m_views.at(z)->parentClient() == view) { - DocWordCompletionPluginView *nview = m_views.tqat(z); + DocWordCompletionPluginView *nview = m_views.at(z); m_views.remove (nview); delete nview; } diff --git a/kcert/kcertpart.cc b/kcert/kcertpart.cc index d0e091041..df0aff1d0 100644 --- a/kcert/kcertpart.cc +++ b/kcert/kcertpart.cc @@ -27,7 +27,7 @@ #include <klocale.h> #include <kdebug.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqbutton.h> #include <tqpushbutton.h> #include <tqcombobox.h> @@ -636,7 +636,7 @@ void KCertPart::displayCACert(KSSLCertificate *c) { // Set the valid period TQPalette cspl = _ca_validFrom->palette(); - if (TQDateTime::tqcurrentDateTime() < c->getQDTNotBefore()) { + if (TQDateTime::currentDateTime() < c->getQDTNotBefore()) { cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); } else { cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); @@ -645,7 +645,7 @@ void KCertPart::displayCACert(KSSLCertificate *c) { _ca_validFrom->setText(c->getNotBefore()); cspl = _ca_validUntil->palette(); - if (TQDateTime::tqcurrentDateTime() > c->getQDTNotAfter()) { + if (TQDateTime::currentDateTime() > c->getQDTNotAfter()) { cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); } else { cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); @@ -677,7 +677,7 @@ void KCertPart::displayPKCS12Cert(KSSLCertificate *c) { // Set the valid period TQPalette cspl = _p12_validFrom->palette(); - if (TQDateTime::tqcurrentDateTime() < c->getQDTNotBefore()) { + if (TQDateTime::currentDateTime() < c->getQDTNotBefore()) { cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); } else { cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); @@ -686,7 +686,7 @@ void KCertPart::displayPKCS12Cert(KSSLCertificate *c) { _p12_validFrom->setText(c->getNotBefore()); cspl = _p12_validUntil->palette(); - if (TQDateTime::tqcurrentDateTime() > c->getQDTNotAfter()) { + if (TQDateTime::currentDateTime() > c->getQDTNotAfter()) { cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); } else { cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); @@ -716,7 +716,7 @@ void KCertPart::slotChain(int c) { displayPKCS12Cert(_p12->getCertificate()); _p12_certState->setText(KSSLCertificate::verifyText(_p12->validate())); } else { - displayPKCS12Cert(_p12->getCertificate()->chain().getChain().tqat(c-1)); + displayPKCS12Cert(_p12->getCertificate()->chain().getChain().at(c-1)); } } diff --git a/kconf_update/kconf_update.cpp b/kconf_update/kconf_update.cpp index 4d3846f2c..7b4a33758 100644 --- a/kconf_update/kconf_update.cpp +++ b/kconf_update/kconf_update.cpp @@ -26,7 +26,7 @@ #include <stdlib.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kconfig.h> #include <ksimpleconfig.h> @@ -201,7 +201,7 @@ KonfUpdate::log() } } - (*m_textStream) << TQDateTime::tqcurrentDateTime().toString( Qt::ISODate ) << " "; + (*m_textStream) << TQDateTime::currentDateTime().toString( Qt::ISODate ) << " "; return *m_textStream; } diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp index 30be4f213..8cc2e9462 100644 --- a/kded/kbuildservicefactory.cpp +++ b/kded/kbuildservicefactory.cpp @@ -113,32 +113,32 @@ KBuildServiceFactory::save(TQDataStream &str) { KSycocaFactory::save(str); - m_nameDictOffset = str.tqdevice()->tqat(); + m_nameDictOffset = str.device()->at(); m_nameDict->save(str); - m_relNameDictOffset = str.tqdevice()->tqat(); + m_relNameDictOffset = str.device()->at(); m_relNameDict->save(str); saveOfferList(str); saveInitList(str); - m_menuIdDictOffset = str.tqdevice()->tqat(); + m_menuIdDictOffset = str.device()->at(); m_menuIdDict->save(str); - int endOfFactoryData = str.tqdevice()->tqat(); + int endOfFactoryData = str.device()->at(); // Update header (pass #3) saveHeader(str); // Seek to end. - str.tqdevice()->tqat(endOfFactoryData); + str.device()->at(endOfFactoryData); } void KBuildServiceFactory::saveOfferList(TQDataStream &str) { - m_offerListOffset = str.tqdevice()->tqat(); + m_offerListOffset = str.device()->at(); bool isNumber; for(TQDictIterator<KSycocaEntry::Ptr> itserv ( *m_entryDict ); @@ -201,7 +201,7 @@ KBuildServiceFactory::saveOfferList(TQDataStream &str) void KBuildServiceFactory::saveInitList(TQDataStream &str) { - m_initListOffset = str.tqdevice()->tqat(); + m_initListOffset = str.device()->at(); KService::List initList; diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp index 7499eda84..e231cd5da 100644 --- a/kded/kbuildservicegroupfactory.cpp +++ b/kded/kbuildservicegroupfactory.cpp @@ -165,14 +165,14 @@ KBuildServiceGroupFactory::save(TQDataStream &str) { KSycocaFactory::save(str); - m_baseGroupDictOffset = str.tqdevice()->tqat(); + m_baseGroupDictOffset = str.device()->at(); m_baseGroupDict->save(str); - int endOfFactoryData = str.tqdevice()->tqat(); + int endOfFactoryData = str.device()->at(); // Update header (pass #3) saveHeader(str); // Seek to end. - str.tqdevice()->tqat(endOfFactoryData); + str.device()->at(endOfFactoryData); } diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp index 1b09d10c6..27b55176d 100644 --- a/kded/kbuildservicetypefactory.cpp +++ b/kded/kbuildservicetypefactory.cpp @@ -152,13 +152,13 @@ KBuildServiceTypeFactory::save(TQDataStream &str) savePatternLists(str); - int endOfFactoryData = str.tqdevice()->tqat(); + int endOfFactoryData = str.device()->at(); // Update header (pass #3) saveHeader(str); // Seek to end. - str.tqdevice()->tqat(endOfFactoryData); + str.device()->at(endOfFactoryData); } void @@ -203,10 +203,10 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str) TQ_INT32 entrySize = 0; TQ_INT32 nrOfEntries = 0; - m_fastPatternOffset = str.tqdevice()->tqat(); + m_fastPatternOffset = str.device()->at(); // Write out fastPatternHeader (Pass #1) - str.tqdevice()->tqat(m_fastPatternOffset); + str.device()->at(m_fastPatternOffset); str << nrOfEntries; str << entrySize; @@ -214,27 +214,27 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str) TQStringList::ConstIterator it = fastPatterns.begin(); for ( ; it != fastPatterns.end() ; ++it ) { - int start = str.tqdevice()->tqat(); + int start = str.device()->at(); // Justify to 6 chars with spaces, so that the size remains constant // in the database file. TQString paddedPattern = (*it).leftJustify(6).right(4); // remove leading "*." //kdDebug(7021) << TQString("FAST : '%1' '%2'").arg(paddedPattern).arg(dict[(*it)]->name()) << endl; str << paddedPattern; str << dict[(*it)]->offset(); - entrySize = str.tqdevice()->tqat() - start; + entrySize = str.device()->at() - start; nrOfEntries++; } // store position - m_otherPatternOffset = str.tqdevice()->tqat(); + m_otherPatternOffset = str.device()->at(); // Write out fastPatternHeader (Pass #2) - str.tqdevice()->tqat(m_fastPatternOffset); + str.device()->at(m_fastPatternOffset); str << nrOfEntries; str << entrySize; // For the other patterns - str.tqdevice()->tqat(m_otherPatternOffset); + str.device()->at(m_otherPatternOffset); it = otherPatterns.begin(); for ( ; it != otherPatterns.end() ; ++it ) diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp index da5059a92..19f7a3671 100644 --- a/kded/kbuildsycoca.cpp +++ b/kded/kbuildsycoca.cpp @@ -160,12 +160,12 @@ void KBuildSycoca::processGnomeVfs() if (line[0] != '\t') { - app = TQString::tqfromLatin1(line); + app = TQString::fromLatin1(line); app.truncate(app.length()-1); } else if (strncmp(line+1, "mime_types=", 11) == 0) { - TQString mimetypes = TQString::tqfromLatin1(line+12); + TQString mimetypes = TQString::fromLatin1(line+12); mimetypes.truncate(mimetypes.length()-1); mimetypes.replace(TQRegExp("\\*"), "all"); KService *s = g_bsf->findServiceByName(app); @@ -500,7 +500,7 @@ bool KBuildSycoca::recreate() if( build()) // Parse dirs { save(); // Save database - if (m_str->tqdevice()->status()) + if (m_str->device()->status()) database->abort(); // Error m_str = 0L; if (!database->close()) @@ -541,7 +541,7 @@ bool KBuildSycoca::recreate() void KBuildSycoca::save() { // Write header (#pass 1) - m_str->tqdevice()->tqat(0); + m_str->device()->at(0); (*m_str) << (TQ_INT32) KSycoca::version(); KSycocaFactory * servicetypeFactory = 0L; @@ -575,14 +575,14 @@ void KBuildSycoca::save() factory = m_lstFactories->next()) { factory->save(*m_str); - if (m_str->tqdevice()->status()) + if (m_str->device()->status()) return; // error } - int endOfData = m_str->tqdevice()->tqat(); + int endOfData = m_str->device()->at(); // Write header (#pass 2) - m_str->tqdevice()->tqat(0); + m_str->device()->at(0); (*m_str) << (TQ_INT32) KSycoca::version(); for(KSycocaFactory *factory = m_lstFactories->first(); @@ -599,7 +599,7 @@ void KBuildSycoca::save() (*m_str) << (TQ_INT32) 0; // No more factories. // Jump to end of database - m_str->tqdevice()->tqat(endOfData); + m_str->device()->at(endOfData); } bool KBuildSycoca::checkDirTimestamps( const TQString& dirname, const TQDateTime& stamp, bool top ) diff --git a/kded/kctimefactory.cpp b/kded/kctimefactory.cpp index 746a1c433..966966a48 100644 --- a/kded/kctimefactory.cpp +++ b/kded/kctimefactory.cpp @@ -53,7 +53,7 @@ KCTimeInfo::save(TQDataStream &str) { KSycocaFactory::save(str); - m_dictOffset = str.tqdevice()->tqat(); + m_dictOffset = str.device()->at(); TQDictIterator<TQ_UINT32> it(ctimeDict); while( it.current()) { @@ -62,10 +62,10 @@ KCTimeInfo::save(TQDataStream &str) } str << TQString::null << (TQ_UINT32) 0; - int endOfFactoryData = str.tqdevice()->tqat(); + int endOfFactoryData = str.device()->at(); saveHeader(str); - str.tqdevice()->tqat(endOfFactoryData); + str.device()->at(endOfFactoryData); } void @@ -86,7 +86,7 @@ void KCTimeInfo::fillCTimeDict(TQDict<TQ_UINT32> &dict) { assert(m_str); - m_str->tqdevice()->tqat(m_dictOffset); + m_str->device()->at(m_dictOffset); TQString path; TQ_UINT32 ctime; while(true) diff --git a/kded/khostname.cpp b/kded/khostname.cpp index e7b1cf209..3f5d8f62a 100644 --- a/kded/khostname.cpp +++ b/kded/khostname.cpp @@ -23,7 +23,7 @@ #include <stdio.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <dcopclient.h> diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp index b1c3a612a..e147dcfaf 100644 --- a/kded/vfolder_menu.cpp +++ b/kded/vfolder_menu.cpp @@ -1000,7 +1000,7 @@ VFolderMenu::loadApplications(const TQString &dir, const TQString &prefix) while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || TQChar(fn.tqat(fn.length() - 1)).latin1() == '~') + if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == '~') continue; TQString pathfn = dir + fn; @@ -1110,7 +1110,7 @@ kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || TQChar(fn.tqat(fn.length() - 1)).latin1() == '~') + if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == '~') continue; TQString pathfn = dir + fn; diff --git a/kdewidgets/makekdewidgets.cpp b/kdewidgets/makekdewidgets.cpp index c5141d3f6..0248a4b58 100644 --- a/kdewidgets/makekdewidgets.cpp +++ b/kdewidgets/makekdewidgets.cpp @@ -6,7 +6,7 @@ #include <kmacroexpander.h> #include <kdebug.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqfileinfo.h> #include <tqfile.h> #include <tqbuffer.h> @@ -47,7 +47,7 @@ static const char classDef[] = "#ifndef EMBED_IMAGES\n" " TQPixmap pix(m_widgets[key].iconSet);\n" "#else\n" " TQPixmap pix(locate( \"data\", \n" - " TQString::tqfromLatin1(\"%PluginNameLower/pics/\") + m_widgets[key].iconSet));\n" + " TQString::fromLatin1(\"%PluginNameLower/pics/\") + m_widgets[key].iconSet));\n" "#endif\n" " return TQIconSet(pix);\n" " }\n" @@ -81,17 +81,17 @@ static const char classDef[] = "#ifndef EMBED_IMAGES\n" "%PluginName::%PluginName()\n" "{\n" " WidgetInfo widget;\n"; -static const char widgetDef[] = " widget.group = TQString::tqfromLatin1(\"%Group\");\n" +static const char widgetDef[] = " widget.group = TQString::fromLatin1(\"%Group\");\n" "#ifdef EMBED_IMAGES\n" " widget.iconSet = TQPixmap(%Pixmap);\n" "#else\n" - " widget.iconSet = TQString::tqfromLatin1(\"%IconSet\");\n" + " widget.iconSet = TQString::fromLatin1(\"%IconSet\");\n" "#endif\n" - " widget.includeFile = TQString::tqfromLatin1(\"%IncludeFile\");\n" - " widget.toolTip = TQString::tqfromLatin1(\"%ToolTip\");\n" - " widget.whatsThis = TQString::tqfromLatin1(\"%WhatsThis\");\n" + " widget.includeFile = TQString::fromLatin1(\"%IncludeFile\");\n" + " widget.toolTip = TQString::fromLatin1(\"%ToolTip\");\n" + " widget.whatsThis = TQString::fromLatin1(\"%WhatsThis\");\n" " widget.isContainer = %IsContainer;\n" - " m_widgets.insert(TQString::tqfromLatin1(\"%Class\"), widget);\n"; + " m_widgets.insert(TQString::fromLatin1(\"%Class\"), widget);\n"; static const char endCtor[] = " %Init\n" "}\n" "%PluginName::~%PluginName()\n" @@ -100,7 +100,7 @@ static const char endCtor[] = " %Init\n" "}\n" "TQWidget *%PluginName::create(const TQString &key, TQWidget *parent, const char *name)\n" "{\n"; -static const char widgetCreate[] = " if (key == TQString::tqfromLatin1(\"%Class\"))\n" +static const char widgetCreate[] = " if (key == TQString::fromLatin1(\"%Class\"))\n" " return new %ImplClass%ConstructorArgs;\n"; static const char endCreate[] = " return 0;\n" "}\n" diff --git a/kdoctools/kio_help.cpp b/kdoctools/kio_help.cpp index 9da16d83e..78873af72 100644 --- a/kdoctools/kio_help.cpp +++ b/kdoctools/kio_help.cpp @@ -19,9 +19,9 @@ #include <tqvaluelist.h> #include <tqfileinfo.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kdebug.h> #include <kurl.h> @@ -112,7 +112,7 @@ TQString HelpProtocol::lookupFile(const TQString &fname, } else { - tqunicodeError( i18n("There is no documentation available for %1." ).arg(path) ); + unicodeError( i18n("There is no documentation available for %1." ).arg(path) ); finished(); 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( "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\"></head>\n" @@ -148,10 +148,10 @@ void HelpProtocol::get( const KURL& url ) doc = url.path(); if ( !mGhelp ) { - if (doc.tqat(0) != '/') + if (doc.at(0) != '/') doc = doc.prepend('/'); - if (doc.tqat(doc.length() - 1) == '/') + if (doc.at(doc.length() - 1) == '/') doc += "index.html"; } @@ -215,7 +215,7 @@ void HelpProtocol::get( const KURL& url ) kdDebug( 7119 ) << "parsed " << mParsed.length() << endl; 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 { int pos1 = mParsed.find( "charset=" ); if ( pos1 > 0 ) { @@ -248,7 +248,7 @@ void HelpProtocol::get( const KURL& url ) kdDebug( 7119 ) << "parsed " << mParsed.length() << endl; 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 { TQString query = url.query(), anchor; @@ -316,7 +316,7 @@ void HelpProtocol::emitFile( const KURL& url ) 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; } diff --git a/kdoctools/kio_help.h b/kdoctools/kio_help.h index c442e7c61..13c198af1 100644 --- a/kdoctools/kio_help.h +++ b/kdoctools/kio_help.h @@ -37,7 +37,7 @@ private: TQString lookupFile(const TQString &fname, const TQString &query, bool &redirect); - void tqunicodeError( const TQString &t ); + void unicodeError( const TQString &t ); TQString mParsed; bool mGhelp; diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp index 8f20c2001..5c51457ce 100644 --- a/kdoctools/meinproc.cpp +++ b/kdoctools/meinproc.cpp @@ -23,7 +23,7 @@ #include <kaboutdata.h> #include <stdlib.h> #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqfileinfo.h> #include <kprocess.h> #include <tqvaluevector.h> diff --git a/kdoctools/xslt.cpp b/kdoctools/xslt.cpp index 5a40d6e60..e4f57e103 100644 --- a/kdoctools/xslt.cpp +++ b/kdoctools/xslt.cpp @@ -16,7 +16,7 @@ #include <assert.h> #include <kfilterbase.h> #include <kfilterdev.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <stdlib.h> #include <config.h> #include <stdarg.h> @@ -133,7 +133,7 @@ xmlParserInputPtr meinExternalEntityLoader(const char *URL, const char *ID, TQString splitOut(const TQString &parsed, int index) { int start_index = index + 1; - while (parsed.tqat(start_index - 1) != '>') start_index++; + while (parsed.at(start_index - 1) != '>') start_index++; int inside = 0; @@ -170,7 +170,7 @@ TQString splitOut(const TQString &parsed, int index) if (index > 0) { int endindex = filedata.findRev("</FILENAME>"); - while (filedata.tqat(endindex) != '>') endindex++; + while (filedata.at(endindex) != '>') endindex++; endindex++; filedata = filedata.left(index) + filedata.mid(endindex); } @@ -279,7 +279,7 @@ TQString lookForCache( const TQString &filename ) { kdDebug() << "lookForCache " << filename << endl; assert( filename.endsWith( ".docbook" ) ); - assert( filename.tqat( 0 ) == '/' ); + assert( filename.at( 0 ) == '/' ); TQString cache = filename.left( filename.length() - 7 ); TQString output; @@ -336,7 +336,7 @@ TQCString fromUnicode( const TQString &data ) buffer_len += test.length(); } else { TQString res; - res.sprintf( "&#%d;", TQChar(part.tqat( i )).tqunicode() ); + res.sprintf( "&#%d;", TQChar(part.at( i )).unicode() ); test = locale->fromUnicode( res ); if (buffer_len + test.length() + 1 > sizeof(buffer)) break; diff --git a/khtml/DESIGN.html b/khtml/DESIGN.html index b6419c891..16484d4f1 100644 --- a/khtml/DESIGN.html +++ b/khtml/DESIGN.html @@ -291,7 +291,7 @@ that defines the DTD to use for HTML (used mainly in the parser). <dd>Java related stuff. <dt><a href="misc/">misc:</a> <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> <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. diff --git a/khtml/css/css_base.h b/khtml/css/css_base.h index b38024bee..9a8774107 100644 --- a/khtml/css/css_base.h +++ b/khtml/css/css_base.h @@ -256,7 +256,7 @@ namespace DOM { virtual ~StyleListImpl(); unsigned long length() const { return m_lstChildren->count(); } - StyleBaseImpl *item(unsigned long num) const { return m_lstChildren->tqat(num); } + StyleBaseImpl *item(unsigned long num) const { return m_lstChildren->at(num); } void append(StyleBaseImpl *item) { m_lstChildren->append(item); } diff --git a/khtml/css/css_renderstyledeclarationimpl.cpp b/khtml/css/css_renderstyledeclarationimpl.cpp index eef98f41e..daf607a9e 100644 --- a/khtml/css/css_renderstyledeclarationimpl.cpp +++ b/khtml/css/css_renderstyledeclarationimpl.cpp @@ -930,7 +930,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) case CSS_PROP_TOP: return getPositionOffsetValue(renderer, CSS_PROP_TOP); case CSS_PROP_UNICODE_BIDI: - switch (style->tqunicodeBidi()) { + switch (style->unicodeBidi()) { case UBNormal: return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL); case Embed: diff --git a/khtml/css/css_ruleimpl.h b/khtml/css/css_ruleimpl.h index d9928994d..2753fcf83 100644 --- a/khtml/css/css_ruleimpl.h +++ b/khtml/css/css_ruleimpl.h @@ -137,7 +137,7 @@ public: ~CSSRuleListImpl(); unsigned long length() const { return m_lstCSSRules.count(); } - CSSRuleImpl *item ( unsigned long index ) { return m_lstCSSRules.tqat( index ); } + CSSRuleImpl *item ( unsigned long index ) { return m_lstCSSRules.at( index ); } /* not part of the DOM */ diff --git a/khtml/css/css_valueimpl.cpp b/khtml/css/css_valueimpl.cpp index 3fa38efe9..a6150c78b 100644 --- a/khtml/css/css_valueimpl.cpp +++ b/khtml/css/css_valueimpl.cpp @@ -281,7 +281,7 @@ void CSSStyleDeclarationImpl::removeCSSHints() return; for (int i = (int)m_lstValues->count()-1; i >= 0; i--) { - if (!m_lstValues->tqat(i)->nonCSSHint) + if (!m_lstValues->at(i)->nonCSSHint) m_lstValues->remove(i); } } @@ -358,8 +358,8 @@ unsigned long CSSStyleDeclarationImpl::length() const DOMString CSSStyleDeclarationImpl::item( unsigned long index ) const { - if(m_lstValues && index < m_lstValues->count() && m_lstValues->tqat(index)) - return getPropertyName(m_lstValues->tqat(index)->m_id); + if(m_lstValues && index < m_lstValues->count() && m_lstValues->at(index)) + return getPropertyName(m_lstValues->at(index)->m_id); return DOMString(); } diff --git a/khtml/css/css_valueimpl.h b/khtml/css/css_valueimpl.h index 668c53d93..3566c00cb 100644 --- a/khtml/css/css_valueimpl.h +++ b/khtml/css/css_valueimpl.h @@ -136,7 +136,7 @@ public: virtual ~CSSValueListImpl(); unsigned long length() const { return m_values.count(); } - CSSValueImpl *item ( unsigned long index ) { return m_values.tqat(index); } + CSSValueImpl *item ( unsigned long index ) { return m_values.at(index); } virtual bool isValueList() const { return true; } diff --git a/khtml/css/csshelper.cpp b/khtml/css/csshelper.cpp index 96e184f2f..b388d2215 100644 --- a/khtml/css/csshelper.cpp +++ b/khtml/css/csshelper.cpp @@ -78,7 +78,7 @@ DOMString khtml::parseURL(const DOMString &url) int nl = 0; 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->l = nl; diff --git a/khtml/css/cssparser.cpp b/khtml/css/cssparser.cpp index 474067cf0..6ca1a069b 100644 --- a/khtml/css/cssparser.cpp +++ b/khtml/css/cssparser.cpp @@ -166,7 +166,7 @@ void CSSParser::parseSheet( CSSStyleSheetImpl *sheet, const DOMString &string ) int length = string.length() + 3; 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 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 ) ); for ( unsigned int i = 0; i < strlen(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() ); data[length-4] = '}'; @@ -218,7 +218,7 @@ bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id, data = (unsigned short *)malloc( length *sizeof( unsigned short ) ); for ( unsigned int i = 0; i < strlen(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] = '}'; // 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 ) ); for ( unsigned int i = 0; i < strlen(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] = '}'; nonCSSHint = _nonCSSHint; @@ -522,7 +522,7 @@ bool CSSParser::parseValue( int propId, bool important ) valid_primitive = true; break; - case CSS_PROP_CLIP: // <tqshape> | auto | inherit + case CSS_PROP_CLIP: // <shape> | auto | inherit if ( id == CSS_VAL_AUTO ) valid_primitive = true; else if ( value->unit == Value::Function ) diff --git a/khtml/css/cssproperties.c b/khtml/css/cssproperties.c index 894ab787f..c86f2d326 100644 --- a/khtml/css/cssproperties.c +++ b/khtml/css/cssproperties.c @@ -281,7 +281,7 @@ findProp (register const char *str, register unsigned int len) #line 102 "cssproperties.gperf" {"text-align", CSS_PROP_TEXT_ALIGN}, #line 109 "cssproperties.gperf" - {"tqunicode-bidi", CSS_PROP_UNICODE_BIDI}, + {"unicode-bidi", CSS_PROP_UNICODE_BIDI}, #line 82 "cssproperties.gperf" {"outline-color", CSS_PROP_OUTLINE_COLOR}, #line 60 "cssproperties.gperf" @@ -632,7 +632,7 @@ static const char * const propertyList[] = { "text-shadow", "text-transform", "top", -"tqunicode-bidi", +"unicode-bidi", "vertical-align", "visibility", "white-space", diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp index 32391bb7f..35a5ff704 100644 --- a/khtml/css/cssstyleselector.cpp +++ b/khtml/css/cssstyleselector.cpp @@ -327,7 +327,7 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do if ( readbytes >= 0 ) file[readbytes] = '\0'; - TQString style = TQString::tqfromLatin1( file.data() ); + TQString style = TQString::fromLatin1( file.data() ); if(s) style += s->settingsToCSS(); DOMString str(style); @@ -352,7 +352,7 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do if ( readbytes >= 0 ) file[readbytes] = '\0'; - TQString style = TQString::tqfromLatin1( file.data() ); + TQString style = TQString::fromLatin1( file.data() ); DOMString str(style); s_quirksSheet = new DOM::CSSStyleSheetImpl(doc); @@ -742,7 +742,7 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, DOM::ElementImpl *e style->adjustBackgroundLayers(); // Only use slow repaints if we actually have a background image. - // FIXME: We only need to tqinvalidate the fixed regions when scrolling. It's total overkill to + // FIXME: We only need to invalidate the fixed regions when scrolling. It's total overkill to // prevent the entire view from blitting on a scroll. if (style->hasFixedBackgroundImage() && view) view->useSlowRepaints(); @@ -786,7 +786,7 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e, if (i == firstLen) values = addValues; - CSSProperty *prop = values->tqat(i >= firstLen ? i - firstLen : i); + CSSProperty *prop = values->at(i >= firstLen ? i - firstLen : i); Source source = Inline; if( prop->m_important ) source = InlineImportant; @@ -871,7 +871,7 @@ static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encoded if( attr.isNull() ) { return PseudoNone; } - TQConstString cu(attr.tqunicode(), attr.length()); + TQConstString cu(attr.unicode(), attr.length()); TQString u = cu.string(); if ( !u.contains("://") ) { 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 if ( sel->match == CSSSelector::Class && !e->hasClassList() ) return false; - TQChar* sel_uc = sel->value.tqunicode(); - TQChar* val_uc = value->tqunicode(); + TQChar* sel_uc = sel->value.unicode(); + TQChar* val_uc = value->unicode(); TQConstString sel_str(sel_uc, sel_len); TQConstString val_str(val_uc, val_len); @@ -1187,29 +1187,29 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm case CSSSelector::Contain: { //kdDebug( 6080 ) << "checking for contains match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); return val_str.string().contains(sel_str.string(), caseSensitive); } case CSSSelector::Begin: { //kdDebug( 6080 ) << "checking for beginswith match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); - return val_str.string().tqstartsWith(sel_str.string(), caseSensitive); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); + return val_str.string().startsWith(sel_str.string(), caseSensitive); } case CSSSelector::End: { //kdDebug( 6080 ) << "checking for endswith match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); - return val_str.string().tqendsWith(sel_str.string(), caseSensitive); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); + return val_str.string().endsWith(sel_str.string(), caseSensitive); } case CSSSelector::Hyphen: { //kdDebug( 6080 ) << "checking for hyphen match" << endl; - TQConstString val_str(value->tqunicode(), value->length()); - TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); + TQConstString val_str(value->unicode(), value->length()); + TQConstString sel_str(sel->value.unicode(), sel->value.length()); const TQString& str = val_str.string(); const TQString& selStr = sel_str.string(); if(str.length() < selStr.length()) return false; @@ -1782,7 +1782,7 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet, TQPtrList<CSSSelector> *s = r->selector(); for(int j = 0; j < (int)s->count(); j++) { - CSSOrderedRule *rule = new CSSOrderedRule(r, s->tqat(j), count()); + CSSOrderedRule *rule = new CSSOrderedRule(r, s->at(j), count()); TQPtrList<CSSOrderedRule>::append(rule); //kdDebug( 6080 ) << "appending StyleRule!" << endl; } @@ -1829,7 +1829,7 @@ void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet, for( int j = 0; j < ( int ) s->count(); j++ ) { CSSOrderedRule *orderedRule = new CSSOrderedRule( - styleRule, s->tqat( j ), count() ); + styleRule, s->at( j ), count() ); TQPtrList<CSSOrderedRule>::append( orderedRule ); } } @@ -1891,7 +1891,7 @@ void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint sel int len = values->count(); for(int i = 0; i < len; i++) { - CSSProperty *prop = values->tqat(i); + CSSProperty *prop = values->at(i); Source source = regular; if( prop->m_important ) source = important; @@ -2079,7 +2079,7 @@ static TQColor colorForCSSValue( int css_value ) KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support bckgrConfig.setGroup("Desktop0"); // Desktop background. - return bckgrConfig.readColorEntry("Color1", &tqApp->tqpalette().disabled().background()); + return bckgrConfig.readColorEntry("Color1", &tqApp->palette().disabled().background()); } return TQColor(); } @@ -2597,7 +2597,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) } case CSS_PROP_UNICODE_BIDI: { - HANDLE_INHERIT_AND_INITIAL(tqunicodeBidi, UnicodeBidi) + HANDLE_INHERIT_AND_INITIAL(unicodeBidi, UnicodeBidi) if(!primitiveValue) break; switch (primitiveValue->getIdent()) { case CSS_VAL_NORMAL: diff --git a/khtml/css/html4.css b/khtml/css/html4.css index 575945464..c3fd1a347 100644 --- a/khtml/css/html4.css +++ b/khtml/css/html4.css @@ -486,27 +486,27 @@ a:visited:active { color: red; outline: 1px dotted invert; } bdo[dir="ltr"] { direction: ltr; - tqunicode-bidi: bidi-override; + unicode-bidi: bidi-override; } bdo[dir="rtl"] { direction: rtl; - tqunicode-bidi: bidi-override; + unicode-bidi: bidi-override; } /* ### this selector seems to be still broken ... - *[dir="ltr"] { direction: ltr; tqunicode-bidi: embed } - *[dir="rtl"] { direction: rtl; tqunicode-bidi: embed } + *[dir="ltr"] { direction: ltr; unicode-bidi: embed } + *[dir="rtl"] { direction: rtl; unicode-bidi: embed } */ /* 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, form, frame, frameset, h1, h2, h3, h4, h5, h6, iframe, noscript, noframes, object, ol, p, ul, applet, center, dir, hr, menu, pre, li, table, tr, thead, tbody, tfoot, col, colgroup, td, th, caption - { tqunicode-bidi: embed } + { unicode-bidi: embed } */ /* end bidi settings */ diff --git a/khtml/dom/css_extensions.cpp b/khtml/dom/css_extensions.cpp index 01a47d5f1..23f7739dc 100644 --- a/khtml/dom/css_extensions.cpp +++ b/khtml/dom/css_extensions.cpp @@ -1881,15 +1881,15 @@ void CSS2Properties::setTop( const DOMString &value ) if(impl) ((ElementImpl *)impl)->setAttribute("top", value); } -DOMString CSS2Properties::tqunicodeBidi() const +DOMString CSS2Properties::unicodeBidi() const { if(!impl) return 0; - return ((ElementImpl *)impl)->getAttribute("tqunicodeBidi"); + return ((ElementImpl *)impl)->getAttribute("unicodeBidi"); } void CSS2Properties::setUnicodeBidi( const DOMString &value ) { - if(impl) ((ElementImpl *)impl)->setAttribute("tqunicodeBidi", value); + if(impl) ((ElementImpl *)impl)->setAttribute("unicodeBidi", value); } DOMString CSS2Properties::verticalAlign() const diff --git a/khtml/dom/css_extensions.h b/khtml/dom/css_extensions.h index bda2cfbbc..a6cdb2149 100644 --- a/khtml/dom/css_extensions.h +++ b/khtml/dom/css_extensions.h @@ -2515,14 +2515,14 @@ public: /** * See the <a - * href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-tqunicode-bidi"> - * tqunicode-bidi property definition </a> in CSS2. + * href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-unicode-bidi"> + * unicode-bidi property definition </a> in CSS2. * */ - DOM::DOMString tqunicodeBidi() const; + DOM::DOMString unicodeBidi() const; /** - * see tqunicodeBidi + * see unicodeBidi */ void setUnicodeBidi( const DOM::DOMString & ); diff --git a/khtml/dom/css_value.h b/khtml/dom/css_value.h index 7523a2797..5d4a043c7 100644 --- a/khtml/dom/css_value.h +++ b/khtml/dom/css_value.h @@ -633,7 +633,7 @@ class RectImpl; /** * The \c Rect interface is used to represent any <a - * href="http://www.w3.org/TR/REC-CSS2/visufx.html#value-def-tqshape"> + * href="http://www.w3.org/TR/REC-CSS2/visufx.html#value-def-shape"> * rect </a> value. This interface reflects the values in the * underlying style property. Hence, modifications made through this * interface modify the style property. diff --git a/khtml/dom/dom_doc.cpp b/khtml/dom/dom_doc.cpp index 088a7a94a..0ff123444 100644 --- a/khtml/dom/dom_doc.cpp +++ b/khtml/dom/dom_doc.cpp @@ -112,8 +112,8 @@ HTMLDocument DOMImplementation::createHTMLDocument( const DOMString& title ) r->open(); - r->write(TQString::tqfromLatin1("<HTML><HEAD><TITLE>") + title.string() + - TQString::tqfromLatin1("</TITLE></HEAD>")); + r->write(TQString::fromLatin1("<HTML><HEAD><TITLE>") + title.string() + + TQString::fromLatin1("</TITLE></HEAD>")); return r; } diff --git a/khtml/dom/dom_string.cpp b/khtml/dom/dom_string.cpp index f8487cf5a..14bdc2613 100644 --- a/khtml/dom/dom_string.cpp +++ b/khtml/dom/dom_string.cpp @@ -39,7 +39,7 @@ DOMString::DOMString(const TQString &str) return; } - impl = new DOMStringImpl( str.tqunicode(), str.length() ); + impl = new DOMStringImpl( str.unicode(), str.length() ); impl->ref(); } @@ -193,10 +193,10 @@ bool DOMString::percentage(int &_percentage) const return true; } -TQChar *DOMString::tqunicode() const +TQChar *DOMString::unicode() const { if(!impl) return 0; - return impl->tqunicode(); + return impl->unicode(); } TQString DOMString::string() const @@ -225,8 +225,8 @@ bool DOM::strcasecmp( const DOMString &as, const DOMString &bs ) { if ( as.length() != bs.length() ) return true; - const TQChar *a = as.tqunicode(); - const TQChar *b = bs.tqunicode(); + const TQChar *a = as.unicode(); + const TQChar *b = bs.unicode(); if ( a == b ) return false; if ( !( a && b ) ) return true; 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 ) { - const TQChar *a = as.tqunicode(); + const TQChar *a = as.unicode(); int l = as.length(); if ( !bs ) return ( l != 0 ); while ( l-- ) { @@ -265,7 +265,7 @@ bool DOM::operator==( const DOMString &a, const DOMString &b ) 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 false; } @@ -276,7 +276,7 @@ bool DOM::operator==( const DOMString &a, const TQString &b ) 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 false; } @@ -291,7 +291,7 @@ bool DOM::operator==( const DOMString &a, const char *b ) const TQChar *aptr = aimpl->s; while ( alen-- ) { unsigned char c = *b++; - if ( !c || ( *aptr++ ).tqunicode() != c ) + if ( !c || ( *aptr++ ).unicode() != c ) return false; } } diff --git a/khtml/dom/dom_string.h b/khtml/dom/dom_string.h index dec259882..3d4706b5a 100644 --- a/khtml/dom/dom_string.h +++ b/khtml/dom/dom_string.h @@ -97,7 +97,7 @@ public: */ DOMString upper() const; - TQChar *tqunicode() const; + TQChar *unicode() const; TQString string() const; int toInt() const; diff --git a/khtml/dom/html_block.h b/khtml/dom/html_block.h index b318d8cb9..4283bafa2 100644 --- a/khtml/dom/html_block.h +++ b/khtml/dom/html_block.h @@ -105,7 +105,7 @@ public: ~HTMLDivElement(); /** - * Horizontal text tqalignment. See the <a + * Horizontal text alignment. See the <a * href="http://www.w3.org/TR/REC-html40/present/graphics.html#adef-align"> * align attribute definition </a> in HTML 4.0. This attribute is * deprecated in HTML 4.0. @@ -231,7 +231,7 @@ public: ~HTMLHeadingElement(); /** - * Horizontal text tqalignment. See the <a + * Horizontal text alignment. See the <a * href="http://www.w3.org/TR/REC-html40/present/graphics.html#adef-align"> * align attribute definition </a> in HTML 4.0. This attribute is * deprecated in HTML 4.0. @@ -272,7 +272,7 @@ public: ~HTMLParagraphElement(); /** - * Horizontal text tqalignment. See the <a + * Horizontal text alignment. See the <a * href="http://www.w3.org/TR/REC-html40/present/graphics.html#adef-align"> * align attribute definition </a> in HTML 4.0. This attribute is * deprecated in HTML 4.0. diff --git a/khtml/dom/html_form.h b/khtml/dom/html_form.h index ef318ba06..0623e421b 100644 --- a/khtml/dom/html_form.h +++ b/khtml/dom/html_form.h @@ -798,7 +798,7 @@ public: void setAccessKey( const DOMString & ); /** - * Text tqalignment relative to \c FIELDSET . See the <a + * Text alignment relative to \c FIELDSET . See the <a * href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-align-LEGEND"> * align attribute definition </a> in HTML 4.0. This attribute is * deprecated in HTML 4.0. diff --git a/khtml/dom/html_image.cpp b/khtml/dom/html_image.cpp index a5cdb3b71..f7c9dac26 100644 --- a/khtml/dom/html_image.cpp +++ b/khtml/dom/html_image.cpp @@ -122,7 +122,7 @@ void HTMLAreaElement::setNoHref( bool _noHref ) } } -DOMString HTMLAreaElement::tqshape() const +DOMString HTMLAreaElement::shape() const { if(!impl) return DOMString(); return ((ElementImpl *)impl)->getAttribute(ATTR_SHAPE); diff --git a/khtml/dom/html_image.h b/khtml/dom/html_image.h index 9b1334c83..9f30aaa14 100644 --- a/khtml/dom/html_image.h +++ b/khtml/dom/html_image.h @@ -90,7 +90,7 @@ public: /** * Comma-separated list of lengths, defining an active region - * geometry. See also \c tqshape for the tqshape of the + * geometry. See also \c shape for the shape of the * region. See the <a * href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords"> * coords attribute definition </a> in HTML 4.0. @@ -131,16 +131,16 @@ public: void setNoHref( bool ); /** - * The tqshape of the active area. The coordinates are given by + * The shape of the active area. The coordinates are given by * \c coords . See the <a - * href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-tqshape"> - * tqshape attribute definition </a> in HTML 4.0. + * href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-shape"> + * shape attribute definition </a> in HTML 4.0. * */ - DOMString tqshape() const; + DOMString shape() const; /** - * see tqshape + * see shape */ void setShape( const DOMString & ); diff --git a/khtml/dom/html_inline.cpp b/khtml/dom/html_inline.cpp index 9f40da2fb..568761685 100644 --- a/khtml/dom/html_inline.cpp +++ b/khtml/dom/html_inline.cpp @@ -148,7 +148,7 @@ void HTMLAnchorElement::setRev( const DOMString &value ) if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value); } -DOMString HTMLAnchorElement::tqshape() const +DOMString HTMLAnchorElement::shape() const { if(!impl) return DOMString(); return ((ElementImpl *)impl)->getAttribute(ATTR_SHAPE); diff --git a/khtml/dom/html_inline.h b/khtml/dom/html_inline.h index 041c43db0..f92ed6917 100644 --- a/khtml/dom/html_inline.h +++ b/khtml/dom/html_inline.h @@ -89,7 +89,7 @@ public: /** * Comma-separated list of lengths, defining an active region - * geometry. See also \c tqshape for the tqshape of the + * geometry. See also \c shape for the shape of the * region. See the <a * href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords"> * coords attribute definition </a> in HTML 4.0. @@ -168,16 +168,16 @@ public: void setRev( const DOMString & ); /** - * The tqshape of the active area. The coordinates are given by + * The shape of the active area. The coordinates are given by * \c coords . See the <a - * href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-tqshape"> - * tqshape attribute definition </a> in HTML 4.0. + * href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-shape"> + * shape attribute definition </a> in HTML 4.0. * */ - DOMString tqshape() const; + DOMString shape() const; /** - * see tqshape + * see shape */ void setShape( const DOMString & ); diff --git a/khtml/dom/html_table.h b/khtml/dom/html_table.h index 72e38d7fe..6b9a2d99d 100644 --- a/khtml/dom/html_table.h +++ b/khtml/dom/html_table.h @@ -63,7 +63,7 @@ public: ~HTMLTableCaptionElement(); /** - * Caption tqalignment with respect to the table. See the <a + * Caption alignment with respect to the table. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-CAPTION"> * align attribute definition </a> in HTML 4.0. This attribute is * deprecated in HTML 4.0. @@ -134,7 +134,7 @@ public: void setAbbr( const DOMString & ); /** - * Horizontal tqalignment of data in cell. See the <a + * Horizontal alignment of data in cell. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-TD"> * align attribute definition </a> in HTML 4.0. * @@ -187,7 +187,7 @@ public: void setCh( const DOMString & ); /** - * Offset of tqalignment character. See the <a + * Offset of alignment character. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff"> * charoff attribute definition </a> in HTML 4.0. * @@ -281,7 +281,7 @@ public: void setScope( const DOMString & ); /** - * Vertical tqalignment of data in cell. See the <a + * Vertical alignment of data in cell. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-valign"> * valign attribute definition </a> in HTML 4.0. * @@ -338,7 +338,7 @@ public: ~HTMLTableColElement(); /** - * Horizontal tqalignment of cell data in column. See the <a + * Horizontal alignment of cell data in column. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-TD"> * align attribute definition </a> in HTML 4.0. * @@ -364,7 +364,7 @@ public: void setCh( const DOMString & ); /** - * Offset of tqalignment character. See the <a + * Offset of alignment character. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff"> * charoff attribute definition </a> in HTML 4.0. * @@ -391,7 +391,7 @@ public: void setSpan( long ); /** - * Vertical tqalignment of cell data in column. See the <a + * Vertical alignment of cell data in column. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-valign"> * valign attribute definition </a> in HTML 4.0. * @@ -790,7 +790,7 @@ public: void setCells( const HTMLCollection & ); /** - * Horizontal tqalignment of data within cells of this row. See the + * Horizontal alignment of data within cells of this row. See the * <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-TD"> * align attribute definition </a> in HTML 4.0. @@ -831,7 +831,7 @@ public: void setCh( const DOMString & ); /** - * Offset of tqalignment character. See the <a + * Offset of alignment character. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff"> * charoff attribute definition </a> in HTML 4.0. * @@ -844,7 +844,7 @@ public: void setChOff( const DOMString & ); /** - * Vertical tqalignment of data within cells of this row. See the <a + * Vertical alignment of data within cells of this row. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-valign"> * valign attribute definition </a> in HTML 4.0. * @@ -913,7 +913,7 @@ public: ~HTMLTableSectionElement(); /** - * Horizontal tqalignment of data in cells. See the \c align + * Horizontal alignment of data in cells. See the \c align * attribute for HTMLTheadElement for details. * */ @@ -938,7 +938,7 @@ public: void setCh( const DOMString & ); /** - * Offset of tqalignment character. See the <a + * Offset of alignment character. See the <a * href="http://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff"> * charoff attribute definition </a> in HTML 4.0. * @@ -951,7 +951,7 @@ public: void setChOff( const DOMString & ); /** - * Vertical tqalignment of data in cells. See the \c valign + * Vertical alignment of data in cells. See the \c valign * attribute for HTMLTheadElement for details. * */ diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp index 4fa87e2ce..125401cae 100644 --- a/khtml/ecma/kjs_binding.cpp +++ b/khtml/ecma/kjs_binding.cpp @@ -261,7 +261,7 @@ UString::UString(const TQString &d) { unsigned int len = d.length(); 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); } @@ -277,7 +277,7 @@ UString::UString(const DOM::DOMString &d) unsigned int len = d.length(); 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); } diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp index b3c2a41b1..c6fac2ab2 100644 --- a/khtml/ecma/kjs_debugwin.cpp +++ b/khtml/ecma/kjs_debugwin.cpp @@ -25,9 +25,9 @@ #include <assert.h> #include <stdlib.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqlistbox.h> #include <tqmultilineedit.h> #include <tqapplication.h> @@ -107,7 +107,7 @@ void SourceDisplay::setSource(SourceFile *sourceFile) } TQString code = sourceFile->getCode(); - const TQChar *chars = code.tqunicode(); + const TQChar *chars = code.unicode(); uint len = code.length(); TQChar newLine('\n'); TQChar cr('\r'); @@ -182,7 +182,7 @@ void SourceDisplay::showEvent(TQShowEvent *) void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph) { if (!m_sourceFile) { - p->fillRect(clipx,clipy,clipw,cliph,tqpalette().active().base()); + p->fillRect(clipx,clipy,clipw,cliph,palette().active().base()); return; } @@ -207,26 +207,26 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, 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); TQColor bgColor; TQColor textColor; if (lineno == m_currentLine) { - bgColor = tqpalette().active().highlight(); - textColor = tqpalette().active().highlightedText(); + bgColor = palette().active().highlight(); + textColor = palette().active().highlightedText(); } else if (m_debugWin->haveBreakpoint(m_sourceFile,lineno+1,lineno+1)) { - bgColor = tqpalette().active().text(); - textColor = tqpalette().active().base(); + bgColor = palette().active().text(); + textColor = palette().active().base(); p->drawPixmap(2,height*lineno+height/2-m_breakpointIcon.height()/2,m_breakpointIcon); } else { - bgColor = tqpalette().active().base(); - textColor = tqpalette().active().text(); + bgColor = palette().active().base(); + textColor = palette().active().text(); } 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); - p->fillRect(0,remainingTop,linenoWidth,bottom-remainingTop,tqpalette().active().mid()); + p->fillRect(0,remainingTop,linenoWidth,bottom-remainingTop,palette().active().mid()); p->fillRect(linenoWidth,remainingTop, - right-linenoWidth,bottom-remainingTop,tqpalette().active().base()); + right-linenoWidth,bottom-remainingTop,palette().active().base()); } //------------------------------------------------------------------------- @@ -548,7 +548,7 @@ void KJSDebugWin::slotToggleBreakpoint(int lineno) if (m_sourceSel->currentItem() < 0) return; - SourceFile *sourceFile = m_sourceSelFiles.tqat(m_sourceSel->currentItem()); + SourceFile *sourceFile = m_sourceSelFiles.at(m_sourceSel->currentItem()); // Find the source fragment containing the selected line (if any) int sourceId = -1; @@ -592,14 +592,14 @@ void KJSDebugWin::slotSourceSelected(int sourceSelIndex) // A source file has been selected from the drop-down list - display the file if (sourceSelIndex < 0 || sourceSelIndex >= (int)m_sourceSel->count()) return; - SourceFile *sourceFile = m_sourceSelFiles.tqat(sourceSelIndex); + SourceFile *sourceFile = m_sourceSelFiles.at(sourceSelIndex); displaySourceFile(sourceFile,true); // If the currently selected context is in the current source file, then hilight // the line it's on. if (m_contextList->currentItem() >= 0) { Context ctx = m_execs[m_contextList->currentItem()]->context(); - if (m_sourceFragments[ctx.sourceId()]->sourceFile == m_sourceSelFiles.tqat(sourceSelIndex)) + if (m_sourceFragments[ctx.sourceId()]->sourceFile == m_sourceSelFiles.at(sourceSelIndex)) setSourceLine(ctx.sourceId(),ctx.curStmtFirstLine()); } } @@ -614,7 +614,7 @@ void KJSDebugWin::slotEval() if (m_execStates.isEmpty()) { if (m_sourceSel->currentItem() < 0) return; - SourceFile *sourceFile = m_sourceSelFiles.tqat(m_sourceSel->currentItem()); + SourceFile *sourceFile = m_sourceSelFiles.at(m_sourceSel->currentItem()); if (!sourceFile->interpreter) return; exec = sourceFile->interpreter->globalExec(); @@ -690,7 +690,7 @@ bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e) void KJSDebugWin::disableOtherWindows() { - TQWidgetList *widgets = TQApplication::tqallWidgets(); + TQWidgetList *widgets = TQApplication::allWidgets(); TQWidgetListIt it(*widgets); for (; it.current(); ++it) it.current()->installEventFilter(this); @@ -698,7 +698,7 @@ void KJSDebugWin::disableOtherWindows() void KJSDebugWin::enableOtherWindows() { - TQWidgetList *widgets = TQApplication::tqallWidgets(); + TQWidgetList *widgets = TQApplication::allWidgets(); TQWidgetListIt it(*widgets); for (; it.current(); ++it) it.current()->removeEventFilter(this); @@ -744,7 +744,7 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId, if (!sourceFile->interpreter) sourceFile->interpreter = exec->interpreter(); for (index = 0; index < m_sourceSel->count(); index++) { - if (m_sourceSelFiles.tqat(index) == sourceFile) + if (m_sourceSelFiles.at(index) == sourceFile) break; } assert(index < m_sourceSel->count()); @@ -782,7 +782,7 @@ bool KJSDebugWin::sourceUnused(KJS::ExecState *exec, int sourceId) SourceFile *sourceFile = fragment->sourceFile; if (sourceFile->hasOneRef()) { for (int i = 0; i < m_sourceSel->count(); i++) { - if (m_sourceSelFiles.tqat(i) == sourceFile) { + if (m_sourceSelFiles.at(i) == sourceFile) { m_sourceSel->removeItem(i); m_sourceSelFiles.remove(i); break; @@ -861,7 +861,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch if (dontShowAgain) { KConfig *config = kapp->config(); - KConfigGroupSaver saver(config,TQString::tqfromLatin1("Java/JavaScript Settings")); + KConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings")); config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0)); config->sync(); TQByteArray data; @@ -930,7 +930,7 @@ void KJSDebugWin::setSourceLine(int sourceId, int lineno) SourceFile *sourceFile = source->sourceFile; if (m_curSourceFile != source->sourceFile) { for (int i = 0; i < m_sourceSel->count(); i++) - if (m_sourceSelFiles.tqat(i) == sourceFile) + if (m_sourceSelFiles.at(i) == sourceFile) m_sourceSel->setCurrentItem(i); displaySourceFile(sourceFile,false); } diff --git a/khtml/ecma/kjs_html.cpp b/khtml/ecma/kjs_html.cpp index 3fdc35bb2..57762ffd3 100644 --- a/khtml/ecma/kjs_html.cpp +++ b/khtml/ecma/kjs_html.cpp @@ -896,7 +896,7 @@ const ClassInfo* KJS::HTMLElement::classInfo() const rel KJS::HTMLElement::AnchorRel DontDelete rev KJS::HTMLElement::AnchorRev DontDelete search KJS::HTMLElement::AnchorSearch DontDelete - tqshape KJS::HTMLElement::AnchorShape DontDelete + shape KJS::HTMLElement::AnchorShape DontDelete tabIndex KJS::HTMLElement::AnchorTabIndex DontDelete target KJS::HTMLElement::AnchorTarget DontDelete text KJS::HTMLElement::AnchorText DontDelete|ReadOnly @@ -981,7 +981,7 @@ const ClassInfo* KJS::HTMLElement::classInfo() const protocol KJS::HTMLElement::AreaProtocol DontDelete|ReadOnly search KJS::HTMLElement::AreaSearch DontDelete|ReadOnly noHref KJS::HTMLElement::AreaNoHref DontDelete - tqshape KJS::HTMLElement::AreaShape DontDelete + shape KJS::HTMLElement::AreaShape DontDelete tabIndex KJS::HTMLElement::AreaTabIndex DontDelete target KJS::HTMLElement::AreaTarget DontDelete @end @@ -1599,7 +1599,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const case AnchorName: return String(anchor.name()); case AnchorRel: return String(anchor.rel()); case AnchorRev: return String(anchor.rev()); - case AnchorShape: return String(anchor.tqshape()); + case AnchorShape: return String(anchor.shape()); case AnchorTabIndex: return Number(anchor.tabIndex()); case AnchorTarget: return String(anchor.target()); // Not specified in http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/a.asp @@ -1735,7 +1735,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const } } case AreaNoHref: return Boolean(area.noHref()); - case AreaShape: return String(area.tqshape()); + case AreaShape: return String(area.shape()); case AreaTabIndex: return Number(area.tabIndex()); case AreaTarget: return String(area.target()); } diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp index 637b6a8e1..32f836ba7 100644 --- a/khtml/ecma/kjs_navigator.cpp +++ b/khtml/ecma/kjs_navigator.cpp @@ -188,14 +188,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String("Mozilla"); case AppName: // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape - if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.find(TQString::tqfromLatin1("compatible")) == -1) + if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 && + userAgent.find(TQString::fromLatin1("compatible")) == -1) { //kdDebug() << "appName -> Mozilla" << endl; return String("Netscape"); } - if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0) + if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 || + userAgent.find(TQString::fromLatin1("MSIE")) >= 0) { //kdDebug() << "appName -> IE" << endl; return String("Microsoft Internet Explorer"); @@ -207,14 +207,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String(userAgent.mid(userAgent.find('/') + 1)); case Product: // We are pretending to be Mozilla or Safari - if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.find(TQString::tqfromLatin1("compatible")) == -1) + if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 && + userAgent.find(TQString::fromLatin1("compatible")) == -1) { return String("Gecko"); } // When spoofing as IE, we use Undefined(). - if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0) + if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 || + userAgent.find(TQString::fromLatin1("MSIE")) >= 0) { return Undefined(); } @@ -223,7 +223,7 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const case ProductSub: { 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) { // We have Gecko/<productSub> in the UA string @@ -245,19 +245,19 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String(userAgent); case Platform: // yet another evil hack, but necessary to spoof some sites... - if ( (userAgent.find(TQString::tqfromLatin1("Win"),0,false)>=0) ) - return String(TQString::tqfromLatin1("Win32")); - else if ( (userAgent.find(TQString::tqfromLatin1("Macintosh"),0,false)>=0) || - (userAgent.find(TQString::tqfromLatin1("Mac_PowerPC"),0,false)>=0) ) - return String(TQString::tqfromLatin1("MacPPC")); + if ( (userAgent.find(TQString::fromLatin1("Win"),0,false)>=0) ) + return String(TQString::fromLatin1("Win32")); + else if ( (userAgent.find(TQString::fromLatin1("Macintosh"),0,false)>=0) || + (userAgent.find(TQString::fromLatin1("Mac_PowerPC"),0,false)>=0) ) + return String(TQString::fromLatin1("MacPPC")); else { struct utsname name; int ret = uname(&name); if ( ret >= 0 ) - return String(TQString(TQString::tqfromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine))); + return String(TQString(TQString::fromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine))); else // can't happen - return String(TQString(TQString::tqfromLatin1("Unix X11"))); + return String(TQString(TQString::fromLatin1("Unix X11"))); } case CpuClass: { @@ -394,7 +394,7 @@ Value Plugins::get(ExecState *exec, const Identifier &propertyName) const bool ok; unsigned int i = propertyName.toULong(&ok); if( ok && i<plugins->count() ) - return Value( new Plugin( exec, plugins->tqat(i) ) ); + return Value( new Plugin( exec, plugins->at(i) ) ); // plugin[name] Value val = pluginByName( exec, propertyName.qstring() ); @@ -439,7 +439,7 @@ Value PluginsFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) bool ok; unsigned int i = args[0].toString(exec).toArrayIndex(&ok); if( ok && i<base->plugins->count() ) - return Value( new Plugin( exec, base->plugins->tqat(i) ) ); + return Value( new Plugin( exec, base->plugins->at(i) ) ); return Undefined(); } case Plugins_NamedItem: @@ -479,7 +479,7 @@ Value MimeTypes::get(ExecState *exec, const Identifier &propertyName) const bool ok; unsigned int i = propertyName.toULong(&ok); if( ok && i<mimes->count() ) - return Value( new MimeType( exec, mimes->tqat(i) ) ); + return Value( new MimeType( exec, mimes->at(i) ) ); // mimeTypes[name] Value val = mimeTypeByName( exec, propertyName.qstring() ); @@ -522,7 +522,7 @@ Value MimeTypesFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) bool ok; unsigned int i = args[0].toString(exec).toArrayIndex(&ok); if( ok && i<base->mimes->count() ) - return Value( new MimeType( exec, base->mimes->tqat(i) ) ); + return Value( new MimeType( exec, base->mimes->at(i) ) ); return Undefined(); } case MimeTypes_NamedItem: @@ -562,8 +562,8 @@ Value Plugin::get(ExecState *exec, const Identifier &propertyName) const //kdDebug(6070) << "Plugin::get plugin[" << i << "]" << endl; if( ok && i<m_info->mimes.count() ) { - //kdDebug(6070) << "returning mimetype " << m_info->mimes.tqat(i)->type << endl; - return Value(new MimeType(exec, m_info->mimes.tqat(i))); + //kdDebug(6070) << "returning mimetype " << m_info->mimes.at(i)->type << endl; + return Value(new MimeType(exec, m_info->mimes.at(i))); } // plugin["name"] @@ -609,7 +609,7 @@ Value PluginFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) bool ok; unsigned int i = args[0].toString(exec).toArrayIndex(&ok); if( ok && i< plugin->pluginInfo()->mimes.count() ) - return Value( new MimeType( exec, plugin->pluginInfo()->mimes.tqat(i) ) ); + return Value( new MimeType( exec, plugin->pluginInfo()->mimes.at(i) ) ); return Undefined(); } case Plugin_NamedItem: diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp index 2469ac681..ca26c5a0b 100644 --- a/khtml/ecma/kjs_proxy.cpp +++ b/khtml/ecma/kjs_proxy.cpp @@ -343,8 +343,8 @@ void KJSProxyImpl::applyUserAgent() assert( m_script ); TQString host = m_frame->m_part->url().isLocalFile() ? "localhost" : m_frame->m_part->url().host(); TQString userAgent = KProtocolManager::userAgentForHost(host); - if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0) + if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 || + userAgent.find(TQString::fromLatin1("MSIE")) >= 0) { m_script->setCompatMode(Interpreter::IECompat); #ifdef KJS_VERBOSE @@ -353,9 +353,9 @@ void KJSProxyImpl::applyUserAgent() } else // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape - if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.find(TQString::tqfromLatin1("compatible")) == -1 && - userAgent.find(TQString::tqfromLatin1("KHTML")) == -1) + if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 && + userAgent.find(TQString::fromLatin1("compatible")) == -1 && + userAgent.find(TQString::fromLatin1("KHTML")) == -1) { m_script->setCompatMode(Interpreter::NetscapeCompat); #ifdef KJS_VERBOSE diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp index bed6b83c6..47d5ac810 100644 --- a/khtml/ecma/kjs_window.cpp +++ b/khtml/ecma/kjs_window.cpp @@ -31,7 +31,7 @@ #include "html/html_documentimpl.h" #include "rendering/render_frames.h" -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqtimer.h> #include <tqpaintdevicemetrics.h> #include <tqapplication.h> @@ -864,7 +864,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const #if defined Q_WS_X11 && ! defined K_WS_QTONLY if (!part->widget()) return Number(0); - KWin::WindowInfo inf = KWin::windowInfo(part->widget()->tqtopLevelWidget()->winId()); + KWin::WindowInfo inf = KWin::windowInfo(part->widget()->topLevelWidget()->winId()); return Number(entry->value == OuterHeight ? inf.geometry().height() : inf.geometry().width()); #else @@ -1013,7 +1013,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const TQPtrList<KParts::ReadOnlyPart> frames = part->frames(); unsigned int len = frames.count(); if (i < len) { - KParts::ReadOnlyPart* frame = frames.tqat(i); + KParts::ReadOnlyPart* frame = frames.at(i); if (frame) return Window::retrieve(frame); } @@ -1446,7 +1446,7 @@ void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory) // check if we're allowed to inject javascript // SYNC check with khtml_part.cpp::slotRedirect! if ( isSafeScript(exec) || - dstUrl.find(TQString::tqfromLatin1("javascript:"), 0, false) != 0 ) + dstUrl.find(TQString::fromLatin1("javascript:"), 0, false) != 0 ) part->scheduleRedirection(-1, dstUrl, lockHistory); @@ -1622,7 +1622,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString if (pos >= 0) { key = s.left(pos).stripWhiteSpace().lower(); val = s.mid(pos + 1).stripWhiteSpace().lower(); - TQRect screen = KGlobalSettings::desktopGeometry(widget->tqtopLevelWidget()); + TQRect screen = KGlobalSettings::desktopGeometry(widget->topLevelWidget()); if (key == "left" || key == "screenx") { winargs.x = (int)val.toFloat() + screen.x(); @@ -1633,13 +1633,13 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString if (winargs.y < screen.y() || winargs.y > screen.bottom()) winargs.y = screen.y(); // only safe choice until size is determined } else if (key == "height") { - winargs.height = (int)val.toFloat() + 2*tqApp->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; + winargs.height = (int)val.toFloat() + 2*tqApp->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; if (winargs.height > screen.height()) // should actually check workspace winargs.height = screen.height(); if (winargs.height < 100) winargs.height = 100; } else if (key == "width") { - winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; + winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; if (winargs.width > screen.width()) // should actually check workspace winargs.width = screen.width(); if (winargs.width < 100) @@ -1897,8 +1897,8 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) KHTMLSettings::KJSWindowFocusPolicy policy = part->settings()->windowFocusPolicy(part->url().host()); if(policy == KHTMLSettings::KJSWindowFocusAllow && widget) { - widget->tqtopLevelWidget()->raise(); - KWin::deIconifyWindow( widget->tqtopLevelWidget()->winId() ); + widget->topLevelWidget()->raise(); + KWin::deIconifyWindow( widget->topLevelWidget()->winId() ); widget->setActiveWindow(); emit part->browserExtension()->requestFocus(part); } @@ -1950,7 +1950,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) { KParts::BrowserExtension *ext = part->browserExtension(); if (ext) { - TQWidget * tl = widget->tqtopLevelWidget(); + TQWidget * tl = widget->topLevelWidget(); TQRect sg = KGlobalSettings::desktopGeometry(tl); TQPoint dest = tl->pos() + TQPoint( args[0].toInt32(exec), args[1].toInt32(exec) ); @@ -1970,7 +1970,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) { KParts::BrowserExtension *ext = part->browserExtension(); if (ext) { - TQWidget * tl = widget->tqtopLevelWidget(); + TQWidget * tl = widget->topLevelWidget(); TQRect sg = KGlobalSettings::desktopGeometry(tl); TQPoint dest( args[0].toInt32(exec)+sg.x(), args[1].toInt32(exec)+sg.y() ); @@ -1989,7 +1989,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) if(policy == KHTMLSettings::KJSWindowResizeAllow && args.size() == 2 && widget) { - TQWidget * tl = widget->tqtopLevelWidget(); + TQWidget * tl = widget->topLevelWidget(); TQRect geom = tl->frameGeometry(); window->resizeTo( tl, geom.width() + args[0].toInt32(exec), @@ -2003,7 +2003,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) if(policy == KHTMLSettings::KJSWindowResizeAllow && args.size() == 2 && widget) { - TQWidget * tl = widget->tqtopLevelWidget(); + TQWidget * tl = widget->topLevelWidget(); window->resizeTo( tl, args[0].toInt32(exec), args[1].toInt32(exec) ); } return Undefined(); @@ -2412,7 +2412,7 @@ Value FrameArray::get(ExecState *exec, const Identifier &p) const bool ok; unsigned int i = p.toArrayIndex(&ok); if (ok && i < len) - frame = frames.tqat(i); + frame = frames.at(i); } // we are potentially fetching a reference to a another Window object here. @@ -2545,7 +2545,7 @@ Value Location::get(ExecState *exec, const Identifier &p) const return String(""); return String( url.path().isEmpty() ? TQString("/") : url.path() ); case Port: - return String( url.port() ? TQString::number((int)url.port()) : TQString::tqfromLatin1("") ); + return String( url.port() ? TQString::number((int)url.port()) : TQString::fromLatin1("") ); case Protocol: return String( url.protocol()+":" ); case Search: diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp index 7b88477f0..08ba07519 100644 --- a/khtml/ecma/xmlhttprequest.cpp +++ b/khtml/ecma/xmlhttprequest.cpp @@ -487,7 +487,7 @@ void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &val // Reject all banned headers. See BANNED_HTTP_HEADERS above. // kdDebug() << "Banned HTTP Headers: " << BANNED_HTTP_HEADERS << endl; TQStringList bannedHeaders = TQStringList::split(',', - TQString::tqfromLatin1(BANNED_HTTP_HEADERS)); + TQString::fromLatin1(BANNED_HTTP_HEADERS)); if (bannedHeaders.contains(name)) return; // Denied diff --git a/khtml/html/html_documentimpl.cpp b/khtml/html/html_documentimpl.cpp index a5c78657c..e2ee3ba57 100644 --- a/khtml/html/html_documentimpl.cpp +++ b/khtml/html/html_documentimpl.cpp @@ -110,8 +110,8 @@ DOMString HTMLDocumentImpl::cookie() const long windowId = 0; KHTMLView *v = view (); - if ( v && v->tqtopLevelWidget() ) - windowId = v->tqtopLevelWidget()->winId(); + if ( v && v->topLevelWidget() ) + windowId = v->topLevelWidget()->winId(); TQCString replyType; TQByteArray params, reply; @@ -142,8 +142,8 @@ void HTMLDocumentImpl::setCookie( const DOMString & value ) long windowId = 0; KHTMLView *v = view (); - if ( v && v->tqtopLevelWidget() ) - windowId = v->tqtopLevelWidget()->winId(); + if ( v && v->topLevelWidget() ) + windowId = v->topLevelWidget()->winId(); TQByteArray params; TQDataStream stream(params, IO_WriteOnly); @@ -226,7 +226,7 @@ void HTMLDocumentImpl::slotHistoryChanged() return; recalcStyle( Force ); - m_render->tqrepaint(); + m_render->repaint(); } HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url) @@ -235,7 +235,7 @@ HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url) TQString s; int pos = url.find('#'); //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); diff --git a/khtml/html/html_elementimpl.cpp b/khtml/html/html_elementimpl.cpp index 736b5a3b9..f635fcc3d 100644 --- a/khtml/html/html_elementimpl.cpp +++ b/khtml/html/html_elementimpl.cpp @@ -176,7 +176,7 @@ void HTMLElementImpl::parseAttribute(AttributeImpl *attr) case ATTR_CLASS: if (attr->val()) { DOMString v = attr->value(); - const TQChar* s = v.tqunicode(); + const TQChar* s = v.unicode(); int l = v.length(); while( l && !s->isSpace() ) l--,s++; @@ -354,11 +354,11 @@ static inline bool isHexDigit( const TQChar &c ) { static inline int toHex( const TQChar &c ) { return ( (c >= TQChar('0') && c <= TQChar('9')) - ? (c.tqunicode() - '0') + ? (c.unicode() - '0') : ( ( c >= TQChar('a') && c <= TQChar('f') ) - ? (c.tqunicode() - 'a' + 10) + ? (c.unicode() - 'a' + 10) : ( ( c >= TQChar('A') && c <= TQChar('F') ) - ? (c.tqunicode() - 'A' + 10) + ? (c.unicode() - 'A' + 10) : -1 ) ) ); } @@ -457,7 +457,7 @@ DOMString HTMLElementImpl::innerHTML() const TQString result; //Use TQString to accumulate since DOMString is poor for appends for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) { DOMString kid = child->toString(); - result += TQConstString(kid.tqunicode(), kid.length()).string(); + result += TQConstString(kid.unicode(), kid.length()).string(); } return result; } @@ -620,32 +620,32 @@ void HTMLElementImpl::setInnerText( const DOMString &text, int& exceptioncode ) appendChild( t, exceptioncode ); } -void HTMLElementImpl::addHTMLAlignment( DOMString tqalignment ) +void HTMLElementImpl::addHTMLAlignment( DOMString alignment ) { - //qDebug("tqalignment is %s", tqalignment.string().latin1() ); - // vertical tqalignment with respect to the current baseline of the text + //qDebug("alignment is %s", alignment.string().latin1() ); + // vertical alignment with respect to the current baseline of the text // right or left means floating images int propfloat = -1; int propvalign = -1; - if ( strcasecmp( tqalignment, "absmiddle" ) == 0 ) { + if ( strcasecmp( alignment, "absmiddle" ) == 0 ) { propvalign = CSS_VAL_MIDDLE; - } else if ( strcasecmp( tqalignment, "absbottom" ) == 0 ) { + } else if ( strcasecmp( alignment, "absbottom" ) == 0 ) { propvalign = CSS_VAL_BOTTOM; - } else if ( strcasecmp( tqalignment, "left" ) == 0 ) { + } else if ( strcasecmp( alignment, "left" ) == 0 ) { propfloat = CSS_VAL_LEFT; propvalign = CSS_VAL_TOP; - } else if ( strcasecmp( tqalignment, "right" ) == 0 ) { + } else if ( strcasecmp( alignment, "right" ) == 0 ) { propfloat = CSS_VAL_RIGHT; propvalign = CSS_VAL_TOP; - } else if ( strcasecmp( tqalignment, "top" ) == 0 ) { + } else if ( strcasecmp( alignment, "top" ) == 0 ) { propvalign = CSS_VAL_TOP; - } else if ( strcasecmp( tqalignment, "middle" ) == 0 ) { + } else if ( strcasecmp( alignment, "middle" ) == 0 ) { propvalign = CSS_VAL__KHTML_BASELINE_MIDDLE; - } else if ( strcasecmp( tqalignment, "center" ) == 0 ) { + } else if ( strcasecmp( alignment, "center" ) == 0 ) { propvalign = CSS_VAL_MIDDLE; - } else if ( strcasecmp( tqalignment, "bottom" ) == 0 ) { + } else if ( strcasecmp( alignment, "bottom" ) == 0 ) { propvalign = CSS_VAL_BASELINE; - } else if ( strcasecmp ( tqalignment, "texttop") == 0 ) { + } else if ( strcasecmp ( alignment, "texttop") == 0 ) { propvalign = CSS_VAL_TEXT_TOP; } diff --git a/khtml/html/html_elementimpl.h b/khtml/html/html_elementimpl.h index 83836f15d..f71ae9b23 100644 --- a/khtml/html/html_elementimpl.h +++ b/khtml/html/html_elementimpl.h @@ -68,7 +68,7 @@ public: protected: // for IMG, OBJECT and APPLET - void addHTMLAlignment( DOMString tqalignment ); + void addHTMLAlignment( DOMString alignment ); }; class HTMLGenericElementImpl : public HTMLElementImpl diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp index 1512395e2..b456d5202 100644 --- a/khtml/html/html_formimpl.cpp +++ b/khtml/html/html_formimpl.cpp @@ -60,7 +60,7 @@ #include <kfileitem.h> #include <tqfile.h> #include <tqdir.h> -#include <tqtextcodec.h> +#include <textcodec.h> // for keygen #include <tqstring.h> @@ -193,7 +193,7 @@ inline static TQString escapeUnencodeable(const TQTextCodec* codec, const TQStri enc_string.append(c); else { TQString ampersandEscape; - ampersandEscape.sprintf("&#%u;", c.tqunicode()); + ampersandEscape.sprintf("&#%u;", c.unicode()); enc_string.append(ampersandEscape); } } @@ -1322,10 +1322,10 @@ TQString HTMLInputElementImpl::state( ) { switch (m_type) { case PASSWORD: - return TQString::tqfromLatin1("."); // empty string, avoid restoring + return TQString::fromLatin1("."); // empty string, avoid restoring case CHECKBOX: case RADIO: - return TQString::tqfromLatin1(checked() ? "on" : "off"); + return TQString::fromLatin1(checked() ? "on" : "off"); case TEXT: if (autoComplete() && value() != getAttribute(ATTR_VALUE) && getDocument()->view()) getDocument()->view()->addFormCompletionItem(name().string(), value().string()); @@ -1340,7 +1340,7 @@ void HTMLInputElementImpl::restoreState(const TQString &state) switch (m_type) { case CHECKBOX: case RADIO: - setChecked((state == TQString::tqfromLatin1("on"))); + setChecked((state == TQString::fromLatin1("on"))); break; case FILE: m_value = DOMString(state.left(state.length()-1)); @@ -1566,12 +1566,12 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis if(m_clicked) { m_clicked = false; - TQString astr(nme.isEmpty() ? TQString::tqfromLatin1("x") : nme + ".x"); + TQString astr(nme.isEmpty() ? TQString::fromLatin1("x") : nme + ".x"); encoding += fixUpfromUnicode(codec, astr); astr.setNum(KMAX( clickX(), 0 )); encoding += fixUpfromUnicode(codec, astr); - astr = nme.isEmpty() ? TQString::tqfromLatin1("y") : nme + ".y"; + astr = nme.isEmpty() ? TQString::fromLatin1("y") : nme + ".y"; encoding += fixUpfromUnicode(codec, astr); astr.setNum(KMAX( clickY(), 0 ) ); encoding += fixUpfromUnicode(codec, astr); @@ -1618,7 +1618,7 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis KIO::UDSEntry filestat; // can't submit file in www-url-form encoded - TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->tqtopLevelWidget(); + TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->topLevelWidget(); if (multipart) { TQCString filearray( "" ); if ( KIO::NetAccess::stat(fileurl, filestat, toplevel)) { @@ -2761,8 +2761,8 @@ static TQString expandLF(const TQString& s) unsigned pos2 = 0; for(unsigned pos = 0; pos < len; pos++) { - TQChar c = s.tqat(pos); - switch(c.tqunicode()) + TQChar c = s.at(pos); + switch(c.unicode()) { case '\n': r[pos2++] = '\r'; diff --git a/khtml/html/html_imageimpl.cpp b/khtml/html/html_imageimpl.cpp index 9ced3bf1b..be13e93c2 100644 --- a/khtml/html/html_imageimpl.cpp +++ b/khtml/html/html_imageimpl.cpp @@ -418,8 +418,8 @@ void HTMLMapElementImpl::parseAttribute(AttributeImpl *attr) case ATTR_NAME: { DOMString s = attr->value(); - if(*s.tqunicode() == '#') - name = TQString(s.tqunicode()+1, s.length()-1).lower(); + if(*s.unicode() == '#') + name = TQString(s.unicode()+1, s.length()-1).lower(); else name = s.string().lower(); // ### make this work for XML documents, e.g. in case of <html:map...> @@ -441,7 +441,7 @@ HTMLAreaElementImpl::HTMLAreaElementImpl(DocumentImpl *doc) m_coords=0; m_coordsLen = 0; nohref = false; - tqshape = Unknown; + shape = Unknown; lasth = lastw = -1; } @@ -461,13 +461,13 @@ void HTMLAreaElementImpl::parseAttribute(AttributeImpl *attr) { case ATTR_SHAPE: if ( strcasecmp( attr->value(), "default" ) == 0 ) - tqshape = Default; + shape = Default; else if ( strcasecmp( attr->value(), "circle" ) == 0 ) - tqshape = Circle; + shape = Circle; else if ( strcasecmp( attr->value(), "poly" ) == 0 || strcasecmp( attr->value(), "polygon" ) == 0 ) - tqshape = Poly; + shape = Poly; else if ( strcasecmp( attr->value(), "rect" ) == 0 ) - tqshape = Rect; + shape = Rect; break; case ATTR_COORDS: delete [] m_coords; @@ -530,7 +530,7 @@ TQRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const // what the HTML author tried to tell us. // a Poly needs at least 3 points (6 coords), so this is correct - if ((tqshape==Poly || tqshape==Unknown) && m_coordsLen > 5) { + if ((shape==Poly || shape==Unknown) && m_coordsLen > 5) { // make sure its even int len = m_coordsLen >> 1; TQPointArray points(len); @@ -539,19 +539,19 @@ TQRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const m_coords[(i<<1)+1].minWidth(height_)); region = TQRegion(points); } - else if (tqshape==Circle && m_coordsLen>=3 || tqshape==Unknown && m_coordsLen == 3) { + else if (shape==Circle && m_coordsLen>=3 || shape==Unknown && m_coordsLen == 3) { int r = kMin(m_coords[2].minWidth(width_), m_coords[2].minWidth(height_)); region = TQRegion(m_coords[0].minWidth(width_)-r, m_coords[1].minWidth(height_)-r, 2*r, 2*r,TQRegion::Ellipse); } - else if (tqshape==Rect && m_coordsLen>=4 || tqshape==Unknown && m_coordsLen == 4) { + else if (shape==Rect && m_coordsLen>=4 || shape==Unknown && m_coordsLen == 4) { int x0 = m_coords[0].minWidth(width_); int y0 = m_coords[1].minWidth(height_); int x1 = m_coords[2].minWidth(width_); int y1 = m_coords[3].minWidth(height_); region = TQRegion(x0,y0,x1-x0,y1-y0); } - else if (tqshape==Default) + else if (shape==Default) region = TQRegion(0,0,width_,height_); // else // return null region diff --git a/khtml/html/html_imageimpl.h b/khtml/html/html_imageimpl.h index 1a389e895..6f26cd2df 100644 --- a/khtml/html/html_imageimpl.h +++ b/khtml/html/html_imageimpl.h @@ -102,7 +102,7 @@ public: virtual void parseAttribute(AttributeImpl *attr); - bool isDefault() const { return tqshape==Default; } + bool isDefault() const { return shape==Default; } bool mapMouseEvent(int x_, int y_, int width_, int height_, khtml::RenderObject::NodeInfo& info); @@ -117,7 +117,7 @@ protected: khtml::Length* m_coords; int m_coordsLen; int lastw, lasth; - Shape tqshape : 3; + Shape shape : 3; bool nohref : 1; }; diff --git a/khtml/html/html_miscimpl.cpp b/khtml/html/html_miscimpl.cpp index d5e812029..58804bff5 100644 --- a/khtml/html/html_miscimpl.cpp +++ b/khtml/html/html_miscimpl.cpp @@ -328,14 +328,14 @@ NodeImpl *HTMLFormCollectionImpl::item( unsigned long index ) const TQPtrList<HTMLGenericFormElementImpl>& l = static_cast<HTMLFormElementImpl*>( m_refNode )->formElements; for (unsigned i = strt; i < l.count(); i++) { - if (l.tqat( i )->isEnumeratable()) + if (l.at( i )->isEnumeratable()) { if (dist == 0) { //Found it! m_cache->position = index; m_cache->current.index = i; - return l.tqat( i ); + return l.at( i ); } else --dist; @@ -349,7 +349,7 @@ unsigned long HTMLFormCollectionImpl::calcLength(NodeImpl *start) const unsigned length = 0; TQPtrList<HTMLGenericFormElementImpl> l = static_cast<HTMLFormElementImpl*>( start )->formElements; for ( unsigned i = 0; i < l.count(); i++ ) - if ( l.tqat( i )->isEnumeratable() ) + if ( l.at( i )->isEnumeratable() ) ++length; return length; } @@ -369,7 +369,7 @@ NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const //Go through the list, trying to find the appropriate named form element. for ( ; currentNamePos < l.count(); ++currentNamePos ) { - HTMLGenericFormElementImpl* el = l.tqat(currentNamePos); + HTMLGenericFormElementImpl* el = l.at(currentNamePos); if (el->isEnumeratable() && ((el->getAttribute(ATTR_ID) == name) || (el->getAttribute(ATTR_NAME) == name))) @@ -387,7 +387,7 @@ NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const TQPtrList<HTMLImageElementImpl>& il = static_cast<HTMLFormElementImpl*>( m_refNode )->imgElements; for ( ; currentNameImgPos < il.count(); ++currentNameImgPos ) { - HTMLImageElementImpl* el = il.tqat(currentNameImgPos); + HTMLImageElementImpl* el = il.at(currentNameImgPos); if ((el->getAttribute(ATTR_ID) == name) || (el->getAttribute(ATTR_NAME) == name)) { diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp index 0b9b5f34d..5da6edd14 100644 --- a/khtml/html/htmltokenizer.cpp +++ b/khtml/html/htmltokenizer.cpp @@ -89,7 +89,7 @@ static const char titleEnd [] = "</title"; #define fixUpChar(x) #else #define fixUpChar(x) \ - switch ((x).tqunicode()) \ + switch ((x).unicode()) \ { \ case 0x80: (x) = 0x20ac; break; \ case 0x82: (x) = 0x201a; break; \ @@ -471,7 +471,7 @@ void HTMLTokenizer::parseComment(TokenizerString &src) if (strict) { - if (src->tqunicode() == '-') { + if (src->unicode() == '-') { delimiterCount++; if (delimiterCount == 2) { delimiterCount = 0; @@ -482,7 +482,7 @@ void HTMLTokenizer::parseComment(TokenizerString &src) delimiterCount = 0; } - if ((!strict || canClose) && src->tqunicode() == '>') + if ((!strict || canClose) && src->unicode() == '>') { bool handleBrokenComments = brokenComments && !( script || style ); bool scriptEnd=false; @@ -521,7 +521,7 @@ void HTMLTokenizer::parseServer(TokenizerString &src) checkScriptBuffer(src.length()); while ( !src.isEmpty() ) { scriptCode[ scriptCodeSize++ ] = *src; - if (src->tqunicode() == '>' && + if (src->unicode() == '>' && scriptCodeSize > 1 && scriptCode[scriptCodeSize-2] == '%') { ++src; server = false; @@ -607,7 +607,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) while( !src.isEmpty() ) { - ushort cc = src->tqunicode(); + ushort cc = src->unicode(); switch(Entity) { case NoEntity: return; @@ -639,7 +639,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) case Hexadecimal: { - int uc = EntityChar.tqunicode(); + int uc = EntityChar.unicode(); int ll = kMin<uint>(src.length(), 8); while(ll--) { TQChar csrc(src->lower()); @@ -658,7 +658,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) } case Decimal: { - int uc = EntityChar.tqunicode(); + int uc = EntityChar.unicode(); int ll = kMin(src.length(), 9-cBufferPos); while(ll--) { cc = src->cell(); @@ -718,7 +718,7 @@ void HTMLTokenizer::parseEntity(TokenizerString &src, TQChar *&dest, bool start) } case SearchSemicolon: #ifdef TOKEN_DEBUG - kdDebug( 6036 ) << "ENTITY " << EntityChar.tqunicode() << endl; + kdDebug( 6036 ) << "ENTITY " << EntityChar.unicode() << endl; #endif fixUpChar(EntityChar); @@ -919,7 +919,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) a = khtml::getAttrID(cBuffer, cBufferPos-1); } if (!a) - attrName = TQString::tqfromLatin1(TQCString(cBuffer, cBufferPos+1).data()); + attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data()); } dest = buffer; @@ -941,7 +941,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) } if ( cBufferPos == CBUFLEN ) { cBuffer[cBufferPos] = '\0'; - attrName = TQString::tqfromLatin1(TQCString(cBuffer, cBufferPos+1).data()); + attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data()); dest = buffer; *dest++ = 0; tag = SearchEqual; @@ -956,7 +956,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) ushort curchar; bool atespace = false; while(!src.isEmpty()) { - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar > ' ') { if(curchar == '=') { #ifdef TOKEN_DEBUG @@ -988,7 +988,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) { ushort curchar; while(!src.isEmpty()) { - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar > ' ') { if(( curchar == '\'' || curchar == '\"' )) { tquote = curchar == '\"' ? DoubleQuote : SingleQuote; @@ -1012,7 +1012,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) while(!src.isEmpty()) { checkBuffer(); - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar <= '\'' && !src.escaped()) { // ### attributes like '&{blaa....};' are supposed to be treated as jscript. if ( curchar == '&' ) @@ -1050,7 +1050,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src) ushort curchar; while(!src.isEmpty()) { checkBuffer(); - curchar = src->tqunicode(); + curchar = src->unicode(); if(curchar <= '>' && !src.escaped()) { // parse Entities if ( curchar == '&' ) @@ -1351,7 +1351,7 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData ) // do we need to enlarge the buffer? checkBuffer(); - ushort cc = src->tqunicode(); + ushort cc = src->unicode(); if (skipLF && (cc != '\n')) skipLF = false; diff --git a/khtml/html/htmltokenizer.h b/khtml/html/htmltokenizer.h index 2197a5083..8e36353b0 100644 --- a/khtml/html/htmltokenizer.h +++ b/khtml/html/htmltokenizer.h @@ -76,8 +76,8 @@ namespace khtml { { DOMStringImpl *value = 0; NodeImpl::Id tid = 0; - if(buffer->tqunicode()) { - tid = buffer->tqunicode(); + if(buffer->unicode()) { + tid = buffer->unicode(); value = v.implementation(); } else if ( !attrName.isEmpty() && attrName != "/" ) { diff --git a/khtml/java/kjavaappletcontext.cpp b/khtml/java/kjavaappletcontext.cpp index 776eb8a64..76914a5dc 100644 --- a/khtml/java/kjavaappletcontext.cpp +++ b/khtml/java/kjavaappletcontext.cpp @@ -138,7 +138,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl; kdDebug(6100) << "arg count = " << arg.count() << endl; - if ( cmd == TQString::tqfromLatin1("showstatus") + if ( cmd == TQString::fromLatin1("showstatus") && !arg.empty() ) { TQString tmp = arg.first(); @@ -146,19 +146,19 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg kdDebug(6100) << "status message = " << tmp << endl; emit showStatus( tmp ); } - else if ( cmd == TQString::tqfromLatin1( "showurlinframe" ) + else if ( cmd == TQString::fromLatin1( "showurlinframe" ) && arg.count() > 1 ) { kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl; emit showDocument( arg[0], arg[1] ); } - else if ( cmd == TQString::tqfromLatin1( "showdocument" ) + else if ( cmd == TQString::fromLatin1( "showdocument" ) && !arg.empty() ) { kdDebug(6100) << "url = " << arg.first() << endl; emit showDocument( arg.first(), "_top" ); } - else if ( cmd == TQString::tqfromLatin1( "resizeapplet" ) + else if ( cmd == TQString::fromLatin1( "resizeapplet" ) && arg.count() > 2 ) { //arg[1] should be appletID @@ -180,10 +180,10 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg tmp->resizeAppletWidget( width, height ); } } - else if (cmd.startsWith(TQString::tqfromLatin1("audioclip_"))) { + else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) { kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl; } - else if ( cmd == TQString::tqfromLatin1( "JS_Event" ) + else if ( cmd == TQString::fromLatin1( "JS_Event" ) && arg.count() > 2 ) { bool ok; @@ -198,7 +198,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg else kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl; } - else if ( cmd == TQString::tqfromLatin1( "AppletStateNotification" ) ) + else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) ) { bool ok; const int appletID = arg.first().toInt(&ok); @@ -222,7 +222,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg } else kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl; } - else if ( cmd == TQString::tqfromLatin1( "AppletFailed" ) ) { + else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) { bool ok; const int appletID = arg.first().toInt(&ok); if (ok) diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp index 4eab56972..4852a5471 100644 --- a/khtml/java/kjavaappletserver.cpp +++ b/khtml/java/kjavaappletserver.cpp @@ -48,7 +48,7 @@ #include <tqlabel.h> #include <tqdialog.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <stdlib.h> @@ -531,19 +531,19 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) switch( cmd_code ) { case KJAS_SHOW_DOCUMENT: - cmd = TQString::tqfromLatin1( "showdocument" ); + cmd = TQString::fromLatin1( "showdocument" ); break; case KJAS_SHOW_URLINFRAME: - cmd = TQString::tqfromLatin1( "showurlinframe" ); + cmd = TQString::fromLatin1( "showurlinframe" ); break; case KJAS_SHOW_STATUS: - cmd = TQString::tqfromLatin1( "showstatus" ); + cmd = TQString::fromLatin1( "showstatus" ); break; case KJAS_RESIZE_APPLET: - cmd = TQString::tqfromLatin1( "resizeapplet" ); + cmd = TQString::fromLatin1( "resizeapplet" ); break; case KJAS_GET_URLDATA: @@ -573,7 +573,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) kdError(6100) << "KIO Data command error " << ok << " args:" << args.size() << endl; return; case KJAS_JAVASCRIPT_EVENT: - cmd = TQString::tqfromLatin1( "JS_Event" ); + cmd = TQString::fromLatin1( "JS_Event" ); kdDebug(6100) << "Javascript request: "<< contextID << " code: " << args[0] << endl; break; @@ -593,24 +593,24 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) return; } case KJAS_AUDIOCLIP_PLAY: - cmd = TQString::tqfromLatin1( "audioclip_play" ); + cmd = TQString::fromLatin1( "audioclip_play" ); kdDebug(6100) << "Audio Play: url=" << args[0] << endl; break; case KJAS_AUDIOCLIP_LOOP: - cmd = TQString::tqfromLatin1( "audioclip_loop" ); + cmd = TQString::fromLatin1( "audioclip_loop" ); kdDebug(6100) << "Audio Loop: url=" << args[0] << endl; break; case KJAS_AUDIOCLIP_STOP: - cmd = TQString::tqfromLatin1( "audioclip_stop" ); + cmd = TQString::fromLatin1( "audioclip_stop" ); kdDebug(6100) << "Audio Stop: url=" << args[0] << endl; break; case KJAS_APPLET_STATE: kdDebug(6100) << "Applet State Notification for Applet " << args[0] << ". New state=" << args[1] << endl; - cmd = TQString::tqfromLatin1( "AppletStateNotification" ); + cmd = TQString::fromLatin1( "AppletStateNotification" ); break; case KJAS_APPLET_FAILED: kdDebug(6100) << "Applet " << args[0] << " Failed: " << args[1] << endl; - cmd = TQString::tqfromLatin1( "AppletFailed" ); + cmd = TQString::fromLatin1( "AppletFailed" ); break; case KJAS_SECURITY_CONFIRM: { if (KSSL::doesSSLWork() && !d->kssl) diff --git a/khtml/java/kjavaappletviewer.cpp b/khtml/java/kjavaappletviewer.cpp index 9071fa5d5..e17e70110 100644 --- a/khtml/java/kjavaappletviewer.cpp +++ b/khtml/java/kjavaappletviewer.cpp @@ -234,7 +234,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, if (equalPos > 0) { const TQString name = (*it).left (equalPos).upper (); TQString value = (*it).right ((*it).length () - equalPos - 1); - if (value.tqat(0)=='\"') + if (value.at(0)=='\"') value = value.right (value.length () - 1); if (value.at (value.length () - 1) == '\"') value.truncate (value.length () - 1); @@ -245,27 +245,27 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, baseurl = KURL (KURL (value), TQString (".")).url (); } else if (name == "__KHTML__CODEBASE") khtml_codebase = value; - else if (name_lower == TQString::tqfromLatin1("codebase") || - name_lower == TQString::tqfromLatin1("java_codebase")) { + else if (name_lower == TQString::fromLatin1("codebase") || + name_lower == TQString::fromLatin1("java_codebase")) { if (!value.isEmpty ()) codebase = value; } else if (name == "__KHTML__CLASSID") - //else if (name.lower()==TQString::tqfromLatin1("classid")) + //else if (name.lower()==TQString::fromLatin1("classid")) classid = value; - else if (name_lower == TQString::tqfromLatin1("code") || - name_lower == TQString::tqfromLatin1("java_code")) + else if (name_lower == TQString::fromLatin1("code") || + name_lower == TQString::fromLatin1("java_code")) classname = value; - else if (name_lower == TQString::tqfromLatin1("src")) + else if (name_lower == TQString::fromLatin1("src")) src_param = value; - else if (name_lower == TQString::tqfromLatin1("archive") || - name_lower == TQString::tqfromLatin1("java_archive") || + else if (name_lower == TQString::fromLatin1("archive") || + name_lower == TQString::fromLatin1("java_archive") || name_lower.startsWith ("cache_archive")) applet->setArchives (value); - else if (name_lower == TQString::tqfromLatin1("name")) + else if (name_lower == TQString::fromLatin1("name")) applet->setAppletName (value); - else if (name_lower == TQString::tqfromLatin1("width")) + else if (name_lower == TQString::fromLatin1("width")) width = value.toInt(); - else if (name_lower == TQString::tqfromLatin1("height")) + else if (name_lower == TQString::fromLatin1("height")) height = value.toInt(); if (!name.startsWith ("__KHTML__")) { applet->setParameter (name, value); @@ -327,7 +327,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, info.verifyPath = true; TQDataStream stream(params, IO_WriteOnly); - stream << info << m_view->tqtopLevelWidget()->winId(); + stream << info << m_view->topLevelWidget()->winId(); if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int)", params, replyType, reply ) ) { kdWarning() << "Can't communicate with kded_kpasswdserver!" << endl; @@ -342,7 +342,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, /* install event filter for close events */ if (wparent) - wparent->tqtopLevelWidget ()->installEventFilter (this); + wparent->topLevelWidget ()->installEventFilter (this); setInstance (KJavaAppletViewerFactory::instance ()); KParts::Part::setWidget (m_view); diff --git a/khtml/java/kjavaprocess.cpp b/khtml/java/kjavaprocess.cpp index c86b922dd..6156b5df7 100644 --- a/khtml/java/kjavaprocess.cpp +++ b/khtml/java/kjavaprocess.cpp @@ -24,7 +24,7 @@ #include <kdebug.h> #include <kio/kprotocolmanager.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqmap.h> #include <config.h> @@ -168,7 +168,7 @@ void KJavaProcess::storeSize( TQByteArray* buff ) const char* size_ptr = size_str.latin1(); for( int i = 0; i < 8; ++i ) - buff->tqat(i) = size_ptr[i]; + buff->at(i) = size_ptr[i]; } void KJavaProcess::sendBuffer( TQByteArray* buff ) @@ -218,12 +218,12 @@ void KJavaProcess::popBuffer() // kdDebug(6100) << "Sending buffer to java, buffer = >>"; // for( unsigned int i = 0; i < buf->size(); i++ ) // { -// if( buf->tqat(i) == (char)0 ) +// if( buf->at(i) == (char)0 ) // kdDebug(6100) << "<SEP>"; -// else if( buf->tqat(i) > 0 && buf->tqat(i) < 10 ) -// kdDebug(6100) << "<CMD " << (int) buf->tqat(i) << ">"; +// else if( buf->at(i) > 0 && buf->at(i) < 10 ) +// kdDebug(6100) << "<CMD " << (int) buf->at(i) << ">"; // else -// kdDebug(6100) << buf->tqat(i); +// kdDebug(6100) << buf->at(i); // } // kdDebug(6100) << "<<" << endl; diff --git a/khtml/khtml_caret.cpp b/khtml/khtml_caret.cpp index 0946685cb..9b819ee6c 100644 --- a/khtml/khtml_caret.cpp +++ b/khtml/khtml_caret.cpp @@ -775,7 +775,7 @@ void CaretBoxLine::addCreatedFlowBoxInside(InlineFlowBox *flowBox, const TQFontM caret_boxes.append(caretBox); // afaik an inner flow box can only have the width 0, therefore we don't - // have to care for rtl or tqalignment + // have to care for rtl or alignment // ### can empty inline elements have a width? css 2 spec isn't verbose about it caretBox->_y += flowBox->baseline() - fm.ascent(); @@ -1749,7 +1749,7 @@ void EditableCharacterIterator::initFirstChar() if (_offset == box->maxOffset()) peekNext(); 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 _char = -1; } @@ -1849,7 +1849,7 @@ kdDebug(6200) << "_offset " << _offset << endl; readchar: // get character 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 _char = -1; }/*end if*/ @@ -1887,7 +1887,7 @@ kdDebug(6200) << "_offset == minofs: " << _offset << " == " << minofs << endl; // _peekNext = b; // get character 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 _char = -1; @@ -1990,9 +1990,9 @@ kdDebug(6200) << "_offset: " << _offset << " _peekNext: " << _peekNext << endl; #endif // get character 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()) - _char = static_cast<RenderText *>(b->object())->text()[_offset].tqunicode(); + _char = static_cast<RenderText *>(b->object())->text()[_offset].unicode(); else _char = -1; }/*end if*/ @@ -2103,7 +2103,7 @@ static RenderTableCell *findNearestTableCellInRow(KHTMLPart *part, int x, int n = (int)row->row->size(); int i; for (i = 0; i < n; i++) { - RenderTableCell *cell = row->row->tqat(i); + RenderTableCell *cell = row->row->at(i); if (!cell || (long)cell == -1) continue; int absx, absy; @@ -2127,7 +2127,7 @@ static RenderTableCell *findNearestTableCellInRow(KHTMLPart *part, int x, int index = i - ((cnt >> 1) + 1)*(cnt & 1) + (cnt >> 1)*!(cnt & 1); if (index < 0 || index >= n) continue; - RenderTableCell *cell = row->row->tqat(index); + RenderTableCell *cell = row->row->at(index); if (!cell || (long)cell == -1) continue; #if DEBUG_CARETMODE > 1 @@ -2227,7 +2227,7 @@ static int findRowInSection(RenderTableSection *section, RenderTableCell *cell, // check for cell int m = row->row->size(); for (int j = 0; j < m; j++) { - RenderTableCell *c = row->row->tqat(j); + RenderTableCell *c = row->row->at(j); if (c == directCell) return i; }/*next j*/ diff --git a/khtml/khtml_caret_p.h b/khtml/khtml_caret_p.h index a5c4bf60d..9524f2df7 100644 --- a/khtml/khtml_caret_p.h +++ b/khtml/khtml_caret_p.h @@ -1034,7 +1034,7 @@ public: */ 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. */ TQChar operator *() const { return TQChar(_char >= 0 ? _char : ' '); } @@ -1089,7 +1089,7 @@ protected: CaretBox *box = *copy; InlineBox *b = box->inlineBox(); 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 _char = -1; } diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp index 5ff15fe53..20d2d9a50 100644 --- a/khtml/khtml_ext.cpp +++ b/khtml/khtml_ext.cpp @@ -35,7 +35,7 @@ #include "misc/loader.h" #include "dom/html_form.h" #include "dom/html_image.h" -#include <tqclipboard.h> +#include <clipboard.h> #include <tqfileinfo.h> #include <tqpopupmenu.h> #include <tqurl.h> @@ -112,7 +112,7 @@ void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget ) if ( !m_connectedToClipboard && m_editableFormWidget ) { - connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( updateEditActions() ) ); 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 ) { - disconnect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + disconnect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( updateEditActions() ) ); if ( oldWidget ) @@ -223,7 +223,7 @@ void KHTMLPartBrowserExtension::copy() text.replace( TQChar( 0xa0 ), ' ' ); - TQClipboard *cb = TQApplication::tqclipboard(); + TQClipboard *cb = TQApplication::clipboard(); disconnect( cb, TQT_SIGNAL( selectionChanged() ), m_part, TQT_SLOT( slotClearSelection() ) ); #ifndef QT_NO_MIMECLIPBOARD TQString htmltext; @@ -315,7 +315,7 @@ void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method ) if ( !m_extensionProxy ) return; - int slot = m_extensionProxy->tqmetaObject()->findSlot( method ); + int slot = m_extensionProxy->metaObject()->findSlot( method ); if ( slot == -1 ) return; @@ -335,10 +335,10 @@ void KHTMLPartBrowserExtension::updateEditActions() // ### duplicated from KonqMainWindow::slotClipboardDataChanged #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" ) ); #else - TQString data=TQApplication::tqclipboard()->text(); + TQString data=TQApplication::clipboard()->text(); enableAction( "paste", data.contains("://")); #endif bool hasSelection = false; @@ -715,10 +715,10 @@ void KHTMLPopupGUIClient::slotCopyLinkLocation() // Set it in both the mouse selection and in the clipboard KURL::List lst; lst.append( safeURL ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); #else - TQApplication::tqclipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries + TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries #endif } @@ -741,8 +741,8 @@ void KHTMLPopupGUIClient::slotCopyImage() drag->addDragObject( new KURLDrag(lst, d->m_khtml->view(), "Image URL") ); // Set it in both the mouse selection and in the clipboard - TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setData( new KURLDrag(lst), TQClipboard::Selection ); + TQApplication::clipboard()->setData( drag, TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( new KURLDrag(lst), TQClipboard::Selection ); #else kdDebug() << "slotCopyImage called when the clipboard does not support this. This should not be possible." << endl; #endif @@ -756,10 +756,10 @@ void KHTMLPopupGUIClient::slotCopyImageLocation() // Set it in both the mouse selection and in the clipboard KURL::List lst; lst.append( safeURL ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); - TQApplication::tqclipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( new KURLDrag( lst ), TQClipboard::Selection ); #else - TQApplication::tqclipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries + TQApplication::clipboard()->setText( safeURL.url() ); //FIXME(E): Handle multiple entries #endif } @@ -809,7 +809,7 @@ void KHTMLPopupGUIClient::saveURL( TQWidget *parent, const TQString &caption, const TQString &filter, long cacheId, const TQString & suggestedFilename ) { - TQString name = TQString::tqfromLatin1( "index.html" ); + TQString name = TQString::fromLatin1( "index.html" ); if ( !suggestedFilename.isEmpty() ) name = suggestedFilename; else if ( !url.fileName().isEmpty() ) diff --git a/khtml/khtml_pagecache.cpp b/khtml/khtml_pagecache.cpp index e736df5c2..935f31cc0 100644 --- a/khtml/khtml_pagecache.cpp +++ b/khtml/khtml_pagecache.cpp @@ -95,8 +95,8 @@ KHTMLPageCacheEntry::endData() { m_complete = true; if ( m_file->status() == 0) { - m_file->dataStream()->tqdevice()->flush(); - m_file->dataStream()->tqdevice()->tqat(0); + m_file->dataStream()->device()->flush(); + m_file->dataStream()->device()->at(0); } } diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp index fefc59fa1..42d7c2fd7 100644 --- a/khtml/khtml_part.cpp +++ b/khtml/khtml_part.cpp @@ -107,7 +107,7 @@ using namespace DOM; #include <kstatusbar.h> #include <kurllabel.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqfile.h> #include <tqtooltip.h> #include <tqmetaobject.h> @@ -717,7 +717,7 @@ bool KHTMLPart::openURL( const KURL &url ) } if (widget()) - d->m_job->setWindow(widget()->tqtopLevelWidget()); + d->m_job->setWindow(widget()->topLevelWidget()); d->m_job->addMetaData(args.metaData()); connect( d->m_job, TQT_SIGNAL( result( KIO::Job* ) ), @@ -1480,7 +1480,7 @@ void KHTMLPart::clear() d->m_startOffset = 0; d->m_endOffset = 0; #ifndef QT_NO_CLIPBOARD - connect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); #endif d->m_jobPercent = 0; @@ -1722,14 +1722,14 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU d->m_bJScriptForce = false; d->m_bJScriptOverride = true; begin(); - TQString errText = TQString::tqfromLatin1( "<HTML dir=%1><HEAD><TITLE>" ) + TQString errText = TQString::fromLatin1( "<HTML dir=%1><HEAD><TITLE>" ) .arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); errText += i18n( "Error while loading %1" ).arg( reqUrl.htmlURL() ); - errText += TQString::tqfromLatin1( "</TITLE></HEAD><BODY><P>" ); + errText += TQString::fromLatin1( "</TITLE></HEAD><BODY><P>" ); errText += i18n( "An error occurred while loading <B>%1</B>:" ).arg( reqUrl.htmlURL() ); - errText += TQString::tqfromLatin1( "</P>" ); + errText += TQString::fromLatin1( "</P>" ); errText += TQStyleSheet::convertFromPlainText( KIO::buildErrorString( errorCode, text ) ); - errText += TQString::tqfromLatin1( "</BODY></HTML>" ); + errText += TQString::fromLatin1( "</BODY></HTML>" ); write(errText); end(); @@ -1757,56 +1757,56 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU TQString url, protocol, datetime; url = reqUrl.prettyURL(); protocol = reqUrl.protocol(); - datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), + datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false ); - TQString doc = TQString::tqfromLatin1( "<html><head><title>" ); + TQString doc = TQString::fromLatin1( "<html><head><title>" ); doc += i18n( "Error: " ); doc += errorName; - doc += TQString::tqfromLatin1( " - %1</title></head><body><h1>" ).arg( url ); + doc += TQString::fromLatin1( " - %1</title></head><body><h1>" ).arg( url ); doc += i18n( "The requested operation could not be completed" ); - doc += TQString::tqfromLatin1( "</h1><h2>" ); + doc += TQString::fromLatin1( "</h1><h2>" ); doc += errorName; - doc += TQString::tqfromLatin1( "</h2>" ); + doc += TQString::fromLatin1( "</h2>" ); if ( !techName.isNull() ) { - doc += TQString::tqfromLatin1( "<h2>" ); + doc += TQString::fromLatin1( "<h2>" ); doc += i18n( "Technical Reason: " ); doc += techName; - doc += TQString::tqfromLatin1( "</h2>" ); + doc += TQString::fromLatin1( "</h2>" ); } - doc += TQString::tqfromLatin1( "<h3>" ); + doc += TQString::fromLatin1( "<h3>" ); doc += i18n( "Details of the Request:" ); - doc += TQString::tqfromLatin1( "</h3><ul><li>" ); + doc += TQString::fromLatin1( "</h3><ul><li>" ); doc += i18n( "URL: %1" ).arg( url ); - doc += TQString::tqfromLatin1( "</li><li>" ); + doc += TQString::fromLatin1( "</li><li>" ); if ( !protocol.isNull() ) { // uncomment for 3.1... i18n change // doc += i18n( "Protocol: %1" ).arg( protocol ).arg( protocol ); - doc += TQString::tqfromLatin1( "</li><li>" ); + doc += TQString::fromLatin1( "</li><li>" ); } doc += i18n( "Date and Time: %1" ).arg( datetime ); - doc += TQString::tqfromLatin1( "</li><li>" ); + doc += TQString::fromLatin1( "</li><li>" ); doc += i18n( "Additional Information: %1" ).arg( text ); - doc += TQString::tqfromLatin1( "</li></ul><h3>" ); + doc += TQString::fromLatin1( "</li></ul><h3>" ); doc += i18n( "Description:" ); - doc += TQString::tqfromLatin1( "</h3><p>" ); + doc += TQString::fromLatin1( "</h3><p>" ); doc += description; - doc += TQString::tqfromLatin1( "</p>" ); + doc += TQString::fromLatin1( "</p>" ); if ( causes.count() ) { - doc += TQString::tqfromLatin1( "<h3>" ); + doc += TQString::fromLatin1( "<h3>" ); doc += i18n( "Possible Causes:" ); - doc += TQString::tqfromLatin1( "</h3><ul><li>" ); + doc += TQString::fromLatin1( "</h3><ul><li>" ); doc += causes.join( "</li><li>" ); - doc += TQString::tqfromLatin1( "</li></ul>" ); + doc += TQString::fromLatin1( "</li></ul>" ); } if ( solutions.count() ) { - doc += TQString::tqfromLatin1( "<h3>" ); + doc += TQString::fromLatin1( "<h3>" ); doc += i18n( "Possible Solutions:" ); - doc += TQString::tqfromLatin1( "</h3><ul><li>" ); + doc += TQString::fromLatin1( "</h3><ul><li>" ); doc += solutions.join( "</li><li>" ); - doc += TQString::tqfromLatin1( "</li></ul>" ); + doc += TQString::fromLatin1( "</li></ul>" ); } - doc += TQString::tqfromLatin1( "</body></html>" ); + doc += TQString::fromLatin1( "</body></html>" ); write( doc ); end(); @@ -2286,7 +2286,7 @@ void KHTMLPart::checkCompleted() } // the view will emit completed on our behalf, - // either now or at next tqrepaint if one is pending + // either now or at next repaint if one is pending //kdDebug(6050) << this << " asks the view to emit completed. pendingAction=" << pendingAction << endl; d->m_view->complete( pendingAction ); @@ -2402,7 +2402,7 @@ void KHTMLPart::slotRedirect() d->m_redirectURL = TQString(); // SYNC check with ecma/kjs_window.cpp::goURL ! - if ( u.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) + if ( u.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) { TQString script = KURL::decode_string( u.right( u.length() - 11 ) ); kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl; @@ -3005,7 +3005,7 @@ void KHTMLPart::findText() // The lineedit of the dialog would make khtml lose its selection, otherwise #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 // 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; #ifndef QT_NO_CLIPBOARD - connect( kapp->tqclipboard(), TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotClearSelection()) ); + connect( kapp->clipboard(), TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotClearSelection()) ); #endif // Create the KFind object @@ -3731,7 +3731,7 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi return; } - if (url.find( TQString::tqfromLatin1( "javascript:" ),0, false ) == 0 ) { + if (url.find( TQString::fromLatin1( "javascript:" ),0, false ) == 0 ) { TQString jscode = KURL::decode_string( url.mid( url.find( "javascript:", 0, false ) ) ); jscode = KStringHandler::rsqueeze( jscode, 80 ); // truncate if too long if (url.startsWith("javascript:window.open")) @@ -3838,18 +3838,18 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi extra = i18n(" (In other frame)"); } - if (u.protocol() == TQString::tqfromLatin1("mailto")) { - TQString mailtoMsg /* = TQString::tqfromLatin1("<img src=%1>").arg(locate("icon", TQString::tqfromLatin1("locolor/16x16/actions/mail_send.png")))*/; + if (u.protocol() == TQString::fromLatin1("mailto")) { + TQString mailtoMsg /* = TQString::fromLatin1("<img src=%1>").arg(locate("icon", TQString::fromLatin1("locolor/16x16/actions/mail_send.png")))*/; mailtoMsg += i18n("Email to: ") + KURL::decode_string(u.path()); TQStringList queries = TQStringList::split('&', u.query().mid(1)); TQStringList::Iterator it = queries.begin(); const TQStringList::Iterator itEnd = queries.end(); for (; it != itEnd; ++it) - if ((*it).startsWith(TQString::tqfromLatin1("subject="))) + if ((*it).startsWith(TQString::fromLatin1("subject="))) mailtoMsg += i18n(" - Subject: ") + KURL::decode_string((*it).mid(8)); - else if ((*it).startsWith(TQString::tqfromLatin1("cc="))) + else if ((*it).startsWith(TQString::fromLatin1("cc="))) mailtoMsg += i18n(" - CC: ") + KURL::decode_string((*it).mid(3)); - else if ((*it).startsWith(TQString::tqfromLatin1("bcc="))) + else if ((*it).startsWith(TQString::fromLatin1("bcc="))) mailtoMsg += i18n(" - BCC: ") + KURL::decode_string((*it).mid(4)); mailtoMsg = TQStyleSheet::escape(mailtoMsg); mailtoMsg.replace(TQRegExp("([\n\r\t]|[ ]{10})"), TQString()); @@ -3858,9 +3858,9 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi } // Is this check necessary at all? (Frerich) #if 0 - else if (u.protocol() == TQString::tqfromLatin1("http")) { + else if (u.protocol() == TQString::fromLatin1("http")) { DOM::Node hrefNode = nodeUnderMouse().parentNode(); - while (hrefNode.nodeName().string() != TQString::tqfromLatin1("A") && !hrefNode.isNull()) + while (hrefNode.nodeName().string() != TQString::fromLatin1("A") && !hrefNode.isNull()) hrefNode = hrefNode.parentNode(); if (!hrefNode.isNull()) { @@ -3868,12 +3868,12 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi if (!hreflangNode.isNull()) { TQString countryCode = hreflangNode.nodeValue().string().lower(); // Map the language code to an appropriate country code. - if (countryCode == TQString::tqfromLatin1("en")) - countryCode = TQString::tqfromLatin1("gb"); - TQString flagImg = TQString::tqfromLatin1("<img src=%1>").arg( - locate("locale", TQString::tqfromLatin1("l10n/") + if (countryCode == TQString::fromLatin1("en")) + countryCode = TQString::fromLatin1("gb"); + TQString flagImg = TQString::fromLatin1("<img src=%1>").arg( + locate("locale", TQString::fromLatin1("l10n/") + countryCode - + TQString::tqfromLatin1("/flag.png"))); + + TQString::fromLatin1("/flag.png"))); emit setStatusBarText(flagImg + u.prettyURL() + extra); } } @@ -3906,7 +3906,7 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c if ( !target.isEmpty() ) hasTarget = true; - if ( url.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) + if ( url.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) { crossFrameExecuteScript( target, KURL::decode_string( url.mid( 11 ) ) ); return false; @@ -4027,7 +4027,7 @@ void KHTMLPart::slotViewDocumentSource() } } - (void) KRun::runURL( url, TQString::tqfromLatin1("text/plain"), isTempFile ); + (void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile ); } void KHTMLPart::slotViewPageInfo() @@ -4108,7 +4108,7 @@ void KHTMLPart::slotViewFrameSource() } } - (void) KRun::runURL( url, TQString::tqfromLatin1("text/plain"), isTempFile ); + (void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile ); } KURL KHTMLPart::backgroundURL() const @@ -4276,7 +4276,7 @@ void KHTMLPart::updateActions() { TQObject *ext = KParts::BrowserExtension::childObject( frame ); if ( ext ) - enablePrintFrame = ext->tqmetaObject()->slotNames().contains( "print()" ); + enablePrintFrame = ext->metaObject()->slotNames().contains( "print()" ); } d->m_paPrintFrame->setEnabled( enablePrintFrame ); @@ -4319,7 +4319,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const TQString &url, con (*it)->m_params = params; // Support for <frame src="javascript:string"> - if ( url.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) + if ( url.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) { if ( processObjectRequest(*it, KURL("about:blank"), TQString("text/html") ) ) { KHTMLPart* p = static_cast<KHTMLPart*>(static_cast<KParts::ReadOnlyPart *>((*it)->m_part)); @@ -4341,7 +4341,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const TQString &url, con TQString KHTMLPart::requestFrameName() { - return TQString::tqfromLatin1("<!--frame %1-->").arg(d->m_frameNameId++); + return TQString::fromLatin1("<!--frame %1-->").arg(d->m_frameNameId++); } bool KHTMLPart::requestObject( khtml::RenderPart *frame, const TQString &url, const TQString &serviceType, @@ -4408,7 +4408,7 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const // We want a KHTMLPart if the HTML says <frame src=""> or <frame src="about:blank"> if ((url.isEmpty() || url.url() == "about:blank") && args.serviceType.isEmpty()) - args.serviceType = TQString::tqfromLatin1( "text/html" ); + args.serviceType = TQString::fromLatin1( "text/html" ); if ( args.serviceType.isEmpty() ) { kdDebug(6050) << "Running new KHTMLRun for " << this << " and child=" << child << endl; @@ -4650,7 +4650,7 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *parentWidget, const char { TQString constr; if ( !serviceName.isEmpty() ) - constr.append( TQString::tqfromLatin1( "Name == '%1'" ).arg( serviceName ) ); + constr.append( TQString::fromLatin1( "Name == '%1'" ).arg( serviceName ) ); KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString() ); @@ -4701,7 +4701,7 @@ KParts::PartManager *KHTMLPart::partManager() { if ( !d->m_manager && d->m_view ) { - d->m_manager = new KParts::PartManager( d->m_view->tqtopLevelWidget(), this, "khtml part manager" ); + d->m_manager = new KParts::PartManager( d->m_view->topLevelWidget(), this, "khtml part manager" ); d->m_manager->setAllowNestedParts( true ); connect( d->m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ), this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) ); @@ -4777,7 +4777,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt "WarnOnUnencryptedForm"); // Move this setting into KSSL instead KConfig *config = kapp->config(); - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfigGroupSaver saver( config, grpNotifMsgs ); if (!config->readBoolEntry("WarnOnUnencryptedForm", true)) { @@ -4811,7 +4811,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt TQString urlstring = u.url(); - if ( urlstring.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { + if ( urlstring.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) { urlstring = KURL::decode_string(urlstring); crossFrameExecuteScript( _target, urlstring.right( urlstring.length() - 11) ); return; @@ -4873,18 +4873,18 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt TQString bodyEnc; if (contentType.lower() == "multipart/form-data") { // FIXME: is this correct? I suspect not - bodyEnc = KURL::encode_string(TQString::tqfromLatin1(formData.data(), + bodyEnc = KURL::encode_string(TQString::fromLatin1(formData.data(), formData.size())); } else if (contentType.lower() == "text/plain") { // Convention seems to be to decode, and s/&/\n/ - TQString tmpbody = TQString::tqfromLatin1(formData.data(), + TQString tmpbody = TQString::fromLatin1(formData.data(), formData.size()); tmpbody.replace(TQRegExp("[&]"), "\n"); tmpbody.replace(TQRegExp("[+]"), " "); tmpbody = KURL::decode_string(tmpbody); // Decode the rest of it bodyEnc = KURL::encode_string(tmpbody); // Recode for the URL } else { - bodyEnc = KURL::encode_string(TQString::tqfromLatin1(formData.data(), + bodyEnc = KURL::encode_string(TQString::fromLatin1(formData.data(), formData.size())); } @@ -4895,7 +4895,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt if ( strcmp( action, "get" ) == 0 ) { if (u.protocol() != "mailto") - u.setQuery( TQString::tqfromLatin1( formData.data(), formData.size() ) ); + u.setQuery( TQString::fromLatin1( formData.data(), formData.size() ) ); args.setDoPost( false ); } else { @@ -4975,7 +4975,7 @@ void KHTMLPart::popupMenu( const TQString &linkUrl ) KHTMLPopupGUIClient* client = new KHTMLPopupGUIClient( this, d->m_popupMenuXML, linkKURL ); TQGuardedPtr<TQObject> guard( client ); - TQString mimetype = TQString::tqfromLatin1( "text/html" ); + TQString mimetype = TQString::fromLatin1( "text/html" ); args.metaData()["referrer"] = referrer; if (!linkUrl.isEmpty()) // over a link @@ -5095,7 +5095,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg // TODO: handle child target correctly! currently the script are always executed fur the parent TQString urlStr = url.url(); - if ( urlStr.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { + if ( urlStr.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) { TQString script = KURL::decode_string( urlStr.right( urlStr.length() - 11 ) ); executeScript( DOM::Node(), script ); return; @@ -5103,17 +5103,17 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg TQString frameName = args.frameName.lower(); if ( !frameName.isEmpty() ) { - if ( frameName == TQString::tqfromLatin1( "_top" ) ) + if ( frameName == TQString::fromLatin1( "_top" ) ) { emit d->m_extension->openURLRequest( url, args ); return; } - else if ( frameName == TQString::tqfromLatin1( "_blank" ) ) + else if ( frameName == TQString::fromLatin1( "_blank" ) ) { emit d->m_extension->createNewWindow( url, args ); return; } - else if ( frameName == TQString::tqfromLatin1( "_parent" ) ) + else if ( frameName == TQString::fromLatin1( "_parent" ) ) { KParts::URLArgs newArgs( args ); newArgs.frameName = TQString(); @@ -5121,7 +5121,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg emit d->m_extension->openURLRequest( url, newArgs ); return; } - else if ( frameName != TQString::tqfromLatin1( "_self" ) ) + else if ( frameName != TQString::fromLatin1( "_self" ) ) { khtml::ChildFrame *_frame = recursiveFrameRequest( callingHtmlPart, url, args ); @@ -6610,9 +6610,9 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event ) #ifndef QT_NO_CLIPBOARD TQString text = selectedText(); text.replace(TQChar(0xa0), ' '); - disconnect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection())); - kapp->tqclipboard()->setText(text,TQClipboard::Selection); - connect( kapp->tqclipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection())); + kapp->clipboard()->setText(text,TQClipboard::Selection); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); #endif //kdDebug( 6000 ) << "selectedText = " << text << endl; emitSelectionChanged(); @@ -6658,7 +6658,7 @@ void KHTMLPart::slotPrintFrame() if ( !ext ) return; - TQMetaObject *mo = ext->tqmetaObject(); + TQMetaObject *mo = ext->metaObject(); int idx = mo->findSlot( "print()", true ); if ( idx >= 0 ) { @@ -6877,7 +6877,7 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part ) if (frame->frameStyle() != TQFrame::NoFrame) { frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken); - frame->tqrepaint(); + frame->repaint(); } } @@ -6905,7 +6905,7 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part ) if (frame->frameStyle() != TQFrame::NoFrame) { frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Plain); - frame->tqrepaint(); + frame->repaint(); } kdDebug(6050) << "new active frame " << d->m_activeFrame << endl; } @@ -7157,7 +7157,7 @@ void KHTMLPart::openWallet(DOM::HTMLFormElementImpl *form) } if (!d->m_wq) { - KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->tqtopLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous); + KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous); d->m_wq = new KHTMLWalletQueue(this); d->m_wq->wallet = wallet; connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool))); @@ -7199,7 +7199,7 @@ void KHTMLPart::saveToWallet(const TQString& key, const TQMap<TQString,TQString> } if (!d->m_wq) { - KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->tqtopLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous); + KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous); d->m_wq = new KHTMLWalletQueue(this); d->m_wq->wallet = wallet; connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool))); diff --git a/khtml/khtml_printsettings.cpp b/khtml/khtml_printsettings.cpp index ed998ffb7..355f50e71 100644 --- a/khtml/khtml_printsettings.cpp +++ b/khtml/khtml_printsettings.cpp @@ -21,7 +21,7 @@ #include <klocale.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> KHTMLPrintSettings::KHTMLPrintSettings(TQWidget *parent, const char *name) diff --git a/khtml/khtml_run.cpp b/khtml/khtml_run.cpp index c07b44b79..90770d38f 100644 --- a/khtml/khtml_run.cpp +++ b/khtml/khtml_run.cpp @@ -30,7 +30,7 @@ KHTMLRun::KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &args, bool hideErrorDialog ) - : KParts::BrowserRun( url, args, part, part->widget() ? part->widget()->tqtopLevelWidget() : 0, + : KParts::BrowserRun( url, args, part, part->widget() ? part->widget()->topLevelWidget() : 0, false, false, hideErrorDialog ), m_child( child ) { diff --git a/khtml/khtml_settings.cc b/khtml/khtml_settings.cc index 6b8649601..431aec0ca 100644 --- a/khtml/khtml_settings.cc +++ b/khtml/khtml_settings.cc @@ -138,9 +138,9 @@ KHTMLSettings::KJavaScriptAdvice KHTMLSettings::strToAdvice(const TQString& _str if (!_str) ret = KJavaScriptDunno; - if (_str.lower() == TQString::tqfromLatin1("accept")) + if (_str.lower() == TQString::fromLatin1("accept")) ret = KJavaScriptAccept; - else if (_str.lower() == TQString::tqfromLatin1("reject")) + else if (_str.lower() == TQString::fromLatin1("reject")) ret = KJavaScriptReject; return ret; @@ -189,63 +189,63 @@ void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domai void KHTMLSettings::readDomainSettings(KConfig *config, bool reset, bool global, KPerDomainSettings &pd_settings) { TQString jsPrefix = global ? TQString::null - : TQString::tqfromLatin1("javascript."); + : TQString::fromLatin1("javascript."); TQString javaPrefix = global ? TQString::null - : TQString::tqfromLatin1("java."); + : TQString::fromLatin1("java."); TQString pluginsPrefix = global ? TQString::null - : TQString::tqfromLatin1("plugins."); + : TQString::fromLatin1("plugins."); // The setting for Java - TQString key = javaPrefix + TQString::tqfromLatin1("EnableJava"); + TQString key = javaPrefix + TQString::fromLatin1("EnableJava"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_bEnableJava = config->readBoolEntry( key, false ); else if ( !global ) pd_settings.m_bEnableJava = d->global.m_bEnableJava; // The setting for Plugins - key = pluginsPrefix + TQString::tqfromLatin1("EnablePlugins"); + key = pluginsPrefix + TQString::fromLatin1("EnablePlugins"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_bEnablePlugins = config->readBoolEntry( key, true ); else if ( !global ) pd_settings.m_bEnablePlugins = d->global.m_bEnablePlugins; // The setting for JavaScript - key = jsPrefix + TQString::tqfromLatin1("EnableJavaScript"); + key = jsPrefix + TQString::fromLatin1("EnableJavaScript"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_bEnableJavaScript = config->readBoolEntry( key, true ); else if ( !global ) pd_settings.m_bEnableJavaScript = d->global.m_bEnableJavaScript; // window property policies - key = jsPrefix + TQString::tqfromLatin1("WindowOpenPolicy"); + key = jsPrefix + TQString::fromLatin1("WindowOpenPolicy"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_windowOpenPolicy = (KJSWindowOpenPolicy) config->readUnsignedNumEntry( key, KJSWindowOpenSmart ); else if ( !global ) pd_settings.m_windowOpenPolicy = d->global.m_windowOpenPolicy; - key = jsPrefix + TQString::tqfromLatin1("WindowMovePolicy"); + key = jsPrefix + TQString::fromLatin1("WindowMovePolicy"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_windowMovePolicy = (KJSWindowMovePolicy) config->readUnsignedNumEntry( key, KJSWindowMoveAllow ); else if ( !global ) pd_settings.m_windowMovePolicy = d->global.m_windowMovePolicy; - key = jsPrefix + TQString::tqfromLatin1("WindowResizePolicy"); + key = jsPrefix + TQString::fromLatin1("WindowResizePolicy"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_windowResizePolicy = (KJSWindowResizePolicy) config->readUnsignedNumEntry( key, KJSWindowResizeAllow ); else if ( !global ) pd_settings.m_windowResizePolicy = d->global.m_windowResizePolicy; - key = jsPrefix + TQString::tqfromLatin1("WindowStatusPolicy"); + key = jsPrefix + TQString::fromLatin1("WindowStatusPolicy"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_windowStatusPolicy = (KJSWindowStatusPolicy) config->readUnsignedNumEntry( key, KJSWindowStatusAllow ); else if ( !global ) pd_settings.m_windowStatusPolicy = d->global.m_windowStatusPolicy; - key = jsPrefix + TQString::tqfromLatin1("WindowFocusPolicy"); + key = jsPrefix + TQString::fromLatin1("WindowFocusPolicy"); if ( (global && reset) || config->hasKey( key ) ) pd_settings.m_windowFocusPolicy = (KJSWindowFocusPolicy) config->readUnsignedNumEntry( key, KJSWindowFocusAllow ); @@ -611,7 +611,7 @@ void KHTMLSettings::init( KConfig * config, bool reset ) { TQCString javaPolicy = adviceToStr( it.data() ); TQCString javaScriptPolicy = adviceToStr( KJavaScriptDunno ); - domainConfig.append(TQString::tqfromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy)); + domainConfig.append(TQString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy)); } config->writeEntry( "JavaDomainSettings", domainConfig ); } @@ -624,7 +624,7 @@ void KHTMLSettings::init( KConfig * config, bool reset ) { TQCString javaPolicy = adviceToStr( KJavaScriptDunno ); TQCString javaScriptPolicy = adviceToStr( it.data() ); - domainConfig.append(TQString::tqfromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy)); + domainConfig.append(TQString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy)); } config->writeEntry( "ECMADomainSettings", domainConfig ); } @@ -878,7 +878,7 @@ const TQString &KHTMLSettings::availableFamilies() if ( !avFamilies ) { avFamilies = new TQString; TQFontDatabase db; - TQStringList families = db.tqfamilies(); + TQStringList families = db.families(); TQStringList s; TQRegExp foundryExp(" \\[.+\\]"); diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp index 80f031fe2..121bc1965 100644 --- a/khtml/khtmlview.cpp +++ b/khtml/khtmlview.cpp @@ -84,7 +84,7 @@ #include <tqptrdict.h> #include <tqtooltip.h> #include <tqstring.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqtimer.h> #include <tqvaluevector.h> @@ -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; 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; } else if ( d->complete && static_cast<RenderCanvas*>(m_part->xmlDocImpl()->renderer())->needsLayout() ) { // 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->tp->begin(d->vertPaintBuffer); 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)); d->tp->end(); 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; d->tp->begin(d->paintBuffer); 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)); d->tp->end(); @@ -756,7 +756,7 @@ static int cnt=0; kdDebug() << "[" << ++cnt << "]" << " clip region: " << pr << endl; // p->setClipRegion(TQRect(0,0,ew,eh)); // 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); #endif // DEBUG_NO_PAINT_BUFFER @@ -867,7 +867,7 @@ void KHTMLView::layout() } #if 0 ElementImpl *listitem = m_part->xmlDocImpl()->getElementById("__test_element__"); - if (listitem) kdDebug(6000) << "after layout, before tqrepaint" << endl; + if (listitem) kdDebug(6000) << "after layout, before repaint" << endl; if (listitem) dumpLineBoxes(static_cast<RenderFlow *>(listitem->renderer())); #endif #ifndef KHTML_NO_CARET @@ -2284,7 +2284,7 @@ void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQVal TQRect rec=en->getRect(); TQLabel *lab=new TQLabel(accesskey,viewport(),0,(WFlags)WDestructiveClose); connect( origview, TQT_SIGNAL(hideAccessKeys()), lab, TQT_SLOT(close()) ); - connect( this, TQT_SIGNAL(repaintAccessKeys()), lab, TQT_SLOT(tqrepaint())); + connect( this, TQT_SIGNAL(repaintAccessKeys()), lab, TQT_SLOT(repaint())); lab->setPalette(TQToolTip::palette()); lab->setLineWidth(2); lab->setFrameStyle(TQFrame::Box | TQFrame::Plain); @@ -2721,7 +2721,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const TQString url = (*it).url; it = data.remove( it ); // assign the same accesskey also to other elements pointing to the same url - if( !url.isEmpty() && !url.tqstartsWith( "javascript:", false )) { + if( !url.isEmpty() && !url.startsWith( "javascript:", false )) { for( TQValueList< AccessKeyData >::Iterator it2 = data.begin(); it2 != data.end(); ) { @@ -2937,7 +2937,7 @@ void KHTMLView::print(bool quick) root->layer()->paint(p, TQRect(0, top, pageWidth, pageHeight)); // m_part->xmlDocImpl()->renderer()->layer()->paint(p, TQRect(0, top, pageWidth, pageHeight)); -// root->tqrepaint(); +// root->repaint(); // p->flush(); kdDebug(6000) << "printed: page " << page <<" bottom At = " << bottom << endl; @@ -2983,7 +2983,7 @@ void KHTMLView::paint(TQPainter *p, const TQRect &rc, int yOff, bool *more) khtml::RenderCanvas *root = static_cast<khtml::RenderCanvas *>(m_part->xmlDocImpl()->renderer()); if(!root) return; - m_part->xmlDocImpl()->setPaintDevice(p->tqdevice()); + m_part->xmlDocImpl()->setPaintDevice(p->device()); root->setPagedMode(true); root->setStaticMode(true); root->setWidth(rc.width()); @@ -3510,12 +3510,12 @@ void KHTMLView::timerEvent ( TQTimerEvent *e ) setStaticBackground(d->useSlowRepaints); -// kdDebug() << "scheduled tqrepaint "<< d->repaintTimerId << endl; +// kdDebug() << "scheduled repaint "<< d->repaintTimerId << endl; killTimer(d->repaintTimerId); d->repaintTimerId = 0; TQRect updateRegion; - TQMemArray<TQRect> rects = d->updateRegion.tqrects(); + TQMemArray<TQRect> rects = d->updateRegion.rects(); d->updateRegion = TQRegion(); @@ -3645,10 +3645,10 @@ void KHTMLView::complete( bool pendingAction ) KHTMLViewPrivate::CSActionPending : KHTMLViewPrivate::CSFull; } - // is there a tqrepaint pending? + // is there a repaint pending? if (d->repaintTimerId) { -// kdDebug() << "requesting tqrepaint now" << endl; +// kdDebug() << "requesting repaint now" << endl; // do it now killTimer(d->repaintTimerId); d->repaintTimerId = startTimer( 20 ); @@ -3702,7 +3702,7 @@ void KHTMLView::initCaret(bool keepSelection) }/*end if*/ // kdDebug(6200) << "d->m_selectionStart " << m_part->d->m_selectionStart.handle() // << " d->m_selectionEnd " << m_part->d->m_selectionEnd.handle() << endl; - // ### does not tqrepaint the selection on keepSelection!=false + // ### does not repaint the selection on keepSelection!=false moveCaretTo(m_part->d->caretNode().handle(), m_part->d->caretOffset(), !keepSelection); // kdDebug(6200) << "d->m_selectionStart " << m_part->d->m_selectionStart.handle() // << " d->m_selectionEnd " << m_part->d->m_selectionEnd.handle() << endl; @@ -3877,7 +3877,7 @@ void KHTMLView::hideCaret() if (d->m_caretViewContext->visible) { // kdDebug(6200) << "redraw caret hidden" << endl; d->m_caretViewContext->visible = false; - // force tqrepaint, otherwise the event won't be handled + // force repaint, otherwise the event won't be handled // before the focus leaves the window repaintContents(d->m_caretViewContext->x, d->m_caretViewContext->y, d->m_caretViewContext->width, @@ -4430,7 +4430,7 @@ void KHTMLView::placeCaretOnChar(CaretBox *hintBox) d->m_caretViewContext->origX = d->m_caretViewContext->x; d->scrollBarMoved = false; #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 ensureNodeHasFocus(m_part->d->caretNode().handle()); caretOn(); diff --git a/khtml/khtmlview.h b/khtml/khtmlview.h index 212a02b44..65e432090 100644 --- a/khtml/khtmlview.h +++ b/khtml/khtmlview.h @@ -384,8 +384,8 @@ private: * * These operations are executed unconditionally, regardless of the * focus, and the caret display policy. - * @param forceRepaint @p true to force an immediate tqrepaint, otherwise - * do a scheduled tqrepaint + * @param forceRepaint @p true to force an immediate repaint, otherwise + * do a scheduled repaint */ void showCaret(bool forceRepaint = false); /** makes the caret invisible, but does not influence the frequency timer. diff --git a/khtml/kmultipart/kmultipart.cpp b/khtml/kmultipart/kmultipart.cpp index 5d82742d9..20768341f 100644 --- a/khtml/kmultipart/kmultipart.cpp +++ b/khtml/kmultipart/kmultipart.cpp @@ -51,7 +51,7 @@ public: Q_ASSERT( !m_lineComplete ); if ( storeNewline || c != '\n' ) { int sz = m_currentLine.size(); - m_currentLine.tqresize( sz+1, TQGArray::SpeedOptim ); + m_currentLine.resize( sz+1, TQGArray::SpeedOptim ); m_currentLine[sz] = c; } if ( c == '\n' ) @@ -68,7 +68,7 @@ public: reset(); } void reset() { - m_currentLine.tqresize( 0, TQGArray::SpeedOptim ); + m_currentLine.resize( 0, TQGArray::SpeedOptim ); m_lineComplete = false; } private: @@ -234,7 +234,7 @@ void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data ) } else if ( !qstrnicmp( line.data(), "Content-Encoding:", 17 ) ) { - TQString encoding = TQString::tqfromLatin1(line.data()+17).stripWhiteSpace().lower(); + TQString encoding = TQString::fromLatin1(line.data()+17).stripWhiteSpace().lower(); if (encoding == "gzip" || encoding == "x-gzip") { m_gzip = true; } else { @@ -245,7 +245,7 @@ void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data ) else if ( !qstrnicmp( line.data(), "Content-Type:", 13 ) ) { Q_ASSERT( m_nextMimeType.isNull() ); - m_nextMimeType = TQString::tqfromLatin1( line.data() + 14 ).stripWhiteSpace(); + m_nextMimeType = TQString::fromLatin1( line.data() + 14 ).stripWhiteSpace(); int semicolon = m_nextMimeType.find( ';' ); if ( semicolon != -1 ) m_nextMimeType = m_nextMimeType.left( semicolon ); diff --git a/khtml/misc/arena.cpp b/khtml/misc/arena.cpp index 58d531384..5efcaf98d 100644 --- a/khtml/misc/arena.cpp +++ b/khtml/misc/arena.cpp @@ -143,7 +143,7 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb) assert((nb & pool->mask) == 0); #endif - nb = (uword)ARENA_ALIGN(pool, nb); /* force tqalignment */ + nb = (uword)ARENA_ALIGN(pool, nb); /* force alignment */ /* attempt to allocate from arenas at pool->current */ { @@ -197,7 +197,7 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb) } else #endif sz = pool->arenasize > nb ? pool->arenasize : nb; - sz += sizeof *a + pool->mask; /* header and tqalignment slop */ + sz += sizeof *a + pool->mask; /* header and alignment slop */ pool->cumul += sz; #ifdef DEBUG_ARENA_MALLOC i++; diff --git a/khtml/misc/decoder.cpp b/khtml/misc/decoder.cpp index f227f4014..34689cae1 100644 --- a/khtml/misc/decoder.cpp +++ b/khtml/misc/decoder.cpp @@ -37,7 +37,7 @@ using namespace khtml; #include "htmlhashes.h" #include <tqregexp.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kglobal.h> #include <kcharsets.h> diff --git a/khtml/misc/htmlattrs.c b/khtml/misc/htmlattrs.c index 6f420e3b3..779792e71 100644 --- a/khtml/misc/htmlattrs.c +++ b/khtml/misc/htmlattrs.c @@ -188,7 +188,7 @@ struct spool_attr_t char spool_attr_str42[sizeof("rules")]; char spool_attr_str43[sizeof("compact")]; char spool_attr_str44[sizeof("rev")]; - char spool_attr_str45[sizeof("tqshape")]; + char spool_attr_str45[sizeof("shape")]; char spool_attr_str46[sizeof("charset")]; char spool_attr_str47[sizeof("charoff")]; char spool_attr_str48[sizeof("lang")]; @@ -343,7 +343,7 @@ static const struct spool_attr_t spool_attr_contents = "rules", "compact", "rev", - "tqshape", + "shape", "charset", "charoff", "lang", diff --git a/khtml/misc/khtmllayout.h b/khtml/misc/khtmllayout.h index b0c8dc613..1049d10c4 100644 --- a/khtml/misc/khtmllayout.h +++ b/khtml/misc/khtmllayout.h @@ -33,7 +33,7 @@ namespace khtml const int UNDEFINED = -1; - // tqalignment + // alignment enum VAlign { VNone=0, Bottom, VCenter, Top, Baseline }; enum HAlign { HDefault, Left, HCenter, Right, HNone = 0 }; diff --git a/khtml/misc/knsplugininstaller.cpp b/khtml/misc/knsplugininstaller.cpp index 09de5a149..aa3c93cb4 100644 --- a/khtml/misc/knsplugininstaller.cpp +++ b/khtml/misc/knsplugininstaller.cpp @@ -36,10 +36,10 @@ #include <tqiodevice.h> #include <tqfile.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmap.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> #include <sys/utsname.h> diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp index de7d5aea2..82a87dab9 100644 --- a/khtml/misc/loader.cpp +++ b/khtml/misc/loader.cpp @@ -213,7 +213,7 @@ CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KI : CachedObject(url, CSSStyleSheet, _cachePolicy, 0) { // Set the type we want (probably css or xml) - TQString ah = TQString::tqfromLatin1( accept ); + TQString ah = TQString::fromLatin1( accept ); if ( !ah.isEmpty() ) ah += ","; ah += "*/*;q=0.1"; @@ -327,7 +327,7 @@ CachedScript::CachedScript(DocLoader* dl, const DOMString &url, KIO::CacheContro // It's javascript we want. // But some websites think their scripts are <some wrong mimetype here> // and refuse to serve them if we only accept application/x-javascript. - setAccept( TQString::tqfromLatin1("*/*") ); + setAccept( TQString::fromLatin1("*/*") ); // load the file Cache::loader()->load(dl, this, false); m_loading = true; @@ -397,7 +397,7 @@ public: void sendTo(TQDataSink* sink, int n) { - sink->receive((const uchar*)&buffer.tqat(pos), n); + sink->receive((const uchar*)&buffer.at(pos), n); pos += n; @@ -787,7 +787,7 @@ void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimati delete p; p = new TQPixmap(m->framePixmap()); m->disconnectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) )); - m->disconnectqStatus( this, TQT_SLOT( movieStatus( int ) )); + m->disconnecStatus( this, TQT_SLOT( movieStatus( int ) )); m->disconnectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) ); TQTimer::singleShot(0, this, TQT_SLOT( deleteMovie())); imgSource = 0; @@ -850,7 +850,7 @@ void CachedImage::data ( TQBuffer &_buffer, bool eof ) imgSource = new ImageSource( _buffer.buffer()); m = new TQMovie( imgSource, 8192 ); m->connectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) )); - m->connectqStatus( this, TQT_SLOT( movieStatus(int))); + m->connecStatus( this, TQT_SLOT( movieStatus(int))); m->connectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) ); } } @@ -1167,7 +1167,7 @@ void Loader::servePendingRequests() { job->addMetaData( "cross-domain", part->toplevelURL().url() ); if (part->widget()) - job->setWindow (part->widget()->tqtopLevelWidget()); + job->setWindow (part->widget()->topLevelWidget()); } } diff --git a/khtml/misc/loader.h b/khtml/misc/loader.h index e950f1767..3baed31ce 100644 --- a/khtml/misc/loader.h +++ b/khtml/misc/loader.h @@ -45,7 +45,7 @@ #include <tqpixmap.h> #include <tqbuffer.h> #include <tqstringlist.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqtimer.h> #include <kurl.h> diff --git a/khtml/misc/multimap.h b/khtml/misc/multimap.h index 8f60dcf02..125e8e07d 100644 --- a/khtml/misc/multimap.h +++ b/khtml/misc/multimap.h @@ -70,7 +70,7 @@ private: static inline unsigned int stupidHash(void* ptr) { unsigned long val = (unsigned long)ptr; - // remove tqalignment and multiply by a prime unlikely to be a factor of size + // remove alignment and multiply by a prime unlikely to be a factor of size val = (val >> 4) * 1237; return val; } diff --git a/khtml/misc/stringit.h b/khtml/misc/stringit.h index d56a78397..789f22af8 100644 --- a/khtml/misc/stringit.h +++ b/khtml/misc/stringit.h @@ -46,7 +46,7 @@ public: DOMStringIt(TQChar *str, uint len) { s = str, l = len; lines = 0; } DOMStringIt(const TQString &str) - { s = str.tqunicode(); l = str.length(); lines = 0; } + { s = str.unicode(); l = str.length(); lines = 0; } DOMStringIt *operator++() { @@ -85,13 +85,13 @@ class TokenizerSubstring friend class TokenizerString; public: 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) {} void clear() { m_length = 0; m_current = 0; } void appendTo(TQString &str) const { - if (m_string.tqunicode() == m_current) { + if (m_string.unicode() == m_current) { if (str.isEmpty()) str = m_string; else diff --git a/khtml/rendering/bidi.cpp b/khtml/rendering/bidi.cpp index 30beadd7c..bd010047a 100644 --- a/khtml/rendering/bidi.cpp +++ b/khtml/rendering/bidi.cpp @@ -242,7 +242,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) { next = current->firstChild(); if ( next && adjustEmbedding ) { - EUnicodeBidi ub = next->style()->tqunicodeBidi(); + EUnicodeBidi ub = next->style()->unicodeBidi(); if ( ub != UBNormal && !emptyRun ) { EDirection dir = next->style()->direction(); 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) { next = current->nextSibling(); if (next) break; - if ( adjustEmbedding && current->style()->tqunicodeBidi() != UBNormal && !emptyRun ) { + if ( adjustEmbedding && current->style()->unicodeBidi() != UBNormal && !emptyRun ) { embed( TQChar::DirPDF, bidi ); } 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. RenderText* textObj = static_cast<RenderText*>(endpoint.obj); if (endpoint.pos+1 < textObj->length() && - textObj->text()[endpoint.pos+1].tqunicode() == SOFT_HYPHEN) + textObj->text()[endpoint.pos+1].unicode() == SOFT_HYPHEN) return; } endpoint.pos--; @@ -484,7 +484,7 @@ static void appendRunsForObject(int start, int end, RenderObject* obj, BidiState bool haveNextMidpoint = (smidpoints && sCurrMidpoint < sNumMidpoints); BidiIterator nextMidpoint; if (haveNextMidpoint) - nextMidpoint = smidpoints->tqat(sCurrMidpoint); + nextMidpoint = smidpoints->at(sCurrMidpoint); if (betweenMidpoints) { if (!(haveNextMidpoint && nextMidpoint.obj == obj)) return; @@ -1241,7 +1241,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator } // 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; bidi.current.increment( bidi ); adjustEmbedding = false; @@ -1611,11 +1611,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi // be skipped. while (!start.atEnd() && (start.obj->isInlineFlow() || (!start.obj->style()->preserveWS() && !start.obj->isBR() && #ifndef QT_NO_UNICODETABLES - ( (start.current().tqunicode() == (ushort)0x0020) || // ASCII space - (start.current().tqunicode() == (ushort)0x0009) || // ASCII tab - (start.current().tqunicode() == (ushort)0x000A) || // ASCII line feed - (start.current().tqunicode() == (ushort)0x000C) || // ASCII form feed - (start.current().tqunicode() == (ushort)0x200B) || // Zero-width space + ( (start.current().unicode() == (ushort)0x0020) || // ASCII space + (start.current().unicode() == (ushort)0x0009) || // ASCII tab + (start.current().unicode() == (ushort)0x000A) || // ASCII line feed + (start.current().unicode() == (ushort)0x000C) || // ASCII form feed + (start.current().unicode() == (ushort)0x200B) || // Zero-width space start.obj->isFloatingOrPositioned() ) #else ( start.current() == ' ' || start.current() == '\n' || start.obj->isFloatingOrPositioned() ) @@ -1824,7 +1824,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi isLineEmpty = false; // 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; if (!ignoringSpaces) { // Ignore soft hyphens @@ -1911,7 +1911,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi lBreak.endOfInline = false; } 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. 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 // 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]; - if (c.tqunicode() == SOFT_HYPHEN) + if (c.unicode() == SOFT_HYPHEN) chopMidpointsAt(lBreak.obj, lBreak.pos-2); } diff --git a/khtml/rendering/break_lines.cpp b/khtml/rendering/break_lines.cpp index a0d314cee..2ae5b53c7 100644 --- a/khtml/rendering/break_lines.cpp +++ b/khtml/rendering/break_lines.cpp @@ -1,7 +1,7 @@ #include <break_lines.h> #include <klibloader.h> #include "tqcstring.h" -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqcleanuphandler.h> #include <config.h> diff --git a/khtml/rendering/break_lines.h b/khtml/rendering/break_lines.h index ed6df2aab..5176e5fb0 100644 --- a/khtml/rendering/break_lines.h +++ b/khtml/rendering/break_lines.h @@ -6,7 +6,7 @@ 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) these are currently for Japanese, though simply adding Korean, Chinese ones should work as well @@ -122,7 +122,7 @@ namespace khtml { inline bool isBreakable( const TQChar *str, const int pos, int len ) { const TQChar *c = str+pos; - unsigned short ch = c->tqunicode(); + unsigned short ch = c->unicode(); if ( ch > 0xff ) { // not latin1, need to do more sophisticated checks for asian fonts unsigned char row = c->row(); @@ -147,8 +147,8 @@ namespace khtml { return false; // do binary search in dontbreak[] - return break_bsearch(dontbreakbefore, c->tqunicode()) && - break_bsearch(dontbreakafter, (str+(pos-1))->tqunicode()); + return break_bsearch(dontbreakbefore, c->unicode()) && + break_bsearch(dontbreakafter, (str+(pos-1))->unicode()); } else // no asian font return c->isSpace(); } else { diff --git a/khtml/rendering/enumerate.cpp b/khtml/rendering/enumerate.cpp index 57445c12b..9cfe149ad 100644 --- a/khtml/rendering/enumerate.cpp +++ b/khtml/rendering/enumerate.cpp @@ -138,7 +138,7 @@ TQString toHebrew( int number ) { TQString letter; if (number < 1) return TQString::number(number); if (number>999) { - letter = toHebrew(number/1000) + TQString::tqfromLatin1("'"); + letter = toHebrew(number/1000) + TQString::fromLatin1("'"); number = number%1000; } diff --git a/khtml/rendering/font.cpp b/khtml/rendering/font.cpp index 766c89840..a33f0e082 100644 --- a/khtml/rendering/font.cpp +++ b/khtml/rendering/font.cpp @@ -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(); if ( scFont ) { const TQString upper = qstr.upper(); - const TQChar *uc = qstr.tqunicode(); + const TQChar *uc = qstr.unicode(); const TQFontMetrics sc_fm( *scFont ); for ( int i = 0; i < len; ++i ) { if ( (uc+i)->category() == TQChar::Letter_Lowercase ) @@ -407,7 +407,7 @@ bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font) /* Cache size info */ if (!scalSizesCache) scalSizesCache = new TQMap<ScalKey, TQValueList<int> >; - (*scalSizesCache)[key] = db.tqsmoothSizes(font.family(), db.styleString(font)); + (*scalSizesCache)[key] = db.smoothSizes(font.family(), db.styleString(font)); } } diff --git a/khtml/rendering/render_applet.cpp b/khtml/rendering/render_applet.cpp index 3a00589e2..fce22f7c8 100644 --- a/khtml/rendering/render_applet.cpp +++ b/khtml/rendering/render_applet.cpp @@ -123,22 +123,22 @@ void RenderApplet::processArguments(const TQMap<TQString, TQString> &args) KJavaApplet* applet = w ? w->applet() : 0; if ( applet ) { - applet->setBaseURL( args[TQString::tqfromLatin1("baseURL") ] ); - applet->setAppletClass( args[TQString::tqfromLatin1("code") ] ); + applet->setBaseURL( args[TQString::fromLatin1("baseURL") ] ); + applet->setAppletClass( args[TQString::fromLatin1("code") ] ); - TQString str = args[TQString::tqfromLatin1("codeBase") ]; + TQString str = args[TQString::fromLatin1("codeBase") ]; if( !str.isEmpty() ) applet->setCodeBase( str ); - str = args[TQString::tqfromLatin1("name") ]; + str = args[TQString::fromLatin1("name") ]; if( !str.isNull() ) applet->setAppletName( str ); else - applet->setAppletName( args[TQString::tqfromLatin1("code") ] ); + applet->setAppletName( args[TQString::fromLatin1("code") ] ); - str = args[TQString::tqfromLatin1("archive") ]; + str = args[TQString::fromLatin1("archive") ]; if( !str.isEmpty() ) - applet->setArchives( args[TQString::tqfromLatin1("archive") ] ); + applet->setArchives( args[TQString::fromLatin1("archive") ] ); } } diff --git a/khtml/rendering/render_arena.cpp b/khtml/rendering/render_arena.cpp index 023b98e36..99fbf4f4d 100644 --- a/khtml/rendering/render_arena.cpp +++ b/khtml/rendering/render_arena.cpp @@ -88,7 +88,7 @@ void* RenderArena::allocate(size_t size) #else void* result = 0; - // Ensure we have correct tqalignment for pointers. Important for Tru64 + // Ensure we have correct alignment for pointers. Important for Tru64 size = KHTML_ROUNDUP(size, sizeof(void*)); // Check recyclers first @@ -130,7 +130,7 @@ void RenderArena::free(size_t size, void* ptr) VALGRIND_MEMPOOL_FREE(findContainingArena(&m_pool, ptr)->base, ptr); #endif - // Ensure we have correct tqalignment for pointers. Important for Tru64 + // Ensure we have correct alignment for pointers. Important for Tru64 size = KHTML_ROUNDUP(size, sizeof(void*)); // See if it's a size that we recycle diff --git a/khtml/rendering/render_block.cpp b/khtml/rendering/render_block.cpp index 5b30e2a58..ccbb6fad0 100644 --- a/khtml/rendering/render_block.cpp +++ b/khtml/rendering/render_block.cpp @@ -881,7 +881,7 @@ static inline bool isAnonymousWhitespace( RenderObject* o ) { return false; RenderObject *fc = o->firstChild(); 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) diff --git a/khtml/rendering/render_body.cpp b/khtml/rendering/render_body.cpp index 2ed114a53..930ec358c 100644 --- a/khtml/rendering/render_body.cpp +++ b/khtml/rendering/render_body.cpp @@ -81,11 +81,11 @@ void RenderBody::paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty) } -void RenderBody::tqrepaint(Priority p) +void RenderBody::repaint(Priority p) { RenderObject *cb = containingBlock(); if(cb) - cb->tqrepaint(p); + cb->repaint(p); } void RenderBody::layout() diff --git a/khtml/rendering/render_body.h b/khtml/rendering/render_body.h index 17c237e91..7951f73e1 100644 --- a/khtml/rendering/render_body.h +++ b/khtml/rendering/render_body.h @@ -40,7 +40,7 @@ public: virtual bool isBody() const { return true; } virtual const char *renderName() const { return "RenderBody"; } - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); virtual void layout(); virtual void setStyle(RenderStyle* style); diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp index e63115361..7400752ac 100644 --- a/khtml/rendering/render_box.cpp +++ b/khtml/rendering/render_box.cpp @@ -346,7 +346,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty) } 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 h = height(); @@ -622,7 +622,7 @@ void RenderBox::paintBackgroundExtended(TQPainter *p, const TQColor &c, const Ba sy+=b.y()-cy; cx=b.x();cy=b.y();cw=b.width();ch=b.height(); } - // restrict painting to tqrepaint-clip + // restrict painting to repaint-clip if (cy < clipy) { ch -= (clipy - cy); sy += (clipy - cy); @@ -795,7 +795,7 @@ void RenderBox::position(InlineBox* box, int /*from*/, int /*len*/, bool /*rever setPos( box->xPos(), box->yPos() ); } -void RenderBox::tqrepaint(Priority prior) +void RenderBox::repaint(Priority prior) { int ow = style() ? style()->outlineSize() : 0; if( isInline() && !isReplaced() ) diff --git a/khtml/rendering/render_box.h b/khtml/rendering/render_box.h index 78b85b5f4..c0c618d5c 100644 --- a/khtml/rendering/render_box.h +++ b/khtml/rendering/render_box.h @@ -87,7 +87,7 @@ public: virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); virtual void repaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); diff --git a/khtml/rendering/render_canvas.cpp b/khtml/rendering/render_canvas.cpp index e5947369d..e8540eba6 100644 --- a/khtml/rendering/render_canvas.cpp +++ b/khtml/rendering/render_canvas.cpp @@ -329,7 +329,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& paintInfo, int /*_tx*/, int /* if ((firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view()) 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) @@ -372,13 +372,13 @@ void RenderCanvas::scheduleDeferredRepaints() if (!needsFullRepaint()) { TQValueList<RenderObject*>::const_iterator it; for ( it = m_dirtyChildren.begin(); it != m_dirtyChildren.end(); ++it ) - (*it)->tqrepaint(); + (*it)->repaint(); } - //kdDebug(6040) << "scheduled deferred repaints: " << m_dirtyChildren.count() << " needed full tqrepaint: " << needsFullRepaint() << endl; + //kdDebug(6040) << "scheduled deferred repaints: " << m_dirtyChildren.count() << " needed full repaint: " << needsFullRepaint() << endl; m_dirtyChildren.clear(); } -void RenderCanvas::tqrepaint(Priority p) +void RenderCanvas::repaint(Priority p) { if (m_view && !m_staticMode) { if (p == RealtimePriority) { @@ -567,7 +567,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep TQRect updateRect; - // Don't use tqrepaint() because it will cause all rects to + // Don't use repaint() because it will cause all rects to // be united (see khtmlview::scheduleRepaint()). Instead // just draw damage rects for objects that have a change // in selection state. @@ -651,9 +651,9 @@ void RenderCanvas::clearSelection(bool doRepaint) { if (o->selectionState()!=SelectionNone) if (doRepaint) - o->tqrepaint(); + o->repaint(); o->setSelectionState(SelectionNone); - o->tqrepaint(); + o->repaint(); RenderObject* no; if ( !(no = o->firstChild()) ) if ( !(no = o->nextSibling()) ) @@ -669,7 +669,7 @@ void RenderCanvas::clearSelection(bool doRepaint) if (m_selectionEnd) { m_selectionEnd->setSelectionState(SelectionNone); if (doRepaint) - m_selectionEnd->tqrepaint(); + m_selectionEnd->repaint(); } // set selection start & end to 0 diff --git a/khtml/rendering/render_canvas.h b/khtml/rendering/render_canvas.h index cd4ef30ca..17f279d7b 100644 --- a/khtml/rendering/render_canvas.h +++ b/khtml/rendering/render_canvas.h @@ -61,7 +61,7 @@ public: KHTMLView *view() const { return m_view; } - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); virtual void repaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); void repaintViewRectangle(int x, int y, int w, int h, bool asap=false); bool needsFullRepaint() const; diff --git a/khtml/rendering/render_container.cpp b/khtml/rendering/render_container.cpp index 13f17c08d..69f987477 100644 --- a/khtml/rendering/render_container.cpp +++ b/khtml/rendering/render_container.cpp @@ -170,11 +170,11 @@ RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild) KHTMLAssert(oldChild->parent() == this); // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or - // that a positioned child got yanked). We also tqrepaint, so that the area exposed when the child + // that a positioned child got yanked). We also repaint, so that the area exposed when the child // disappears gets repainted properly. if ( document()->renderer() ) { oldChild->setNeedsLayoutAndMinMaxRecalc(); - oldChild->tqrepaint(); + oldChild->repaint(); // Keep our layer hierarchy updated. oldChild->removeLayers(enclosingLayer()); diff --git a/khtml/rendering/render_flow.cpp b/khtml/rendering/render_flow.cpp index 97dd40468..ae579bd46 100644 --- a/khtml/rendering/render_flow.cpp +++ b/khtml/rendering/render_flow.cpp @@ -267,7 +267,7 @@ bool RenderFlow::hitTestLines(NodeInfo& i, int x, int y, int tx, int ty, HitTest } -void RenderFlow::tqrepaint(Priority prior) +void RenderFlow::repaint(Priority prior) { if (isInlineFlow()) { // Find our leftmost position. @@ -280,7 +280,7 @@ void RenderFlow::tqrepaint(Priority prior) if (curr == firstLineBox() || curr->xPos() < left) left = curr->xPos(); - // Now tqinvalidate a rectangle. + // Now invalidate a rectangle. int ow = style() ? style()->outlineSize() : 0; // We need to add in the relative position offsets of any inlines (including us) up to our @@ -306,7 +306,7 @@ void RenderFlow::tqrepaint(Priority prior) effectiveWidth()+ow*2, effectiveHeight()+ow*2, prior); } else - return RenderBox::tqrepaint(prior); + return RenderBox::repaint(prior); } } diff --git a/khtml/rendering/render_flow.h b/khtml/rendering/render_flow.h index 3267a92f1..1e23822bb 100644 --- a/khtml/rendering/render_flow.h +++ b/khtml/rendering/render_flow.h @@ -69,7 +69,7 @@ public: void paintLines(PaintInfo& i, int _tx, int _ty); bool hitTestLines(NodeInfo& i, int x, int y, int tx, int ty, HitTestAction hitTestAction); - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); virtual int highestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp index 5c53f0250..d55b32fe4 100644 --- a/khtml/rendering/render_form.cpp +++ b/khtml/rendering/render_form.cpp @@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget ); - TQSize s( cb->tqstyle().tqpixelMetric( TQStyle::PM_IndicatorWidth ), - cb->tqstyle().tqpixelMetric( TQStyle::PM_IndicatorHeight ) ); + TQSize s( cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorWidth ), + cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget ); - TQSize s( rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), - rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); + TQSize s( rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), + rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -260,17 +260,17 @@ void RenderSubmitButton::calcMinMaxWidth() bool empty = raw.isEmpty(); if ( empty ) - raw = TQString::tqfromLatin1("X"); + raw = TQString::fromLatin1("X"); TQFontMetrics fm = pb->fontMetrics(); TQSize ts = fm.size( ShowPrefix, raw); TQSize s(pb->tqstyle().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts ) .expandedTo(TQApplication::globalStrut())); - int margin = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) + - pb->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; + int margin = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonMargin, pb) + + pb->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; int w = ts.width() + margin; int h = s.height(); if (pb->isDefault() || pb->autoDefault()) { - int dbw = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; + int dbw = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; w += dbw; } @@ -1018,7 +1018,7 @@ void RenderSelect::updateFromElement() DOMString label = optElem->getAttribute(ATTR_LABEL); if (!label.isEmpty()) text = label.string(); - text = TQString::tqfromLatin1(" ")+text; + text = TQString::fromLatin1(" ")+text; } if(m_useListBox) { @@ -1406,7 +1406,7 @@ void TextAreaWidget::slotReplaceNext() } if (!(m_replace->options() & KReplaceDialog::PromptOnReplace)) { - viewport()->tqsetUpdatesEnabled(false); + viewport()->setUpdatesEnabled(false); } KFind::Result res = KFind::NoMatch; @@ -1449,7 +1449,7 @@ void TextAreaWidget::slotReplaceNext() } if (!(m_replace->options() & KReplaceDialog::PromptOnReplace)) { - viewport()->tqsetUpdatesEnabled(true); + viewport()->setUpdatesEnabled(true); repaintChanged(); } @@ -1738,13 +1738,13 @@ TQString RenderTextArea::text() paragraphText = paragraphText.left(pl); //Snip invented space. for (int l = 0; l < pl; ++l) { if (lindex != w->lineOfChar(p, l)) { - paragraphText.insert(l+ll++, TQString::tqfromLatin1("\n")); + paragraphText.insert(l+ll++, TQString::fromLatin1("\n")); lindex = w->lineOfChar(p, l); } } txt += paragraphText; if (p < w->paragraphs() - 1) - txt += TQString::tqfromLatin1("\n"); + txt += TQString::fromLatin1("\n"); } } else diff --git a/khtml/rendering/render_frames.cpp b/khtml/rendering/render_frames.cpp index 9f58a0a4f..bc3f00be4 100644 --- a/khtml/rendering/render_frames.cpp +++ b/khtml/rendering/render_frames.cpp @@ -728,16 +728,16 @@ void RenderPartObject::updateWidget() HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>( child ); TQString aStr = p->name(); - aStr += TQString::tqfromLatin1("=\""); + aStr += TQString::fromLatin1("=\""); aStr += p->value(); - aStr += TQString::tqfromLatin1("\""); + aStr += TQString::fromLatin1("\""); TQString name_lower = p->name().lower(); - if (name_lower == TQString::tqfromLatin1("type") && objbase->id() != ID_APPLET) { + if (name_lower == TQString::fromLatin1("type") && objbase->id() != ID_APPLET) { objbase->setServiceType(p->value()); } else if (url.isEmpty() && - (name_lower == TQString::tqfromLatin1("src") || - name_lower == TQString::tqfromLatin1("movie") || - name_lower == TQString::tqfromLatin1("code"))) { + (name_lower == TQString::fromLatin1("src") || + name_lower == TQString::fromLatin1("movie") || + name_lower == TQString::fromLatin1("code"))) { url = p->value(); } params.append(aStr); @@ -754,8 +754,8 @@ void RenderPartObject::updateWidget() } } } - params.append( TQString::tqfromLatin1("__KHTML__PLUGINEMBED=\"YES\"") ); - params.append( TQString::tqfromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url())); + params.append( TQString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") ); + params.append( TQString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url())); HTMLEmbedElementImpl *embed = 0; TQString classId; @@ -775,18 +775,18 @@ void RenderPartObject::updateWidget() } classId = objbase->classId; - params.append( TQString::tqfromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) ); - params.append( TQString::tqfromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) ); + params.append( TQString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) ); + params.append( TQString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) ); if (!objbase->getAttribute(ATTR_WIDTH).isEmpty()) - params.append( TQString::tqfromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) ); + params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) ); else if (embed && !embed->getAttribute(ATTR_WIDTH).isEmpty()) { - params.append( TQString::tqfromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) ); + params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) ); objbase->setAttribute(ATTR_WIDTH, embed->getAttribute(ATTR_WIDTH)); } if (!objbase->getAttribute(ATTR_HEIGHT).isEmpty()) - params.append( TQString::tqfromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) ); + params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) ); else if (embed && !embed->getAttribute(ATTR_HEIGHT).isEmpty()) { - params.append( TQString::tqfromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) ); + params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) ); objbase->setAttribute(ATTR_HEIGHT, embed->getAttribute(ATTR_HEIGHT)); } @@ -808,7 +808,7 @@ void RenderPartObject::updateWidget() serviceType = "application/x-activex-handler"; #endif - if(classId.find(TQString::tqfromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) { + if(classId.find(TQString::fromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) { // It is ActiveX, but the nsplugin system handling // should also work, that's why we don't override the // serviceType with application/x-activex-handler @@ -817,17 +817,17 @@ void RenderPartObject::updateWidget() // with nspluginviewer (Niko) serviceType = "application/x-shockwave-flash"; } - else if(classId.find(TQString::tqfromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0) + else if(classId.find(TQString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0) serviceType = "audio/x-pn-realaudio-plugin"; - else if(classId.find(TQString::tqfromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 || - objbase->classId.find(TQString::tqfromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0) + else if(classId.find(TQString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 || + objbase->classId.find(TQString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0) serviceType = "application/x-java-applet"; // http://www.apple.com/quicktime/tools_tips/tutorials/activex.html - else if(classId.find(TQString::tqfromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0) + else if(classId.find(TQString::fromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0) serviceType = "video/quicktime"; // http://msdn.microsoft.com/library/en-us/dnwmt/html/adding_windows_media_to_web_pages__etse.asp?frame=true - else if(objbase->classId.find(TQString::tqfromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 || - classId.find(TQString::tqfromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0) + else if(objbase->classId.find(TQString::fromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 || + classId.find(TQString::fromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0) serviceType = "video/x-msvideo"; else diff --git a/khtml/rendering/render_generated.cpp b/khtml/rendering/render_generated.cpp index f5fc70687..17c65fc9c 100644 --- a/khtml/rendering/render_generated.cpp +++ b/khtml/rendering/render_generated.cpp @@ -53,7 +53,7 @@ void RenderCounterBase::calcMinMaxWidth() generateContent(); 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(); RenderText::calcMinMaxWidth(); @@ -379,7 +379,7 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty) diamond[2] = TQPoint(x+s, y+2*s); diamond[3] = TQPoint(x, y+s); p->setBrush( color ); - p->tqdrawConvexPolygon( diamond, 0, 4 ); + p->drawConvexPolygon( diamond, 0, 4 ); return; } case LNONE: diff --git a/khtml/rendering/render_image.cpp b/khtml/rendering/render_image.cpp index b5357bba1..46104adb8 100644 --- a/khtml/rendering/render_image.cpp +++ b/khtml/rendering/render_image.cpp @@ -266,7 +266,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty) if ( !berrorPic ) { //qDebug("qDrawShadePanel %d/%d/%d/%d", _tx + leftBorder, _ty + topBorder, 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; if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) ) @@ -416,7 +416,7 @@ void RenderImage::notifyFinished(CachedObject *finishedObj) if ( ( m_cachedImage == finishedObj || m_oldImage == finishedObj ) && m_oldImage ) { m_oldImage->deref( this ); m_oldImage = 0; - tqrepaint(); + repaint(); } RenderReplaced::notifyFinished(finishedObj); diff --git a/khtml/rendering/render_layer.cpp b/khtml/rendering/render_layer.cpp index 3427bf1dc..96b0236cb 100644 --- a/khtml/rendering/render_layer.cpp +++ b/khtml/rendering/render_layer.cpp @@ -168,7 +168,7 @@ TQRegion RenderLayer::paintedRegion(RenderLayer* rootLayer) if (m_negZOrderList) { uint count = m_negZOrderList->count(); for (uint i = 0; i < count; i++) { - RenderLayer* child = m_negZOrderList->tqat(i); + RenderLayer* child = m_negZOrderList->at(i); r += child->paintedRegion(rootLayer); } } @@ -188,19 +188,19 @@ TQRegion RenderLayer::paintedRegion(RenderLayer* rootLayer) if (m_posZOrderList) { uint count = m_posZOrderList->count(); for (uint i = 0; i < count; i++) { - RenderLayer* child = m_posZOrderList->tqat(i); + RenderLayer* child = m_posZOrderList->at(i); r += child->paintedRegion(rootLayer); } } return r; } -void RenderLayer::tqrepaint( Priority p, bool markForRepaint ) +void RenderLayer::repaint( Priority p, bool markForRepaint ) { if (markForRepaint && m_markedForRepaint) return; for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) - child->tqrepaint( p, markForRepaint ); + child->repaint( p, markForRepaint ); TQRect layerBounds, damageRect, fgrect; calculateRects(renderer()->canvas()->layer(), renderer()->viewRect(), layerBounds, damageRect, fgrect); m_visibleRect = damageRect.intersect( layerBounds ); @@ -213,7 +213,7 @@ void RenderLayer::tqrepaint( Priority p, bool markForRepaint ) void RenderLayer::updateLayerPositions(RenderLayer* rootLayer, bool doFullRepaint, bool checkForRepaint) { if (doFullRepaint) { - m_object->tqrepaint(); + m_object->repaint(); checkForRepaint = doFullRepaint = false; } @@ -266,7 +266,7 @@ void RenderLayer::updateWidgetMasks(RenderLayer* rootLayer) m_region = TQRect(0,0,sv->contentsWidth(),sv->contentsHeight()); for (uint i = 0; i < count; i++) { - RenderLayer* child = m_posZOrderList->tqat(i); + RenderLayer* child = m_posZOrderList->at(i); if (child->zIndex() == 0 && child->renderer()->style()->position() == STATIC) continue; // we don't know the widget's exact stacking position within flow m_region -= child->paintedRegion(rootLayer); @@ -537,7 +537,7 @@ void RenderLayer::checkInlineRelOffset(const RenderObject* o, int& x, int& y) y += sy; } -void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool tqrepaint) +void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repaint) { if (renderer()->style()->overflowX() != OMARQUEE || !renderer()->hasOverflowClip()) { if (x < 0) x = 0; @@ -569,9 +569,9 @@ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool tqrep // Fire the scroll DOM event. m_object->element()->dispatchHTMLEvent(EventImpl::SCROLL_EVENT, true, false); - // Just schedule a full tqrepaint of our object. - if (tqrepaint) - m_object->tqrepaint(RealtimePriority); + // Just schedule a full repaint of our object. + if (repaint) + m_object->repaint(RealtimePriority); if (updateScrollbars) { if (m_hBar) @@ -637,7 +637,7 @@ int RenderLayer::verticalScrollbarWidth() #ifdef APPLE_CHANGES return m_vBar->width(); #else - return m_vBar->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent); + return m_vBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); #endif } @@ -650,7 +650,7 @@ int RenderLayer::horizontalScrollbarHeight() #ifdef APPLE_CHANGES return m_hBar->height(); #else - return m_hBar->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent); + return m_hBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); #endif } @@ -691,7 +691,7 @@ void RenderLayer::positionScrollbars(const TQRect& absBounds) TQScrollBar *b = m_hBar; if (!m_hBar) b = m_vBar; - int sw = b->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent); + int sw = b->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent); if (m_vBar) { TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1); @@ -898,7 +898,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, TQPainter *p, if (m_negZOrderList) { uint count = m_negZOrderList->count(); for (uint i = 0; i < count; i++) { - RenderLayer* child = m_negZOrderList->tqat(i); + RenderLayer* child = m_negZOrderList->at(i); child->paintLayer(rootLayer, p, paintDirtyRect, selectionOnly); } } @@ -946,7 +946,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, TQPainter *p, if (m_posZOrderList) { uint count = m_posZOrderList->count(); for (uint i = 0; i < count; i++) { - RenderLayer* child = m_posZOrderList->tqat(i); + RenderLayer* child = m_posZOrderList->at(i); child->paintLayer(rootLayer, p, paintDirtyRect, selectionOnly); } } @@ -1026,7 +1026,7 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje if (m_posZOrderList) { uint count = m_posZOrderList->count(); for (int i = count-1; i >= 0; i--) { - RenderLayer* child = m_posZOrderList->tqat(i); + RenderLayer* child = m_posZOrderList->at(i); insideLayer = child->nodeAtPointForLayer(rootLayer, info, xMousePos, yMousePos, hitTestRect); if (insideLayer) return insideLayer; @@ -1057,7 +1057,7 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje if (m_negZOrderList) { uint count = m_negZOrderList->count(); for (int i = count-1; i >= 0; i--) { - RenderLayer* child = m_negZOrderList->tqat(i); + RenderLayer* child = m_negZOrderList->at(i); insideLayer = child->nodeAtPointForLayer(rootLayer, info, xMousePos, yMousePos, hitTestRect); if (insideLayer) return insideLayer; @@ -1261,8 +1261,8 @@ static void sortByZOrder(TQPtrVector<RenderLayer>* buffer, for (uint i = end-1; i > start; i--) { bool sorted = true; for (uint j = start; j < i; j++) { - RenderLayer* elt = buffer->tqat(j); - RenderLayer* elt2 = buffer->tqat(j+1); + RenderLayer* elt = buffer->at(j); + RenderLayer* elt2 = buffer->at(j+1); if (elt->zIndex() > elt2->zIndex()) { sorted = false; buffer->insert(j, elt2); @@ -1279,8 +1279,8 @@ static void sortByZOrder(TQPtrVector<RenderLayer>* buffer, sortByZOrder(buffer, mergeBuffer, start, mid); sortByZOrder(buffer, mergeBuffer, mid, end); - RenderLayer* elt = buffer->tqat(mid-1); - RenderLayer* elt2 = buffer->tqat(mid); + RenderLayer* elt = buffer->at(mid-1); + RenderLayer* elt2 = buffer->at(mid); // Handle the fast common case (of equal z-indices). The list may already // be completely sorted. @@ -1293,26 +1293,26 @@ static void sortByZOrder(TQPtrVector<RenderLayer>* buffer, uint i1 = start; uint i2 = mid; - elt = buffer->tqat(i1); - elt2 = buffer->tqat(i2); + elt = buffer->at(i1); + elt2 = buffer->at(i2); while (i1 < mid || i2 < end) { if (i1 < mid && (i2 == end || elt->zIndex() <= elt2->zIndex())) { mergeBuffer->insert(mergeBuffer->count(), elt); i1++; if (i1 < mid) - elt = buffer->tqat(i1); + elt = buffer->at(i1); } else { mergeBuffer->insert(mergeBuffer->count(), elt2); i2++; if (i2 < end) - elt2 = buffer->tqat(i2); + elt2 = buffer->at(i2); } } for (uint i = start; i < end; i++) - buffer->insert(i, mergeBuffer->tqat(i-start)); + buffer->insert(i, mergeBuffer->at(i-start)); mergeBuffer->clear(); } @@ -1471,7 +1471,7 @@ static void writeLayers(TQTextStream &ts, const RenderLayer* rootLayer, RenderLa if (negList) { for (unsigned i = 0; i != negList->count(); ++i) - writeLayers(ts, rootLayer, negList->tqat(i), paintDirtyRect, indent ); + writeLayers(ts, rootLayer, negList->at(i), paintDirtyRect, indent ); } if (shouldPaint) @@ -1485,7 +1485,7 @@ static void writeLayers(TQTextStream &ts, const RenderLayer* rootLayer, RenderLa TQPtrVector<RenderLayer>* posList = l->posZOrderList(); if (posList) { for (unsigned i = 0; i != posList->count(); ++i) - writeLayers(ts, rootLayer, posList->tqat(i), paintDirtyRect, indent); + writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, indent); } } diff --git a/khtml/rendering/render_layer.h b/khtml/rendering/render_layer.h index 1176a63a3..a8f1e5adc 100644 --- a/khtml/rendering/render_layer.h +++ b/khtml/rendering/render_layer.h @@ -190,7 +190,7 @@ public: void checkInlineRelOffset(const RenderObject* o, int& x, int& y); short scrollXOffset() { return m_scrollX; } int scrollYOffset() { return m_scrollY; } - void scrollToOffset(int x, int y, bool updateScrollbars = true, bool tqrepaint = true); + void scrollToOffset(int x, int y, bool updateScrollbars = true, bool repaint = true); void scrollToXOffset(int x) { scrollToOffset(x, m_scrollY); } void scrollToYOffset(int y) { scrollToOffset(m_scrollX, y); } void showScrollbar(Qt::Orientation, bool); @@ -202,7 +202,7 @@ public: void paintScrollbars(RenderObject::PaintInfo& pI); void checkScrollbarsAfterLayout(); void slotValueChanged(int); - void tqrepaint(Priority p=NormalPriority, bool markForRepaint = false); + void repaint(Priority p=NormalPriority, bool markForRepaint = false); void updateScrollPositionFromScrollbars(); void updateLayerPosition(); diff --git a/khtml/rendering/render_list.cpp b/khtml/rendering/render_list.cpp index c88f103d3..769b79670 100644 --- a/khtml/rendering/render_list.cpp +++ b/khtml/rendering/render_list.cpp @@ -333,7 +333,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty) diamond[2] = TQPoint(x+s, y+2*s); diamond[3] = TQPoint(x, y+s); p->setBrush( color ); - p->tqdrawConvexPolygon( diamond, 0, 4 ); + p->drawConvexPolygon( diamond, 0, 4 ); return; } case LNONE: @@ -344,21 +344,21 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty) if( style()->direction() == LTR) { p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item); p->drawText(_tx + fm.width(m_item), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, - TQString::tqfromLatin1(". ")); + TQString::fromLatin1(". ")); } else { - const TQString& punct(TQString::tqfromLatin1(" .")); + const TQString& punct(TQString::fromLatin1(" .")); p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct); p->drawText(_tx + fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item); } } else { if (style()->direction() == LTR) { - const TQString& punct(TQString::tqfromLatin1(". ")); + const TQString& punct(TQString::fromLatin1(". ")); p->drawText(_tx-offset/2, _ty, 0, 0, Qt::AlignRight|TQt::DontClip, punct); p->drawText(_tx-offset/2-fm.width(punct), _ty, 0, 0, Qt::AlignRight|TQt::DontClip, m_item); } else { - const TQString& punct(TQString::tqfromLatin1(" .")); + const TQString& punct(TQString::fromLatin1(" .")); p->drawText(_tx+offset/2, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct); p->drawText(_tx+offset/2+fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item); } @@ -543,7 +543,7 @@ void RenderListMarker::calcMinMaxWidth() default: KHTMLAssert(false); } - m_markerWidth = fm.width(m_item) + fm.width(TQString::tqfromLatin1(". ")); + m_markerWidth = fm.width(m_item) + fm.width(TQString::fromLatin1(". ")); } end: diff --git a/khtml/rendering/render_object.cpp b/khtml/rendering/render_object.cpp index 1fc72c7d8..162ca4956 100644 --- a/khtml/rendering/render_object.cpp +++ b/khtml/rendering/render_object.cpp @@ -535,9 +535,9 @@ bool RenderObject::hasStaticY() const void RenderObject::setPixmap(const TQPixmap&, const TQRect& /*r*/, CachedImage* image) { - //tqrepaint bg when it finished loading + //repaint bg when it finished loading if(image && parent() && style() && style()->backgroundLayers()->containsImage(image)) { - isBody() ? canvas()->tqrepaint() : tqrepaint(); + isBody() ? canvas()->repaint() : repaint(); } } @@ -1164,15 +1164,15 @@ TQString RenderObject::information() const << " mB: " << marginBottom() << " qB: " << isBottomMarginQuirk() << "}" << (isTableCell() ? - ( TQString::tqfromLatin1(" [r=") + + ( TQString::fromLatin1(" [r=") + TQString::number( static_cast<const RenderTableCell *>(this)->row() ) + - TQString::tqfromLatin1(" c=") + + TQString::fromLatin1(" c=") + TQString::number( static_cast<const RenderTableCell *>(this)->col() ) + - TQString::tqfromLatin1(" rs=") + + TQString::fromLatin1(" rs=") + TQString::number( static_cast<const RenderTableCell *>(this)->rowSpan() ) + - TQString::tqfromLatin1(" cs=") + + TQString::fromLatin1(" cs=") + TQString::number( static_cast<const RenderTableCell *>(this)->colSpan() ) + - TQString::tqfromLatin1("]") ) : TQString::null ); + TQString::fromLatin1("]") ) : TQString::null ); if ( layer() ) ts << " layer=" << layer(); if ( continuation() ) @@ -1283,11 +1283,11 @@ void RenderObject::setStyle(RenderStyle *style) m_style->outlineWidth() > style->outlineWidth() || (!m_style->hidesOverflow() && style->hidesOverflow()) || ( m_style->hasClip() && !(m_style->clip() == style->clip()) ) ) ) { - // schedule a tqrepaint with the old style + // schedule a repaint with the old style if (layer() && !isInlineFlow()) - layer()->tqrepaint(pri); + layer()->repaint(pri); else - tqrepaint(pri); + repaint(pri); } if ( ( isFloating() && m_style->floating() != style->floating() ) || @@ -1345,7 +1345,7 @@ void RenderObject::setStyle(RenderStyle *style) } setNeedsLayoutAndMinMaxRecalc(); } else if (!isText() && d >= RenderStyle::Visible) { - // a tqrepaint is enough + // a repaint is enough if (layer()) { if (canvas() && canvas()->needsWidgetMasks()) { // update our widget masks @@ -1357,9 +1357,9 @@ void RenderObject::setStyle(RenderStyle *style) } } if (layer() && !isInlineFlow()) - layer()->tqrepaint(pri); + layer()->repaint(pri); else - tqrepaint(pri); + repaint(pri); } } } @@ -1428,9 +1428,9 @@ void RenderObject::repaintDuringLayout() if (canvas()->needsFullRepaint() || isText()) return; if (layer() && !isInlineFlow()) { - layer()->tqrepaint( NormalPriority, true ); + layer()->repaint( NormalPriority, true ); } else { - tqrepaint(); + repaint(); canvas()->deferredRepaint( this ); } } @@ -1850,7 +1850,7 @@ short RenderObject::getVerticalPosition( bool firstLine, RenderObject* ref ) con bool checkParent = ref->isInline() && !ref->isReplacedBlock() && !( ref->style()->verticalAlign() == TOP || ref->style()->verticalAlign() == BOTTOM ); vpos = checkParent ? ref->verticalPositionHint( firstLine ) : 0; - // don't allow elements nested inside text-top to have a different vtqalignment. + // don't allow elements nested inside text-top to have a different valignment. if ( va == BASELINE ) return vpos; else if ( va == LENGTH ) diff --git a/khtml/rendering/render_object.h b/khtml/rendering/render_object.h index e403601d3..f7f772387 100644 --- a/khtml/rendering/render_object.h +++ b/khtml/rendering/render_object.h @@ -441,7 +441,7 @@ public: void layoutIfNeeded() { if (needsLayout()) layout(); } // used for element state updates that can not be fixed with a - // tqrepaint and do not need a relayout + // repaint and do not need a relayout virtual void updateFromElement() {} // Called immediately after render-object is inserted @@ -681,8 +681,8 @@ public: // Used by collapsed border tables. virtual void collectBorders(TQValueList<CollapsedBorderValue>& borderStyles); - // force a complete tqrepaint - virtual void tqrepaint(Priority p = NormalPriority) { if(m_parent) m_parent->tqrepaint(p); } + // force a complete repaint + virtual void repaint(Priority p = NormalPriority) { if(m_parent) m_parent->repaint(p); } virtual void repaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); virtual unsigned int length() const { return 1; } @@ -747,7 +747,7 @@ public: virtual int leftmostPosition(bool /*includeOverflowInterior*/=true, bool /*includeSelf*/=true) const { return 0; } virtual int highestPosition(bool /*includeOverflowInterior*/=true, bool /*includeSelf*/=true) const { return 0; } - // recursively tqinvalidate current layout + // recursively invalidate current layout // unused: void invalidateLayout(); virtual void calcVerticalMargins() {} diff --git a/khtml/rendering/render_replaced.cpp b/khtml/rendering/render_replaced.cpp index 01379930a..7653b746c 100644 --- a/khtml/rendering/render_replaced.cpp +++ b/khtml/rendering/render_replaced.cpp @@ -183,7 +183,7 @@ bool RenderWidget::event( TQEvent *e ) return true; TQWidgetResizeEvent *re = static_cast<TQWidgetResizeEvent *>(e); m_widget->resize( re->w, re->h ); - tqrepaint(); + repaint(); } // eat all events - except if this is a frame (in which case KHTMLView handles it all) if ( ::tqqt_cast<KHTMLView *>( m_widget ) ) @@ -543,10 +543,10 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx, } } } - TQMemArray<TQRect> br = blit.tqrects(); + TQMemArray<TQRect> br = blit.rects(); const int cnt = br.size(); - const bool external = p->tqdevice()->isExtDev(); + const bool external = p->device()->isExtDev(); TQPixmap* const pm = PaintBuffer::grab( widget->size() ); if (!pm) { @@ -558,7 +558,7 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx, if ( external ) { // even hackier! TQPainter pt( pm ); - const TQColor c = widget->tqcolorGroup().base(); + const TQColor c = widget->colorGroup().base(); for (int i = 0; i < cnt; ++i) pt.fillRect( br[i], c ); } else { @@ -672,7 +672,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e) // don't allow the widget to react to wheel event unless its // currently focused. this avoids accidentally changing a select box // or something while wheeling a webpage. - if (tqApp->tqfocusWidget() != widget() && + if (tqApp->focusWidget() != widget() && widget()->focusPolicy() <= TQ_StrongFocus) { TQT_TQWHEELEVENT(e)->ignore(); TQApplication::sendEvent(view(), e); diff --git a/khtml/rendering/render_style.cpp b/khtml/rendering/render_style.cpp index 81d0b62ed..a71dd4116 100644 --- a/khtml/rendering/render_style.cpp +++ b/khtml/rendering/render_style.cpp @@ -726,7 +726,7 @@ bool RenderStyle::inheritedNotEqual( RenderStyle *other ) const CbLayout: The containing block of the object needs a relayout. Layout: the RenderObject needs a relayout after the style change Visible: The change is visible, but no relayout is needed - NonVisible: The object does need neither tqrepaint nor relayout after + NonVisible: The object does need neither repaint nor relayout after the change. ### TODO: @@ -744,7 +744,7 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const // EUserInput _user_input : 2; as long as :enabled is not impl'd // ### this needs work to know more exactly if we need a relayout -// or just a tqrepaint +// or just a repaint // non-inherited attributes // DataRef<StyleBoxData> box; @@ -786,7 +786,7 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const !(noninherited_flags.f._position == other->noninherited_flags.f._position) || !(noninherited_flags.f._floating == other->noninherited_flags.f._floating) || !(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; } diff --git a/khtml/rendering/render_style.h b/khtml/rendering/render_style.h index 59e38277d..c60a7ef47 100644 --- a/khtml/rendering/render_style.h +++ b/khtml/rendering/render_style.h @@ -39,7 +39,7 @@ #include <tqfont.h> #include <tqfontmetrics.h> #include <tqptrlist.h> -#include <tqpalette.h> +#include <palette.h> #include <tqapplication.h> #include "dom/dom_misc.h" @@ -919,7 +919,7 @@ protected: PseudoId _styleType : 4; bool _hasClip : 1; unsigned _pseudoBits : 8; - EUnicodeBidi _tqunicodeBidi : 2; + EUnicodeBidi _unicodeBidi : 2; // non CSS2 non-inherited 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._hasClip = false; noninherited_flags.f._pseudoBits = 0; - noninherited_flags.f._tqunicodeBidi = initialUnicodeBidi(); + noninherited_flags.f._unicodeBidi = initialUnicodeBidi(); noninherited_flags.f._textOverflow = initialTextOverflow(); noninherited_flags.f.unused = 0; } @@ -1108,7 +1108,7 @@ public: LengthBox clip() const { return visual->clip; } 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; } 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 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 setTableLayout(ETableLayout v) { noninherited_flags.f._table_layout = v; } diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp index 26e9c26d5..2cf1bf1f9 100644 --- a/khtml/rendering/render_table.cpp +++ b/khtml/rendering/render_table.cpp @@ -482,7 +482,7 @@ void RenderTable::paint( PaintInfo& pI, int _tx, int _ty) #if 0 TQString m; for (uint i = 0; i < borderStyles.count(); i++) - m += TQString("%1 ").arg((*borderStyles.tqat(i)).width()); + m += TQString("%1 ").arg((*borderStyles.at(i)).width()); kdDebug(6040) << m << endl; #endif TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin(); diff --git a/khtml/rendering/render_text.cpp b/khtml/rendering/render_text.cpp index cc41a1688..f5fa2e373 100644 --- a/khtml/rendering/render_text.cpp +++ b/khtml/rendering/render_text.cpp @@ -738,7 +738,7 @@ void RenderText::deleteInlineBoxes(RenderArena* arena) if (!arena) arena = renderArena(); for(unsigned int i=0; i < len; i++) { - InlineTextBox* s = m_lines.tqat(i); + InlineTextBox* s = m_lines.at(i); if (s) s->detach(arena); m_lines.remove(i); @@ -1036,7 +1036,7 @@ void RenderText::calcMinMaxWidth() bool firstLine = true; for(int i = 0; i < len; i++) { - unsigned short c = str->s[i].tqunicode(); + unsigned short c = str->s[i].unicode(); bool isNewline = false; // If line-breaks survive to here they are preserved @@ -1056,7 +1056,7 @@ void RenderText::calcMinMaxWidth() continue; 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 )) ) wordlen++; @@ -1328,11 +1328,11 @@ short RenderText::width() const return w; } -void RenderText::tqrepaint(Priority p) +void RenderText::repaint(Priority p) { RenderObject *cb = containingBlock(); if(cb) - cb->tqrepaint(p); + cb->repaint(p); } bool RenderText::isFixedWidthFont() const @@ -1464,13 +1464,13 @@ static TQString quoteAndEscapeNonPrintables(const TQString &s) TQString result; result += '"'; for (uint i = 0; i != s.length(); ++i) { - TQChar c = s.tqat(i); + TQChar c = s.at(i); if (c == '\\') { result += "\\\\"; } else if (c == '"') { result += "\\\""; } else { - ushort u = c.tqunicode(); + ushort u = c.unicode(); if (u >= 0x20 && u < 0x7F) { result += c; } else { diff --git a/khtml/rendering/render_text.h b/khtml/rendering/render_text.h index 0923837b3..50132fbc7 100644 --- a/khtml/rendering/render_text.h +++ b/khtml/rendering/render_text.h @@ -36,7 +36,7 @@ class TQPainter; class TQFontMetrics; -// Define a constant for soft hyphen's tqunicode value. +// Define a constant for soft hyphen's unicode value. #define SOFT_HYPHEN 173 const int cNoTruncation = -1; @@ -247,7 +247,7 @@ public: virtual short marginLeft() const { return style()->marginLeft().minWidth(0); } virtual short marginRight() const { return style()->marginRight().minWidth(0); } - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); bool hasBreakableChar() const { return m_hasBreakableChar; } const TQFontMetrics &metrics(bool firstLine) const; diff --git a/khtml/test/align2.html b/khtml/test/align2.html index 789fa3203..56f3feb70 100644 --- a/khtml/test/align2.html +++ b/khtml/test/align2.html @@ -4,14 +4,14 @@ </HEAD> <BODY> <H1>Align Test 2</H1> -This page contains regression tests for vertical tqalignment of images. +This page contains regression tests for vertical alignment of images. Each test consist of a table with a colored background. Within the table an empty image is shown with a border of 1 pixel around it. <HR> <TABLE width = 100%> <tr><td bgcolor="0000ff"> <IMG SRC="unknown.gif" height=10 width=50 border=1> -<FONT size=7>This image has no tqalignment</FONT> +<FONT size=7>This image has no alignment</FONT> </td></tr> </TABLE> <HR> @@ -39,7 +39,7 @@ Within the table an empty image is shown with a border of 1 pixel around it. <TABLE width = 100%> <tr><td bgcolor="0000ff"> <IMG SRC="unknown.gif" height=150 width=50 border=1> -<FONT size=7>This image has no tqalignment</FONT> +<FONT size=7>This image has no alignment</FONT> <IMG SRC="unknown.gif" height=50 width=50 border=1> </td></tr> </TABLE> @@ -68,7 +68,7 @@ Within the table an empty image is shown with a border of 1 pixel around it. <TABLE width = 100%> <tr><td bgcolor="0000ff"> <IMG SRC="unknown.gif" height=10 width=50 border=1> -<FONT>This image has no tqalignment</FONT> +<FONT>This image has no alignment</FONT> </td></tr> </TABLE> <HR> @@ -96,7 +96,7 @@ Within the table an empty image is shown with a border of 1 pixel around it. <TABLE width = 100%> <tr><td bgcolor="0000ff"> <IMG SRC="unknown.gif" height=150 width=50 border=1> -<FONT>This image has no tqalignment</FONT> +<FONT>This image has no alignment</FONT> <IMG SRC="unknown.gif" height=50 width=50 border=1> </td></tr> </TABLE> diff --git a/khtml/test/image_map.html b/khtml/test/image_map.html index 35d170d2a..21e002382 100644 --- a/khtml/test/image_map.html +++ b/khtml/test/image_map.html @@ -13,11 +13,11 @@ Moving the mouse cursor over the image should show different destinations <!-- =============== TOP IMAGE MAP =========== --> <MAP name="topbar"> -<AREA tqshape="rect" coords="90,0,120,18" href="http://www.kde.org/faq/kdefaq.html"> -<AREA tqshape="rect" coords="130,0,205,18" href="ftp://ftp.kde.org/pub/kde/"> -<AREA tqshape="rect" coords="215,0,295,18" href="http://www.kde.org/absolute_url.html"> -<AREA tqshape="rect" coords="305,0,355,18" href="relative_url_index.html"> -<AREA tqshape="default" nohref> +<AREA shape="rect" coords="90,0,120,18" href="http://www.kde.org/faq/kdefaq.html"> +<AREA shape="rect" coords="130,0,205,18" href="ftp://ftp.kde.org/pub/kde/"> +<AREA shape="rect" coords="215,0,295,18" href="http://www.kde.org/absolute_url.html"> +<AREA shape="rect" coords="305,0,355,18" href="relative_url_index.html"> +<AREA shape="default" nohref> </MAP> </BODY> diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp index 93c2deea5..e8be1ed1a 100644 --- a/khtml/test_regression.cpp +++ b/khtml/test_regression.cpp @@ -74,7 +74,7 @@ #include <tqpushbutton.h> #include <tqscrollview.h> #include <tqstring.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvaluelist.h> #include <tqwidget.h> #include <tqfileinfo.h> @@ -943,7 +943,7 @@ TQString RegressionTest::getPartOutput( OutputType type) getPartDOMOutput( outputStream, m_part, 0 ); } - dump.replace( m_baseDir + "/tests", TQString::tqfromLatin1( "REGRESSION_SRCDIR" ) ); + dump.replace( m_baseDir + "/tests", TQString::fromLatin1( "REGRESSION_SRCDIR" ) ); return dump; } @@ -1051,7 +1051,7 @@ void RegressionTest::doJavascriptReport( const TQString &test ) text.replace( TQRegExp( "\nFAIL" ), "\n<span style='color: red'>FAIL</span>" ); text.replace( TQRegExp( "\nPASSED" ), "\n<span style='color: green'>PASSED</span>" ); text.replace( TQRegExp( "\nPASS" ), "\n<span style='color: green'>PASS</span>" ); - if ( text.tqat( 0 ) == '\n' ) + if ( text.at( 0 ) == '\n' ) text = text.mid( 1, text.length() ); text.replace( '\n', "<br>\n" ); cl += text; @@ -1079,8 +1079,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) pos++; int newpos = absBase.find('/', pos); if (newpos == -1) newpos = absBase.length(); - TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); - TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); + TQConstString cmpPathComp(absPath.unicode() + pos, newpos - pos); + TQConstString cmpBaseComp(absBase.unicode() + pos, newpos - pos); // kdDebug() << "cmpPathComp: \"" << cmpPathComp.string() << "\"" << endl; // kdDebug() << "cmpBaseComp: \"" << cmpBaseComp.string() << "\"" << endl; // kdDebug() << "pos: " << pos << " newpos: " << newpos << endl; @@ -1094,8 +1094,8 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) TQString rel; { - TQConstString relBase(absBase.tqunicode() + basepos, absBase.length() - basepos); - TQConstString relPath(absPath.tqunicode() + pathpos, absPath.length() - pathpos); + TQConstString relBase(absBase.unicode() + basepos, absBase.length() - basepos); + TQConstString relPath(absPath.unicode() + pathpos, absPath.length() - pathpos); // generate as many .. as there are path elements in relBase if (relBase.string().length() > 0) { for (int i = relBase.string().contains('/'); i > 0; --i) @@ -1138,7 +1138,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures ) if ( failures & RenderFailure ) { renderDiff += "<pre>"; - FILE *pipe = popen( TQString::tqfromLatin1( "diff -u baseline/%1-render %3/%2-render" ) + FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-render %3/%2-render" ) .arg ( test, test, relOutputDir ).latin1(), "r" ); TQTextIStream *is = new TQTextIStream( pipe ); for ( int line = 0; line < 100 && !is->eof(); ++line ) { @@ -1154,7 +1154,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures ) if ( failures & DomFailure ) { domDiff += "<pre>"; - FILE *pipe = popen( TQString::tqfromLatin1( "diff -u baseline/%1-dom %3/%2-dom" ) + FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-dom %3/%2-dom" ) .arg ( test, test, relOutputDir ).latin1(), "r" ); TQTextIStream *is = new TQTextIStream( pipe ); for ( int line = 0; line < 100 && !is->eof(); ++line ) { diff --git a/khtml/test_regression_fontoverload.cpp b/khtml/test_regression_fontoverload.cpp index 93f698ed2..615dfc198 100644 --- a/khtml/test_regression_fontoverload.cpp +++ b/khtml/test_regression_fontoverload.cpp @@ -98,7 +98,7 @@ QFakeFontEngine::QFakeFontEngine( XFontStruct *fs, const char *name, int size ) : QFontEngineXLFD( fs, name, 0) { pixS = size; - ahem = TQString::tqfromLatin1(name).contains("ahem"); + ahem = TQString::fromLatin1(name).contains("ahem"); } QFakeFontEngine::~QFakeFontEngine() @@ -337,7 +337,7 @@ void DCOPClient::processSocketData( int ) } #include <tqapplication.h> -#include <tqpalette.h> +#include <palette.h> KDE_EXPORT void TQApplication::setPalette( const TQPalette &, bool , const char* ) diff --git a/khtml/testkhtml.cpp b/khtml/testkhtml.cpp index 4a2b2daa1..7765cee8a 100644 --- a/khtml/testkhtml.cpp +++ b/khtml/testkhtml.cpp @@ -123,7 +123,7 @@ int main(int argc, char *argv[]) doc->setURLCursor(TQCursor(Qt::PointingHandCursor)); a.setTopWidget(doc->widget()); TQWidget::connect(doc, TQT_SIGNAL(setWindowCaption(const TQString &)), - doc->widget()->tqtopLevelWidget(), TQT_SLOT(setCaption(const TQString &))); + doc->widget()->topLevelWidget(), TQT_SLOT(setCaption(const TQString &))); doc->widget()->show(); toplevel->show(); ((TQScrollView *)doc->widget())->viewport()->show(); @@ -142,7 +142,7 @@ void Dummy::doBenchmark() results.clear(); TQString directory = KFileDialog::getExistingDirectory(settings.readPathEntry("path"), m_part->view(), - TQString::tqfromLatin1("Please select directory with tests")); + TQString::fromLatin1("Please select directory with tests")); if (!directory.isEmpty()) { settings.writePathEntry("path", directory); @@ -184,14 +184,14 @@ void Dummy::nextRun() for (int pos = 0; pos < timings.size(); ++pos) { int t = timings[pos]; if (pos < COLD_RUNS) - m_part->write(TQString::tqfromLatin1("<td>(Cold):") + TQString::number(t) + "</td>"); + m_part->write(TQString::fromLatin1("<td>(Cold):") + TQString::number(t) + "</td>"); else { total += t; - m_part->write(TQString::tqfromLatin1("<td><i>") + TQString::number(t) + "</i></td>"); + m_part->write(TQString::fromLatin1("<td><i>") + TQString::number(t) + "</i></td>"); } } - m_part->write(TQString::tqfromLatin1("<td>Average:<b>") + TQString::number(double(total) / HOT_RUNS) + "</b></td>"); + m_part->write(TQString::fromLatin1("<td>Average:<b>") + TQString::number(double(total) / HOT_RUNS) + "</b></td>"); m_part->write("</tr>"); } diff --git a/khtml/xml/dom2_eventsimpl.cpp b/khtml/xml/dom2_eventsimpl.cpp index c49a03e78..5121e9caf 100644 --- a/khtml/xml/dom2_eventsimpl.cpp +++ b/khtml/xml/dom2_eventsimpl.cpp @@ -48,7 +48,7 @@ EventImpl::EventImpl() m_currentTarget = 0; m_eventPhase = 0; m_target = 0; - m_createTime = TQDateTime::tqcurrentDateTime(); + m_createTime = TQDateTime::currentDateTime(); m_defaultHandled = false; } @@ -67,7 +67,7 @@ EventImpl::EventImpl(EventId _id, bool canBubbleArg, bool cancelableArg) m_currentTarget = 0; m_eventPhase = 0; m_target = 0; - m_createTime = TQDateTime::tqcurrentDateTime(); + m_createTime = TQDateTime::currentDateTime(); m_defaultHandled = false; } @@ -590,10 +590,10 @@ KeyEventBaseImpl::KeyEventBaseImpl(EventId id, bool canBubbleArg, bool cancelabl m_keyVal = key->ascii(); 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. 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. m_modifier = key->state(); @@ -739,10 +739,10 @@ DOMString KeyboardEventImpl::keyIdentifier() const { if (unsigned special = virtKeyVal()) if (const char* id = keyIdentifiersToVirtKeys()->toLeft(special)) - return TQString::tqfromLatin1(id); + return TQString::fromLatin1(id); - if (unsigned tqunicode = keyVal()) - return TQString(TQChar(tqunicode)); + if (unsigned unicode = keyVal()) + return TQString(TQChar(unicode)); return "Unidentified"; } @@ -773,9 +773,9 @@ void KeyboardEventImpl::initKeyboardEvent(const DOMString &typeArg, //Figure out the code information from the key identifier. 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. - unsigned short code = keyIdentifierArg.tqunicode()[0]; + unsigned short code = keyIdentifierArg.unicode()[0]; if (code > 0x20 && code != 0x7F) keyVal = code; } @@ -819,7 +819,7 @@ int KeyboardEventImpl::keyCode() const if (m_virtKeyVal != DOM_VK_UNDEFINED) return m_virtKeyVal; else - return TQChar((unsigned short)m_keyVal).upper().tqunicode(); + return TQChar((unsigned short)m_keyVal).upper().unicode(); } int KeyboardEventImpl::charCode() const @@ -856,14 +856,14 @@ void TextEventImpl::initTextEvent(const DOMString &typeArg, //See whether we can get a key out of this. unsigned keyCode = 0; if (text.length() == 1) - keyCode = text.tqunicode()[0].tqunicode(); + keyCode = text.unicode()[0].unicode(); initKeyBaseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, keyCode, 0, 0); } 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.. if (m_keyVal) return m_keyVal; @@ -872,8 +872,8 @@ int TextEventImpl::keyCode() const int TextEventImpl::charCode() const { - //On text events, in Mozilla charCode is 0 for non-tqunicode keys, - //and the tqunicode key otherwise... IE doesn't support this. + //On text events, in Mozilla charCode is 0 for non-unicode keys, + //and the unicode key otherwise... IE doesn't support this. if (m_virtKeyVal) return 0; return m_keyVal; diff --git a/khtml/xml/dom_docimpl.cpp b/khtml/xml/dom_docimpl.cpp index 0f70610ef..922714a4e 100644 --- a/khtml/xml/dom_docimpl.cpp +++ b/khtml/xml/dom_docimpl.cpp @@ -337,7 +337,7 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, KHTMLView *v) m_namespaceMap = new IdNameMapping(1); TQString xhtml(XHTML_NAMESPACE); 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[xhtmlNamespace]->ref(); m_namespaceMap->count+=2; @@ -1387,7 +1387,7 @@ void DocumentImpl::write( const TQString &text ) if (m_view) m_view->part()->resetFromScript(); m_tokenizer->setAutoClose(); - write(TQString::tqfromLatin1("<html>")); + write(TQString::fromLatin1("<html>")); } m_tokenizer->write(text, false); } diff --git a/khtml/xml/dom_docimpl.h b/khtml/xml/dom_docimpl.h index 8d20f47e6..5e50c09a4 100644 --- a/khtml/xml/dom_docimpl.h +++ b/khtml/xml/dom_docimpl.h @@ -198,7 +198,7 @@ public: DocumentFragmentImpl *createDocumentFragment (); TextImpl *createTextNode ( DOMStringImpl* data ) { return new TextImpl( docPtr(), 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 ); CDATASectionImpl *createCDATASection ( DOMStringImpl* data ); ProcessingInstructionImpl *createProcessingInstruction ( const DOMString &target, DOMStringImpl* data ); diff --git a/khtml/xml/dom_elementimpl.cpp b/khtml/xml/dom_elementimpl.cpp index f4506c8ba..552ac208e 100644 --- a/khtml/xml/dom_elementimpl.cpp +++ b/khtml/xml/dom_elementimpl.cpp @@ -46,7 +46,7 @@ #include "css/cssproperties.h" #include "xml/dom_xmlimpl.h" -#include <tqtextstream.h> +#include <textstream.h> #include <kdebug.h> #include <stdlib.h> @@ -855,7 +855,7 @@ DOMString ElementImpl::toString() const for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) { DOMString kid = child->toString(); - result += TQConstString(kid.tqunicode(), kid.length()).string(); + result += TQConstString(kid.unicode(), kid.length()).string(); } result += "</"; diff --git a/khtml/xml/dom_nodeimpl.cpp b/khtml/xml/dom_nodeimpl.cpp index 834f4b674..5febe695e 100644 --- a/khtml/xml/dom_nodeimpl.cpp +++ b/khtml/xml/dom_nodeimpl.cpp @@ -588,7 +588,7 @@ void NodeImpl::handleLocalEvents(EventImpl *evt, bool useCapture) Event ev = evt; // removeEventListener (e.g. called from a JS event listener) might - // tqinvalidate the item after the current iterator (which "it" is pointing to). + // invalidate the item after the current iterator (which "it" is pointing to). // So we make a copy of the list. TQValueList<RegisteredEventListener> listeners = *m_regdListeners.listeners; TQValueList<RegisteredEventListener>::iterator it; @@ -989,7 +989,7 @@ DOMStringImpl* NodeImpl::textContent() const delete kidText; } } - return new DOMStringImpl(out.tqunicode(), out.length()); + return new DOMStringImpl(out.unicode(), out.length()); } //------------------------------------------------------------------------- @@ -1925,7 +1925,7 @@ NodeImpl *GenericRONamedNodeMapImpl::item ( unsigned long index ) const if (index >= m_contents->count()) return 0; - return m_contents->tqat(index); + return m_contents->at(index); } unsigned long GenericRONamedNodeMapImpl::length( ) const diff --git a/khtml/xml/dom_stringimpl.cpp b/khtml/xml/dom_stringimpl.cpp index 14aa4f5ea..79bddf5d9 100644 --- a/khtml/xml/dom_stringimpl.cpp +++ b/khtml/xml/dom_stringimpl.cpp @@ -61,8 +61,8 @@ bool DOMStringImpl::containsOnlyWhitespace() const for (uint i = 0; i < l; i++) { TQChar c = s[i]; - if (c.tqunicode() <= 0x7F) { - if (c.tqunicode() > ' ') + if (c.unicode() <= 0x7F) { + if (c.unicode() > ' ') return false; } else { if (c.direction() != TQChar::DirWS) @@ -294,10 +294,10 @@ khtml::Length* DOMStringImpl::toCoordsArray(int& len) const int pos2; 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; } - r[i] = parseLength((TQChar *) str.tqunicode()+pos, str.length()-pos); + r[i] = parseLength((TQChar *) str.unicode()+pos, str.length()-pos); return r; } @@ -320,13 +320,13 @@ khtml::Length* DOMStringImpl::toLengthArray(int& len) const int pos2; 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; } /* IE Quirk: If the last comma is the last char skip it and reduce len by one */ 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 len--; diff --git a/khtml/xml/dom_stringimpl.h b/khtml/xml/dom_stringimpl.h index edac46755..cd7128967 100644 --- a/khtml/xml/dom_stringimpl.h +++ b/khtml/xml/dom_stringimpl.h @@ -92,7 +92,7 @@ public: DOMStringImpl *capitalize(bool noFirstCap=false) const; DOMStringImpl *escapeHTML(); - TQChar *tqunicode() const { return s; } + TQChar *unicode() const { return s; } uint length() const { return l; } TQString string() const; diff --git a/khtml/xml/xml_tokenizer.cpp b/khtml/xml/xml_tokenizer.cpp index 8f6164f51..7c043815a 100644 --- a/khtml/xml/xml_tokenizer.cpp +++ b/khtml/xml/xml_tokenizer.cpp @@ -42,7 +42,7 @@ using namespace DOM; using namespace khtml; XMLIncrementalSource::XMLIncrementalSource() - : TQXmlInputSource(), m_pos( 0 ), m_tqunicode( 0 ), + : TQXmlInputSource(), m_pos( 0 ), m_unicode( 0 ), m_finished( false ) { } @@ -59,13 +59,13 @@ TQChar XMLIncrementalSource::next() else if ( m_data.length() <= m_pos ) return TQXmlInputSource::EndOfData; else - return m_tqunicode[m_pos++]; + return m_unicode[m_pos++]; } void XMLIncrementalSource::setData( const TQString& str ) { m_data = str; - m_tqunicode = m_data.tqunicode(); + m_unicode = m_data.unicode(); m_pos = 0; if ( !str.isEmpty() ) m_finished = false; @@ -78,7 +78,7 @@ void XMLIncrementalSource::setData( const TQByteArray& data ) void XMLIncrementalSource::appendXML( const TQString& str ) { m_data += str; - m_tqunicode = m_data.tqunicode(); + m_unicode = m_data.unicode(); } TQString XMLIncrementalSource::data() @@ -289,7 +289,7 @@ bool XMLHandler::comment(const TQString & ch) if (currentNode()->nodeType() == Node::TEXT_NODE) exitText(); // ### 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; } @@ -299,7 +299,7 @@ bool XMLHandler::processingInstruction(const TQString &target, const TQString &d exitText(); // ### handle exceptions 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); pi->checkStyleSheet(); return true; @@ -364,7 +364,7 @@ bool XMLHandler::internalEntityDecl(const TQString &name, const TQString &value) { EntityImpl *e = new EntityImpl(m_doc,name); // ### 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()) static_cast<GenericRONamedNodeMapImpl*>(m_doc->doctype()->entities())->addNode(e); return true; diff --git a/khtml/xml/xml_tokenizer.h b/khtml/xml/xml_tokenizer.h index d2910472e..749c423ff 100644 --- a/khtml/xml/xml_tokenizer.h +++ b/khtml/xml/xml_tokenizer.h @@ -155,7 +155,7 @@ public: private: TQString m_data; uint m_pos; - const TQChar *m_tqunicode; + const TQChar *m_unicode; bool m_finished; }; diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp index 1beb025cf..080c73c90 100644 --- a/kimgio/dds.cpp +++ b/kimgio/dds.cpp @@ -910,7 +910,7 @@ namespace { // Private. return false; } - int offset = s.tqdevice()->tqat(); + int offset = s.device()->at(); int size = FaceOffset( header ); for( int i = 0; i < 6; i++ ) { @@ -921,7 +921,7 @@ namespace { // Private. } // Seek device. - s.tqdevice()->tqat( offset ); + s.device()->at( offset ); offset += size; // Load face from stream. @@ -964,7 +964,7 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io ) if( fourcc != FOURCC_DDS ) { kdDebug(399) << "This is not a DDS file." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -976,7 +976,7 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io ) if( s.atEnd() || !IsValid( header ) ) { kdDebug(399) << "This DDS file is not valid." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -984,7 +984,7 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io ) if( !IsSupported( header ) ) { kdDebug(399) << "This DDS file is not supported." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -1002,12 +1002,12 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io ) if( result == false ) { kdDebug(399) << "Error loading DDS file." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } io->setImage( img ); - io->setqStatus( 0 ); + io->seStatus( 0 ); } diff --git a/kimgio/eps.cpp b/kimgio/eps.cpp index a2770cc75..496dd1e1d 100644 --- a/kimgio/eps.cpp +++ b/kimgio/eps.cpp @@ -61,7 +61,7 @@ static bool seekToCodeStart( TQIODevice * io, TQ_UINT32 & ps_offset, TQ_UINT32 & + ((unsigned char) buf[2] << 16) + ((unsigned char) buf[3] << 24); kdDebug(399) << "kimgio EPS: Offset: " << ps_offset <<" Size: " << ps_size << endl; - if ( !io->tqat(ps_offset) ) // Get offset of PostScript code in the MS-DOS EPS file. + if ( !io->at(ps_offset) ) // Get offset of PostScript code in the MS-DOS EPS file. { kdError(399) << "kimgio EPS: cannot seek in MS-DOS EPS file" << endl; return false; @@ -218,7 +218,7 @@ KDE_EXPORT void kimgio_eps_read (TQImageIO *image) io->reset(); // Go back to start of file to give all the file to GhostScript if (ps_offset>0L) // We have an offset - io->tqat(ps_offset); + io->at(ps_offset); TQByteArray buffer ( io->readAll() ); // If we have no MS-DOS EPS file or if the size seems wrong, then choose the buffer size @@ -234,7 +234,7 @@ KDE_EXPORT void kimgio_eps_read (TQImageIO *image) TQImage myimage; if( myimage.load (tmpFile.name()) ) { image->setImage (myimage); - image->setqStatus (0); + image->seStatus (0); kdDebug(399) << "kimgio EPS: success!" << endl; } else @@ -290,5 +290,5 @@ KDE_EXPORT void kimgio_eps_write( TQImageIO *imageio ) inFile.close(); - imageio->setqStatus(0); + imageio->seStatus(0); } diff --git a/kimgio/exr.cpp b/kimgio/exr.cpp index 2af22b345..88b3fbbbe 100644 --- a/kimgio/exr.cpp +++ b/kimgio/exr.cpp @@ -148,7 +148,7 @@ KDE_EXPORT void kimgio_exr_read( TQImageIO *io ) } io->setImage( image ); - io->setqStatus( 0 ); + io->seStatus( 0 ); } catch (const std::exception &exc) { diff --git a/kimgio/hdr.cpp b/kimgio/hdr.cpp index 82a2e111d..cf761b23f 100644 --- a/kimgio/hdr.cpp +++ b/kimgio/hdr.cpp @@ -127,7 +127,7 @@ namespace { // Private. if (val != 2) { - s.tqdevice()->tqat( s.tqdevice()->tqat() - 1 ); + s.device()->at( s.device()->at() - 1 ); Read_Old_Line(image.data(), width, s); RGBE_To_QRgbLine(image.data(), scanline, width); continue; @@ -225,7 +225,7 @@ KDE_EXPORT void kimgio_hdr_read( TQImageIO * io ) { kdDebug(399) << "Unknown HDR format." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -238,7 +238,7 @@ KDE_EXPORT void kimgio_hdr_read( TQImageIO * io ) { kdDebug(399) << "Invalid HDR file." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -249,12 +249,12 @@ KDE_EXPORT void kimgio_hdr_read( TQImageIO * io ) { kdDebug(399) << "Error loading HDR file." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } io->setImage( img ); - io->setqStatus( 0 ); + io->seStatus( 0 ); } diff --git a/kimgio/ico.cpp b/kimgio/ico.cpp index b7208e577..b55b52ce0 100644 --- a/kimgio/ico.cpp +++ b/kimgio/ico.cpp @@ -243,7 +243,7 @@ namespace extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io ) { - TQIODevice::Offset offset = io->ioDevice()->tqat(); + TQIODevice::Offset offset = io->ioDevice()->at(); TQDataStream stream( io->ioDevice() ); stream.setByteOrder( TQDataStream::LittleEndian ); @@ -295,7 +295,7 @@ extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io ) offset + selected->offset > io->ioDevice()->size() ) return; - io->ioDevice()->tqat( offset + selected->offset ); + io->ioDevice()->at( offset + selected->offset ); TQImage icon; if ( loadFromDIB( stream, *selected, icon ) ) { @@ -306,7 +306,7 @@ extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io ) icon.setText( "X-HotspotY", 0, TQString::number( selected->hotspotY ) ); } io->setImage(icon); - io->setqStatus(0); + io->seStatus(0); } } @@ -334,7 +334,7 @@ void kimgio_ico_write(TQImageIO *io) if (!qt_write_dib(dib, pixels)) return; - uint hdrPos = dib.device()->tqat(); + uint hdrPos = dib.device()->at(); if (!qt_write_dib(dib, mask)) return; memmove(dibData.data() + hdrPos, dibData.data() + hdrPos + BMP_WIN + 8, dibData.size() - hdrPos - BMP_WIN - 8); @@ -361,14 +361,14 @@ void kimgio_ico_write(TQImageIO *io) rec.dibSize = dibData.size(); ico << rec.width << rec.height << rec.colors << rec.hotspotX << rec.hotspotY << rec.dibSize; - rec.dibOffset = ico.device()->tqat() + sizeof(rec.dibOffset); + rec.dibOffset = ico.device()->at() + sizeof(rec.dibOffset); ico << rec.dibOffset; BMP_INFOHDR dibHeader; - dib.device()->tqat(0); + dib.device()->at(0); dib >> dibHeader; dibHeader.biHeight = io->image().height() << 1; - dib.device()->tqat(0); + dib.device()->at(0); dib << dibHeader; ico.writeRawBytes(dibData.data(), dibData.size()); diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp index 121e83287..7f66710bb 100644 --- a/kimgio/jp2.cpp +++ b/kimgio/jp2.cpp @@ -163,7 +163,7 @@ kimgio_jp2_read( TQImageIO* io ) if( gs.altimage ) jas_image_destroy( gs.altimage ); io->setImage( image ); - io->setqStatus( 0 ); + io->seStatus( 0 ); } // kimgio_jp2_read @@ -291,7 +291,7 @@ kimgio_jp2_write( TQImageIO* io ) TQ_LONG size; // seek to the beginning of the file. - if( !in->tqat( 0 ) ) { delete ktempf; return; } + if( !in->at( 0 ) ) { delete ktempf; return; } // 0 or -1 is EOF / error while( ( size = in->readBlock( b.data(), 4096 ) ) > 0 ) { @@ -309,7 +309,7 @@ kimgio_jp2_write( TQImageIO* io ) // everything went fine - io->setqStatus( IO_Ok ); + io->seStatus( IO_Ok ); } // kimgio_jp2_write #endif // HAVE_JASPER diff --git a/kimgio/pcx.cpp b/kimgio/pcx.cpp index e823ebb8d..be69a4630 100644 --- a/kimgio/pcx.cpp +++ b/kimgio/pcx.cpp @@ -46,7 +46,7 @@ static TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph ) // Skip the rest of the header TQ_UINT8 byte; - while ( s.tqdevice()->tqat() < 128 ) + while ( s.device()->at() < 128 ) s >> byte; return s; @@ -183,7 +183,7 @@ static void readImage4( TQImage &img, TQDataStream &s, const PCXHEADER &header ) TQ_UINT32 offset = i*header.BytesPerLine; for ( unsigned int x=0; x<header.width(); ++x ) if ( buf[ offset + ( x/8 ) ] & ( 128 >> ( x%8 ) ) ) - pixbuf[ x ] = static_cast<const char>(pixbuf.tqat(x)) + ( 1 << i ); + pixbuf[ x ] = static_cast<const char>(pixbuf.at(x)) + ( 1 << i ); } uchar *p = img.scanLine( y ); @@ -267,9 +267,9 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io ) TQDataStream s( io->ioDevice() ); s.setByteOrder( TQDataStream::LittleEndian ); - if ( s.tqdevice()->size() < 128 ) + if ( s.device()->size() < 128 ) { - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -279,7 +279,7 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io ) if ( header.Manufacturer != 10 || s.atEnd()) { - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -323,11 +323,11 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io ) if ( !img.isNull() ) { io->setImage( img ); - io->setqStatus( 0 ); + io->seStatus( 0 ); } else { - io->setqStatus( -1 ); + io->seStatus( -1 ); } } @@ -343,7 +343,7 @@ static void writeLine( TQDataStream &s, TQByteArray &buf ) count = 1; byte = buf[ i++ ]; - while ( ( i < size ) && ( TQChar(byte) == buf.tqat(i) ) && ( count < 63 ) ) + while ( ( i < size ) && ( TQChar(byte) == buf.at(i) ) && ( count < 63 ) ) { ++i; ++count; @@ -412,7 +412,7 @@ static void writeImage4( TQImage &img, TQDataStream &s, PCXHEADER &header ) { for ( int i=0; i<4; ++i ) if ( *( p+x ) & ( 1 << i ) ) - buf[ i ][ x/8 ] = buf[ i ].tqat(x/8) | 1 << ( 7-x%8 ); + buf[ i ][ x/8 ] = buf[ i ].at(x/8) | 1 << ( 7-x%8 ); } for ( int i=0; i<4; ++i ) @@ -526,7 +526,7 @@ KDE_EXPORT void kimgio_pcx_write( TQImageIO *io ) writeImage24( img, s, header ); } - io->setqStatus( 0 ); + io->seStatus( 0 ); } /* vim: et sw=2 ts=2 diff --git a/kimgio/psd.cpp b/kimgio/psd.cpp index d400257aa..c70919d0b 100644 --- a/kimgio/psd.cpp +++ b/kimgio/psd.cpp @@ -119,15 +119,15 @@ namespace { // Private. // Skip mode data. s >> tmp; - s.tqdevice()->tqat( s.tqdevice()->tqat() + tmp ); + s.device()->at( s.device()->at() + tmp ); // Skip image resources. s >> tmp; - s.tqdevice()->tqat( s.tqdevice()->tqat() + tmp ); + s.device()->at( s.device()->at() + tmp ); // Skip the reserved data. s >> tmp; - s.tqdevice()->tqat( s.tqdevice()->tqat() + tmp ); + s.device()->at( s.device()->at() + tmp ); // Find out if the data is compressed. // Known values: @@ -250,7 +250,7 @@ void kimgio_psd_read( TQImageIO *io ) if( s.atEnd() || !IsValid( header ) ) { kdDebug(399) << "This PSD file is not valid." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -258,7 +258,7 @@ void kimgio_psd_read( TQImageIO *io ) if( !IsSupported( header ) ) { kdDebug(399) << "This PSD file is not supported." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -266,12 +266,12 @@ void kimgio_psd_read( TQImageIO *io ) if( !LoadPSD(s, header, img) ) { kdDebug(399) << "Error loading PSD file." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } io->setImage( img ); - io->setqStatus( 0 ); + io->seStatus( 0 ); } diff --git a/kimgio/rgb.cpp b/kimgio/rgb.cpp index da3888c99..68da172fb 100644 --- a/kimgio/rgb.cpp +++ b/kimgio/rgb.cpp @@ -38,12 +38,12 @@ KDE_EXPORT void kimgio_rgb_read(TQImageIO *io) if (!sgi.readImage(img)) { io->setImage(TQImage()); - io->setqStatus(-1); + io->seStatus(-1); return; } io->setImage(img); - io->setqStatus(0); + io->seStatus(0); } @@ -53,9 +53,9 @@ KDE_EXPORT void kimgio_rgb_write(TQImageIO *io) TQImage img = io->image(); if (!sgi.writeImage(img)) - io->setqStatus(-1); + io->seStatus(-1); - io->setqStatus(0); + io->seStatus(0); } diff --git a/kimgio/tga.cpp b/kimgio/tga.cpp index 0b7c3df1e..f9fc02b5e 100644 --- a/kimgio/tga.cpp +++ b/kimgio/tga.cpp @@ -324,13 +324,13 @@ KDE_EXPORT void kimgio_tga_read( TQImageIO *io ) // Read image header. TgaHeader tga; s >> tga; - s.tqdevice()->tqat( TgaHeader::SIZE + tga.id_length ); + s.device()->at( TgaHeader::SIZE + tga.id_length ); // Check image file format. if( s.atEnd() ) { kdDebug(399) << "This TGA file is not valid." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -338,7 +338,7 @@ KDE_EXPORT void kimgio_tga_read( TQImageIO *io ) if( !IsSupported(tga) ) { kdDebug(399) << "This TGA file is not supported." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } @@ -349,13 +349,13 @@ KDE_EXPORT void kimgio_tga_read( TQImageIO *io ) if( result == false ) { kdDebug(399) << "Error loading TGA file." << endl; io->setImage( TQImage() ); - io->setqStatus( -1 ); + io->seStatus( -1 ); return; } io->setImage( img ); - io->setqStatus( 0 ); + io->seStatus( 0 ); } @@ -385,6 +385,6 @@ KDE_EXPORT void kimgio_tga_write( TQImageIO *io ) s << TQ_UINT8( tqAlpha( color ) ); } - io->setqStatus( 0 ); + io->seStatus( 0 ); } diff --git a/kimgio/tiffr.cpp b/kimgio/tiffr.cpp index 0d3e1d062..7d8a22403 100644 --- a/kimgio/tiffr.cpp +++ b/kimgio/tiffr.cpp @@ -30,14 +30,14 @@ static toff_t tiff_seek( thandle_t handle, toff_t off, int whence ) TQIODevice *dev = reinterpret_cast<TQIODevice *>( handle ); if ( whence == SEEK_CUR ) - off += dev->tqat(); + off += dev->at(); else if ( whence == SEEK_END ) off += dev->size(); - if ( !dev->tqat( off ) ) + if ( !dev->at( off ) ) return ( toff_t )-1; - return dev->tqat(); + return dev->at(); } static toff_t tiff_size( thandle_t handle ) @@ -140,7 +140,7 @@ KDE_EXPORT void kimgio_tiff_read( TQImageIO *io ) TIFFClose( tiff ); io->setImage( image ); - io->setqStatus ( 0 ); + io->seStatus ( 0 ); } KDE_EXPORT void kimgio_tiff_write( TQImageIO * ) diff --git a/kimgio/xcf.cpp b/kimgio/xcf.cpp index ff74f1576..6acc4394f 100644 --- a/kimgio/xcf.cpp +++ b/kimgio/xcf.cpp @@ -42,7 +42,7 @@ KDE_EXPORT void kimgio_xcf_read(TQImageIO *io) KDE_EXPORT void kimgio_xcf_write(TQImageIO *io) { kdDebug(399) << "XCF: write support not implemented" << endl; - io->setqStatus(-1); + io->seStatus(-1); } /////////////////////////////////////////////////////////////////////////////// @@ -127,14 +127,14 @@ void XCFImageFormat::readXCF(TQImageIO *io) char tag[14]; xcf_io.readRawBytes(tag, sizeof(tag)); - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on header tag" << endl; return; } xcf_io >> xcf_image.width >> xcf_image.height >> xcf_image.type; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on image info" << endl; return; } @@ -156,7 +156,7 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " << xcf_io >> layer_offset; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer offsets" << endl; return; } @@ -178,7 +178,7 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " << while (!layer_offsets.isEmpty()) { TQ_INT32 layer_offset = layer_offsets.pop(); - xcf_io.tqdevice()->tqat(layer_offset); + xcf_io.device()->at(layer_offset); if (!loadLayer(xcf_io, xcf_image)) return; @@ -190,7 +190,7 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " << } io->setImage(xcf_image.image); - io->setqStatus(0); + io->seStatus(0); } @@ -294,7 +294,7 @@ bool XCFImageFormat::loadProperty(TQDataStream& xcf_io, PropType& type, TQByteAr xcf_io >> foo; type=PropType(foo); // TODO urks - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on property type" << type << endl; return false; } @@ -309,7 +309,7 @@ bool XCFImageFormat::loadProperty(TQDataStream& xcf_io, PropType& type, TQByteAr if (type == PROP_COLORMAP) { xcf_io >> size; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on property " << type << " size" << endl; return false; } @@ -329,7 +329,7 @@ bool XCFImageFormat::loadProperty(TQDataStream& xcf_io, PropType& type, TQByteAr xcf_io >> size >> factor >> digits; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on property " << type << endl; return false; } @@ -337,7 +337,7 @@ bool XCFImageFormat::loadProperty(TQDataStream& xcf_io, PropType& type, TQByteAr for (int i = 0; i < 5; i++) { xcf_io >> unit_strings; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on property " << type << endl; return false; } @@ -354,7 +354,7 @@ bool XCFImageFormat::loadProperty(TQDataStream& xcf_io, PropType& type, TQByteAr xcf_io.readRawBytes(data, size); } - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on property " << type << " data, size " << size << endl; return false; } @@ -382,7 +382,7 @@ bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image) xcf_io >> layer.width >> layer.height >> layer.type >> layer.name; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer" << endl; return false; } @@ -405,7 +405,7 @@ bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image) // If there are any more layers, merge them into the final TQImage. xcf_io >> layer.hierarchy_offset >> layer.mask_offset; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer image offsets" << endl; return false; } @@ -415,7 +415,7 @@ bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image) if( !composeTiles(xcf_image)) return false; - xcf_io.tqdevice()->tqat(layer.hierarchy_offset); + xcf_io.device()->at(layer.hierarchy_offset); // As tiles are loaded, they are copied into the layers tiles by // this routine. (loadMask(), below, uses a slightly different @@ -427,7 +427,7 @@ bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image) return false; if (layer.mask_offset != 0) { - xcf_io.tqdevice()->tqat(layer.mask_offset); + xcf_io.device()->at(layer.mask_offset); if (!loadMask(xcf_io, layer)) return false; @@ -739,7 +739,7 @@ bool XCFImageFormat::loadHierarchy(TQDataStream& xcf_io, Layer& layer) xcf_io >> width >> height >> bpp >> offset; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer " << layer.name << " image header" << endl; return false; } @@ -752,19 +752,19 @@ bool XCFImageFormat::loadHierarchy(TQDataStream& xcf_io, Layer& layer) do { xcf_io >> junk; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer " << layer.name << " level offsets" << endl; return false; } } while (junk != 0); - TQIODevice::Offset saved_pos = xcf_io.tqdevice()->tqat(); + TQIODevice::Offset saved_pos = xcf_io.device()->at(); - xcf_io.tqdevice()->tqat(offset); + xcf_io.device()->at(offset); if (!loadLevel(xcf_io, layer, bpp)) return false; - xcf_io.tqdevice()->tqat(saved_pos); + xcf_io.device()->at(saved_pos); return true; } @@ -785,7 +785,7 @@ bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, TQ_INT32 bpp) xcf_io >> width >> height >> offset; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer " << layer.name << " level info" << endl; return false; } @@ -801,11 +801,11 @@ bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, TQ_INT32 bpp) return false; } - TQIODevice::Offset saved_pos = xcf_io.tqdevice()->tqat(); + TQIODevice::Offset saved_pos = xcf_io.device()->at(); TQ_UINT32 offset2; xcf_io >> offset2; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer " << layer.name << " level offset look-ahead" << endl; return false; } @@ -815,7 +815,7 @@ bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, TQ_INT32 bpp) if (offset2 == 0) offset2 = offset + (uint)(TILE_WIDTH * TILE_HEIGHT * 4 * 1.5); - xcf_io.tqdevice()->tqat(offset); + xcf_io.device()->at(offset); int size = layer.image_tiles[j][i].width() * layer.image_tiles[j][i].height(); if (!loadTileRLE(xcf_io, layer.tile, size, offset2 - offset, bpp)) @@ -827,10 +827,10 @@ bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, TQ_INT32 bpp) layer.assignBytes(layer, i, j); - xcf_io.tqdevice()->tqat(saved_pos); + xcf_io.device()->at(saved_pos); xcf_io >> offset; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on layer " << layer.name << " level offset" << endl; return false; } @@ -855,7 +855,7 @@ bool XCFImageFormat::loadMask(TQDataStream& xcf_io, Layer& layer) xcf_io >> width >> height >> name; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on mask info" << endl; return false; } @@ -868,12 +868,12 @@ bool XCFImageFormat::loadMask(TQDataStream& xcf_io, Layer& layer) TQ_UINT32 hierarchy_offset; xcf_io >> hierarchy_offset; - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { kdDebug(399) << "XCF: read failure on mask image offset" << endl; return false; } - xcf_io.tqdevice()->tqat(hierarchy_offset); + xcf_io.device()->at(hierarchy_offset); layer.assignBytes = assignMaskBytes; if (!loadHierarchy(xcf_io, layer)) @@ -919,7 +919,7 @@ bool XCFImageFormat::loadTileRLE(TQDataStream& xcf_io, uchar* tile, int image_si xcf_io.readRawBytes((char*)xcfdata, data_length); - if (xcf_io.tqdevice()->status() != IO_Ok) { + if (xcf_io.device()->status() != IO_Ok) { delete[] xcfodata; kdDebug(399) << "XCF: read failure on tile" << endl; return false; diff --git a/kimgio/xview.cpp b/kimgio/xview.cpp index 3ba866c40..169ad1aa8 100644 --- a/kimgio/xview.cpp +++ b/kimgio/xview.cpp @@ -94,7 +94,7 @@ KDE_EXPORT void kimgio_xv_read( TQImageIO *_imageio ) } _imageio->setImage( image ); - _imageio->setqStatus( 0 ); + _imageio->seStatus( 0 ); free(block); return; @@ -164,6 +164,6 @@ KDE_EXPORT void kimgio_xv_write( TQImageIO *imageio ) } delete[] buffer; - imageio->setqStatus( 0 ); + imageio->seStatus( 0 ); } diff --git a/kinit/kdostartupconfig.cpp b/kinit/kdostartupconfig.cpp index fceed88e2..4f2571a12 100644 --- a/kinit/kdostartupconfig.cpp +++ b/kinit/kdostartupconfig.cpp @@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE. // See description in kstartupconfig.cpp . #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kinstance.h> #include <kstandarddirs.h> #include <kconfig.h> diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index 6859282d3..de448fdd6 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -49,7 +49,7 @@ #include <tqfile.h> #include <tqdatetime.h> #include <tqfileinfo.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <tqfont.h> #include <kinstance.h> diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp index 47b3b5f42..69a2e10d2 100644 --- a/kinit/klauncher.cpp +++ b/kinit/klauncher.cpp @@ -182,7 +182,7 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) objId(), "terminateKDE()", false ); TQString prefix = locateLocal("socket", "klauncher"); - KTempFile domainname(prefix, TQString::tqfromLatin1(".slave-socket")); + KTempFile domainname(prefix, TQString::fromLatin1(".slave-socket")); if (domainname.status() != 0) { // Sever error! diff --git a/kinit/tests/klaunchertest.cpp b/kinit/tests/klaunchertest.cpp index 46a4e5635..f246e7086 100644 --- a/kinit/tests/klaunchertest.cpp +++ b/kinit/tests/klaunchertest.cpp @@ -39,13 +39,13 @@ int main(int argc, char *argv[]) TQCString dcopService; int pid; int result = KApplication::startServiceByDesktopName( - TQString::tqfromLatin1("konsole"), TQString::null, &error, &dcopService, &pid ); + TQString::fromLatin1("konsole"), TQString::null, &error, &dcopService, &pid ); printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n", result, error.ascii(), dcopService.data(), pid); result = KApplication::startServiceByDesktopName( - TQString::tqfromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid ); + TQString::fromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid ); printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n", result, error.ascii(), dcopService.data(), pid); diff --git a/kio/bookmarks/kbookmark.cc b/kio/bookmarks/kbookmark.cc index 9721788a2..44b8b496c 100644 --- a/kio/bookmarks/kbookmark.cc +++ b/kio/bookmarks/kbookmark.cc @@ -447,7 +447,7 @@ void KBookmark::updateAccessMetadata() { kdDebug(7043) << "KBookmark::updateAccessMetadata " << address() << " " << url().prettyURL() << endl; - const uint timet = TQDateTime::tqcurrentDateTime().toTime_t(); + const uint timet = TQDateTime::currentDateTime().toTime_t(); setMetaDataItem( "time_added", TQString::number( timet ), DontOverwriteMetaData ); setMetaDataItem( "time_visited", TQString::number( timet ) ); diff --git a/kio/bookmarks/kbookmarkbar.cc b/kio/bookmarks/kbookmarkbar.cc index 158caf373..08c34061b 100644 --- a/kio/bookmarks/kbookmarkbar.cc +++ b/kio/bookmarks/kbookmarkbar.cc @@ -313,7 +313,7 @@ static TQString handleToolbarDragMoveEvent( int index = 0; KToolBarButton* b; - b = dynamic_cast<KToolBarButton*>(tb->tqchildAt(pos)); + b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); KAction *a = 0; TQString address; atFirst = false; @@ -394,7 +394,7 @@ static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions Q_ASSERT(tb); KToolBarButton *b; - b = dynamic_cast<KToolBarButton*>(tb->tqchildAt(pos)); + b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); if (!b) return 0; diff --git a/kio/bookmarks/kbookmarkexporter.cc b/kio/bookmarks/kbookmarkexporter.cc index 30c52bdb8..0c11f0a55 100644 --- a/kio/bookmarks/kbookmarkexporter.cc +++ b/kio/bookmarks/kbookmarkexporter.cc @@ -20,8 +20,8 @@ #include <stdio.h> #include <tqfile.h> -#include <tqtextcodec.h> -#include <tqstylesheet.h> +#include <textcodec.h> +#include <stylesheet.h> #include <kdebug.h> #include <klocale.h> diff --git a/kio/bookmarks/kbookmarkexporter.h b/kio/bookmarks/kbookmarkexporter.h index 0943d6cbe..dc700fad1 100644 --- a/kio/bookmarks/kbookmarkexporter.h +++ b/kio/bookmarks/kbookmarkexporter.h @@ -23,7 +23,7 @@ #ifndef __kbookmarkexporter_h #define __kbookmarkexporter_h -#include <tqtextstream.h> +#include <textstream.h> #include <kbookmark.h> /** diff --git a/kio/bookmarks/kbookmarkimporter.cc b/kio/bookmarks/kbookmarkimporter.cc index 8a31fa3d2..cca66d85e 100644 --- a/kio/bookmarks/kbookmarkimporter.cc +++ b/kio/bookmarks/kbookmarkimporter.cc @@ -23,7 +23,7 @@ #include <klocale.h> #include <kdebug.h> #include <kcharsets.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <sys/types.h> #include <stddef.h> diff --git a/kio/bookmarks/kbookmarkimporter_crash.cc b/kio/bookmarks/kbookmarkimporter_crash.cc index 988e1f673..ea00a83b1 100644 --- a/kio/bookmarks/kbookmarkimporter_crash.cc +++ b/kio/bookmarks/kbookmarkimporter_crash.cc @@ -29,7 +29,7 @@ #include <tqfile.h> #include <tqdir.h> #include <tqstring.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <dcopclient.h> #include <sys/types.h> diff --git a/kio/bookmarks/kbookmarkimporter_ie.cc b/kio/bookmarks/kbookmarkimporter_ie.cc index 8d1372194..40e4be248 100644 --- a/kio/bookmarks/kbookmarkimporter_ie.cc +++ b/kio/bookmarks/kbookmarkimporter_ie.cc @@ -22,7 +22,7 @@ #include <kstringhandler.h> #include <klocale.h> #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <sys/types.h> #include <stddef.h> diff --git a/kio/bookmarks/kbookmarkimporter_kde1.cc b/kio/bookmarks/kbookmarkimporter_kde1.cc index 49999e675..c3e280eb6 100644 --- a/kio/bookmarks/kbookmarkimporter_kde1.cc +++ b/kio/bookmarks/kbookmarkimporter_kde1.cc @@ -24,7 +24,7 @@ #include <klocale.h> #include <kdebug.h> #include <kcharsets.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <sys/types.h> #include <stddef.h> diff --git a/kio/bookmarks/kbookmarkimporter_ns.cc b/kio/bookmarks/kbookmarkimporter_ns.cc index e4e074107..b589e55dc 100644 --- a/kio/bookmarks/kbookmarkimporter_ns.cc +++ b/kio/bookmarks/kbookmarkimporter_ns.cc @@ -28,8 +28,8 @@ #include <klocale.h> #include <kdebug.h> #include <kcharsets.h> -#include <tqtextcodec.h> -#include <tqstylesheet.h> +#include <textcodec.h> +#include <stylesheet.h> #include <sys/types.h> #include <stddef.h> @@ -191,7 +191,7 @@ void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) { fstream.setEncoding(m_utf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale); TQString charset - = m_utf8 ? "UTF-8" : TQString::tqfromLatin1(TQTextCodec::codecForLocale()->name()).upper(); + = m_utf8 ? "UTF-8" : TQString::fromLatin1(TQTextCodec::codecForLocale()->name()).upper(); fstream << "<!DOCTYPE NETSCAPE-Bookmark-file-1>" << endl << i18n("<!-- This file was generated by Konqueror -->") << endl diff --git a/kio/bookmarks/kbookmarkimporter_opera.cc b/kio/bookmarks/kbookmarkimporter_opera.cc index 45ac1a7ca..bd520d41d 100644 --- a/kio/bookmarks/kbookmarkimporter_opera.cc +++ b/kio/bookmarks/kbookmarkimporter_opera.cc @@ -22,7 +22,7 @@ #include <kstringhandler.h> #include <klocale.h> #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <sys/types.h> #include <stddef.h> diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkmanager.cc index 250d62a59..7f238b4ad 100644 --- a/kio/bookmarks/kbookmarkmanager.cc +++ b/kio/bookmarks/kbookmarkmanager.cc @@ -36,7 +36,7 @@ #include <dcopclient.h> #include <tqfile.h> #include <tqfileinfo.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kstaticdeleter.h> #include <tqptrstack.h> @@ -329,7 +329,7 @@ bool KBookmarkManager::saveAs( const TQString & filename, bool toolbarCache ) co // Save the bookmark toolbar folder for quick loading // but only when it will actually make things quicker - const TQString cacheFilename = filename + TQString::tqfromLatin1(".tbcache"); + const TQString cacheFilename = filename + TQString::fromLatin1(".tbcache"); if(toolbarCache && !root().isToolbarGroup()) { KSaveFile cacheFile( cacheFilename ); @@ -388,7 +388,7 @@ KBookmarkGroup KBookmarkManager::toolbar() if(!m_docIsLoaded) { kdDebug(7043) << "KBookmarkManager::toolbar trying cache" << endl; - const TQString cacheFilename = m_bookmarksFile + TQString::tqfromLatin1(".tbcache"); + const TQString cacheFilename = m_bookmarksFile + TQString::fromLatin1(".tbcache"); TQFileInfo bmInfo(m_bookmarksFile); TQFileInfo cacheInfo(cacheFilename); if (m_toolbarDoc.isNull() && @@ -614,11 +614,11 @@ void KBookmarkManager::setEditorOptions( const TQString& caption, bool browser ) void KBookmarkManager::slotEditBookmarks() { KProcess proc; - proc << TQString::tqfromLatin1("keditbookmarks"); + proc << TQString::fromLatin1("keditbookmarks"); if (!dptr()->m_editorCaption.isNull()) - proc << TQString::tqfromLatin1("--customcaption") << dptr()->m_editorCaption; + proc << TQString::fromLatin1("--customcaption") << dptr()->m_editorCaption; if (!dptr()->m_browserEditor) - proc << TQString::tqfromLatin1("--nobrowser"); + proc << TQString::fromLatin1("--nobrowser"); proc << m_bookmarksFile; proc.start(KProcess::DontCare); } @@ -626,8 +626,8 @@ void KBookmarkManager::slotEditBookmarks() void KBookmarkManager::slotEditBookmarksAtAddress( const TQString& address ) { KProcess proc; - proc << TQString::tqfromLatin1("keditbookmarks") - << TQString::tqfromLatin1("--address") << address + proc << TQString::fromLatin1("keditbookmarks") + << TQString::fromLatin1("--address") << address << m_bookmarksFile; proc.start(KProcess::DontCare); } @@ -690,7 +690,7 @@ void KBookmarkManager::updateFavicon( const TQString &url, const TQString &favic TQString KBookmarkManager::userBookmarksFile() { - return locateLocal("data", TQString::tqfromLatin1("konqueror/bookmarks.xml")); + return locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml")); } KBookmarkManager* KBookmarkManager::userBookmarksManager() diff --git a/kio/bookmarks/kbookmarkmenu.cc b/kio/bookmarks/kbookmarkmenu.cc index 0c7965a16..bed3127f3 100644 --- a/kio/bookmarks/kbookmarkmenu.cc +++ b/kio/bookmarks/kbookmarkmenu.cc @@ -39,11 +39,11 @@ #include <kstdaction.h> #include <kstringhandler.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqfile.h> #include <tqheader.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlistview.h> #include <tqpushbutton.h> @@ -403,9 +403,9 @@ void RMB::slotRMBActionCopyLocation( int val ) if ( !bookmark.isGroup() ) { - kapp->tqclipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), + kapp->clipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), TQClipboard::Selection ); - kapp->tqclipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), + kapp->clipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0), TQClipboard::Clipboard ); } } diff --git a/kio/httpfilter/httpfilter.cc b/kio/httpfilter/httpfilter.cc index a7e8c87c9..6a5a1346c 100644 --- a/kio/httpfilter/httpfilter.cc +++ b/kio/httpfilter/httpfilter.cc @@ -81,7 +81,7 @@ HTTPFilterMD5::HTTPFilterMD5() TQString HTTPFilterMD5::md5() { - return TQString::tqfromLatin1(context.base64Digest()); + return TQString::fromLatin1(context.base64Digest()); } void diff --git a/kio/kfile/config-kfile.h b/kio/kfile/config-kfile.h index 3c5b7c09b..8715ed273 100644 --- a/kio/kfile/config-kfile.h +++ b/kio/kfile/config-kfile.h @@ -3,7 +3,7 @@ const int kfile_area = 250; -#define DefaultViewStyle TQString::tqfromLatin1("SimpleView") +#define DefaultViewStyle TQString::fromLatin1("SimpleView") #define DefaultPannerPosition 40 #define DefaultMixDirsAndFiles false #define DefaultShowStatusLine false @@ -14,19 +14,19 @@ const int kfile_area = 250; #define DefaultRecentURLsNumber 15 #define DefaultDirectoryFollowing true #define DefaultAutoSelectExtChecked true -#define ConfigGroup TQString::tqfromLatin1("KFileDialog Settings") -#define RecentURLs TQString::tqfromLatin1("Recent URLs") -#define RecentFiles TQString::tqfromLatin1("Recent Files") -#define RecentURLsNumber TQString::tqfromLatin1("Maximum of recent URLs") -#define RecentFilesNumber TQString::tqfromLatin1("Maximum of recent files") -#define DialogWidth TQString::tqfromLatin1("Width (%1)") -#define DialogHeight TQString::tqfromLatin1("Height (%1)") -#define ConfigShowStatusLine TQString::tqfromLatin1("ShowStatusLine") -#define AutoDirectoryFollowing TQString::tqfromLatin1("Automatic directory following") -#define PathComboCompletionMode TQString::tqfromLatin1("PathCombo Completionmode") -#define LocationComboCompletionMode TQString::tqfromLatin1("LocationCombo Completionmode") -#define ShowSpeedbar TQString::tqfromLatin1("Show Speedbar") -#define ShowBookmarks TQString::tqfromLatin1("Show Bookmarks") -#define AutoSelectExtChecked TQString::tqfromLatin1("Automatically select filename extension") +#define ConfigGroup TQString::fromLatin1("KFileDialog Settings") +#define RecentURLs TQString::fromLatin1("Recent URLs") +#define RecentFiles TQString::fromLatin1("Recent Files") +#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs") +#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files") +#define DialogWidth TQString::fromLatin1("Width (%1)") +#define DialogHeight TQString::fromLatin1("Height (%1)") +#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine") +#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following") +#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode") +#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode") +#define ShowSpeedbar TQString::fromLatin1("Show Speedbar") +#define ShowBookmarks TQString::fromLatin1("Show Bookmarks") +#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension") #endif diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp index 99fed814f..c791667f6 100644 --- a/kio/kfile/kacleditwidget.cpp +++ b/kio/kfile/kacleditwidget.cpp @@ -34,7 +34,7 @@ #include <tqcombobox.h> #include <tqlabel.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwidgetstack.h> #include <tqheader.h> @@ -148,7 +148,7 @@ KACLListViewItem::KACLListViewItem( TQListView* parent, qualifier( _qualifier ), isPartial( false ) { m_pACLListView = dynamic_cast<KACLListView*>( parent ); - tqrepaint(); + repaint(); } @@ -192,7 +192,7 @@ TQString KACLListViewItem::key( int, bool ) const } void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg, - int column, int width, int tqalignment ) + int column, int width, int alignment ) { TQColorGroup mycg = cg; if ( isDefault ) { @@ -204,7 +204,7 @@ void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg, mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) ); p->setFont( font ); } - KListViewItem::paintCell( p, mycg, column, width, tqalignment ); + KListViewItem::paintCell( p, mycg, column, width, alignment ); KACLListViewItem *below =0; if ( itemBelow() ) @@ -247,7 +247,7 @@ void KACLListViewItem::updatePermPixmaps() setPixmap( 4, TQPixmap() ); } -void KACLListViewItem::tqrepaint() +void KACLListViewItem::repaint() { int idx = 0; switch ( type ) @@ -527,7 +527,7 @@ void EditACLEntryDialog::slotOk() } if ( m_defaultCB ) m_item->isDefault = m_defaultCB->isChecked(); - m_item->tqrepaint(); + m_item->repaint(); KDialogBase::slotOk(); } @@ -582,14 +582,14 @@ KACLListView::KACLListView( TQWidget* parent, const char* name ) struct passwd *user = 0; setpwent(); while ( ( user = getpwent() ) != 0 ) { - m_allUsers << TQString::tqfromLatin1( user->pw_name ); + m_allUsers << TQString::fromLatin1( user->pw_name ); } endpwent(); struct group *gr = 0; setgrent(); while ( ( gr = getgrent() ) != 0 ) { - m_allGroups << TQString::tqfromLatin1( gr->gr_name ); + m_allGroups << TQString::fromLatin1( gr->gr_name ); } endgrent(); m_allUsers.sort(); @@ -1019,7 +1019,7 @@ void KACLListView::slotRemoveEntry() delete item; } else { item->value = 0; - item->tqrepaint(); + item->repaint(); } if ( !itemWasDefault ) calculateEffectiveRights(); @@ -1030,7 +1030,7 @@ void KACLListView::slotRemoveEntry() || item->type == Group || item->type == Others ) ) { item->value = 0; - item->tqrepaint(); + item->repaint(); } else { delete item; } diff --git a/kio/kfile/kacleditwidget_p.h b/kio/kfile/kacleditwidget_p.h index 9b4d9d48e..1a0c85064 100644 --- a/kio/kfile/kacleditwidget_p.h +++ b/kio/kfile/kacleditwidget_p.h @@ -186,10 +186,10 @@ public: void togglePerm( acl_perm_t perm ); virtual void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int tqalignment ); + int column, int width, int alignment ); void updatePermPixmaps(); - void tqrepaint(); + void repaint(); KACLListView::EntryType type; unsigned short value; diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp index 41b4176fa..8ba9d29bb 100644 --- a/kio/kfile/kcombiview.cpp +++ b/kio/kfile/kcombiview.cpp @@ -300,7 +300,7 @@ void KCombiView::slotSortingChanged( TQDir::SortSpec sorting ) KFileView *KCombiView::focusView( KFileView *preferred ) const { - TQWidget *w = tqfocusWidget(); + TQWidget *w = focusWidget(); KFileView *other = (right == preferred) ? left : right; return (preferred && w == preferred->widget()) ? preferred : other; } diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp index 753ba1b3a..d2dc39da9 100644 --- a/kio/kfile/kdiroperator.cpp +++ b/kio/kfile/kdiroperator.cpp @@ -24,7 +24,7 @@ #include <tqapplication.h> #include <tqdialog.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqpopupmenu.h> #include <tqregexp.h> @@ -111,13 +111,13 @@ KDirOperator::KDirOperator(const KURL& _url, TQString strPath = TQDir::currentDirPath(); strPath.append('/'); currUrl = KURL(); - currUrl.setProtocol(TQString::tqfromLatin1("file")); + currUrl.setProtocol(TQString::fromLatin1("file")); currUrl.setPath(strPath); } else { currUrl = _url; if ( currUrl.protocol().isEmpty() ) - currUrl.setProtocol(TQString::tqfromLatin1("file")); + currUrl.setProtocol(TQString::fromLatin1("file")); currUrl.addPath("/"); // make sure we have a trailing slash! } @@ -414,7 +414,7 @@ bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory ) { url.addPath( *it ); exists = KIO::NetAccess::exists( url, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( url, tqtopLevelWidget() ); + writeOk = !exists && KIO::NetAccess::mkdir( url, topLevelWidget() ); } if ( exists ) // url was already existant @@ -484,7 +484,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items, if ( doIt ) { KIO::DeleteJob *job = KIO::del( urls, false, showProgress ); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; } @@ -547,7 +547,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items, if ( doIt ) { KIO::CopyJob *job = KIO::trash( urls, showProgress ); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; } @@ -651,7 +651,7 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward) if ( !isReadable( newurl ) ) { // maybe newurl is a file? check its parent directory - newurl.cd(TQString::tqfromLatin1("..")); + newurl.cd(TQString::fromLatin1("..")); if ( !isReadable( newurl ) ) { resetCursor(); KMessageBox::error(viewWidget(), @@ -777,7 +777,7 @@ KURL KDirOperator::url() const void KDirOperator::cdUp() { KURL tmp(currUrl); - tmp.cd(TQString::tqfromLatin1("..")); + tmp.cd(TQString::fromLatin1("..")); setURL(tmp, true); } @@ -1120,7 +1120,7 @@ void KDirOperator::setDirLister( KDirLister *lister ) dir->setAutoUpdate( true ); - TQWidget* mainWidget = tqtopLevelWidget(); + TQWidget* mainWidget = topLevelWidget(); dir->setMainWindow (mainWidget); kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl; @@ -1253,7 +1253,7 @@ void KDirOperator::slotCompletionMatch(const TQString& match) void KDirOperator::setupActions() { - myActionCollection = new KActionCollection( tqtopLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); + myActionCollection = new KActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); upAction = KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT( cdUp() ), myActionCollection, "up" ); @@ -1273,7 +1273,7 @@ void KDirOperator::setupActions() this, TQT_SLOT( trashSelected( KAction::ActivationReason, TQt::ButtonState ) ) ); new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT( deleteSelected() ), myActionCollection, "delete" ); - mkdirAction->setIcon( TQString::tqfromLatin1("folder_new") ); + mkdirAction->setIcon( TQString::fromLatin1("folder_new") ); reloadAction->setText( i18n("Reload") ); reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload )); @@ -1293,7 +1293,7 @@ void KDirOperator::setupActions() TQT_TQOBJECT(this), TQT_SLOT( slotSortReversed() ), myActionCollection, "reversed" ); - TQString sortGroup = TQString::tqfromLatin1("sort"); + TQString sortGroup = TQString::fromLatin1("sort"); byNameAction->setExclusiveGroup( sortGroup ); byDateAction->setExclusiveGroup( sortGroup ); bySizeAction->setExclusiveGroup( sortGroup ); @@ -1337,7 +1337,7 @@ void KDirOperator::setupActions() TQT_SLOT( togglePreview( bool ))); - TQString viewGroup = TQString::tqfromLatin1("view"); + TQString viewGroup = TQString::fromLatin1("view"); shortAction->setExclusiveGroup( viewGroup ); detailedAction->setExclusiveGroup( viewGroup ); @@ -1386,7 +1386,7 @@ void KDirOperator::setupMenu(int whichActions) if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & TQt::ShiftButton)) actionMenu->insert( myActionCollection->action( "trash" ) ); KConfig *globalconfig = KGlobal::config(); - KConfigGroupSaver cs( globalconfig, TQString::tqfromLatin1("KDE") ); + KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") ); if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & TQt::ShiftButton) || globalconfig->readBoolEntry("ShowDeleteCommand", false)) actionMenu->insert( myActionCollection->action( "delete" ) ); @@ -1450,45 +1450,45 @@ void KDirOperator::readConfig( KConfig *kc, const TQString& group ) defaultView = 0; int sorting = 0; - TQString viewStyle = kc->readEntry( TQString::tqfromLatin1("View Style"), - TQString::tqfromLatin1("Simple") ); - if ( viewStyle == TQString::tqfromLatin1("Detail") ) + TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"), + TQString::fromLatin1("Simple") ); + if ( viewStyle == TQString::fromLatin1("Detail") ) defaultView |= KFile::Detail; else defaultView |= KFile::Simple; - if ( kc->readBoolEntry( TQString::tqfromLatin1("Separate Directories"), + if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"), DefaultMixDirsAndFiles ) ) defaultView |= KFile::SeparateDirs; - if ( kc->readBoolEntry(TQString::tqfromLatin1("Show Preview"), false)) + if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false)) defaultView |= KFile::PreviewContents; - if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort case insensitively"), + if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"), DefaultCaseInsensitive ) ) sorting |= TQDir::IgnoreCase; - if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort directories first"), + if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"), DefaultDirsFirst ) ) sorting |= TQDir::DirsFirst; - TQString name = TQString::tqfromLatin1("Name"); - TQString sortBy = kc->readEntry( TQString::tqfromLatin1("Sort by"), name ); + TQString name = TQString::fromLatin1("Name"); + TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name ); if ( sortBy == name ) sorting |= TQDir::Name; - else if ( sortBy == TQString::tqfromLatin1("Size") ) + else if ( sortBy == TQString::fromLatin1("Size") ) sorting |= TQDir::Size; - else if ( sortBy == TQString::tqfromLatin1("Date") ) + else if ( sortBy == TQString::fromLatin1("Date") ) sorting |= TQDir::Time; mySorting = static_cast<TQDir::SortSpec>( sorting ); setSorting( mySorting ); - if ( kc->readBoolEntry( TQString::tqfromLatin1("Show hidden files"), + if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"), DefaultShowHidden ) ) { showHiddenAction->setChecked( true ); dir->setShowingDotFiles( true ); } - if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort reversed"), + if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"), DefaultSortReversed ) ) reverseAction->setChecked( true ); @@ -1505,18 +1505,18 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group ) if ( !group.isEmpty() ) kc->setGroup( group ); - TQString sortBy = TQString::tqfromLatin1("Name"); + TQString sortBy = TQString::fromLatin1("Name"); if ( KFile::isSortBySize( mySorting ) ) - sortBy = TQString::tqfromLatin1("Size"); + sortBy = TQString::fromLatin1("Size"); else if ( KFile::isSortByDate( mySorting ) ) - sortBy = TQString::tqfromLatin1("Date"); - kc->writeEntry( TQString::tqfromLatin1("Sort by"), sortBy ); + sortBy = TQString::fromLatin1("Date"); + kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy ); - kc->writeEntry( TQString::tqfromLatin1("Sort reversed"), + kc->writeEntry( TQString::fromLatin1("Sort reversed"), reverseAction->isChecked() ); - kc->writeEntry( TQString::tqfromLatin1("Sort case insensitively"), + kc->writeEntry( TQString::fromLatin1("Sort case insensitively"), caseInsensitiveAction->isChecked() ); - kc->writeEntry( TQString::tqfromLatin1("Sort directories first"), + kc->writeEntry( TQString::fromLatin1("Sort directories first"), dirsFirstAction->isChecked() ); // don't save the separate dirs or preview when an application specific @@ -1530,26 +1530,26 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group ) if ( !appSpecificPreview ) { if ( separateDirsAction->isEnabled() ) - kc->writeEntry( TQString::tqfromLatin1("Separate Directories"), + kc->writeEntry( TQString::fromLatin1("Separate Directories"), separateDirsAction->isChecked() ); KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview")); if ( previewAction->isEnabled() ) { bool hasPreview = previewAction->isChecked(); - kc->writeEntry( TQString::tqfromLatin1("Show Preview"), hasPreview ); + kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview ); } } - kc->writeEntry( TQString::tqfromLatin1("Show hidden files"), + kc->writeEntry( TQString::fromLatin1("Show hidden files"), showHiddenAction->isChecked() ); KFile::FileView fv = static_cast<KFile::FileView>( m_viewKind ); TQString style; if ( KFile::isDetailView( fv ) ) - style = TQString::tqfromLatin1("Detail"); + style = TQString::fromLatin1("Detail"); else if ( KFile::isSimpleView( fv ) ) - style = TQString::tqfromLatin1("Simple"); - kc->writeEntry( TQString::tqfromLatin1("View Style"), style ); + style = TQString::fromLatin1("Simple"); + kc->writeEntry( TQString::fromLatin1("View Style"), style ); kc->setGroup( oldGroup ); } diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp index 10238ad93..2dcb89629 100644 --- a/kio/kfile/kdirselectdialog.cpp +++ b/kio/kfile/kdirselectdialog.cpp @@ -18,7 +18,7 @@ */ #include <tqdir.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpopupmenu.h> #include <tqstringlist.h> #include <tqvaluestack.h> @@ -248,7 +248,7 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item ) { // scroll to make item the topmost item view()->ensureItemVisible( item ); - TQRect r = view()->tqitemRect( item ); + TQRect r = view()->itemRect( item ); if ( r.isValid() ) { int x, y; @@ -391,7 +391,7 @@ void KDirSelectDialog::slotComboTextChanged( const TQString& text ) { item->setSelected( false ); // 2002/12/27, deselected item is not repainted, so force it - item->tqrepaint(); + item->repaint(); } } @@ -426,7 +426,7 @@ void KDirSelectDialog::slotMkdir() { folderurl.addPath( *it ); exists = KIO::NetAccess::exists( folderurl, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( folderurl, tqtopLevelWidget() ); + writeOk = !exists && KIO::NetAccess::mkdir( folderurl, topLevelWidget() ); } if ( exists ) // url was already existant diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp index 2a2f6f0f2..8399d387a 100644 --- a/kio/kfile/kdiskfreesp.cpp +++ b/kio/kfile/kdiskfreesp.cpp @@ -24,7 +24,7 @@ #include "kdiskfreesp.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kdebug.h> #include <kprocess.h> @@ -100,7 +100,7 @@ void KDiskFreeSp::dfDone() TQTextStream t (dfStringErrOut, IO_ReadOnly); TQString s=t.readLine(); - if ( (s.isEmpty()) || ( s.left(10) != TQString::tqfromLatin1("Filesystem") ) ) + if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) ) kdError() << "Error running df command... got [" << s << "]" << endl; while ( !t.eof() ) { TQString u,v; diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp index bded7fb79..d71df8680 100644 --- a/kio/kfile/kencodingfiledialog.cpp +++ b/kio/kfile/kencodingfiledialog.cpp @@ -27,7 +27,7 @@ #include <kglobal.h> #include <klocale.h> #include <kcharsets.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kdiroperator.h> #include <krecentdocument.h> @@ -54,7 +54,7 @@ KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQStrin d->encoding->clear (); TQString sEncoding = encoding; if (sEncoding.isEmpty()) - sEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); + sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); TQStringList encodings (KGlobal::charsets()->availableEncodingNames()); int insert = 0; @@ -170,7 +170,7 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(cons TQWidget *parent, const TQString& caption) { - bool specialDir = dir.tqat(0) == ':'; + bool specialDir = dir.at(0) == ':'; KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption, Saving,parent, "filedialog", true); @@ -193,7 +193,7 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const TQ const TQString& dir, const TQString& filter, TQWidget *parent, const TQString& caption) { - bool specialDir = dir.tqat(0) == ':'; + bool specialDir = dir.at(0) == ':'; KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption, Saving,parent, "filedialog", true); diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp index a68aec53b..823714396 100644 --- a/kio/kfile/kfiledetailview.cpp +++ b/kio/kfile/kfiledetailview.cpp @@ -317,7 +317,7 @@ void KFileDetailView::updateView( const KFileItem *i ) item->init(); setSortingKey( item, i ); - //item->tqrepaint(); // only repaints if visible + //item->repaint(); // only repaints if visible } void KFileDetailView::setSortingKey( KFileListViewItem *item, diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h index 7e0baff83..937c8f56c 100644 --- a/kio/kfile/kfiledetailview.h +++ b/kio/kfile/kfiledetailview.h @@ -78,7 +78,7 @@ public: TQRect rect() const { - TQRect r = listView()->tqitemRect(this); + TQRect r = listView()->itemRect(this); return TQRect( listView()->viewportToContents( r.topLeft() ), TQSize( r.width(), r.height() ) ); } diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index fbc6dd7ab..8f763c930 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -32,11 +32,11 @@ #include <tqcheckbox.h> #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqptrlist.h> #include <tqpixmap.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqtooltip.h> #include <tqtimer.h> #include <tqwhatsthis.h> @@ -258,7 +258,7 @@ void KFileDialog::setMimeFilter( const TQStringList& mimeTypes, filterWidget->setMimeFilter( mimeTypes, defaultType ); TQStringList types = TQStringList::split(" ", filterWidget->currentFilter()); - types.append( TQString::tqfromLatin1( "inode/directory" )); + types.append( TQString::fromLatin1( "inode/directory" )); ops->clearFilter(); ops->setMimeFilter( types ); d->hasDefaultFilter = !defaultType.isEmpty(); @@ -357,7 +357,7 @@ void KFileDialog::slotOk() bool multi = (mode() & KFile::Files) != 0; KFileItemListIterator it( *items ); - TQString endQuote = TQString::tqfromLatin1("\" "); + TQString endQuote = TQString::fromLatin1("\" "); TQString name, files; while ( it.current() ) { name = (*it)->name(); @@ -402,7 +402,7 @@ void KFileDialog::slotOk() } } - KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { // ### after message freeze, add message for directories! @@ -446,7 +446,7 @@ void KFileDialog::slotOk() return; } - KURL url = KIO::NetAccess::mostLocalURL(selectedURL,tqtopLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { KMessageBox::sorry( d->mainWidget, @@ -555,7 +555,7 @@ void KFileDialog::slotOk() it != list.end(); ++it ) { job = KIO::stat( *it, !(*it).isLocalFile() ); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); KIO::Scheduler::scheduleJob( job ); d->statJobs.append( job ); connect( job, TQT_SIGNAL( result(KIO::Job *) ), @@ -565,7 +565,7 @@ void KFileDialog::slotOk() } job = KIO::stat(d->url,!d->url.isLocalFile()); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); d->statJobs.append( job ); connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*))); } @@ -1548,7 +1548,7 @@ TQString KFileDialog::selectedFile() const { if ( result() == TQDialog::Accepted ) { - KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); if (url.isLocalFile()) return url.path(); else { @@ -1570,7 +1570,7 @@ TQStringList KFileDialog::selectedFiles() const KURL::List urls = parseSelectedURLs(); TQValueListConstIterator<KURL> it = urls.begin(); while ( it != urls.end() ) { - url = KIO::NetAccess::mostLocalURL(*it,tqtopLevelWidget()); + url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget()); if ( url.isLocalFile() ) list.append( url.path() ); ++it; @@ -1595,7 +1595,7 @@ TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filte TQWidget *parent, const TQString& caption) { - bool specialDir = dir.tqat(0) == ':'; + bool specialDir = dir.at(0) == ':'; KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); if ( !specialDir ) dlg.setSelection( dir ); // may also be a filename @@ -1616,7 +1616,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi WId parent_id, const TQString& caption) { - bool specialDir = dir.tqat(0) == ':'; + bool specialDir = dir.at(0) == ':'; TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); #ifdef Q_WS_X11 @@ -1644,7 +1644,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter, TQWidget *parent, const TQString& caption) { - bool specialDir = dir.tqat(0) == ':'; + bool specialDir = dir.at(0) == ':'; KFileDialog dlg(specialDir ? dir : TQString::null, filter, parent, "filedialog", true); if ( !specialDir ) dlg.setSelection( dir ); // may also be a filename @@ -1737,7 +1737,7 @@ void KFileDialog::readConfig( KConfig *kc, const TQString& group ) d->autoSelectExtChecked = kc->readBoolEntry (AutoSelectExtChecked, DefaultAutoSelectExtChecked); updateAutoSelectExtension (); - int w1 = tqminimumSize().width(); + int w1 = minimumSize().width(); int w2 = toolbar->sizeHint().width() + 10; if (w1 < w2) setMinimumWidth(w2); @@ -1950,7 +1950,7 @@ void KFileDialog::updateAutoSelectExtension (void) // first try X-KDE-NativeExtension TQString nativeExtension = mime->property ("X-KDE-NativeExtension").toString (); - if (nativeExtension.tqat (0) == '.') + if (nativeExtension.at (0) == '.') { d->extension = nativeExtension.lower (); kdDebug (kfile_area) << "\tsetMimeFilter-style: native ext=\'" @@ -2068,7 +2068,7 @@ void KFileDialog::updateLocationEditExtension (const TQString &lastExtension) { // exists? KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, tqtopLevelWidget())) + if (KIO::NetAccess::stat (url, t, topLevelWidget())) { kdDebug (kfile_area) << "\tfile exists" << endl; @@ -2146,7 +2146,7 @@ void KFileDialog::appendExtension (KURL &url) // exists? KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, tqtopLevelWidget())) + if (KIO::NetAccess::stat (url, t, topLevelWidget())) { kdDebug (kfile_area) << "\tfile exists - won't append extension" << endl; return; @@ -2265,7 +2265,7 @@ void KFileDialog::toggleBookmarks(bool show) connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )), TQT_SLOT( enterURL( const TQString& ))); - toolbar->insertButton(TQString::tqfromLatin1("bookmark"), + toolbar->insertButton(TQString::fromLatin1("bookmark"), (int)HOTLIST_BUTTON, true, i18n("Bookmarks"), 5); toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(), @@ -2361,7 +2361,7 @@ void KFileDialog::setNonExtSelection() TQString pattern, filename = locationEdit->currentText().stripWhiteSpace(); KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if ( !pattern.isEmpty() && pattern.tqat( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 ) + if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 ) locationEdit->lineEdit()->setSelection( 0, filename.length() - pattern.stripWhiteSpace().length()+1 ); else { diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp index 625321f1a..12a51db8e 100644 --- a/kio/kfile/kfilefiltercombo.cpp +++ b/kio/kfile/kfilefiltercombo.cpp @@ -95,7 +95,7 @@ TQString KFileFilterCombo::currentFilter() const { TQString f = currentText(); if (f == text(currentItem())) { // user didn't edit the text - f = *filters.tqat(currentItem()); + f = *filters.at(currentItem()); if ( d->isMimeFilter || (currentItem() == 0 && d->hasAllSupportedFiles) ) { return f; // we have a mimetype as filter } @@ -129,7 +129,7 @@ void KFileFilterCombo::setMimeFilter( const TQStringList& types, { clear(); filters.clear(); - TQString delim = TQString::tqfromLatin1(", "); + TQString delim = TQString::fromLatin1(", "); d->hasAllSupportedFiles = false; m_allTypes = defaultType.isEmpty() && (types.count() > 1); diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp index 90c8e82f2..fec9158de 100644 --- a/kio/kfile/kfileiconview.cpp +++ b/kio/kfile/kfileiconview.cpp @@ -70,8 +70,8 @@ public: parent->actionCollection(), "large rows" ); - smallColumns->setExclusiveGroup(TQString::tqfromLatin1("IconView mode")); - largeRows->setExclusiveGroup(TQString::tqfromLatin1("IconView mode")); + smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode")); + largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode")); previews = new KToggleAction( i18n("Thumbnail Previews"), 0, parent->actionCollection(), @@ -191,7 +191,7 @@ void KFileIconView::readConfig( KConfig *kc, const TQString& group ) { TQString gr = group.isEmpty() ? TQString("KFileIconView") : group; KConfigGroupSaver cs( kc, gr ); - TQString small = TQString::tqfromLatin1("SmallColumns"); + TQString small = TQString::fromLatin1("SmallColumns"); d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE ); d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) ); @@ -214,8 +214,8 @@ void KFileIconView::writeConfig( KConfig *kc, const TQString& group ) KConfigGroupSaver cs( kc, gr ); TQString viewMode = d->smallColumns->isChecked() ? - TQString::tqfromLatin1("SmallColumns") : - TQString::tqfromLatin1("LargeRows"); + TQString::fromLatin1("SmallColumns") : + TQString::fromLatin1("LargeRows"); if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE ) kc->revertToDefault( "ViewMode" ); else @@ -251,7 +251,7 @@ void KFileIconView::showToolTip( TQIconViewItem *item ) int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 : item->pixmapRect().width() ) - 4; if ( fontMetrics().width( item->text() ) >= w ) { - toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").arg(item->text()), 0, + toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0, "myToolTip", (WFlags)(WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) ); toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); @@ -268,7 +268,7 @@ void KFileIconView::showToolTip( TQIconViewItem *item ) toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); } toolTip->setFont( TQToolTip::font() ); - toolTip->tqsetPalette( TQToolTip::palette(), true ); + toolTip->setPalette( TQToolTip::palette(), true ); toolTip->show(); } } @@ -338,12 +338,12 @@ void KFileIconView::insertItem( KFileItem *i ) KFileView::insertItem( i ); TQIconView* qview = static_cast<TQIconView*>( this ); - // Since creating and initializing an item leads to a tqrepaint, + // Since creating and initializing an item leads to a repaint, // we disable updates on the IconView for a while. - qview->tqsetUpdatesEnabled( false ); + qview->setUpdatesEnabled( false ); KFileIconViewItem *item = new KFileIconViewItem( qview, i ); initItem( item, i, true ); - qview->tqsetUpdatesEnabled( true ); + qview->setUpdatesEnabled( true ); if ( !i->isMimeTypeKnown() ) m_resolver->m_lstPendingMimeIconItems.append( item ); @@ -450,7 +450,7 @@ void KFileIconView::updateView( bool b ) if ( !item->pixmapSize().isNull() ) item->setPixmapSize( TQSize( 0, 0 ) ); } - // recalculate item parameters but avoid an in-place tqrepaint + // recalculate item parameters but avoid an in-place repaint item->setPixmap( (item->fileInfo())->pixmap( myIconSize ), true, false ); item = static_cast<KFileIconViewItem *>(item->nextItem()); } while ( item != 0L ); @@ -632,7 +632,7 @@ bool KFileIconView::canPreview( const KFileItem *item ) const for ( ; it != d->previewMimeTypes.end(); ++it ) { TQString type = *it; // the "mimetype" can be "image/*" - if ( type.tqat( type.length() - 1 ) == '*' ) { + if ( type.at( type.length() - 1 ) == '*' ) { r.setPattern( type ); if ( r.search( item->mimetype() ) != -1 ) return true; @@ -763,7 +763,7 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i, if ( updateTextAndPixmap ) { - // this causes a tqrepaint of the item, which we want to avoid during + // this causes a repaint of the item, which we want to avoid during // directory listing, when all items are created. We want to paint all // items at once, not every single item in that case. item->setText( i->text() , false, false ); diff --git a/kio/kfile/kfilemetainfowidget.cpp b/kio/kfile/kfilemetainfowidget.cpp index c4df4a15d..b6e7cf61f 100644 --- a/kio/kfile/kfilemetainfowidget.cpp +++ b/kio/kfile/kfilemetainfowidget.cpp @@ -34,7 +34,7 @@ #include <tqdatetimeedit.h> #include <tqpixmap.h> #include <tqimage.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvalidator.h> /* diff --git a/kio/kfile/kfilemetapreview.cpp b/kio/kfile/kfilemetapreview.cpp index c8b89b5d6..87da3aaee 100644 --- a/kio/kfile/kfilemetapreview.cpp +++ b/kio/kfile/kfilemetapreview.cpp @@ -8,7 +8,7 @@ #include "kfilemetapreview.h" -#include <tqlayout.h> +#include <layout.h> #include <kio/previewjob.h> #include <klibloader.h> diff --git a/kio/kfile/kfilepreview.cpp b/kio/kfile/kfilepreview.cpp index 877260a5f..b221a1ebb 100644 --- a/kio/kfile/kfilepreview.cpp +++ b/kio/kfile/kfilepreview.cpp @@ -149,7 +149,7 @@ void KFilePreview::updateView(bool b) { left->updateView(b); if(preview) - preview->tqrepaint(b); + preview->repaint(b); } void KFilePreview::updateView(const KFileItem *i) diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp index 0a2798ae6..0506918c0 100644 --- a/kio/kfile/kfilesharedlg.cpp +++ b/kio/kfile/kfilesharedlg.cpp @@ -23,7 +23,7 @@ #include <tqdir.h> #include <tqradiobutton.h> #include <tqbuttongroup.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <kprocess.h> #include <kprocio.h> diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp index 154009625..82be902de 100644 --- a/kio/kfile/kfilespeedbar.cpp +++ b/kio/kfile/kfilespeedbar.cpp @@ -21,8 +21,8 @@ #include <tqdir.h> #include <tqfile.h> -#include <tqtextcodec.h> -#include <tqtextstream.h> +#include <textcodec.h> +#include <textstream.h> #include <kconfig.h> #include <kglobal.h> diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp index 06bce2881..e8451077d 100644 --- a/kio/kfile/kfiletreeview.cpp +++ b/kio/kfile/kfiletreeview.cpp @@ -342,7 +342,7 @@ void KFileTreeView::slotAutoOpenFolder() return; m_dropItem->setOpen( true ); - m_dropItem->tqrepaint(); + m_dropItem->repaint(); } @@ -522,7 +522,7 @@ void KFileTreeView::slotAnimation() } uint & iconNumber = it.data().iconNumber; - TQString icon = TQString::tqfromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); + TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); // kdDebug(250) << "Loading icon " << icon << endl; item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) ); @@ -666,7 +666,7 @@ void KFileTreeViewToolTip::maybeTip( const TQPoint & ) if ( item ) { TQString text = static_cast<KFileViewItem*>( item )->toolTipText(); if ( !text.isEmpty() ) - tip ( m_view->tqitemRect( item ), text ); + tip ( m_view->itemRect( item ), text ); } #endif } diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp index eb12a9498..165801652 100644 --- a/kio/kfile/kfileview.cpp +++ b/kio/kfile/kfileview.cpp @@ -258,7 +258,7 @@ sort_by_name: void KFileView::updateView(bool f) { - widget()->tqrepaint(f); + widget()->repaint(f); } void KFileView::updateView(const KFileItem *) diff --git a/kio/kfile/kfileview.h b/kio/kfile/kfileview.h index 1a13e264e..bce408327 100644 --- a/kio/kfile/kfileview.h +++ b/kio/kfile/kfileview.h @@ -146,11 +146,11 @@ public: virtual void clear(); /** - * does a tqrepaint of the view. + * does a repaint of the view. * * The default implementation calls * \code - * widget()->tqrepaint(f) + * widget()->repaint(f) * \endcode **/ virtual void updateView(bool f = true); diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp index 150536a33..f96cff795 100644 --- a/kio/kfile/kicondialog.cpp +++ b/kio/kfile/kicondialog.cpp @@ -29,7 +29,7 @@ #include <kfiledialog.h> #include <kimagefilepreview.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstring.h> #include <tqstringlist.h> #include <tqsortedlist.h> @@ -122,7 +122,7 @@ void KIconCanvas::slotLoadFiles() TQApplication::setOverrideCursor(tqwaitCursor); // disable updates to not trigger paint events when adding child items - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); #ifdef HAVE_LIBART KSVGIconEngine *svgEngine = new KSVGIconEngine(); @@ -137,7 +137,7 @@ void KIconCanvas::slotLoadFiles() { // Calling kapp->processEvents() makes the iconview flicker like hell // (it's being repainted once for every new item), so we don't do this. - // Instead, we directly tqrepaint the progress bar without going through + // Instead, we directly repaint the progress bar without going through // the event-loop. We do that just once for every 10th item so that // the progress bar doesn't flicker in turn. (pfeiffer) if ( emitProgress >= 10 ) { @@ -191,7 +191,7 @@ void KIconCanvas::slotLoadFiles() #endif // enable updates since we have to draw the whole view now - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); TQApplication::restoreOverrideCursor(); d->m_bLoading = false; @@ -259,7 +259,7 @@ void KIconDialog::init() mGroupOrSize = KIcon::Desktop; mContext = KIcon::Any; mType = 0; - mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::tqfromLatin1("*.png")); + mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); TQWidget *main = new TQWidget( this ); setMainWidget(main); @@ -268,11 +268,11 @@ void KIconDialog::init() top->setSpacing( spacingHint() ); TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main); - bgroup->tqlayout()->setSpacing(KDialog::spacingHint()); - bgroup->tqlayout()->setMargin(KDialog::marginHint()); + bgroup->layout()->setSpacing(KDialog::spacingHint()); + bgroup->layout()->setMargin(KDialog::marginHint()); top->addWidget(bgroup); 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); grid->addWidget(mpRb1, 1, 0); mpCombo = new TQComboBox(bgroup); @@ -631,8 +631,8 @@ void KIconDialog::slotProgress(int p) { mpProgress->setProgress(p); // commented out the following since setProgress already paints ther - // progress bar. ->tqrepaint() only makes it flicker - //mpProgress->tqrepaint(); + // progress bar. ->repaint() only makes it flicker + //mpProgress->repaint(); } void KIconDialog::slotFinished() diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp index 2d9f7881a..4cc1950b3 100644 --- a/kio/kfile/kimagefilepreview.cpp +++ b/kio/kfile/kimagefilepreview.cpp @@ -7,7 +7,7 @@ * License. See the file "COPYING" for the exact licensing terms. */ -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqcombobox.h> #include <tqcheckbox.h> diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp index d82c4523b..c6486c76a 100644 --- a/kio/kfile/kmetaprops.cpp +++ b/kio/kfile/kmetaprops.cpp @@ -29,11 +29,11 @@ #include <kprotocolinfo.h> #include <tqvalidator.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqfileinfo.h> #include <tqdatetime.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqvgroupbox.h> #undef Bool diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp index e9a4c2b6f..2caee6287 100644 --- a/kio/kfile/knotifydialog.cpp +++ b/kio/kfile/knotifydialog.cpp @@ -42,7 +42,7 @@ #include <tqheader.h> #include <tqlabel.h> #include <tqlistview.h> -#include <tqlayout.h> +#include <layout.h> #include <tqptrlist.h> #include <tqpushbutton.h> #include <tqstring.h> @@ -181,7 +181,7 @@ KNotifyDialog::~KNotifyDialog() void KNotifyDialog::addApplicationEvents( const char *appName ) { addApplicationEvents( TQString::fromUtf8( appName ) + - TQString::tqfromLatin1( "/eventsrc" ) ); + TQString::fromLatin1( "/eventsrc" ) ); } void KNotifyDialog::addApplicationEvents( const TQString& path ) @@ -374,7 +374,7 @@ Application * KNotifyWidget::addApplicationEvents( const TQString& path ) kdDebug() << "**** knotify: adding path: " << path << endl; TQString relativePath = path; - if ( path.tqat(0) == '/' && KStandardDirs::exists( path ) ) + if ( path.at(0) == '/' && KStandardDirs::exists( path ) ) relativePath = makeRelative( path ); if ( !relativePath.isEmpty() ) @@ -1005,10 +1005,10 @@ Application::Application( const TQString &path ) m_events = 0L; config = new KConfig(config_file, false, false); kc = new KConfig(path, true, false, "data"); - kc->setGroup( TQString::tqfromLatin1("!Global!") ); - m_icon = kc->readEntry(TQString::tqfromLatin1("IconName"), - TQString::tqfromLatin1("misc")); - m_description = kc->readEntry( TQString::tqfromLatin1("Comment"), + kc->setGroup( TQString::fromLatin1("!Global!") ); + m_icon = kc->readEntry(TQString::fromLatin1("IconName"), + TQString::fromLatin1("misc")); + m_description = kc->readEntry( TQString::fromLatin1("Comment"), i18n("No description available") ); int index = path.find( '/' ); @@ -1070,10 +1070,10 @@ void Application::reloadEvents( bool revertToDefaults ) Event *e = 0L; - TQString global = TQString::tqfromLatin1("!Global!"); - TQString default_group = TQString::tqfromLatin1("<default>"); - TQString name = TQString::tqfromLatin1("Name"); - TQString comment = TQString::tqfromLatin1("Comment"); + TQString global = TQString::fromLatin1("!Global!"); + TQString default_group = TQString::fromLatin1("<default>"); + TQString name = TQString::fromLatin1("Name"); + TQString comment = TQString::fromLatin1("Comment"); TQStringList conflist = kc->groupList(); TQStringList::ConstIterator it = conflist.begin(); diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp index 0b32bc684..52d3e6435 100644 --- a/kio/kfile/kopenwith.cpp +++ b/kio/kfile/kopenwith.cpp @@ -26,7 +26,7 @@ #include <tqimage.h> #include <tqpixmap.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqtoolbutton.h> #include <tqcheckbox.h> @@ -279,8 +279,8 @@ void KApplicationTree::slotSelectionChanged(TQListViewItem* i) void KApplicationTree::resizeEvent( TQResizeEvent * e) { - setColumnWidth(0, width()-TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent) - -2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)); + setColumnWidth(0, width()-TQApplication::tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent) + -2*TQApplication::tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth)); KListView::resizeEvent(e); } @@ -340,7 +340,7 @@ KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text, { TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() ); if (_urls.count() > 1) - caption += TQString::tqfromLatin1("..."); + caption += TQString::fromLatin1("..."); setCaption(caption); setServiceType( _urls ); init( _text, _value ); @@ -376,7 +376,7 @@ void KOpenWithDlg::setServiceType( const KURL::List& _urls ) if ( _urls.count() == 1 ) { qServiceType = KMimeType::findByURL( _urls.first())->name(); - if (qServiceType == TQString::tqfromLatin1("application/octet-stream")) + if (qServiceType == TQString::fromLatin1("application/octet-stream")) qServiceType = TQString::null; } else @@ -413,13 +413,13 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) KHistoryCombo *combo = new KHistoryCombo(); combo->setDuplicatesEnabled( false ); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") ); - int max = kc->readNumEntry( TQString::tqfromLatin1("Maximum history"), 15 ); + KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); + int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 ); combo->setMaxCount( max ); - int mode = kc->readNumEntry(TQString::tqfromLatin1("CompletionMode"), + int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"), KGlobalSettings::completionMode()); combo->setCompletionMode((KGlobalSettings::Completion)mode); - TQStringList list = kc->readListEntry( TQString::tqfromLatin1("History") ); + TQStringList list = kc->readListEntry( TQString::fromLatin1("History") ); combo->setHistoryItems( list, true ); edit = new KURLRequester( combo, this ); } @@ -483,8 +483,8 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) // check to see if we use konsole if not disable the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); - TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole")); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); if (bReadOnly || preferredTerminal != "konsole") nocloseonexit->hide(); @@ -666,13 +666,13 @@ void KOpenWithDlg::slotOK() if (terminal->isChecked()) { - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); - preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole")); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); m_command = preferredTerminal; // only add --noclose when we are sure it is konsole we're using if (preferredTerminal == "konsole" && nocloseonexit->isChecked()) - m_command += TQString::tqfromLatin1(" --noclose"); - m_command += TQString::tqfromLatin1(" -e "); + m_command += TQString::fromLatin1(" --noclose"); + m_command += TQString::fromLatin1(" -e "); m_command += edit->url(); kdDebug(250) << "Setting m_command to " << m_command << endl; } @@ -740,7 +740,7 @@ void KOpenWithDlg::slotOK() { desktop = new KDesktopFile(newPath); } - desktop->writeEntry("Type", TQString::tqfromLatin1("Application")); + desktop->writeEntry("Type", TQString::fromLatin1("Application")); desktop->writeEntry("Name", initialServiceName); desktop->writePathEntry("Exec", fullExec); if (terminal->isChecked()) @@ -814,9 +814,9 @@ void KOpenWithDlg::accept() combo->addToHistory( edit->url() ); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") ); - kc->writeEntry( TQString::tqfromLatin1("History"), combo->historyItems() ); - kc->writeEntry(TQString::tqfromLatin1("CompletionMode"), + KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); + kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() ); + kc->writeEntry(TQString::fromLatin1("CompletionMode"), combo->completionMode()); // don't store the completion-list, as it contains all of KURLCompletion's // executables diff --git a/kio/kfile/kpreviewprops.cpp b/kio/kfile/kpreviewprops.cpp index 9fd91cc7b..9ad4c5262 100644 --- a/kio/kfile/kpreviewprops.cpp +++ b/kio/kfile/kpreviewprops.cpp @@ -19,7 +19,7 @@ #include "kpreviewprops.h" -#include <tqlayout.h> +#include <layout.h> #include <kfilemetapreview.h> #include <kglobalsettings.h> diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index 6496b2cdb..952cad631 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -61,9 +61,9 @@ extern "C" { #include <tqcheckbox.h> #include <tqstrlist.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqpainter.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcombobox.h> #include <tqgroupbox.h> #include <tqwhatsthis.h> @@ -516,7 +516,7 @@ void KPropertiesDialog::insertPages() if ( mimetype.isEmpty() ) return; - TQString query = TQString::tqfromLatin1( + TQString query = TQString::fromLatin1( "('KPropsDlg/Plugin' in ServiceTypes) and " "((not exist [X-KDE-Protocol]) or " " ([X-KDE-Protocol] == '%1' ) )" ).arg(item->url().protocol()); @@ -576,7 +576,7 @@ void KPropertiesDialog::rename( const TQString& _name ) else { TQString tmpurl = m_singleUrl.url(); - if ( tmpurl.tqat(tmpurl.length() - 1) == '/') + if ( tmpurl.at(tmpurl.length() - 1) == '/') // It's a directory, so strip the trailing slash first tmpurl.truncate( tmpurl.length() - 1); newUrl = tmpurl; @@ -718,7 +718,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl; mode_t mode = item->mode(); bool hasDirs = item->isDir() && !item->isLink(); - bool hasRoot = url.path() == TQString::tqfromLatin1("/"); + bool hasRoot = url.path() == TQString::fromLatin1("/"); TQString iconStr = KMimeType::iconForURL(url, mode); TQString directory = properties->kurl().directory(); TQString protocol = properties->kurl().protocol(); @@ -831,7 +831,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) magicMimeComment = TQString::null; } - if ( url.path() == TQString::tqfromLatin1("/") ) + if ( url.path() == TQString::fromLatin1("/") ) hasRoot = true; if ( (*it)->isDir() && !(*it)->isLink() ) { @@ -859,7 +859,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ ) { KIconButton *iconButton = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * iconButton->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * iconButton->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); iconButton->setFixedSize(bsize, bsize); iconButton->setIconSize(48); iconButton->setStrictIconSize(false); @@ -883,7 +883,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) this, TQT_SLOT( slotIconChanged() ) ); } else { TQLabel *iconLabel = new TQLabel( d->m_frame ); - int bsize = 66 + 2 * iconLabel->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * iconLabel->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); iconLabel->setFixedSize(bsize, bsize); iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); iconArea = iconLabel; @@ -908,7 +908,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) // Enhanced rename: Don't highlight the file extension. TQString pattern; KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if (!pattern.isEmpty() && pattern.tqat(0)=='*' && pattern.find('*',1)==-1) + if (!pattern.isEmpty() && pattern.at(0)=='*' && pattern.find('*',1)==-1) d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1); else { @@ -942,7 +942,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) //TODO: wrap for win32 or mac? TQPushButton *button = new TQPushButton(box); - TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("configure")); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure")); TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); button->setIconSet( iconSet ); button->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); @@ -1136,9 +1136,9 @@ void KFilePropsPlugin::slotEditFileType() else mime = d->mimeType; //TODO: wrap for win32 or mac? - TQString keditfiletype = TQString::tqfromLatin1("keditfiletype"); + TQString keditfiletype = TQString::fromLatin1("keditfiletype"); KRun::runCommand( keditfiletype - + " --parent " + TQString::number( (ulong)properties->tqtopLevelWidget()->winId()) + + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId()) + " " + KProcess::quote(mime), keditfiletype, keditfiletype /*unused*/); #endif @@ -1234,7 +1234,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job ) KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize(); KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles(); KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs(); - m_sizeLabel->setText( TQString::tqfromLatin1("%1 (%2)\n%3, %4") + m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4") .arg(KIO::convertSize(totalSize)) .arg(KGlobal::locale()->formatNumber(totalSize, 0)) .arg(i18n("1 file","%n files",totalFiles)) @@ -1439,7 +1439,7 @@ void KFilePropsPlugin::applyIconChanges() if (S_ISDIR(properties->item()->mode())) { - path = url.path(1) + TQString::tqfromLatin1(".directory"); + path = url.path(1) + TQString::fromLatin1(".directory"); // don't call updateUrl because the other tabs (i.e. permissions) // apply to the directory, not the .directory file. } @@ -1654,11 +1654,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr /* Group: Access Permissions */ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame ); - gb->tqlayout()->setSpacing(KDialog::spacingHint()); - gb->tqlayout()->setMargin(KDialog::marginHint()); + gb->layout()->setSpacing(KDialog::spacingHint()); + gb->layout()->setMargin(KDialog::marginHint()); box->addWidget (gb); - gl = new TQGridLayout (gb->tqlayout(), 7, 2); + gl = new TQGridLayout (gb->layout(), 7, 2); gl->setColStretch(1, 1); l = d->explanationLabel = new TQLabel( "", gb ); @@ -1723,11 +1723,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr /**** Group: Ownership ****/ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame ); - gb->tqlayout()->setSpacing(KDialog::spacingHint()); - gb->tqlayout()->setMargin(KDialog::marginHint()); + gb->layout()->setSpacing(KDialog::spacingHint()); + gb->layout()->setMargin(KDialog::marginHint()); box->addWidget (gb); - gl = new TQGridLayout (gb->tqlayout(), 4, 3); + gl = new TQGridLayout (gb->layout(), 4, 3); gl->addRowSpacing(0, 10); /*** Set Owner ***/ @@ -1753,7 +1753,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr kcom->setOrder(KCompletion::Sorted); setpwent(); for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::tqfromLatin1(user->pw_name)); + kcom->addItem(TQString::fromLatin1(user->pw_name)); endpwent(); usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto : KGlobalSettings::CompletionNone); @@ -1781,7 +1781,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++) { if (IamRoot) - groupList += TQString::tqfromLatin1(ge->gr_name); + groupList += TQString::fromLatin1(ge->gr_name); else { /* pick the groups to which the user belongs */ @@ -1802,7 +1802,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr /* add the effective Group to the list .. */ ge = getgrgid (getegid()); if (ge) { - TQString name = TQString::tqfromLatin1(ge->gr_name); + TQString name = TQString::fromLatin1(ge->gr_name); if (name.isEmpty()) name.setNum(ge->gr_gid); if (groupList.find(name) == groupList.end()) @@ -1915,10 +1915,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() { // Group: Access Permissions gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox ); - gb->tqlayout()->setSpacing(KDialog::spacingHint()); - gb->tqlayout()->setMargin(KDialog::marginHint()); + gb->layout()->setSpacing(KDialog::spacingHint()); + gb->layout()->setMargin(KDialog::marginHint()); - gl = new TQGridLayout (gb->tqlayout(), 6, 6); + gl = new TQGridLayout (gb->layout(), 6, 6); gl->addRowSpacing(0, 10); TQValueVector<TQWidget*> theNotSpecials; @@ -2639,7 +2639,7 @@ void KURLPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Link")); + config.writeEntry( "Type", TQString::fromLatin1("Link")); config.writePathEntry( "URL", URLEdit->url() ); // Users can't create a Link .desktop file with a Name field, // but distributions can. Update the Name field in that case. @@ -2796,7 +2796,7 @@ void KBindingPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("MimeType") ); + config.writeEntry( "Type", TQString::fromLatin1("MimeType") ); config.writeEntry( "Patterns", patternEdit->text() ); config.writeEntry( "Comment", commentEdit->text() ); @@ -2852,8 +2852,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP if ((mountPoint != "-") && (mountPoint != "none") && !mountPoint.isEmpty() && device != "none") { - devices.append( device + TQString::tqfromLatin1(" (") - + mountPoint + TQString::tqfromLatin1(")") ); + devices.append( device + TQString::fromLatin1(" (") + + mountPoint + TQString::fromLatin1(")") ); m_devicelist.append(device); d->mountpointlist.append(mountPoint); } @@ -2916,7 +2916,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP layout->addMultiCellWidget(sep, 6, 6, 0, 1); unmounted = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * unmounted->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * unmounted->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); unmounted->setFixedSize(bsize, bsize); unmounted->setIconType(KIcon::Desktop, KIcon::Device); layout->addWidget(unmounted, 7, 0); @@ -3077,7 +3077,7 @@ void KDevicePropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("FSDevice") ); + config.writeEntry( "Type", TQString::fromLatin1("FSDevice") ); config.writeEntry( "Dev", device->currentText() ); config.writeEntry( "MountPoint", mountpoint->text() ); @@ -3362,7 +3362,7 @@ void KDesktopPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Application")); + config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writeEntry( "Comment", w->commentEdit->text() ); config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat config.writeEntry( "GenericName", w->genNameEdit->text() ); @@ -3446,9 +3446,9 @@ void KDesktopPropsPlugin::slotAdvanced() // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::tqfromLatin1("konsole")); + TQString::fromLatin1("konsole")); bool terminalCloseBool = false; @@ -3493,7 +3493,7 @@ void KDesktopPropsPlugin::slotAdvanced() int i, maxEntries = 1000; setpwent(); for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::tqfromLatin1(pw->pw_name)); + kcom->addItem(TQString::fromLatin1(pw->pw_name)); endpwent(); if (i < maxEntries) { @@ -3635,7 +3635,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) mainlayout->addWidget(tmpQGroupBox); - TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 2, 2); + TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2); grid->setSpacing( KDialog::spacingHint() ); grid->setColStretch(1, 1); @@ -3662,7 +3662,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) mainlayout->addWidget(tmpQGroupBox); - grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 3, 2); + grid = new TQGridLayout(tmpQGroupBox->layout(), 3, 2); grid->setSpacing( KDialog::spacingHint() ); grid->setColStretch(1, 1); @@ -3672,9 +3672,9 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::tqfromLatin1("konsole")); + TQString::fromLatin1("konsole")); int posOptions = 1; d->nocloseonexitCheck = 0L; @@ -3701,7 +3701,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) mainlayout->addWidget(tmpQGroupBox); - grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 2, 2); + grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2); grid->setSpacing(KDialog::spacingHint()); grid->setColStretch(1, 1); @@ -3767,7 +3767,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) int i, maxEntries = 1000; setpwent(); for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::tqfromLatin1(pw->pw_name)); + kcom->addItem(TQString::fromLatin1(pw->pw_name)); endpwent(); if (i < maxEntries) { @@ -3854,7 +3854,7 @@ void KExecPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Application")); + config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writePathEntry( "Exec", execEdit->text() ); config.writePathEntry( "SwallowExec", swallowExecEdit->text() ); config.writeEntry( "SwallowTitle", swallowTitleEdit->text() ); @@ -3862,7 +3862,7 @@ void KExecPropsPlugin::applyChanges() TQString temp = terminalEdit->text(); if (d->nocloseonexitCheck ) if ( d->nocloseonexitCheck->isChecked() ) - temp += TQString::tqfromLatin1("--noclose "); + temp += TQString::fromLatin1("--noclose "); temp = temp.stripWhiteSpace(); config.writeEntry( "TerminalOptions", temp ); config.writeEntry( "X-KDE-SubstituteUID", suidCheck->isChecked() ); @@ -4097,7 +4097,7 @@ void KApplicationPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Application")); + config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writeEntry( "Comment", commentEdit->text() ); config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat config.writeEntry( "GenericName", genNameEdit->text() ); diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp index 85cdebb02..22b4cd477 100644 --- a/kio/kfile/krecentdirs.cpp +++ b/kio/kfile/krecentdirs.cpp @@ -52,13 +52,13 @@ static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool re if (key[1] == ':') { key = key.mid(2); - config = new KSimpleConfig(TQString::tqfromLatin1("krecentdirsrc"), readOnly); + config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly); } else { key = key.mid(1); config = KGlobal::config(); - config->setGroup(TQString::tqfromLatin1("Recent Dirs")); + config->setGroup(TQString::fromLatin1("Recent Dirs")); } result=config->readPathListEntry(key); diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp index 7b5c6908a..f1f6af6ce 100644 --- a/kio/kfile/krecentdocument.cpp +++ b/kio/kfile/krecentdocument.cpp @@ -35,7 +35,7 @@ #include <kdesktopfile.h> #include <tqdir.h> #include <tqfileinfo.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstringlist.h> #include <tqregexp.h> @@ -45,7 +45,7 @@ TQString KRecentDocument::recentDocumentDirectory() { // need to change this path, not sure where - return locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")); + return locateLocal("data", TQString::fromLatin1("RecentDocuments/")); } TQStringList KRecentDocument::recentDocuments() @@ -88,9 +88,9 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) kdDebug(250) << "KRecentDocument::add for " << openStr << endl; KConfig *config = KGlobal::config(); TQString oldGrp = config->group(); - config->setGroup(TQString::tqfromLatin1("RecentDocuments")); - bool useRecent = config->readBoolEntry(TQString::tqfromLatin1("UseRecent"), true); - int maxEntries = config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); + config->setGroup(TQString::fromLatin1("RecentDocuments")); + bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true); + int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); config->setGroup(oldGrp); if(!useRecent) @@ -100,7 +100,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQString dStr = path + url.fileName(); - TQString ddesktop = dStr + TQString::tqfromLatin1(".desktop"); + TQString ddesktop = dStr + TQString::fromLatin1(".desktop"); int i=1; // check for duplicates @@ -108,7 +108,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // see if it points to the same file and application KSimpleConfig tmp(ddesktop); tmp.setDesktopGroup(); - if(tmp.readEntry(TQString::tqfromLatin1("X-KDE-LastOpenedWith")) + if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith")) == desktopEntryName) { utime(TQFile::encodeName(ddesktop), NULL); @@ -118,7 +118,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) ++i; if ( i > maxEntries ) break; - ddesktop = dStr + TQString::tqfromLatin1("[%1].desktop").arg(i); + ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i); } TQDir dir(path); @@ -129,7 +129,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQStringList::Iterator it; it = list.begin(); while(i > maxEntries-1){ - TQFile::remove(dir.absPath() + TQString::tqfromLatin1("/") + (*it)); + TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it)); --i, ++it; } } @@ -137,15 +137,15 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // create the applnk KSimpleConfig conf(ddesktop); conf.setDesktopGroup(); - conf.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") ); - conf.writePathEntry( TQString::tqfromLatin1("URL"), openStr ); + conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); + conf.writePathEntry( TQString::fromLatin1("URL"), openStr ); // If you change the line below, change the test in the above loop - conf.writeEntry( TQString::tqfromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); + conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); TQString name = url.fileName(); if (name.isEmpty()) name = openStr; - conf.writeEntry( TQString::tqfromLatin1("Name"), name ); - conf.writeEntry( TQString::tqfromLatin1("Icon"), KMimeType::iconForURL( url ) ); + conf.writeEntry( TQString::fromLatin1("Name"), name ); + conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) ); } void KRecentDocument::add(const TQString &openStr, bool isUrl) @@ -170,8 +170,8 @@ void KRecentDocument::clear() int KRecentDocument::maximumItems() { KConfig *config = KGlobal::config(); - KConfigGroupSaver sa(config, TQString::tqfromLatin1("RecentDocuments")); - return config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); + KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); + return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); } diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp index 234e8717a..ee79b4e58 100644 --- a/kio/kfile/kurlbar.cpp +++ b/kio/kfile/kurlbar.cpp @@ -64,7 +64,7 @@ protected: if ( item ) { TQString text = static_cast<KURLBarItem*>( item )->toolTip(); if ( !text.isEmpty() ) - tip( m_view->tqitemRect( item ), text ); + tip( m_view->itemRect( item ), text ); } } @@ -188,11 +188,11 @@ void KURLBarItem::paint( TQPainter *p ) if ( isCurrent() || isSelected() ) { int h = height( box ); - TQBrush brush = box->tqcolorGroup().brush( TQColorGroup::Highlight ); + TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight ); p->fillRect( 0, 0, w, h, brush ); TQPen pen = p->pen(); TQPen oldPen = pen; - pen.setColor( box->tqcolorGroup().mid() ); + pen.setColor( box->colorGroup().mid() ); p->setPen( pen ); p->drawPoint( 0, 0 ); @@ -225,10 +225,10 @@ void KURLBarItem::paint( TQPainter *p ) int xPos = pm->width() + margin + 2; if ( isCurrent() || isSelected() ) { - p->setPen( box->tqcolorGroup().highlight().dark(115) ); + p->setPen( box->colorGroup().highlight().dark(115) ); p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1), yPos + 1, visibleText ); - p->setPen( box->tqcolorGroup().highlightedText() ); + p->setPen( box->colorGroup().highlightedText() ); } p->drawText( xPos, yPos, visibleText ); @@ -257,10 +257,10 @@ void KURLBarItem::paint( TQPainter *p ) x = QMAX( x, margin ); if ( isCurrent() || isSelected() ) { - p->setPen( box->tqcolorGroup().highlight().dark(115) ); + p->setPen( box->colorGroup().highlight().dark(115) ); p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1), y + 1, visibleText ); - p->setPen( box->tqcolorGroup().highlightedText() ); + p->setPen( box->colorGroup().highlightedText() ); } p->drawText( x, y, visibleText ); @@ -844,7 +844,7 @@ KURLBarListBox::~KURLBarListBox() void KURLBarListBox::paintEvent( TQPaintEvent* ) { TQPainter p(this); - p.setPen( tqcolorGroup().mid() ); + p.setPen( colorGroup().mid() ); p.drawRect( 0, 0, width(), height() ); } @@ -980,7 +980,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url, if ( KGlobal::instance()->aboutData() ) appName = KGlobal::instance()->aboutData()->programName(); if ( appName.isEmpty() ) - appName = TQString::tqfromLatin1( KGlobal::instance()->instanceName() ); + appName = TQString::fromLatin1( KGlobal::instance()->instanceName() ); m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box ); m_appLocal->setChecked( appLocal ); TQWhatsThis::add( m_appLocal, @@ -1010,7 +1010,7 @@ KURL KURLBarItemDialog::url() const { TQString text = m_urlEdit->url(); KURL u; - if ( text.tqat(0) == '/' ) + if ( text.at(0) == '/' ) u.setPath( text ); else u = text; diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp index c9db56756..72c7cbd07 100644 --- a/kio/kfile/kurlcombobox.cpp +++ b/kio/kfile/kurlcombobox.cpp @@ -31,7 +31,7 @@ class KURLComboBox::KURLComboBoxPrivate { public: KURLComboBoxPrivate() { - dirpix = SmallIcon(TQString::tqfromLatin1("folder")); + dirpix = SmallIcon(TQString::fromLatin1("folder")); } TQPixmap dirpix; @@ -72,7 +72,7 @@ void KURLComboBox::init( Mode mode ) setTrapReturnKey( true ); setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); - opendirPix = SmallIcon(TQString::tqfromLatin1("folder_open")); + opendirPix = SmallIcon(TQString::fromLatin1("folder_open")); connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int ))); } @@ -87,7 +87,7 @@ TQStringList KURLComboBox::urls() const for ( int i = defaultList.count(); i < count(); i++ ) { url = text( i ); if ( !url.isEmpty() ) { - //if ( url.tqat(0) == '/' ) + //if ( url.at(0) == '/' ) // list.append( url.prepend( fileProt ) ); //else list.append( url ); @@ -129,7 +129,7 @@ void KURLComboBox::setDefaults() KURLComboItem *item; for ( unsigned int id = 0; id < defaultList.count(); id++ ) { - item = defaultList.tqat( id ); + item = defaultList.at( id ); insertURLItem( item ); } } diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp index 1a53e7660..5d1495127 100644 --- a/kio/kfile/kurlrequester.cpp +++ b/kio/kfile/kurlrequester.cpp @@ -206,7 +206,7 @@ void KURLRequester::init() d->edit = new KLineEdit( this, "line edit" ); myButton = new KURLDragPushButton( this, "kfile button"); - TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("fileopen")); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen")); TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); myButton->setIconSet( iconSet ); myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); diff --git a/kio/kfile/kurlrequesterdlg.cpp b/kio/kfile/kurlrequesterdlg.cpp index 19409afdc..ea91074e2 100644 --- a/kio/kfile/kurlrequesterdlg.cpp +++ b/kio/kfile/kurlrequesterdlg.cpp @@ -22,7 +22,7 @@ #include <unistd.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstring.h> #include <tqtoolbutton.h> diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp index c66ed3ff2..47fcd02ca 100644 --- a/kio/kfile/tests/kdirselectdialogtest.cpp +++ b/kio/kfile/tests/kdirselectdialogtest.cpp @@ -10,7 +10,7 @@ int main( int argc, char **argv ) KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null ); if ( u.isValid() ) KMessageBox::information( 0L, - TQString::tqfromLatin1("You selected the url: %1") + TQString::fromLatin1("You selected the url: %1") .arg( u.prettyURL() ), "Selected URL" ); return 0; diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp index 43dbb4fd0..867b9b4a8 100644 --- a/kio/kfile/tests/kfdtest.cpp +++ b/kio/kfile/tests/kfdtest.cpp @@ -25,7 +25,7 @@ void KFDTest::doit() if ( dlg->exec() == KDialog::Accepted ) { - KMessageBox::information(0, TQString::tqfromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() )); + KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() )); } // tqApp->quit(); diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp index bad100809..5c520dd5d 100644 --- a/kio/kfile/tests/kfiletreeviewtest.cpp +++ b/kio/kfile/tests/kfiletreeviewtest.cpp @@ -148,7 +148,7 @@ int main(int argc, char **argv) { for( int i = 1; i < argc; i++ ) { - argv1 = TQString::tqfromLatin1(argv[i]); + argv1 = TQString::fromLatin1(argv[i]); kdDebug() << "Opening " << argv1 << endl; if( argv1 == "-d" ) tf->setDirOnly(); diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp index aad57b257..8661c9919 100644 --- a/kio/kfile/tests/kfstest.cpp +++ b/kio/kfile/tests/kfstest.cpp @@ -24,7 +24,7 @@ #include <stdlib.h> #include <sys/stat.h> #include <tqdir.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstringlist.h> #include <tqwidget.h> @@ -51,11 +51,11 @@ int main(int argc, char **argv) TQString argv1; TQString startDir; if (argc > 1) - argv1 = TQString::tqfromLatin1(argv[1]); + argv1 = TQString::fromLatin1(argv[1]); if ( argc > 2 ) - startDir = TQString::tqfromLatin1( argv[2]); + startDir = TQString::fromLatin1( argv[2]); - if (argv1 == TQString::tqfromLatin1("diroperator")) { + if (argv1 == TQString::fromLatin1("diroperator")) { KDirOperator *op = new KDirOperator(startDir, 0, "operator"); op->setViewConfig( KGlobal::config(), "TestGroup" ); op->setView(KFile::Simple); @@ -64,24 +64,24 @@ int main(int argc, char **argv) a.exec(); } - else if (argv1 == TQString::tqfromLatin1("justone")) { + else if (argv1 == TQString::fromLatin1("justone")) { TQString name = KFileDialog::getOpenFileName(startDir); qDebug("filename=%s",name.latin1()); } - else if (argv1 == TQString::tqfromLatin1("existingURL")) { + else if (argv1 == TQString::fromLatin1("existingURL")) { KURL url = KFileDialog::getExistingURL(); qDebug("URL=%s",url.url().latin1()); name1 = url.url(); } - else if (argv1 == TQString::tqfromLatin1("preview")) { + else if (argv1 == TQString::fromLatin1("preview")) { KURL u = KFileDialog::getImageOpenURL(); qDebug("filename=%s", u.url().latin1()); } - else if (argv1 == TQString::tqfromLatin1("preselect")) { - names = KFileDialog::getOpenFileNames(TQString::tqfromLatin1("/etc/passwd")); + else if (argv1 == TQString::fromLatin1("preselect")) { + names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd")); TQStringList::Iterator it = names.begin(); while ( it != names.end() ) { qDebug("selected file: %s", (*it).latin1()); @@ -89,10 +89,10 @@ int main(int argc, char **argv) } } - else if (argv1 == TQString::tqfromLatin1("dirs")) + else if (argv1 == TQString::fromLatin1("dirs")) name1 = KFileDialog::getExistingDirectory(); - else if (argv1 == TQString::tqfromLatin1("heap")) { + else if (argv1 == TQString::fromLatin1("heap")) { KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L, "file dialog", true ); dlg->setMode( KFile::File); @@ -104,33 +104,33 @@ int main(int argc, char **argv) if ( urlBar ) { urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"), - TQString::tqfromLatin1("KDE FTP Server") ); + TQString::fromLatin1("KDE FTP Server") ); } if ( dlg->exec() == KDialog::Accepted ) name1 = dlg->selectedURL().url(); } - else if ( argv1 == TQString::tqfromLatin1("eventloop") ) + else if ( argv1 == TQString::fromLatin1("eventloop") ) { KFDTest *test = new KFDTest( startDir ); return a.exec(); } - else if (argv1 == TQString::tqfromLatin1("save")) { + else if (argv1 == TQString::fromLatin1("save")) { KURL u = KFileDialog::getSaveURL(); -// TQString(TQDir::homeDirPath() + TQString::tqfromLatin1("/testfile")), +// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")), // TQString::null, 0L); name1 = u.url(); } - else if (argv1 == TQString::tqfromLatin1("icon")) { + else if (argv1 == TQString::fromLatin1("icon")) { KIconDialog dlg; TQString icon = dlg.selectIcon(); kdDebug() << icon << endl; } -// else if ( argv1 == TQString::tqfromLatin1("dirselect") ) { +// else if ( argv1 == TQString::fromLatin1("dirselect") ) { // KURL url; // url.setPath( "/" ); // KURL selected = KDirSelectDialog::selectDirectory( url ); @@ -140,7 +140,7 @@ int main(int argc, char **argv) else { KFileDialog dlg(startDir, - TQString::tqfromLatin1("*|All Files\n" + TQString::fromLatin1("*|All Files\n" "*.lo *.o *.la|All libtool Files"), 0, 0, true); // dlg.setFilter( "*.tdevelop" ); @@ -177,7 +177,7 @@ int main(int argc, char **argv) } if (!(name1.isNull())) - KMessageBox::information(0, TQString::tqfromLatin1("You selected the file " ) + name1, - TQString::tqfromLatin1("Your Choice")); + KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1, + TQString::fromLatin1("Your Choice")); return 0; } diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp index 4a1d4bec0..9248eec5d 100644 --- a/kio/kfile/tests/kurlrequestertest.cpp +++ b/kio/kfile/tests/kurlrequestertest.cpp @@ -10,7 +10,7 @@ int main( int argc, char **argv ) qDebug( "Selected url: %s", url.url().latin1()); KURLRequester *req = new KURLRequester(); - KEditListBox *el = new KEditListBox( TQString::tqfromLatin1("Test"), req->customEditor() ); + KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() ); el->show(); return app.exec(); } diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp index b2449f79f..6f0592ac4 100644 --- a/kio/kio/authinfo.cpp +++ b/kio/kio/authinfo.cpp @@ -158,7 +158,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc, AutoLogin &log = *it; if ( (mode & defaultOnly) == defaultOnly && - log.machine == TQString::tqfromLatin1("default") && + log.machine == TQString::fromLatin1("default") && (login.login.isEmpty() || login.login == log.login) ) { login.type = log.type; @@ -169,7 +169,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc, } if ( (mode & presetOnly) == presetOnly && - log.machine == TQString::tqfromLatin1("preset") && + log.machine == TQString::fromLatin1("preset") && (login.login.isEmpty() || login.login == log.login) ) { login.type = log.type; @@ -237,7 +237,7 @@ TQString NetRC::extract( const char* buf, const char* key, int& pos ) if ( idx > start ) { pos = idx; - return TQString::tqfromLatin1( buf+start, idx-start); + return TQString::fromLatin1( buf+start, idx-start); } } } @@ -280,7 +280,7 @@ bool NetRC::parse( int fd ) while( buf[tail-1] == '\n' || buf[tail-1] =='\r' ) tail--; - TQString mac = TQString::tqfromLatin1(buf, tail).stripWhiteSpace(); + TQString mac = TQString::fromLatin1(buf, tail).stripWhiteSpace(); if ( !mac.isEmpty() ) loginMap[type][index].macdef[macro].append( mac ); @@ -294,12 +294,12 @@ bool NetRC::parse( int fd ) if (strncasecmp(buf+pos, "default", 7) == 0 ) { pos += 7; - l.machine = TQString::tqfromLatin1("default"); + l.machine = TQString::fromLatin1("default"); } else if (strncasecmp(buf+pos, "preset", 6) == 0 ) { pos += 6; - l.machine = TQString::tqfromLatin1("preset"); + l.machine = TQString::fromLatin1("preset"); } } // kdDebug() << "Machine: " << l.machine << endl; @@ -314,7 +314,7 @@ bool NetRC::parse( int fd ) type = l.type = extract( buf, "type", pos ); if ( l.type.isEmpty() && !l.machine.isEmpty() ) - type = l.type = TQString::tqfromLatin1("ftp"); + type = l.type = TQString::fromLatin1("ftp"); // kdDebug() << "Type: " << l.type << endl; macro = extract( buf, "macdef", pos ); diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp index 56c24b072..e1d343c10 100644 --- a/kio/kio/chmodjob.cpp +++ b/kio/kio/chmodjob.cpp @@ -121,7 +121,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list ) break; } } - if ( !isLink && relativePath != TQString::tqfromLatin1("..") ) + if ( !isLink && relativePath != TQString::fromLatin1("..") ) { ChmodInfo info; info.url = m_lstItems.first()->url(); // base directory diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp index 35bed5235..44615c975 100644 --- a/kio/kio/dataprotocol.cpp +++ b/kio/kio/dataprotocol.cpp @@ -26,7 +26,7 @@ #include <tqcstring.h> #include <tqstring.h> #include <tqstringlist.h> -#include <tqtextcodec.h> +#include <textcodec.h> #ifdef DATAKIOSLAVE # include <kinstance.h> @@ -121,7 +121,7 @@ inline TQString extract(const TQString &buf, int &pos, TQChar c1, TQChar c2 = '\0', TQChar c3 = '\0') { int oldpos = pos; pos = find(buf,oldpos,c1,c2,c3); - return TQString(buf.tqunicode() + oldpos, pos - oldpos); + return TQString(buf.unicode() + oldpos, pos - oldpos); } /** ignores all whitespaces @@ -186,7 +186,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) { header_info.is_base64 = false; // decode url and save it - TQString &raw_url = header_info.url = TQString::tqfromLatin1("data:") + url.path(); + TQString &raw_url = header_info.url = TQString::fromLatin1("data:") + url.path(); int raw_url_len = (int)raw_url.length(); // jump over scheme part (must be "data:", we don't even check that) diff --git a/kio/kio/dataslave.cpp b/kio/kio/dataslave.cpp index 8ec90b2a7..d16ecc0d4 100644 --- a/kio/kio/dataslave.cpp +++ b/kio/kio/dataslave.cpp @@ -137,7 +137,7 @@ void DataSlave::send(int cmd, const TQByteArray &arr) { break; default: error(ERR_UNSUPPORTED_ACTION, - unsupportedActionErrorString(TQString::tqfromLatin1("data"),cmd)); + unsupportedActionErrorString(TQString::fromLatin1("data"),cmd)); }/*end switch*/ } diff --git a/kio/kio/defaultprogress.cpp b/kio/kio/defaultprogress.cpp index 72144000b..5100e5909 100644 --- a/kio/kio/defaultprogress.cpp +++ b/kio/kio/defaultprogress.cpp @@ -17,7 +17,7 @@ */ #include <tqtimer.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqdatetime.h> #include <tqcheckbox.h> @@ -273,7 +273,7 @@ void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent ) void DefaultProgress::slotInfoMessage( KIO::Job*, const TQString & msg ) { speedLabel->setText( msg ); - speedLabel->setAlignment( speedLabel->tqalignment() & ~TQt::WordBreak ); + speedLabel->setAlignment( speedLabel->alignment() & ~TQt::WordBreak ); } diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp index 9c0ae5e81..f99219524 100644 --- a/kio/kio/global.cpp +++ b/kio/kio/global.cpp @@ -97,7 +97,7 @@ KIO_EXPORT TQString KIO::number( KIO::filesize_t size ) { char charbuf[256]; sprintf(charbuf, "%lld", size); - return TQString::tqfromLatin1(charbuf); + return TQString::fromLatin1(charbuf); } KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSize, @@ -284,7 +284,7 @@ KIO_EXPORT TQString KIO::buildErrorString(int errorCode, const TQString &errorTe result = i18n( "Could not create socket for accessing %1." ).arg( errorText ); break; case KIO::ERR_COULD_NOT_CONNECT: - result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::tqfromLatin1("localhost") : errorText ); + result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("localhost") : errorText ); break; case KIO::ERR_CONNECTION_BROKEN: result = i18n( "Connection to host %1 is broken." ).arg( errorText ); @@ -477,16 +477,16 @@ KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0 url = i18n( "(unknown)" ); } - datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), + datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false ); ret << errorName; - ret << TQString::tqfromLatin1( "<qt><p><b>" ) + errorName + - TQString::tqfromLatin1( "</b></p><p>" ) + description + - TQString::tqfromLatin1( "</p>" ); - ret2 = TQString::tqfromLatin1( "<qt><p>" ); + ret << TQString::fromLatin1( "<qt><p><b>" ) + errorName + + TQString::fromLatin1( "</b></p><p>" ) + description + + TQString::fromLatin1( "</p>" ); + ret2 = TQString::fromLatin1( "<qt><p>" ); if ( !techName.isEmpty() ) - ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::tqfromLatin1( "</p>" ); + ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::fromLatin1( "</p>" ); ret2 += i18n( "</p><p><b>Details of the request</b>:" ); ret2 += i18n( "</p><ul><li>URL: %1</li>" ).arg( url ); if ( !protocol.isEmpty() ) { @@ -497,12 +497,12 @@ KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0 if ( !causes.isEmpty() ) { ret2 += i18n( "<p><b>Possible causes</b>:</p><ul><li>" ); ret2 += causes.join( "</li><li>" ); - ret2 += TQString::tqfromLatin1( "</li></ul>" ); + ret2 += TQString::fromLatin1( "</li></ul>" ); } if ( !solutions.isEmpty() ) { ret2 += i18n( "<p><b>Possible solutions</b>:</p><ul><li>" ); ret2 += solutions.join( "</li><li>" ); - ret2 += TQString::tqfromLatin1( "</li></ul>" ); + ret2 += TQString::fromLatin1( "</li></ul>" ); } ret << ret2; return ret; @@ -559,7 +559,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT protocol = i18n( "(unknown)" ); } - datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), + datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false ); TQString errorName, techName, description; @@ -1738,7 +1738,7 @@ static TQString get_mount_info(const TQString& filename, if ( is_my_mountpoint( mounted[i].f_mntonname, realname, max ) ) { mountPoint = TQFile::decodeName(mounted[i].f_mntonname); - fstype = TQString::tqfromLatin1(mounttype); + fstype = TQString::fromLatin1(mounttype); check_mount_point( mounttype, mounted[i].f_mntfromname, isautofs, isslow ); // keep going, looking for a potentially better one @@ -1805,7 +1805,7 @@ static TQString get_mount_info(const TQString& filename, if ( is_my_mountpoint( mountedto, realname, max ) ) { mountPoint = TQFile::decodeName(mountedto); - fstype = TQString::tqfromLatin1(ent->vfsent_name); + fstype = TQString::fromLatin1(ent->vfsent_name); check_mount_point(ent->vfsent_name, device_name, isautofs, isslow); if (ismanual == Unseen) diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp index 411604aba..58bb00c58 100644 --- a/kio/kio/job.cpp +++ b/kio/kio/job.cpp @@ -792,7 +792,7 @@ SimpleJob *KIO::special(const KURL& url, const TQByteArray & data, bool showProg SimpleJob *KIO::mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo ) { KIO_ARGS << int(1) << TQ_INT8( ro ? 1 : 0 ) - << TQString::tqfromLatin1(fstype) << dev << point; + << TQString::fromLatin1(fstype) << dev << point; SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo ); if ( showProgressInfo ) Observer::self()->mounting( job, dev, point ); @@ -1413,7 +1413,7 @@ void StoredTransferJob::slotStoredData( KIO::Job *, const TQByteArray &data ) if ( data.size() == 0 ) return; unsigned int oldSize = m_data.size(); - m_data.tqresize( oldSize + data.size(), TQGArray::SpeedOptim ); + m_data.resize( oldSize + data.size(), TQGArray::SpeedOptim ); memcpy( m_data.data() + oldSize, data.data(), data.size() ); } @@ -1480,7 +1480,7 @@ void MimetypeJob::slotFinished( ) // Due to the "protocol doesn't support listing" code in KRun, we // assumed it was a file. kdDebug(7007) << "It is in fact a directory!" << endl; - m_mimetype = TQString::tqfromLatin1("inode/directory"); + m_mimetype = TQString::fromLatin1("inode/directory"); emit TransferJob::mimetype( this, m_mimetype ); m_error = 0; } @@ -3359,7 +3359,7 @@ void CopyJob::copyNextFile() bool devicesOk=false; // if the source is a devices url, handle it a littlebit special - if ((*it).uSource.protocol()==TQString::tqfromLatin1("devices")) + if ((*it).uSource.protocol()==TQString::fromLatin1("devices")) { TQByteArray data; TQByteArray param; @@ -3395,20 +3395,20 @@ void CopyJob::copyNextFile() config.setDesktopGroup(); KURL url = (*it).uSource; url.setPass( "" ); - config.writePathEntry( TQString::tqfromLatin1("URL"), url.url() ); - config.writeEntry( TQString::tqfromLatin1("Name"), url.url() ); - config.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") ); + config.writePathEntry( TQString::fromLatin1("URL"), url.url() ); + config.writeEntry( TQString::fromLatin1("Name"), url.url() ); + config.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); TQString protocol = (*it).uSource.protocol(); - if ( protocol == TQString::tqfromLatin1("ftp") ) - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("ftp") ); - else if ( protocol == TQString::tqfromLatin1("http") ) - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("www") ); - else if ( protocol == TQString::tqfromLatin1("info") ) - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("info") ); - else if ( protocol == TQString::tqfromLatin1("mailto") ) // sven: - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("kmail") ); // added mailto: support + if ( protocol == TQString::fromLatin1("ftp") ) + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("ftp") ); + else if ( protocol == TQString::fromLatin1("http") ) + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("www") ); + else if ( protocol == TQString::fromLatin1("info") ) + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("info") ); + else if ( protocol == TQString::fromLatin1("mailto") ) // sven: + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("kmail") ); // added mailto: support else - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("unknown") ); + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("unknown") ); config.sync(); files.remove( it ); m_processedFiles++; @@ -4533,7 +4533,7 @@ void MultiGetJob::slotFinished() // return slave to pool // fetch new slave for first entry in m_waitQueue and call start // again. - GetRequest *entry = m_waitQueue.tqat(0); + GetRequest *entry = m_waitQueue.at(0); m_url = entry->url; slaveDone(); Scheduler::doJob(this); @@ -4651,7 +4651,7 @@ TQFile *CacheInfo::cachedFile() ok = false; time_t date; - time_t tqcurrentDate = time(0); + time_t currentDate = time(0); // URL if (ok && (!fgets(buffer, 400, fs))) @@ -4673,10 +4673,10 @@ TQFile *CacheInfo::cachedFile() if (ok) { date = (time_t) strtoul(buffer, 0, 10); - if (m_maxCacheAge && (difftime(tqcurrentDate, date) > m_maxCacheAge)) + if (m_maxCacheAge && (difftime(currentDate, date) > m_maxCacheAge)) { m_bMustRevalidate = true; - m_expireDate = tqcurrentDate; + m_expireDate = currentDate; } } @@ -4690,7 +4690,7 @@ TQFile *CacheInfo::cachedFile() { date = (time_t) strtoul(buffer, 0, 10); // After the expire date we need to revalidate. - if (!date || difftime(tqcurrentDate, date) >= 0) + if (!date || difftime(currentDate, date) >= 0) m_bMustRevalidate = true; m_expireDate = date; } diff --git a/kio/kio/kacl.cpp b/kio/kio/kacl.cpp index d05098102..432a50d31 100644 --- a/kio/kio/kacl.cpp +++ b/kio/kio/kacl.cpp @@ -623,8 +623,8 @@ TQString KACL::KACLPrivate::getUserName( uid_t uid ) const if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { - m_usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) ); - return TQString::tqfromLatin1( user->pw_name ); + m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) ); + return TQString::fromLatin1( user->pw_name ); } else return TQString::number( uid ); @@ -641,8 +641,8 @@ TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { - m_groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) ); - return TQString::tqfromLatin1( grp->gr_name ); + m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) ); + return TQString::fromLatin1( grp->gr_name ); } else return TQString::number( gid ); @@ -654,7 +654,7 @@ TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const static TQString aclAsString(const acl_t acl) { char *aclString = acl_to_text( acl, 0 ); - TQString ret = TQString::tqfromLatin1( aclString ); + TQString ret = TQString::fromLatin1( aclString ); acl_free( (void*)aclString ); return ret; } diff --git a/kio/kio/kar.cpp b/kio/kio/kar.cpp index 376a748a4..07072d0c6 100644 --- a/kio/kio/kar.cpp +++ b/kio/kio/kar.cpp @@ -98,7 +98,7 @@ bool KAr::openArchive( int mode ) TQCString name; int date, uid, gid, mode, size; - dev->tqat( dev->tqat() + (2 - (dev->tqat() % 2)) % 2 ); // Ar headers are padded to byte boundary + dev->at( dev->at() + (2 - (dev->at() % 2)) % 2 ); // Ar headers are padded to byte boundary if ( dev->readBlock (ar_header.data(), 60) != 60 ) { // Read ar header kdWarning(7042) << "Couldn't read header" << endl; @@ -131,7 +131,7 @@ bool KAr::openArchive( int mode ) kdDebug(7042) << "Read in longnames entry" << endl; } else if (name.mid(1, 1) == " ") { // Symbol table entry kdDebug(7042) << "Skipped symbol entry" << endl; - dev->tqat( dev->tqat() + size ); + dev->at( dev->at() + size ); skip_entry = true; } else { // Longfilename kdDebug(7042) << "Longfilename #" << name.mid(1, 15).toInt() << endl; @@ -150,10 +150,10 @@ bool KAr::openArchive( int mode ) kdDebug(7042) << "Filename: " << name << " Size: " << size << endl; KArchiveEntry* entry; - entry = new KArchiveFile(this, name, mode, date, /*uid*/ 0, /*gid*/ 0, 0, dev->tqat(), size); + entry = new KArchiveFile(this, name, mode, date, /*uid*/ 0, /*gid*/ 0, 0, dev->at(), size); rootDir()->addEntry(entry); // Ar files don't support directorys, so everything in root - dev->tqat( dev->tqat() + size ); // Skip contents + dev->at( dev->at() + size ); // Skip contents } delete[] ar_longnames; diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp index c5b9cad66..0e8d6789d 100644 --- a/kio/kio/karchive.cpp +++ b/kio/kio/karchive.cpp @@ -90,7 +90,7 @@ KArchive::~KArchive() bool KArchive::open( int mode ) { - if ( m_dev && !m_dev->tqopen( mode ) ) + if ( m_dev && !m_dev->open( mode ) ) return false; if ( m_open ) @@ -375,7 +375,7 @@ KArchiveDirectory * KArchive::rootDir() TQString username = pw ? TQFile::decodeName(pw->pw_name) : TQString::number( getuid() ); TQString groupname = grp ? TQFile::decodeName(grp->gr_name) : TQString::number( getgid() ); - d->rootDir = new KArchiveDirectory( this, TQString::tqfromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null ); + d->rootDir = new KArchiveDirectory( this, TQString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null ); } return d->rootDir; } @@ -491,7 +491,7 @@ int KArchiveFile::size() const TQByteArray KArchiveFile::data() const { - archive()->device()->tqat( m_pos ); + archive()->device()->at( m_pos ); // Read content TQByteArray arr( m_size ); diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp index 798a37d95..c5e04537e 100644 --- a/kio/kio/kdatatool.cpp +++ b/kio/kio/kdatatool.cpp @@ -167,11 +167,11 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const if ( !datatype.isEmpty() ) { - constr = TQString::tqfromLatin1( "DataType == '%1'" ).arg( datatype ); + constr = TQString::fromLatin1( "DataType == '%1'" ).arg( datatype ); } if ( !mimetype.isEmpty() ) { - TQString tmp = TQString::tqfromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype ); + TQString tmp = TQString::fromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype ); if ( constr.isEmpty() ) constr = tmp; else @@ -180,7 +180,7 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const /* Bug in KTrader ? Test with HEAD-tdelibs! if ( instance ) { - TQString tmp = TQString::tqfromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() ); + TQString tmp = TQString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() ); if ( constr.isEmpty() ) constr = tmp; else diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp index 652101310..a7fa515d7 100644 --- a/kio/kio/kdirlister.cpp +++ b/kio/kio/kdirlister.cpp @@ -1781,7 +1781,7 @@ void KDirListerCache::printDebug() << " rootItem: " << ( itu.current()->rootItem ? itu.current()->rootItem->url() : KURL() ) << " autoUpdates refcount: " << itu.current()->autoUpdates << " complete: " << itu.current()->complete - << ( itu.current()->lstItems ? TQString(" with %1 items.").tqarg(itu.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl; + << ( itu.current()->lstItems ? TQString(" with %1 items.").arg(itu.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl; } kdDebug(7004) << "urlsCurrentlyHeld: " << endl; @@ -1814,7 +1814,7 @@ void KDirListerCache::printDebug() for ( ; itc.current() ; ++itc ) kdDebug(7004) << " " << itc.currentKey() << " rootItem: " << ( itc.current()->rootItem ? itc.current()->rootItem->url().prettyURL() : TQString("NULL") ) - << ( itc.current()->lstItems ? TQString(" with %1 items.").tqarg(itc.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl; + << ( itc.current()->lstItems ? TQString(" with %1 items.").arg(itc.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl; } #endif diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp index 363ab2752..89e89e422 100644 --- a/kio/kio/kfileitem.cpp +++ b/kio/kio/kfileitem.cpp @@ -32,7 +32,7 @@ #include <tqdir.h> #include <tqfile.h> #include <tqmap.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <kdebug.h> #include <kfilemetainfo.h> @@ -1041,7 +1041,7 @@ TQString KFileItem::parsePermissions(mode_t perm) const if (hasExtendedACL()) p[10]='+'; - return TQString::tqfromLatin1(p); + return TQString::fromLatin1(p); } // check if we need to cache this diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp index 3c85363c4..dcf735619 100644 --- a/kio/kio/kfilemetainfo.cpp +++ b/kio/kio/kfilemetainfo.cpp @@ -937,7 +937,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const query = "(not exist [X-KDE-Protocol])"; queryMimeType = mimeType; } else { - query = TQString::tqfromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol); + query = TQString::fromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol); // querying for a protocol: we have no mimetype, so we need to use KFilePlugin as one queryMimeType = "KFilePlugin"; // hopefully using KFilePlugin as genericMimeType too isn't a problem diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp index 62b5e6ddb..1f6dca285 100644 --- a/kio/kio/kfileshare.cpp +++ b/kio/kio/kfileshare.cpp @@ -90,7 +90,7 @@ void KFileShare::readConfig() // static { // Create KFileSharePrivate instance KFileSharePrivate::self(); - KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true); + KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes"; s_restricted = config.readEntry("RESTRICT", "yes") == "yes"; @@ -241,7 +241,7 @@ KFileShare::Authorization KFileShare::authorization() TQString KFileShare::findExe( const char* exeName ) { // /usr/sbin on Mandrake, $PATH allows flexibility for other distributions - TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::tqfromLatin1(":/usr/sbin"); + TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin"); TQString exe = KStandardDirs::findExe( exeName, path ); if (exe.isEmpty()) kdError() << exeName << " not found in " << path << endl; diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp index 72cc13f1f..7260f9e18 100644 --- a/kio/kio/kimageio.cpp +++ b/kio/kio/kimageio.cpp @@ -100,18 +100,18 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) { if (mLib.isEmpty()) { - iio->setqStatus(1); // Error + iio->seStatus(1); // Error return; } TQString libpath = KLibLoader::findLibrary(mLib.ascii()); if ( libpath.isEmpty()) { - iio->setqStatus(1); // Error + iio->seStatus(1); // Error return; } lt_dlhandle libhandle = lt_dlopen( TQFile::encodeName(libpath) ); if (libhandle == 0) { - iio->setqStatus(1); // error + iio->seStatus(1); // error kdWarning() << "KImageIOFormat::callLibFunc: couldn't dlopen " << mLib << "(" << lt_dlerror() << ")" << endl; return; } @@ -123,7 +123,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) lt_ptr func = lt_dlsym(libhandle, funcName.ascii()); if (func == NULL) { - iio->setqStatus(1); // error + iio->seStatus(1); // error kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl; } mReadFunc = (void (*)(TQImageIO *))func; @@ -134,7 +134,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) lt_ptr func = lt_dlsym(libhandle, funcName.ascii()); if (func == NULL) { - iio->setqStatus(1); // error + iio->seStatus(1); // error kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl; } mWriteFunc = (void (*)(TQImageIO *))func; @@ -145,12 +145,12 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) if (mReadFunc) mReadFunc(iio); else - iio->setqStatus(1); // Error + iio->seStatus(1); // Error else if (mWriteFunc) mWriteFunc(iio); else - iio->setqStatus(1); // Error + iio->seStatus(1); // Error } @@ -232,7 +232,7 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode) patterns.sort(); patterns.prepend(allPatterns); - TQString pattern = patterns.join(TQString::tqfromLatin1("\n")); + TQString pattern = patterns.join(TQString::fromLatin1("\n")); return pattern; } @@ -256,7 +256,7 @@ KImageIOFactory::readImage( TQImageIO *iio) } if (!format || !format->bRead) { - iio->setqStatus(1); // error + iio->seStatus(1); // error return; } @@ -283,7 +283,7 @@ KImageIOFactory::writeImage( TQImageIO *iio) } if (!format || !format->bWrite) { - iio->setqStatus(1); // error + iio->seStatus(1); // error return; } diff --git a/kio/kio/klimitediodevice.h b/kio/kio/klimitediodevice.h index 0c5a76b79..e2946d37a 100644 --- a/kio/kio/klimitediodevice.h +++ b/kio/kio/klimitediodevice.h @@ -56,7 +56,7 @@ public: else ok = m_dev->open( m ); if ( ok )*/ - m_dev->tqat( m_start ); // No concurrent access ! + m_dev->at( m_start ); // No concurrent access ! } else kdWarning(7005) << "KLimitedIODevice::open only supports IO_ReadOnly!" << endl; @@ -89,13 +89,13 @@ public: return c[0]; } virtual int ungetch( int c ) { return m_dev->ungetch(c); } // ## apply lower limit ? - virtual Offset at() const { return m_dev->tqat() - m_start; } + virtual Offset at() const { return m_dev->at() - m_start; } virtual bool at( Offset pos ) { Q_ASSERT( pos <= m_length ); pos = QMIN( pos, m_length ); // Apply upper limit - return m_dev->tqat( m_start + pos ); + return m_dev->at( m_start + pos ); } - virtual bool atEnd() const { return m_dev->atEnd() || m_dev->tqat() >= m_start + m_length; } + virtual bool atEnd() const { return m_dev->atEnd() || m_dev->at() >= m_start + m_length; } private: TQIODevice* m_dev; TQ_ULONG m_start; diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp index 09615d9a7..72b249249 100644 --- a/kio/kio/kmimemagic.cpp +++ b/kio/kio/kmimemagic.cpp @@ -525,7 +525,7 @@ class KMimeMagicUtimeConf public: KMimeMagicUtimeConf() { - tmpDirs << TQString::tqfromLatin1("/tmp"); // default value + tmpDirs << TQString::fromLatin1("/tmp"); // default value // The trick is that we also don't want the user to override globally set // directories. So we have to misuse KStandardDirs :} diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp index 719107223..5d650b4b2 100644 --- a/kio/kio/kmimetype.cpp +++ b/kio/kio/kmimetype.cpp @@ -265,7 +265,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode, { // Assume inode/directory, if the protocol supports listing. if ( KProtocolInfo::supportsListing( _url ) ) - return mimeType( TQString::tqfromLatin1("inode/directory") ); + return mimeType( TQString::fromLatin1("inode/directory") ); else return defaultMimeTypePtr(); // == 'no idea', e.g. for "data:,foo/" } @@ -382,15 +382,15 @@ void KMimeType::init( KDesktopFile * config ) m_lstPatterns = config->readListEntry( "Patterns", ';' ); // Read the X-KDE-AutoEmbed setting and store it in the properties map - TQString XKDEAutoEmbed = TQString::tqfromLatin1("X-KDE-AutoEmbed"); + TQString XKDEAutoEmbed = TQString::fromLatin1("X-KDE-AutoEmbed"); if ( config->hasKey( XKDEAutoEmbed ) ) m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) ); - TQString XKDEText = TQString::tqfromLatin1("X-KDE-text"); + TQString XKDEText = TQString::fromLatin1("X-KDE-text"); if ( config->hasKey( XKDEText ) ) m_mapProps.insert( XKDEText, config->readBoolEntry( XKDEText ) ); - TQString XKDEIsAlso = TQString::tqfromLatin1("X-KDE-IsAlso"); + TQString XKDEIsAlso = TQString::fromLatin1("X-KDE-IsAlso"); if ( config->hasKey( XKDEIsAlso ) ) { TQString inherits = config->readEntry( XKDEIsAlso ); if ( inherits != name() ) @@ -399,7 +399,7 @@ void KMimeType::init( KDesktopFile * config ) kdWarning(7009) << "Error: " << inherits << " inherits from itself!!!!" << endl; } - TQString XKDEPatternsAccuracy = TQString::tqfromLatin1("X-KDE-PatternsAccuracy"); + TQString XKDEPatternsAccuracy = TQString::fromLatin1("X-KDE-PatternsAccuracy"); if ( config->hasKey( XKDEPatternsAccuracy ) ) m_mapProps.insert( XKDEPatternsAccuracy, config->readEntry( XKDEPatternsAccuracy ) ); @@ -838,7 +838,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf KURL mpURL; mpURL.setPath( mp ); // Open a new window - retval = KRun::runURL( mpURL, TQString::tqfromLatin1("inode/directory") ); + retval = KRun::runURL( mpURL, TQString::fromLatin1("inode/directory") ); } else { diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp index d4d7b620a..a794131d5 100644 --- a/kio/kio/kmimetypechooser.cpp +++ b/kio/kio/kmimetypechooser.cpp @@ -28,7 +28,7 @@ #include <ksycoca.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqpushbutton.h> #include <tqwhatsthis.h> @@ -195,9 +195,9 @@ void KMimeTypeChooser::editMimeType() // thanks to libkonq/konq_operations.cc connect( KSycoca::self(), TQT_SIGNAL(databaseChanged()), this, TQT_SLOT(slotSycocaDatabaseChanged()) ); - TQString keditfiletype = TQString::tqfromLatin1("keditfiletype"); + TQString keditfiletype = TQString::fromLatin1("keditfiletype"); KRun::runCommand( keditfiletype - + " --parent " + TQString::number( (ulong)tqtopLevelWidget()->winId()) + + " --parent " + TQString::number( (ulong)topLevelWidget()->winId()) + " " + KProcess::quote(mt), keditfiletype, keditfiletype /*unused*/); } diff --git a/kio/kio/knfsshare.cpp b/kio/kio/knfsshare.cpp index f0fdfce6d..7a6642809 100644 --- a/kio/kio/knfsshare.cpp +++ b/kio/kio/knfsshare.cpp @@ -18,7 +18,7 @@ #include <tqdict.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kdirwatch.h> #include <kstaticdeleter.h> diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp index 9d24886da..a3d8e0302 100644 --- a/kio/kio/kprotocolmanager.cpp +++ b/kio/kio/kprotocolmanager.cpp @@ -277,7 +277,7 @@ TQString KProtocolManager::proxyForURL( const KURL &url ) break; } - return (proxy.isEmpty() ? TQString::tqfromLatin1("DIRECT") : proxy); + return (proxy.isEmpty() ? TQString::fromLatin1("DIRECT") : proxy); } void KProtocolManager::badProxy( const TQString &proxy ) @@ -462,7 +462,7 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers ) if( modifiers.contains('p') ) { // TODO: determine this value instead of hardcoding it... - supp += TQString::tqfromLatin1("; X11"); + supp += TQString::fromLatin1("; X11"); } if( modifiers.contains('m') ) { @@ -471,13 +471,13 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers ) if( modifiers.contains('l') ) { TQStringList languageList = KGlobal::locale()->languageList(); - TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") ); if( it != languageList.end() ) { - if( languageList.contains( TQString::tqfromLatin1("en") ) > 0 ) + if( languageList.contains( TQString::fromLatin1("en") ) > 0 ) languageList.remove( it ); else - (*it) = TQString::tqfromLatin1("en"); + (*it) = TQString::fromLatin1("en"); } if( languageList.count() ) supp += TQString("; %1").arg(languageList.join(", ")); diff --git a/kio/kio/kremoteencoding.cpp b/kio/kio/kremoteencoding.cpp index 23fd0563d..632eeb8b2 100644 --- a/kio/kio/kremoteencoding.cpp +++ b/kio/kio/kremoteencoding.cpp @@ -37,13 +37,13 @@ TQString KRemoteEncoding::decode(const TQCString& name) const { #ifdef CHECK_UTF8 if (codec->mibEnum() == 106 && !KStringHandler::isUtf8(name)) - return TQString::tqfromLatin1(name); + return TQString::fromLatin1(name); #endif TQString result = codec->toUnicode(name); if (codec->fromUnicode(result) != name) // fallback in case of decoding failure - return TQString::tqfromLatin1(name); + return TQString::fromLatin1(name); return result; } diff --git a/kio/kio/kremoteencoding.h b/kio/kio/kremoteencoding.h index 35191d8e5..a2c730924 100644 --- a/kio/kio/kremoteencoding.h +++ b/kio/kio/kremoteencoding.h @@ -22,7 +22,7 @@ #include <kurl.h> #include <tqstring.h> #include <tqcstring.h> -#include <tqtextcodec.h> +#include <textcodec.h> class KRemoteEncodingPrivate; /** diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp index 2f488bc70..648264fa6 100644 --- a/kio/kio/krun.cpp +++ b/kio/kio/krun.cpp @@ -51,7 +51,7 @@ #include <dcopclient.h> #include <tqfile.h> #include <tqfileinfo.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqdatetime.h> #include <tqregexp.h> #include <kdesktopfile.h> @@ -388,13 +388,13 @@ TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List if (!re.search( exec )) { exec = TQString(re.cap( 1 )).stripWhiteSpace(); for (uint pos = 0; pos < exec.length(); ) { - TQChar c = exec.tqunicode()[pos]; + TQChar c = exec.unicode()[pos]; if (c != '\'' && c != '"') goto synerr; // what else can we do? after normal parsing the substs would be insecure int pos2 = exec.find( c, pos + 1 ) - 1; if (pos2 < 0) 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; exec.remove( pos, 2 ); } diff --git a/kio/kio/ksambashare.cpp b/kio/kio/ksambashare.cpp index 08da8352c..b6b0cc0ad 100644 --- a/kio/kio/ksambashare.cpp +++ b/kio/kio/ksambashare.cpp @@ -18,7 +18,7 @@ #include <tqdict.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kdirwatch.h> #include <kstaticdeleter.h> @@ -62,7 +62,7 @@ bool KSambaSharePrivate::load() { * @return wether a smb.conf was found. **/ bool KSambaSharePrivate::findSmbConf() { - KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true); + KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); smbConf = config.readEntry("SMBCONF"); if ( TQFile::exists(smbConf) ) diff --git a/kio/kio/kservicefactory.cpp b/kio/kio/kservicefactory.cpp index 47c3fc06b..c5784e65a 100644 --- a/kio/kio/kservicefactory.cpp +++ b/kio/kio/kservicefactory.cpp @@ -52,14 +52,14 @@ KServiceFactory::KServiceFactory() (*m_str) >> i; m_menuIdDictOffset = i; - int saveOffset = m_str->tqdevice()->tqat(); + int saveOffset = m_str->device()->at(); // Init index tables m_nameDict = new KSycocaDict(m_str, m_nameDictOffset); // Init index tables m_relNameDict = new KSycocaDict(m_str, m_relNameDictOffset); // Init index tables m_menuIdDict = new KSycocaDict(m_str, m_menuIdDictOffset); - saveOffset = m_str->tqdevice()->tqat(saveOffset); + saveOffset = m_str->device()->at(saveOffset); } else { @@ -225,7 +225,7 @@ KService::List KServiceFactory::allInitServices() // Assume we're NOT building a database - m_str->tqdevice()->tqat(m_initListOffset); + m_str->device()->at(m_initListOffset); TQ_INT32 entryCount; (*m_str) >> entryCount; @@ -253,7 +253,7 @@ KService::List KServiceFactory::offers( int serviceTypeOffset ) TQDataStream *str = m_str; // Jump to the offer list - str->tqdevice()->tqat( m_offerListOffset ); + str->device()->at( m_offerListOffset ); TQ_INT32 aServiceTypeOffset; TQ_INT32 aServiceOffset; @@ -268,13 +268,13 @@ KService::List KServiceFactory::offers( int serviceTypeOffset ) if ( aServiceTypeOffset == serviceTypeOffset ) { // Save stream position ! - int savedPos = str->tqdevice()->tqat(); + int savedPos = str->device()->at(); // Create Service KService * serv = createEntry( aServiceOffset ); if (serv) list.append( KService::Ptr( serv ) ); // Restore position - str->tqdevice()->tqat( savedPos ); + str->device()->at( savedPos ); } else if ( aServiceTypeOffset > (TQ_INT32)serviceTypeOffset ) break; // too far } diff --git a/kio/kio/kservicegroupfactory.cpp b/kio/kio/kservicegroupfactory.cpp index b693035a6..d27fab3e2 100644 --- a/kio/kio/kservicegroupfactory.cpp +++ b/kio/kio/kservicegroupfactory.cpp @@ -40,10 +40,10 @@ KServiceGroupFactory::KServiceGroupFactory() (*m_str) >> i; m_baseGroupDictOffset = i; - int saveOffset = m_str->tqdevice()->tqat(); + int saveOffset = m_str->device()->at(); // Init index tables m_baseGroupDict = new KSycocaDict(m_str, m_baseGroupDictOffset); - m_str->tqdevice()->tqat(saveOffset); + m_str->device()->at(saveOffset); } else { diff --git a/kio/kio/kservicetypefactory.cpp b/kio/kio/kservicetypefactory.cpp index 393526eff..f7c0f5969 100644 --- a/kio/kio/kservicetypefactory.cpp +++ b/kio/kio/kservicetypefactory.cpp @@ -118,14 +118,14 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt // Get stream to the header TQDataStream *str = m_str; - str->tqdevice()->tqat( m_fastPatternOffset ); + str->device()->at( m_fastPatternOffset ); TQ_INT32 nrOfEntries; (*str) >> nrOfEntries; TQ_INT32 entrySize; (*str) >> entrySize; - TQ_INT32 fastOffset = str->tqdevice()->tqat( ); + TQ_INT32 fastOffset = str->device()->at( ); TQ_INT32 matchingOffset = 0; @@ -145,7 +145,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt while (left <= right) { middle = (left + right) / 2; // read pattern at position "middle" - str->tqdevice()->tqat( middle * entrySize + fastOffset ); + str->device()->at( middle * entrySize + fastOffset ); KSycocaEntry::read(*str, pattern); int cmp = pattern.compare( extension ); if (cmp < 0) @@ -166,7 +166,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt // Now try the "other" Pattern table if ( m_patterns.isEmpty() ) { - str->tqdevice()->tqat( m_otherPatternOffset ); + str->device()->at( m_otherPatternOffset ); TQString pattern; TQ_INT32 mimetypeOffset; diff --git a/kio/kio/kshred.cpp b/kio/kio/kshred.cpp index 151cc69a6..f3997bf58 100644 --- a/kio/kio/kshred.cpp +++ b/kio/kio/kshred.cpp @@ -95,7 +95,7 @@ KShred::fillbyte(unsigned int byte) } if (!flush()) return false; - return file->tqat(0); + return file->at(0); } @@ -114,7 +114,7 @@ KShred::fillpattern(unsigned char *data, unsigned int size) } if (!flush()) return false; - return file->tqat(0); + return file->at(0); } @@ -140,7 +140,7 @@ KShred::fillrandom() } if (!flush()) return false; - return file->tqat(0); + return file->at(0); } diff --git a/kio/kio/ktar.cpp b/kio/kio/ktar.cpp index a9bd1faca..687da26f5 100644 --- a/kio/kio/ktar.cpp +++ b/kio/kio/ktar.cpp @@ -461,14 +461,14 @@ bool KTar::openArchive( int mode ) //kdDebug(7041) << "KTar::openArchive file " << nm << " size=" << size << endl; e = new KArchiveFile( this, nm, access, time, user, group, symlink, - dev->tqat(), size ); + dev->at(), size ); } // Skip contents + align bytes int rest = size % 0x200; int skip = size + (rest ? 0x200 - rest : 0); - //kdDebug(7041) << "KTar::openArchive, at()=" << dev->tqat() << " rest=" << rest << " skipping " << skip << endl; - if (! dev->tqat( dev->tqat() + skip ) ) + //kdDebug(7041) << "KTar::openArchive, at()=" << dev->at() << " rest=" << rest << " skipping " << skip << endl; + if (! dev->at( dev->at() + skip ) ) kdWarning(7041) << "KTar::openArchive skipping " << skip << " failed" << endl; } @@ -495,7 +495,7 @@ bool KTar::openArchive( int mode ) else { //qDebug("Terminating. Read %d bytes, first one is %d", n, buffer[0]); - d->tarEnd = dev->tqat() - n; // Remember end of archive + d->tarEnd = dev->at() - n; // Remember end of archive ende = true; } } while( !ende ); @@ -591,7 +591,7 @@ bool KTar::writeDir( const TQString& name, const TQString& user, const TQString& char buffer[ 0x201 ]; memset( buffer, 0, 0x200 ); - if ( mode() & IO_ReadWrite ) device()->tqat(d->tarEnd); // Go to end of archive as might have moved with a read + if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read // If more than 100 chars, we need to use the LongLink trick if ( dirName.length() > 99 ) @@ -616,7 +616,7 @@ bool KTar::writeDir( const TQString& name, const TQString& user, const TQString& // Write header device()->writeBlock( buffer, 0x200 ); - if ( mode() & IO_ReadWrite ) d->tarEnd = device()->tqat(); + if ( mode() & IO_ReadWrite ) d->tarEnd = device()->at(); d->dirList.append( dirName ); // contains trailing slash return true; // TODO if wanted, better error control @@ -633,10 +633,10 @@ bool KTar::prepareWriting( const TQString& name, const TQString& user, const TQS bool KTar::doneWriting( uint size ) { - // Write tqalignment + // Write alignment int rest = size % 0x200; if ( mode() & IO_ReadWrite ) - d->tarEnd = device()->tqat() + (rest ? 0x200 - rest : 0); // Record our new end of archive + d->tarEnd = device()->at() + (rest ? 0x200 - rest : 0); // Record our new end of archive if ( rest ) { char buffer[ 0x201 ]; @@ -799,7 +799,7 @@ bool KTar::prepareWriting_impl(const TQString &name, const TQString &user, char buffer[ 0x201 ]; memset( buffer, 0, 0x200 ); - if ( mode() & IO_ReadWrite ) device()->tqat(d->tarEnd); // Go to end of archive as might have moved with a read + if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read // provide converted stuff we need lateron TQCString encodedFilename = TQFile::encodeName(fileName); @@ -858,7 +858,7 @@ bool KTar::writeDir_impl(const TQString &name, const TQString &user, char buffer[ 0x201 ]; memset( buffer, 0, 0x200 ); - if ( mode() & IO_ReadWrite ) device()->tqat(d->tarEnd); // Go to end of archive as might have moved with a read + if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read // provide converted stuff we need lateron TQCString encodedDirname = TQFile::encodeName(dirName); @@ -882,7 +882,7 @@ bool KTar::writeDir_impl(const TQString &name, const TQString &user, // Write header device()->writeBlock( buffer, 0x200 ); - if ( mode() & IO_ReadWrite ) d->tarEnd = device()->tqat(); + if ( mode() & IO_ReadWrite ) d->tarEnd = device()->at(); d->dirList.append( dirName ); // contains trailing slash return true; // TODO if wanted, better error control @@ -916,7 +916,7 @@ bool KTar::writeSymLink_impl(const TQString &name, const TQString &target, char buffer[ 0x201 ]; memset( buffer, 0, 0x200 ); - if ( mode() & IO_ReadWrite ) device()->tqat(d->tarEnd); // Go to end of archive as might have moved with a read + if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read // provide converted stuff we need lateron TQCString encodedFilename = TQFile::encodeName(fileName); @@ -946,7 +946,7 @@ bool KTar::writeSymLink_impl(const TQString &name, const TQString &target, // Write header bool retval = device()->writeBlock( buffer, 0x200 ) == 0x200; - if ( mode() & IO_ReadWrite ) d->tarEnd = device()->tqat(); + if ( mode() & IO_ReadWrite ) d->tarEnd = device()->at(); return retval; } diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp index ab65e0c66..2c4c5b12e 100644 --- a/kio/kio/kurifilter.cpp +++ b/kio/kio/kurifilter.cpp @@ -35,7 +35,7 @@ template class TQPtrList<KURIFilterPlugin>; KURIFilterPlugin::KURIFilterPlugin( TQObject *parent, const char *name, double pri ) :TQObject( parent, name ) { - m_strName = TQString::tqfromLatin1( name ); + m_strName = TQString::fromLatin1( name ); m_dblPriority = pri; } @@ -173,30 +173,30 @@ TQString KURIFilterData::iconName() TQString exeName = m_pURI.url(); exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given KService::Ptr service = KService::serviceByDesktopName( exeName ); - if (service && service->icon() != TQString::tqfromLatin1( "unknown" )) + if (service && service->icon() != TQString::fromLatin1( "unknown" )) m_strIconName = service->icon(); // Try to find an icon with the same name as the binary (useful for non-kde apps) else if ( !KGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() ) m_strIconName = exeName; else // not found, use default - m_strIconName = TQString::tqfromLatin1("exec"); + m_strIconName = TQString::fromLatin1("exec"); break; } case KURIFilterData::HELP: { - m_strIconName = TQString::tqfromLatin1("khelpcenter"); + m_strIconName = TQString::fromLatin1("khelpcenter"); break; } case KURIFilterData::SHELL: { - m_strIconName = TQString::tqfromLatin1("konsole"); + m_strIconName = TQString::fromLatin1("konsole"); break; } case KURIFilterData::ERROR: case KURIFilterData::BLOCKED: { - m_strIconName = TQString::tqfromLatin1("error"); + m_strIconName = TQString::fromLatin1("error"); break; } default: diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp index 79a939530..445fc674b 100644 --- a/kio/kio/kurlcompletion.cpp +++ b/kio/kio/kurlcompletion.cpp @@ -35,7 +35,7 @@ #include <tqtimer.h> #include <tqdir.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqdeepcopy.h> #include <tqthread.h> @@ -750,7 +750,7 @@ bool KURLCompletion::userCompletion(const MyURL &url, TQString *match) { if ( url.protocol() != "file" || !url.dir().isEmpty() - || url.file().tqat(0) != '~' ) + || url.file().at(0) != '~' ) return false; if ( !isListedURL( CTUser ) ) { @@ -782,7 +782,7 @@ extern char **environ; // Array of environment variables bool KURLCompletion::envCompletion(const MyURL &url, TQString *match) { - if ( url.file().tqat(0) != '$' ) + if ( url.file().at(0) != '$' ) return false; if ( !isListedURL( CTEnv ) ) { @@ -861,7 +861,7 @@ bool KURLCompletion::exeCompletion(const MyURL &url, TQString *match) } // No hidden files unless the user types "." - bool no_hidden_files = url.file().tqat(0) != '.'; + bool no_hidden_files = url.file().at(0) != '.'; // List files if needed // @@ -921,7 +921,7 @@ bool KURLCompletion::systemexeCompletion(const MyURL &url, TQString *match) } // No hidden files unless the user types "." - bool no_hidden_files = url.file().tqat(0) != '.'; + bool no_hidden_files = url.file().at(0) != '.'; // List files if needed // @@ -995,7 +995,7 @@ bool KURLCompletion::fileCompletion(const MyURL &url, TQString *match) } // No hidden files unless the user types "." - bool no_hidden_files = ( url.file().tqat(0) != '.' ); + bool no_hidden_files = ( url.file().at(0) != '.' ); // List files if needed // @@ -1365,7 +1365,7 @@ void KURLCompletion::postProcessMatch( TQString *match ) const void KURLCompletion::adjustMatch( TQString& match ) const { - if ( match.tqat( match.length()-1 ) != '/' ) + if ( match.at( match.length()-1 ) != '/' ) { TQString copy; diff --git a/kio/kio/kurlpixmapprovider.cpp b/kio/kio/kurlpixmapprovider.cpp index c55546c55..caeedf066 100644 --- a/kio/kio/kurlpixmapprovider.cpp +++ b/kio/kio/kurlpixmapprovider.cpp @@ -22,7 +22,7 @@ TQPixmap KURLPixmapProvider::pixmapFor( const TQString& url, int size ) { KURL u; - if ( url.tqat(0) == '/' ) + if ( url.at(0) == '/' ) u.setPath( url ); else u = url; diff --git a/kio/kio/kzip.cpp b/kio/kio/kzip.cpp index ccc573697..a0bad4492 100644 --- a/kio/kio/kzip.cpp +++ b/kio/kio/kzip.cpp @@ -394,7 +394,7 @@ bool KZip::openArchive( int mode ) // ReadWrite mode still uses TQFile for now; we'd need to copy to the tempfile, in fact. if ( !m_filename.isEmpty() ) { setDevice( TQT_TQIODEVICE(new TQFile( m_filename )) ); - if ( !device()->tqopen( mode ) ) + if ( !device()->open( mode ) ) return false; } break; // continued below @@ -427,7 +427,7 @@ bool KZip::openArchive( int mode ) for (;;) // repeat until 'end of entries' signature is reached { kdDebug(7040) << "loop starts" << endl; -kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; +kdDebug(7040) << "dev->at() now : " << dev->at() << endl; n = dev->readBlock( buffer, 4 ); if (n < 4) @@ -449,7 +449,7 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; kdDebug(7040) << "PK34 found local file header" << endl; startOfFile = false; // can this fail ??? - dev->tqat( dev->tqat() + 2 ); // skip 'version needed to extract' + dev->at( dev->at() + 2 ); // skip 'version needed to extract' // read static header stuff n = dev->readBlock( buffer, 24 ); @@ -490,7 +490,7 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; // read and parse the beginning of the extra field, // skip rest of extra field in case it is too long - unsigned int extraFieldEnd = dev->tqat() + extralen; + unsigned int extraFieldEnd = dev->at() + extralen; pfi->extralen = extralen; int handledextralen = QMIN(extralen, (int)sizeof buffer); @@ -505,7 +505,7 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; } // jump to end of extra field - dev->tqat( extraFieldEnd ); + dev->at( extraFieldEnd ); // we have to take care of the 'general purpose bit flag'. // if bit 3 is set, the header doesn't contain the length of @@ -544,18 +544,18 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; if ( buffer[0] == 'K' && buffer[1] == 7 && buffer[2] == 8 ) { foundSignature = true; - dev->tqat( dev->tqat() + 12 ); // skip the 'data_descriptor' + dev->at( dev->at() + 12 ); // skip the 'data_descriptor' } else if ( ( buffer[0] == 'K' && buffer[1] == 1 && buffer[2] == 2 ) || ( buffer[0] == 'K' && buffer[1] == 3 && buffer[2] == 4 ) ) { foundSignature = true; - dev->tqat( dev->tqat() - 4 ); // go back 4 bytes, so that the magic bytes can be found... + dev->at( dev->at() - 4 ); // go back 4 bytes, so that the magic bytes can be found... } else if ( buffer[0] == 'P' || buffer[1] == 'P' || buffer[2] == 'P' ) { // We have another P character so we must go back a little to check if it is a magic - dev->tqat( dev->tqat() - 3 ); + dev->at( dev->at() - 3 ); } } @@ -611,14 +611,14 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; if ( buffer[0] == 'K' && buffer[1] == 7 && buffer[2] == 8 ) { foundSignature = true; - dev->tqat( dev->tqat() + 12 ); // skip the 'data_descriptor' + dev->at( dev->at() + 12 ); // skip the 'data_descriptor' } if ( ( buffer[0] == 'K' && buffer[1] == 1 && buffer[2] == 2 ) || ( buffer[0] == 'K' && buffer[1] == 3 && buffer[2] == 4 ) ) { foundSignature = true; - dev->tqat( dev->tqat() - 4 ); + dev->at( dev->at() - 4 ); // go back 4 bytes, so that the magic bytes can be found // in the next cycle... } @@ -626,10 +626,10 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; } else { -// kdDebug(7040) << "before interesting dev->tqat(): " << dev->tqat() << endl; +// kdDebug(7040) << "before interesting dev->at(): " << dev->at() << endl; bool success; - success = dev->tqat( dev->tqat() + compr_size ); // can this fail ??? -/* kdDebug(7040) << "after interesting dev->tqat(): " << dev->tqat() << endl; + success = dev->at( dev->at() + compr_size ); // can this fail ??? +/* kdDebug(7040) << "after interesting dev->at(): " << dev->at() << endl; if ( success ) kdDebug(7040) << "dev->at was successful... " << endl; else @@ -653,7 +653,7 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; // so we reached the central header at the end of the zip file // here we get all interesting data out of the central header // of a file - offset = dev->tqat() - 4; + offset = dev->at() - 4; //set offset for appending new files if ( d->m_offset == 0L ) d->m_offset = offset; @@ -792,7 +792,7 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; //calculate offset to next entry offset += 46 + commlen + extralen + namelen; - bool b = dev->tqat(offset); + bool b = dev->at(offset); Q_ASSERT( b ); if ( !b ) return false; @@ -832,12 +832,12 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; if ( buffer[0] == 'K' && buffer[1] == 3 && buffer[2] == 4 ) { foundSignature = true; - dev->tqat( dev->tqat() - 4 ); // go back 4 bytes, so that the magic bytes can be found... + dev->at( dev->at() - 4 ); // go back 4 bytes, so that the magic bytes can be found... } else if ( buffer[0] == 'P' || buffer[1] == 'P' || buffer[2] == 'P' ) { // We have another P character so we must go back a little to check if it is a magic - dev->tqat( dev->tqat() - 3 ); + dev->at( dev->at() - 3 ); } } } @@ -871,14 +871,14 @@ bool KZip::closeArchive() char buffer[ 22 ]; // first used for 12, then for 22 at the end uLong crc = crc32(0L, Z_NULL, 0); - TQ_LONG centraldiroffset = device()->tqat(); + TQ_LONG centraldiroffset = device()->at(); //kdDebug(7040) << "closearchive: centraldiroffset: " << centraldiroffset << endl; TQ_LONG atbackup = centraldiroffset; TQPtrListIterator<KZipFileEntry> it( d->m_fileList ); for ( ; it.current() ; ++it ) { //set crc and compressed size in each local file header - if ( !device()->tqat( it.current()->headerStart() + 14 ) ) + if ( !device()->at( it.current()->headerStart() + 14 ) ) return false; //kdDebug(7040) << "closearchive setcrcandcsize: filename: " // << it.current()->path() @@ -905,7 +905,7 @@ bool KZip::closeArchive() if ( device()->writeBlock( buffer, 12 ) != 12 ) return false; } - device()->tqat( atbackup ); + device()->at( atbackup ); for ( it.toFirst(); it.current() ; ++it ) { @@ -994,9 +994,9 @@ bool KZip::closeArchive() if ( !ok ) return false; } - TQ_LONG centraldirendoffset = device()->tqat(); + TQ_LONG centraldirendoffset = device()->at(); //kdDebug(7040) << "closearchive: centraldirendoffset: " << centraldirendoffset << endl; - //kdDebug(7040) << "closearchive: device()->tqat(): " << device()->tqat() << endl; + //kdDebug(7040) << "closearchive: device()->at(): " << device()->at() << endl; //write end of central dir record. buffer[ 0 ] = 'P'; //end of central dir signature @@ -1107,7 +1107,7 @@ bool KZip::prepareWriting_impl(const TQString &name, const TQString &user, } // set right offset in zip. - if ( !device()->tqat( d->m_offset ) ) { + if ( !device()->at( d->m_offset ) ) { kdWarning(7040) << "prepareWriting_impl: cannot seek in ZIP file. Disk full?" << endl; abort(); return false; @@ -1144,9 +1144,9 @@ bool KZip::prepareWriting_impl(const TQString &name, const TQString &user, // construct a KZipFileEntry and add it to list KZipFileEntry * e = new KZipFileEntry( this, fileName, perm, mtime, user, group, TQString::null, - name, device()->tqat() + 30 + name.length(), // start + name, device()->at() + 30 + name.length(), // start 0 /*size unknown yet*/, d->m_compression, 0 /*csize unknown yet*/ ); - e->setHeaderStart( device()->tqat() ); + e->setHeaderStart( device()->at() ); //kdDebug(7040) << "wrote file start: " << e->position() << " name: " << name << endl; parentDir->addEntry( e ); @@ -1274,13 +1274,13 @@ bool KZip::doneWriting( uint size ) Q_ASSERT( d->m_currentFile ); //kdDebug(7040) << "donewriting reached." << endl; //kdDebug(7040) << "filename: " << d->m_currentFile->path() << endl; - //kdDebug(7040) << "getpos (at): " << device()->tqat() << endl; + //kdDebug(7040) << "getpos (at): " << device()->at() << endl; d->m_currentFile->setSize(size); int extra_field_len = 0; if ( d->m_extraField == ModificationTime ) extra_field_len = 17; // value also used in doneWriting() - int csize = device()->tqat() - + int csize = device()->at() - d->m_currentFile->headerStart() - 30 - d->m_currentFile->path().length() - extra_field_len; d->m_currentFile->setCompressedSize(csize); @@ -1294,7 +1294,7 @@ bool KZip::doneWriting( uint size ) d->m_currentFile = 0L; // update saved offset for appending new files - d->m_offset = device()->tqat(); + d->m_offset = device()->at(); return true; } diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp index 795f9a8b1..e6c3d655b 100644 --- a/kio/kio/netaccess.cpp +++ b/kio/kio/netaccess.cpp @@ -373,7 +373,7 @@ bool NetAccess::mkdirInternal( const KURL & url, int permissions, TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window ) { bJobOK = true; // success unless further error occurs - m_mimetype = TQString::tqfromLatin1("unknown"); + m_mimetype = TQString::fromLatin1("unknown"); KIO::Job * job = KIO::mimetype( url ); job->setWindow (window); connect( job, TQT_SIGNAL( result (KIO::Job *) ), @@ -462,7 +462,7 @@ bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* connect( job, TQT_SIGNAL( result (KIO::Job *) ), this, TQT_SLOT( slotResult (KIO::Job *) ) ); - TQMetaObject *meta = job->tqmetaObject(); + TQMetaObject *meta = job->metaObject(); static const char dataSignal[] = "data(KIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)"; if ( meta->findSignal( dataSignal ) != -1 ) { diff --git a/kio/kio/netaccess.h b/kio/kio/netaccess.h index 3fb9103af..110c18053 100644 --- a/kio/kio/netaccess.h +++ b/kio/kio/netaccess.h @@ -92,7 +92,7 @@ public: * } * \endcode * - * Of course, your user interface will still process exposure/tqrepaint + * Of course, your user interface will still process exposure/repaint * events during the download. * * If the download fails, lastError() and lastErrorString() will be set. diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp index a71f7881f..dc72d3a1d 100644 --- a/kio/kio/passdlg.cpp +++ b/kio/kio/passdlg.cpp @@ -22,9 +22,9 @@ #include <tqcheckbox.h> #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsimplerichtext.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <kcombobox.h> #include <kconfig.h> @@ -198,7 +198,7 @@ static void calculateLabelSize(TQLabel *label) // Calculate a proper size for the text. { TQSimpleRichText rt(qt_text, label->font()); - TQRect d = KGlobalSettings::desktopGeometry(label->tqtopLevelWidget()); + TQRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget()); pref_width = d.width() / 4; rt.setWidth(pref_width-10); diff --git a/kio/kio/paste.cpp b/kio/kio/paste.cpp index 99714ffa7..6f70f0f2c 100644 --- a/kio/kio/paste.cpp +++ b/kio/kio/paste.cpp @@ -36,9 +36,9 @@ #include <ktempfile.h> #include <tqapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqdragobject.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvaluevector.h> static KURL getNewFileName( const KURL &u, const TQString& text ) @@ -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 // In that case, get it again. Let's hope the user didn't copy something else meanwhile :/ if ( clipboard ) { - data = TQApplication::tqclipboard()->data(); + data = TQApplication::clipboard()->data(); } const TQByteArray ba = data->encodedData( chosenFormat ); return pasteDataAsyncTo( new_url, ba ); @@ -146,13 +146,13 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data, KIO_EXPORT bool KIO::isClipboardEmpty() { #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 ) return false; #else // Happens with some versions of Qt Embedded... :/ // Guess. - TQString data = TQApplication::tqclipboard()->text(); + TQString data = TQApplication::clipboard()->text(); if(data.contains("://")) return false; #endif @@ -215,7 +215,7 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move ) } #ifndef QT_NO_MIMECLIPBOARD - TQMimeSource *data = TQApplication::tqclipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); // First check for 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 ( move ) - TQApplication::tqclipboard()->clear(); + TQApplication::clipboard()->clear(); return res; } return pasteMimeSource( data, dest_url, TQString::null, 0 /*TODO parent widget*/, true /*clipboard*/ ); #else TQByteArray ba; TQTextStream txtStream( ba, IO_WriteOnly ); - TQStringList data = TQStringList::split("\n", TQApplication::tqclipboard()->text()); + TQStringList data = TQStringList::split("\n", TQApplication::clipboard()->text()); KURL::List urls; KURLDrag::decode(data, urls); 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() { - TQMimeSource *data = TQApplication::tqclipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); KURL::List urls; if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) { if ( urls.isEmpty() ) diff --git a/kio/kio/pastedialog.cpp b/kio/kio/pastedialog.cpp index f698d2de3..acea66815 100644 --- a/kio/kio/pastedialog.cpp +++ b/kio/kio/pastedialog.cpp @@ -22,11 +22,11 @@ #include <kmimetype.h> #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqcombobox.h> #include <tqapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label, const TQString &value, const TQStringList& items, @@ -62,7 +62,7 @@ KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label, m_clipboardChanged = false; if ( clipboard ) - connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( slotClipboardDataChanged() ) ); } diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp index 0fc13b4b2..3b428c847 100644 --- a/kio/kio/previewjob.cpp +++ b/kio/kio/previewjob.cpp @@ -96,7 +96,7 @@ struct KIO::PreviewJobPrivate // If the file to create a thumb for was a temp file, this is its name TQString tempName; // Over that, it's too much - unsigned long tqmaximumSize; + unsigned long maximumSize; // the size for the icon overlay int iconSize; // the transparency of the blended mimetype icon @@ -246,7 +246,7 @@ void PreviewJob::startPreview() // Read configuration value for the maximum allowed size KConfig * config = KGlobal::config(); KConfigGroupSaver cgs( config, "PreviewSettings" ); - d->tqmaximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ ); + d->maximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ ); if (bNeedCache) { @@ -339,7 +339,7 @@ void PreviewJob::slotResult( KIO::Job *job ) } else if ( (*it).m_uds == KIO::UDS_SIZE ) { - if ( filesize_t((*it).m_long) > d->tqmaximumSize && + if ( filesize_t((*it).m_long) > d->maximumSize && !d->ignoreMaximumSize && !d->currentItem.plugin->property("IgnoreMaximumSize").toBool() ) { diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp index 722f2874b..041bd80ff 100644 --- a/kio/kio/renamedlg.cpp +++ b/kio/kio/renamedlg.cpp @@ -26,7 +26,7 @@ #include <tqfileinfo.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqdir.h> diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp index 5bda16786..9b518b1ef 100644 --- a/kio/kio/scheduler.cpp +++ b/kio/kio/scheduler.cpp @@ -346,7 +346,7 @@ bool Scheduler::startJobScheduled(ProtocolInfo *protInfo) // Prevent starvation. We skip the first entry in the queue at most // 2 times in a row. The protInfo->skipCount = 0; - job = protInfo->joblist.tqat(0); + job = protInfo->joblist.at(0); slave = findIdleSlave(protInfo, job, dummy ); } else @@ -356,7 +356,7 @@ bool Scheduler::startJobScheduled(ProtocolInfo *protInfo) Slave *firstSlave = 0; for(uint i = 0; (i < protInfo->joblist.count()) && (i < 10); i++) { - job = protInfo->joblist.tqat(i); + job = protInfo->joblist.at(i); slave = findIdleSlave(protInfo, job, exact); if (!firstSlave) { diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp index 937d6aa51..8f42aaac8 100644 --- a/kio/kio/sessiondata.cpp +++ b/kio/kio/sessiondata.cpp @@ -19,7 +19,7 @@ */ #include <tqptrlist.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kdebug.h> #include <kconfig.h> @@ -273,7 +273,7 @@ void SessionData::reset() // Get language settings... TQStringList languageList = KGlobal::locale()->languagesTwoAlpha(); - TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") ); if ( it != languageList.end() ) { if ( languageList.contains( english ) > 0 ) @@ -286,7 +286,7 @@ void SessionData::reset() d->language = languageList.join( ", " ); - d->charsets = TQString::tqfromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower(); + d->charsets = TQString::fromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower(); KProtocolManager::reparseConfiguration(); } diff --git a/kio/kio/skipdlg.cpp b/kio/kio/skipdlg.cpp index 0fe7b230b..7cecdaf69 100644 --- a/kio/kio/skipdlg.cpp +++ b/kio/kio/skipdlg.cpp @@ -23,7 +23,7 @@ #include <tqmessagebox.h> #include <tqwidget.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <kapplication.h> diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp index b4f288d94..4826c8da8 100644 --- a/kio/kio/slave.cpp +++ b/kio/kio/slave.cpp @@ -364,7 +364,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error client->attach(); TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName()); - KTempFile socketfile(prefix, TQString::tqfromLatin1(".slave-socket")); + KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket")); if ( socketfile.status() != 0 ) { error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno)); @@ -469,7 +469,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url ) client->attach(); TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName()); - KTempFile socketfile(prefix, TQString::tqfromLatin1(".slave-socket")); + KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket")); if ( socketfile.status() != 0 ) return 0; diff --git a/kio/kio/slavebase.h b/kio/kio/slavebase.h index 48fccd74e..82370ce56 100644 --- a/kio/kio/slavebase.h +++ b/kio/kio/slavebase.h @@ -618,10 +618,10 @@ public: * KIO::AuthInfo authInfo; * if ( openPassDlg( authInfo ) ) * { - * kdDebug() << TQString::tqfromLatin1("User: ") + * kdDebug() << TQString::fromLatin1("User: ") * << authInfo.username << endl; - * kdDebug() << TQString::tqfromLatin1("Password: ") - * << TQString::tqfromLatin1("Not displayed here!") << endl; + * kdDebug() << TQString::fromLatin1("Password: ") + * << TQString::fromLatin1("Not displayed here!") << endl; * } * \endcode * @@ -635,10 +635,10 @@ public: * TQString errorMsg = "You entered an incorrect password."; * if ( openPassDlg( authInfo, errorMsg ) ) * { - * kdDebug() << TQString::tqfromLatin1("User: ") + * kdDebug() << TQString::fromLatin1("User: ") * << authInfo.username << endl; - * kdDebug() << TQString::tqfromLatin1("Password: ") - * << TQString::tqfromLatin1("Not displayed here!") << endl; + * kdDebug() << TQString::fromLatin1("Password: ") + * << TQString::fromLatin1("Not displayed here!") << endl; * } * \endcode * diff --git a/kio/kio/statusbarprogress.cpp b/kio/kio/statusbarprogress.cpp index 777f96e58..bcbab1334 100644 --- a/kio/kio/statusbarprogress.cpp +++ b/kio/kio/statusbarprogress.cpp @@ -17,7 +17,7 @@ */ #include <tqtooltip.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwidgetstack.h> #include <tqpushbutton.h> #include <tqlabel.h> diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp index 06694dd72..42cbad3a4 100644 --- a/kio/kpasswdserver/kpasswdserver.cpp +++ b/kio/kpasswdserver/kpasswdserver.cpp @@ -94,7 +94,7 @@ static TQString makeWalletKey( const TQString& key, const TQString& realm ) // Helper for storeInWallet/readFromWallet static TQString makeMapKey( const char* key, int entryNumber ) { - TQString str = TQString::tqfromLatin1( key ); + TQString str = TQString::fromLatin1( key ); if ( entryNumber > 1 ) str += "-" + TQString::number( entryNumber ); return str; diff --git a/kio/kssl/keygenwizard.ui b/kio/kssl/keygenwizard.ui index 2130c767b..4cb5fe1df 100644 --- a/kio/kssl/keygenwizard.ui +++ b/kio/kssl/keygenwizard.ui @@ -30,7 +30,7 @@ <property name="scaledContents"> <bool>false</bool> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property name="wordwrap" stdset="0"> diff --git a/kio/kssl/keygenwizard2.ui b/kio/kssl/keygenwizard2.ui index a0d200428..90fef8fef 100644 --- a/kio/kssl/keygenwizard2.ui +++ b/kio/kssl/keygenwizard2.ui @@ -24,7 +24,7 @@ <property name="text"> <string>You must now provide a password for the certificate request. Please choose a very secure password as this will be used to encrypt your private key.</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property name="wordwrap" stdset="0"> diff --git a/kio/kssl/ksslcertdlg.cc b/kio/kssl/ksslcertdlg.cc index 511bd4021..88de77c90 100644 --- a/kio/kssl/ksslcertdlg.cc +++ b/kio/kssl/ksslcertdlg.cc @@ -22,7 +22,7 @@ #include <kssl.h> -#include <tqlayout.h> +#include <layout.h> #include <tqradiobutton.h> #include <tqcheckbox.h> #include <tqlistview.h> diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc index 7211e510f..285bb1d2d 100644 --- a/kio/kssl/ksslcertificate.cc +++ b/kio/kssl/ksslcertificate.cc @@ -246,7 +246,7 @@ TQString KSSLCertificate::getMD5DigestFromKDEKey(const TQString &k) { int pos = k.findRev('('); if (pos != -1) { unsigned int len = k.length(); - if (k.tqat(len-1) == ')') { + if (k.at(len-1) == ')') { rc = k.mid(pos+1, len-pos-2); } } @@ -871,7 +871,7 @@ TQDateTime KSSLCertificate::getQDTNotBefore() const { #ifdef KSSL_HAVE_SSL return ASN1_UTCTIME_QDateTime(X509_get_notBefore(d->m_cert), NULL); #else -return TQDateTime::tqcurrentDateTime(); +return TQDateTime::currentDateTime(); #endif } @@ -880,7 +880,7 @@ TQDateTime KSSLCertificate::getQDTNotAfter() const { #ifdef KSSL_HAVE_SSL return ASN1_UTCTIME_QDateTime(X509_get_notAfter(d->m_cert), NULL); #else -return TQDateTime::tqcurrentDateTime(); +return TQDateTime::currentDateTime(); #endif } diff --git a/kio/kssl/ksslinfodlg.cc b/kio/kssl/ksslinfodlg.cc index 32580e932..cb7dc2e96 100644 --- a/kio/kssl/ksslinfodlg.cc +++ b/kio/kssl/ksslinfodlg.cc @@ -23,7 +23,7 @@ #include <kssl.h> -#include <tqlayout.h> +#include <layout.h> #include <kpushbutton.h> #include <tqframe.h> #include <tqlabel.h> @@ -273,14 +273,14 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) { d->_serialNum->setText(x->getSerialNumber()); cspl = d->_validFrom->palette(); - if (x->getQDTNotBefore() > TQDateTime::tqcurrentDateTime(Qt::UTC)) + if (x->getQDTNotBefore() > TQDateTime::currentDateTime(Qt::UTC)) cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); d->_validFrom->setPalette(cspl); d->_validFrom->setText(x->getNotBefore()); cspl = d->_validUntil->palette(); - if (x->getQDTNotAfter() < TQDateTime::tqcurrentDateTime(Qt::UTC)) + if (x->getQDTNotAfter() < TQDateTime::currentDateTime(Qt::UTC)) cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); d->_validUntil->setPalette(cspl); @@ -305,8 +305,8 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) { ksv = ksvl.first(); if (ksv == KSSLCertificate::SelfSigned) { - if (x->getQDTNotAfter() > TQDateTime::tqcurrentDateTime(Qt::UTC) && - x->getQDTNotBefore() < TQDateTime::tqcurrentDateTime(Qt::UTC)) { + if (x->getQDTNotAfter() > TQDateTime::currentDateTime(Qt::UTC) && + x->getQDTNotBefore() < TQDateTime::currentDateTime(Qt::UTC)) { if (KSSLSigners().useForSSL(*x)) ksv = KSSLCertificate::Ok; } else { @@ -348,7 +348,7 @@ void KSSLInfoDlg::slotChain(int x) { cl.setAutoDelete(true); for (int i = 0; i < x-1; i++) cl.remove((unsigned int)0); - KSSLCertificate thisCert = *(cl.tqat(0)); + KSSLCertificate thisCert = *(cl.at(0)); cl.remove((unsigned int)0); thisCert.chain().setChain(cl); displayCert(&thisCert); diff --git a/kio/kssl/ksslpeerinfo.cc b/kio/kssl/ksslpeerinfo.cc index 8d960ceb7..d1c2d00fc 100644 --- a/kio/kssl/ksslpeerinfo.cc +++ b/kio/kssl/ksslpeerinfo.cc @@ -65,7 +65,7 @@ void KSSLPeerInfo::setPeerHost(TQString realHost) { #ifdef Q_WS_WIN //TODO kresolver not ported d->peerHost = d->peerHost.lower(); #else - d->peerHost = TQString::tqfromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost)); + d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost)); #endif } diff --git a/kio/kssl/ksslsettings.cc b/kio/kssl/ksslsettings.cc index d9286433e..5a77b12bf 100644 --- a/kio/kssl/ksslsettings.cc +++ b/kio/kssl/ksslsettings.cc @@ -182,7 +182,7 @@ TQString KSSLSettings::getCipherList() { // Also remove NULL ciphers and 168bit ciphers for (unsigned int i = 0; i < cipherList.count(); i++) { CipherNode *j = 0L; - while ((j = cipherList.tqat(i)) != 0L) { + while ((j = cipherList.at(i)) != 0L) { if (j->name.contains("ADH-") || j->name.contains("NULL-") || j->name.contains("DES-CBC3-SHA") || j->name.contains("FZA")) { cipherList.remove(j); } else { diff --git a/kio/misc/kntlm/kntlm.cpp b/kio/misc/kntlm/kntlm.cpp index db2b45b6c..9af382483 100644 --- a/kio/misc/kntlm/kntlm.cpp +++ b/kio/misc/kntlm/kntlm.cpp @@ -32,7 +32,7 @@ #include "des.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 TQ_UINT32 offset; @@ -45,10 +45,10 @@ TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tq TQString str; const char *c = buf.data() + offset; - if ( tqunicode ) { + if ( unicode ) { str = UnicodeLE2TQString( (TQChar*) c, len >> 1 ); } else { - str = TQString::tqfromLatin1( c, len ); + str = TQString::fromLatin1( c, len ); } return str; } @@ -67,11 +67,11 @@ TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf ) 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; - if ( tqunicode ) { + if ( unicode ) { tmp = QString2UnicodeLE( str ); addBuf( buf, secbuf, tmp ); } else { @@ -126,15 +126,15 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt Challenge *ch = (Challenge *) challenge.data(); TQByteArray response; uint chsize = challenge.size(); - bool tqunicode = false; + bool unicode = false; TQString dom; //challenge structure too small if ( chsize < 32 ) return false; - tqunicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; + unicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; if ( domain.isEmpty() ) - dom = getString( challenge, ch->targetName, tqunicode ); + dom = getString( challenge, ch->targetName, unicode ); else dom = domain; @@ -164,10 +164,10 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response ); // } if ( !dom.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->domain, dom, tqunicode ); - addString( rbuf, ((Auth*) rbuf.data())->user, user, tqunicode ); + addString( rbuf, ((Auth*) rbuf.data())->domain, dom, unicode ); + addString( rbuf, ((Auth*) rbuf.data())->user, user, unicode ); if ( !workstation.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, tqunicode ); + addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, unicode ); auth = rbuf; @@ -241,10 +241,10 @@ TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned cha TQByteArray KNTLM::ntlmHash( const TQString &password ) { KMD4::Digest digest; - TQByteArray ret, tqunicode; - tqunicode = QString2UnicodeLE( password ); + TQByteArray ret, unicode; + unicode = QString2UnicodeLE( password ); - KMD4 md4( tqunicode ); + KMD4 md4( unicode ); md4.rawDigest( digest ); ret.duplicate( (const char*) digest, sizeof( digest ) ); return ret; @@ -299,7 +299,7 @@ TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo ) Blob *bl = (Blob *) blob.data(); bl->signature = KFromToBigEndian( (TQ_UINT32) 0x01010000 ); - TQ_UINT64 now = TQDateTime::tqcurrentDateTime().toTime_t(); + TQ_UINT64 now = TQDateTime::currentDateTime().toTime_t(); now += (TQ_UINT64)3600*(TQ_UINT64)24*(TQ_UINT64)134774; now *= (TQ_UINT64)10000000; bl->timestamp = KFromToLittleEndian( now ); @@ -372,18 +372,18 @@ void KNTLM::convertKey( unsigned char *key_56, void* ks ) TQByteArray KNTLM::QString2UnicodeLE( const TQString &target ) { - TQByteArray tqunicode( target.length() * 2 ); + TQByteArray unicode( target.length() * 2 ); 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 ret; for ( uint i = 0; i < len; i++ ) { - ret += KFromToLittleEndian( data[ i ].tqunicode() ); + ret += KFromToLittleEndian( data[ i ].unicode() ); } return ret; } diff --git a/kio/misc/kntlm/kntlm.h b/kio/misc/kntlm/kntlm.h index 2be0a00af..462624fcd 100644 --- a/kio/misc/kntlm/kntlm.h +++ b/kio/misc/kntlm/kntlm.h @@ -212,7 +212,7 @@ public: /** * 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. */ @@ -226,7 +226,7 @@ private: static TQString UnicodeLE2TQString( const TQChar* data, uint len ); 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 ); }; diff --git a/kio/misc/kpac/downloader.cpp b/kio/misc/kpac/downloader.cpp index 6f419f5f5..f301cc697 100644 --- a/kio/misc/kpac/downloader.cpp +++ b/kio/misc/kpac/downloader.cpp @@ -21,7 +21,7 @@ #include <cstdlib> #include <cstring> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kcharsets.h> #include <kglobal.h> diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp index 243f5f9c2..55faef8a1 100644 --- a/kio/misc/kpac/script.cpp +++ b/kio/misc/kpac/script.cpp @@ -49,7 +49,7 @@ TQString UString::qstring() const UString::UString( const TQString &s ) { 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() ); } diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp index 46475e9aa..ae446da65 100644 --- a/kio/misc/ksendbugmail/main.cpp +++ b/kio/misc/ksendbugmail/main.cpp @@ -6,7 +6,7 @@ #include <stdlib.h> #include <unistd.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kapplication.h> #include <kemailsettings.h> @@ -74,7 +74,7 @@ int main(int argc, char **argv) { if (recipient.isEmpty()) recipient = "submit@bugs.kde.org"; else { - if (recipient.tqat(0) == '\'') { + if (recipient.at(0) == '\'') { recipient = recipient.mid(1).left(recipient.length() - 2); } } @@ -84,7 +84,7 @@ int main(int argc, char **argv) { if (subject.isEmpty()) subject = "(no subject)"; else { - if (subject.tqat(0) == '\'') + if (subject.at(0) == '\'') subject = subject.mid(1).left(subject.length() - 2); } TQTextIStream input(stdin); @@ -101,11 +101,11 @@ int main(int argc, char **argv) { if (!fromaddr.isEmpty()) { TQString name = emailConfig.getSetting(KEMailSettings::RealName); if (!name.isEmpty()) - fromaddr = name + TQString::tqfromLatin1(" <") + fromaddr + TQString::tqfromLatin1(">"); + fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">"); } else { struct passwd *p; p = getpwuid(getuid()); - fromaddr = TQString::tqfromLatin1(p->pw_name); + fromaddr = TQString::fromLatin1(p->pw_name); fromaddr += "@"; char buffer[256]; buffer[0] = '\0'; @@ -117,7 +117,7 @@ int main(int argc, char **argv) { TQString server = emailConfig.getSetting(KEMailSettings::OutServer); if (server.isEmpty()) - server=TQString::tqfromLatin1("bugs.kde.org"); + server=TQString::fromLatin1("bugs.kde.org"); SMTP *sm = new SMTP; BugMailer bm(sm); @@ -129,7 +129,7 @@ int main(int argc, char **argv) { sm->setSenderAddress(fromaddr); sm->setRecipientAddress(recipient); sm->setMessageSubject(subject); - sm->setMessageHeader(TQString::tqfromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient.data())); + sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient.data())); sm->setMessageBody(text); sm->sendMessage(); diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp index a9f69792d..36a417b88 100644 --- a/kio/misc/ksendbugmail/smtp.cpp +++ b/kio/misc/ksendbugmail/smtp.cpp @@ -134,7 +134,7 @@ void SMTP::sendMessage(void) kdDebug() << "state was == FINISHED\n" << endl; finished = false; state = IN; - writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); write(sock->socket(), writeString.ascii(), writeString.length()); } if(connected){ @@ -262,7 +262,7 @@ void SMTP::processLine(TQString *line) switch(stat){ case GREET: //220 state = IN; - writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; @@ -273,19 +273,19 @@ void SMTP::processLine(TQString *line) switch(state){ case IN: state = READY; - writeString = TQString::tqfromLatin1("mail from: %1\r\n").arg(senderAddress); + writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; case READY: state = SENTFROM; - writeString = TQString::tqfromLatin1("rcpt to: %1\r\n").arg(recipientAddress); + writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; case SENTFROM: state = SENTTO; - writeString = TQString::tqfromLatin1("data\r\n"); + writeString = TQString::fromLatin1("data\r\n"); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; @@ -305,11 +305,11 @@ void SMTP::processLine(TQString *line) break; case READYDATA: //354 state = DATA; - writeString = TQString::tqfromLatin1("Subject: %1\r\n").arg(messageSubject); + writeString = TQString::fromLatin1("Subject: %1\r\n").arg(messageSubject); writeString += messageHeader; writeString += "\r\n"; writeString += messageBody; - writeString += TQString::tqfromLatin1(".\r\n"); + writeString += TQString::fromLatin1(".\r\n"); kdDebug() << "out: " << writeString; write(sock->socket(), writeString.ascii(), writeString.length()); break; diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp index 45d523d2e..760e654d7 100644 --- a/kio/misc/kssld/kssld.cpp +++ b/kio/misc/kssld/kssld.cpp @@ -72,7 +72,7 @@ static void updatePoliciesConfig(KConfig *cfg) { cfg->setGroup(*i); // remove it if it has expired - if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::tqcurrentDateTime()) { + if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::currentDateTime()) { cfg->deleteGroup(*i); continue; } @@ -164,7 +164,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (node->permanent || - node->expires > TQDateTime::tqcurrentDateTime()) { + node->expires > TQDateTime::currentDateTime()) { // First convert to a binary format and then write the // kconfig entry write the (CN, policy, cert) to // KSimpleConfig @@ -239,7 +239,7 @@ TQStringList groups = cfg->groupList(); // remove it if it has expired if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { cfg->deleteGroup(*i); continue; } @@ -278,7 +278,7 @@ KSSLCNode *node; node->permanent = permanent; if (!permanent) { - node->expires = TQDateTime::tqcurrentDateTime(); + node->expires = TQDateTime::currentDateTime(); // FIXME: make this configurable node->expires = TQT_TQDATETIME_OBJECT(node->expires.addSecs(3600)); } @@ -297,7 +297,7 @@ KSSLCNode *node; certList.prepend(n); if (!permanent) { - n->expires = TQDateTime::tqcurrentDateTime(); + n->expires = TQDateTime::currentDateTime(); n->expires = TQT_TQDATETIME_OBJECT(n->expires.addSecs(3600)); } @@ -312,7 +312,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -338,7 +338,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -362,7 +362,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -386,7 +386,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -410,7 +410,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -535,7 +535,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); @@ -563,7 +563,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); @@ -593,7 +593,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); @@ -867,7 +867,7 @@ void KSSLD::searchAddCert(KSSLCertificate *cert) { if (elem.findRef(cert) == -1) { unsigned int n = 0; for(; n < elem.size(); n++) { - if (!elem.tqat(n)) { + if (!elem.at(n)) { elem.insert(n, cert); break; } @@ -912,7 +912,7 @@ TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) { TQPtrVector<KSSLCertificate> &elem = *it; for (unsigned int n = 0; n < elem.size(); n++) { - KSSLCertificate *cert = elem.tqat(n); + KSSLCertificate *cert = elem.at(n); if (cert) { rc.append(cert->getKDEKey()); } diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp index 3815277c5..0cbc891c4 100644 --- a/kio/misc/kwalletd/kwalletd.cpp +++ b/kio/misc/kwalletd/kwalletd.cpp @@ -42,10 +42,10 @@ #include <tqdir.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqregexp.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqvbox.h> #include <assert.h> diff --git a/kio/misc/kwalletd/kwalletwizard.ui b/kio/misc/kwalletd/kwalletwizard.ui index 6f94e5643..9d9c83def 100644 --- a/kio/misc/kwalletd/kwalletwizard.ui +++ b/kio/misc/kwalletd/kwalletwizard.ui @@ -58,7 +58,7 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignCenter</set> </property> </widget> @@ -83,7 +83,7 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -233,7 +233,7 @@ <property name="text"> <string>Enter a new password:</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -250,7 +250,7 @@ <property name="text"> <string>Verify password:</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> @@ -376,7 +376,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> @@ -403,7 +403,7 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp index 87f95fb29..f49060696 100644 --- a/kio/misc/uiserver.cpp +++ b/kio/misc/uiserver.cpp @@ -46,7 +46,7 @@ #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpopupmenu.h> #include <tqheader.h> @@ -418,7 +418,7 @@ void ProgressItem::slotToggleDefaultProgress() { // Called when a rename or skip dialog pops up // We want to prevent someone from killing the job in the uiserver then -void ProgressItem::tqsetVisible( bool visible ) { +void ProgressItem::setVisible( bool visible ) { if ( m_visible != visible ) { m_visible = visible; @@ -792,7 +792,7 @@ ProgressItem* UIServer::findItem( int id ) void UIServer::setItemVisible( ProgressItem * item, bool visible ) { - item->tqsetVisible( visible ); + item->setVisible( visible ); // Check if we were the last one to be visible // or the first one -> hide/show the list in that case // (Note that the user could have hidden the listview by hand yet, no time) diff --git a/kio/misc/uiserver.h b/kio/misc/uiserver.h index 74c1a681e..85e255a43 100644 --- a/kio/misc/uiserver.h +++ b/kio/misc/uiserver.h @@ -118,7 +118,7 @@ public: bool keepOpen() const; void finished(); - void tqsetVisible( bool visible ); + void setVisible( bool visible ); void setDefaultProgressVisible( bool visible ); bool isVisible() const { return m_visible; } diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp index 3b7a6c6d3..c5dfba9d2 100644 --- a/kio/tests/jobtest.cpp +++ b/kio/tests/jobtest.cpp @@ -532,7 +532,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) void JobTest::copyFileToSystem() { - if ( !KProtocolInfo::isKnownProtocol( TQString::tqfromLatin1( "system" ) ) ) { + if ( !KProtocolInfo::isKnownProtocol( TQString::fromLatin1( "system" ) ) ) { kdDebug() << k_funcinfo << "no kio_system, skipping test" << endl; return; } diff --git a/kio/tests/kacltest.cpp b/kio/tests/kacltest.cpp index 348d35e34..e97f7c110 100644 --- a/kio/tests/kacltest.cpp +++ b/kio/tests/kacltest.cpp @@ -80,22 +80,22 @@ int main(int argc, char *argv[]) } #ifdef Q_OS_FREEBSD -static const TQString s_group1 = TQString::tqfromLatin1("staff"); -static const TQString s_group2 = TQString::tqfromLatin1("guest"); +static const TQString s_group1 = TQString::fromLatin1("staff"); +static const TQString s_group2 = TQString::fromLatin1("guest"); #else -static const TQString s_group1 = TQString::tqfromLatin1("audio"); -static const TQString s_group2 = TQString::tqfromLatin1("users"); +static const TQString s_group1 = TQString::fromLatin1("audio"); +static const TQString s_group2 = TQString::fromLatin1("users"); #endif -static const TQString s_testACL = TQString::tqfromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); -static const TQString s_testACL2 = TQString::tqfromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + - TQString::tqfromLatin1( "group:" ) + s_group1 + TQString::tqfromLatin1( ":--x\n" ) + - TQString::tqfromLatin1( "group:" ) + s_group2 + TQString::tqfromLatin1( ":r--\n" ) + - TQString::tqfromLatin1( "mask::r-x\nother::r--\n" ); -static const TQString s_testACLEffective = TQString::tqfromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + - TQString::tqfromLatin1( "group:" ) + s_group1 + TQString::tqfromLatin1( ":--x\n" ) + - TQString::tqfromLatin1( "group:" ) + s_group2 + TQString::tqfromLatin1( ":r--\n" ) + - TQString::tqfromLatin1( "mask::r-x\nother::r--\n" ); +static const TQString s_testACL = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); +static const TQString s_testACL2 = TQString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + + TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + + TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + + TQString::fromLatin1( "mask::r-x\nother::r--\n" ); +static const TQString s_testACLEffective = TQString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + + TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + + TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + + TQString::fromLatin1( "mask::r-x\nother::r--\n" ); KACLTest::KACLTest() :m_acl( s_testACL ) @@ -265,8 +265,8 @@ void KACLTest::testSettingExtended() // groups, all and named - const TQString expected2 = TQString::tqfromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + - TQString::tqfromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::tqfromLatin1(":r--\nmask::rwx\nother::r--\n" ); + const TQString expected2 = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + + TQString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::fromLatin1(":r--\nmask::rwx\nother::r--\n" ); CharlesII.setACL( s_testACL ); // reset ACLGroupPermissionsList groups; ACLGroupPermissions group = qMakePair( s_group1, ( unsigned short )3 ); diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp index c2a642c1f..a831041e1 100644 --- a/kio/tests/kdefaultprogresstest.cpp +++ b/kio/tests/kdefaultprogresstest.cpp @@ -18,7 +18,7 @@ int main(int argc, char **argv) dlg->slotTotalDirs( 0L, 1 ); dlg->slotSpeed( 0L, 55 ); - dlg->slotInfoMessage( 0L, TQString::tqfromLatin1( "Starting..." ) ); + dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Starting..." ) ); int files = 0; for ( int size = 0 ; size < 12000 ; size += 1 ) @@ -31,7 +31,7 @@ int main(int argc, char **argv) } kapp->processEvents(); } - dlg->slotInfoMessage( 0L, TQString::tqfromLatin1( "Done." ) ); + dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Done." ) ); delete dlg; return 0; diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp index 6137f5e71..5e12b469b 100644 --- a/kio/tests/kdirlistertest.cpp +++ b/kio/tests/kdirlistertest.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <kapplication.h> diff --git a/kio/tests/kfiltertest.cpp b/kio/tests/kfiltertest.cpp index 54599e838..fe57deb17 100644 --- a/kio/tests/kfiltertest.cpp +++ b/kio/tests/kfiltertest.cpp @@ -21,7 +21,7 @@ #include <unistd.h> #include <limits.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kdebug.h> #include <kinstance.h> @@ -41,8 +41,8 @@ void test_block( const TQString & fileName ) // TQCString s(array,n+1); // Terminate with 0 before printing // printf("%s", s.data()); - kdDebug() << "dev.at = " << dev->tqat() << endl; - //kdDebug() << "f.at = " << f.tqat() << endl; + kdDebug() << "dev.at = " << dev->at() << endl; + //kdDebug() << "f.at = " << f.at() << endl; } dev->close(); delete dev; diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp index 0db23457d..98083a477 100644 --- a/kio/tests/kioslavetest.cpp +++ b/kio/tests/kioslavetest.cpp @@ -9,7 +9,7 @@ LGPL version 2. */ -#include <tqlayout.h> +#include <layout.h> #include <tqmessagebox.h> #include <tqdir.h> diff --git a/kio/tests/kruntest.cpp b/kio/tests/kruntest.cpp index 0febcbc26..89f701ffd 100644 --- a/kio/tests/kruntest.cpp +++ b/kio/tests/kruntest.cpp @@ -28,7 +28,7 @@ #include <kde_file.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqdir.h> #include <stdlib.h> diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp index ab0130860..436ae7639 100644 --- a/kio/tests/ksycocatest.cpp +++ b/kio/tests/ksycocatest.cpp @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) KApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption TQCString instname = "kword"; - TQString desktopPath = TQString::tqfromLatin1( "Office/%1.desktop" ).arg( instname ); + TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname ); qDebug( "Looking for %s", desktopPath.latin1() ); KService::Ptr service = KService::serviceByDesktopPath( desktopPath ); if ( service ) diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp index dd4d84e7f..c448cca90 100644 --- a/kio/tests/kurifiltertest.cpp +++ b/kio/tests/kurifiltertest.cpp @@ -45,7 +45,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType if( abs_path ) { - m_filterData->setAbsolutePath( TQString::tqfromLatin1( abs_path ) ); + m_filterData->setAbsolutePath( TQString::fromLatin1( abs_path ) ); kdDebug() << "Filtering: " << a << " with abs_path=" << abs_path << endl; } else @@ -98,7 +98,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType { // Hack for other locales than english, normalize google hosts to google.com cmd = cmd.replace( TQRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" ); - if ( cmd != TQString::tqfromLatin1( expectedResult ) ) + if ( cmd != TQString::fromLatin1( expectedResult ) ) { kdError() << " Got " << cmd << " expected " << expectedResult << endl; ::exit(1); diff --git a/kio/tests/previewtest.cpp b/kio/tests/previewtest.cpp index f2b740224..4dbb398f6 100644 --- a/kio/tests/previewtest.cpp +++ b/kio/tests/previewtest.cpp @@ -1,6 +1,6 @@ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <kapplication.h> diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc index 496f761dd..2deeb3535 100644 --- a/kioslave/file/file.cc +++ b/kioslave/file/file.cc @@ -379,7 +379,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum kdDebug(7101) << "put(): " << dest_orig << ", mode=" << _mode << endl; TQString dest_part( dest_orig ); - dest_part += TQString::tqfromLatin1(".part"); + dest_part += TQString::fromLatin1(".part"); TQCString _dest_part( TQFile::encodeName(dest_part)); KDE_struct_stat buff_orig; @@ -809,7 +809,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, ut.modtime = buff_src.st_mtime; if ( ::utime( _dest.data(), &ut ) != 0 ) { - kdWarning() << TQString(TQString::tqfromLatin1("Couldn't preserve access and modification time for\n%1").arg( dest.path() )) << endl; + kdWarning() << TQString(TQString::fromLatin1("Couldn't preserve access and modification time for\n%1").arg( dest.path() )) << endl; } processedSize( buff_src.st_size ); @@ -859,7 +859,7 @@ void FileProtocol::rename( const KURL &src, const KURL &dest, error( KIO::ERR_ACCESS_DENIED, dest.path() ); } else if (errno == EXDEV) { - error( KIO::ERR_UNSUPPORTED_ACTION, TQString::tqfromLatin1("rename")); + error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename")); } else if (errno == EROFS) { // The file is on a read-only filesystem error( KIO::ERR_CANNOT_DELETE, src.path() ); @@ -964,8 +964,8 @@ TQString FileProtocol::getUserName( uid_t uid ) if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { - usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) ); - return TQString::tqfromLatin1( user->pw_name ); + usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) ); + return TQString::fromLatin1( user->pw_name ); } else return TQString::number( uid ); @@ -981,8 +981,8 @@ TQString FileProtocol::getGroupName( gid_t gid ) if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { - groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) ); - return TQString::tqfromLatin1( grp->gr_name ); + groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) ); + return TQString::fromLatin1( grp->gr_name ); } else return TQString::number( gid ); @@ -1116,7 +1116,7 @@ void FileProtocol::stat( const KURL & url ) */ TQCString _path( TQFile::encodeName(url.path(-1))); - TQString sDetails = metaData(TQString::tqfromLatin1("details")); + TQString sDetails = metaData(TQString::fromLatin1("details")); int details = sDetails.isEmpty() ? 2 : sDetails.toInt(); kdDebug(7101) << "FileProtocol::stat details=" << details << endl; @@ -1419,10 +1419,10 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c bool fstype_empty = !_fstype || !*_fstype; TQCString fstype = KProcess::quote(_fstype).latin1(); // good guess TQCString readonly = _ro ? "-r" : ""; - TQString epath = TQString::tqfromLatin1(getenv("PATH")); - TQString path = TQString::tqfromLatin1("/sbin:/bin"); + TQString epath = TQString::fromLatin1(getenv("PATH")); + TQString path = TQString::fromLatin1("/sbin:/bin"); if(!epath.isEmpty()) - path += TQString::tqfromLatin1(":") + epath; + path += TQString::fromLatin1(":") + epath; TQString mountProg = KGlobal::dirs()->findExe("mount", path); if (mountProg.isEmpty()){ error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\"")); @@ -1604,7 +1604,7 @@ void FileProtocol::unmount( const TQString& _point ) } #else TQString epath = getenv("PATH"); - TQString path = TQString::tqfromLatin1("/sbin:/bin"); + TQString path = TQString::fromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; TQString umountProg = KGlobal::dirs()->findExe("umount", path); @@ -1658,7 +1658,7 @@ void FileProtocol::unmount( const TQString& _point ) bool FileProtocol::pmount(const TQString &dev) { TQString epath = getenv("PATH"); - TQString path = TQString::tqfromLatin1("/sbin:/bin"); + TQString path = TQString::fromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; TQString pmountProg = KGlobal::dirs()->findExe("pmount", path); @@ -1700,7 +1700,7 @@ bool FileProtocol::pumount(const TQString &point) if (dev.endsWith("/")) dev.truncate(dev.length()-1); TQString epath = getenv("PATH"); - TQString path = TQString::tqfromLatin1("/sbin:/bin"); + TQString path = TQString::fromLatin1("/sbin:/bin"); if (!epath.isEmpty()) path += ":" + epath; TQString pumountProg = KGlobal::dirs()->findExe("pumount", path); @@ -1774,7 +1774,7 @@ static bool isExtendedACL( acl_t acl ) static TQString aclAsString( acl_t acl ) { char *aclString = acl_to_text( acl, 0 ); - TQString ret = TQString::tqfromLatin1( aclString ); + TQString ret = TQString::fromLatin1( aclString ); acl_free( (void*)aclString ); return ret; } diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc index a30710743..07208fe77 100644 --- a/kioslave/ftp/ftp.cc +++ b/kioslave/ftp/ftp.cc @@ -71,9 +71,9 @@ #endif // JPF: a remark on coding style (2004-03-06): -// Some calls to TQString::tqfromLatin1() were removed from the code. In most places +// Some calls to TQString::fromLatin1() were removed from the code. In most places // the KDE code relies on implicit creation of QStrings. Also Qt has a lot of -// const char* overloads, so that using TQString::tqfromLatin1() can be ineffectient! +// const char* overloads, so that using TQString::fromLatin1() can be ineffectient! #define FTP_LOGIN "anonymous" #define FTP_PASSWD "anonymous@" @@ -968,7 +968,7 @@ int Ftp::ftpOpenEPRTDataConnection() if (sin == NULL) return ERR_INTERNAL; - // TQString command = TQString::tqfromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) + // TQString command = TQString::fromLatin1("eprt |%1|%2|%3|").arg(sin->ianaFamily()) // .arg(sin->nodeName()) // .arg(sin->port()); TQCString command; diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index f772950bb..a1495d78b 100644 --- a/kioslave/http/http.cc +++ b/kioslave/http/http.cc @@ -607,7 +607,7 @@ void HTTPProtocol::stat(const KURL& url) if ( m_protocol != "webdav" && m_protocol != "webdavs" ) { - TQString statSide = metaData(TQString::tqfromLatin1("statSide")); + TQString statSide = metaData(TQString::fromLatin1("statSide")); if ( statSide != "source" ) { // When uploading we assume the file doesn't exit @@ -1805,7 +1805,7 @@ bool HTTPProtocol::isOffline(const KURL &url) TQDataStream stream(params, IO_WriteOnly); - if ( url.host() == TQString::tqfromLatin1("localhost") || url.host() == TQString::tqfromLatin1("127.0.0.1") || url.host() == TQString::tqfromLatin1("::") ) { + if ( url.host() == TQString::fromLatin1("localhost") || url.host() == TQString::fromLatin1("127.0.0.1") || url.host() == TQString::fromLatin1("::") ) { return false; } if ( dcopClient()->call( "kded", "networkstatus", "status()", @@ -2786,7 +2786,7 @@ try_again: // by assuming that they will be sending html. kdDebug(7113) << "(" << m_pid << ") HTTPPreadHeader: HEAD -> returned " << "mimetype: " << DEFAULT_MIME_TYPE << endl; - mimeType(TQString::tqfromLatin1(DEFAULT_MIME_TYPE)); + mimeType(TQString::fromLatin1(DEFAULT_MIME_TYPE)); return true; } @@ -2847,7 +2847,7 @@ try_again: // Store the the headers so they can be passed to the // calling application later - m_responseHeader << TQString::tqfromLatin1(buf); + m_responseHeader << TQString::fromLatin1(buf); if ((strncasecmp(buf, "HTTP/", 5) == 0) || (strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support @@ -3030,7 +3030,7 @@ try_again: // Keep Alive else if (strncasecmp(buf, "Keep-Alive:", 11) == 0) { TQStringList options = TQStringList::split(',', - TQString::tqfromLatin1(trimLead(buf+11))); + TQString::fromLatin1(trimLead(buf+11))); for(TQStringList::ConstIterator it = options.begin(); it != options.end(); it++) @@ -3046,7 +3046,7 @@ try_again: // Cache control else if (strncasecmp(buf, "Cache-Control:", 14) == 0) { TQStringList cacheControls = TQStringList::split(',', - TQString::tqfromLatin1(trimLead(buf+14))); + TQString::fromLatin1(trimLead(buf+14))); for(TQStringList::ConstIterator it = cacheControls.begin(); it != cacheControls.end(); it++) @@ -3081,7 +3081,7 @@ try_again: else if (strncasecmp(buf, "Content-location:", 17) == 0) { setMetaData ("content-location", - TQString::tqfromLatin1(trimLead(buf+17)).stripWhiteSpace()); + TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace()); } // what type of data do we have? @@ -3093,7 +3093,7 @@ try_again: while ( *pos && *pos != ';' ) pos++; // Assign the mime-type. - m_strMimeType = TQString::tqfromLatin1(start, pos-start).stripWhiteSpace().lower(); + m_strMimeType = TQString::fromLatin1(start, pos-start).stripWhiteSpace().lower(); kdDebug(7113) << "(" << m_pid << ") Content-type: " << m_strMimeType << endl; // If we still have text, then it means we have a mime-type with a @@ -3108,8 +3108,8 @@ try_again: if (*pos) { - mediaAttribute = TQString::tqfromLatin1(start, pos-start).stripWhiteSpace().lower(); - mediaValue = TQString::tqfromLatin1(pos+1, end-pos-1).stripWhiteSpace(); + mediaAttribute = TQString::fromLatin1(start, pos-start).stripWhiteSpace().lower(); + mediaValue = TQString::fromLatin1(pos+1, end-pos-1).stripWhiteSpace(); pos = end; if (mediaValue.length() && (mediaValue[0] == '"') && @@ -3153,7 +3153,7 @@ try_again: // Cache management else if (strncasecmp(buf, "Last-Modified:", 14) == 0) { - m_request.lastModified = (TQString::tqfromLatin1(trimLead(buf+14))).stripWhiteSpace(); + m_request.lastModified = (TQString::fromLatin1(trimLead(buf+14))).stripWhiteSpace(); } // whoops.. we received a warning @@ -3177,7 +3177,7 @@ try_again: // The deprecated Refresh Response else if (strncasecmp(buf,"Refresh:", 8) == 0) { mayCache = false; // Do not cache page as it defeats purpose of Refresh tag! - setMetaData( "http-refresh", TQString::tqfromLatin1(trimLead(buf+8)).stripWhiteSpace() ); + setMetaData( "http-refresh", TQString::fromLatin1(trimLead(buf+8)).stripWhiteSpace() ); } // In fact we should do redirection only if we got redirection code @@ -3254,7 +3254,7 @@ try_again: dispositionBuf--; if ( dispositionBuf > bufStart ) - dispositionFilename = TQString::tqfromLatin1( bufStart, dispositionBuf-bufStart ); + dispositionFilename = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ); break; } @@ -3267,7 +3267,7 @@ try_again: dispositionBuf++; if ( dispositionBuf > bufStart ) - dispositionType = TQString::tqfromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace(); + dispositionType = TQString::fromLatin1( bufStart, dispositionBuf-bufStart ).stripWhiteSpace(); while ( *dispositionBuf == ';' || *dispositionBuf == ' ' ) dispositionBuf++; @@ -3288,7 +3288,7 @@ try_again: } } else if(strncasecmp(buf, "Content-Language:", 17) == 0) { - TQString language = TQString::tqfromLatin1(trimLead(buf+17)).stripWhiteSpace(); + TQString language = TQString::fromLatin1(trimLead(buf+17)).stripWhiteSpace(); if (!language.isEmpty()) setMetaData("content-language", language); } @@ -3381,17 +3381,17 @@ try_again: // md5 signature else if (strncasecmp(buf, "Content-MD5:", 12) == 0) { - m_sContentMD5 = TQString::tqfromLatin1(trimLead(buf + 12)); + m_sContentMD5 = TQString::fromLatin1(trimLead(buf + 12)); } // *** Responses to the HTTP OPTIONS method follow // WebDAV capabilities else if (strncasecmp(buf, "DAV:", 4) == 0) { if (m_davCapabilities.isEmpty()) { - m_davCapabilities << TQString::tqfromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4)); } else { - m_davCapabilities << TQString::tqfromLatin1(trimLead(buf + 4)); + m_davCapabilities << TQString::fromLatin1(trimLead(buf + 4)); } } // *** Responses to the HTTP OPTIONS method finished @@ -3667,14 +3667,14 @@ try_again: if (m_strMimeType == "application/x-tar") { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::tqfromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("application/x-tgz"); } else if (m_strMimeType == "application/postscript") { // LEONB: Adding another exception for psgz files. // Could we use the mimelnk files instead of hardcoding all this? m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::tqfromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); } else if ( m_request.allowCompressedPage && m_strMimeType != "application/x-tgz" && @@ -3683,7 +3683,7 @@ try_again: m_request.url.path().right(6) == ".ps.gz" ) { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::tqfromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); } else if ( (m_request.allowCompressedPage && m_strMimeType == "text/html") @@ -3700,7 +3700,7 @@ try_again: else { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::tqfromLatin1("application/x-gzip"); + m_strMimeType = TQString::fromLatin1("application/x-gzip"); } } @@ -3713,34 +3713,34 @@ try_again: if (m_qContentEncodings.last() == "bzip2") { m_qContentEncodings.remove(m_qContentEncodings.fromLast()); - m_strMimeType = TQString::tqfromLatin1("application/x-bzip2"); + m_strMimeType = TQString::fromLatin1("application/x-bzip2"); } // Convert some common mimetypes to standard KDE mimetypes if (m_strMimeType == "application/x-targz") - m_strMimeType = TQString::tqfromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("application/x-tgz"); else if (m_strMimeType == "application/zip") - m_strMimeType = TQString::tqfromLatin1("application/x-zip"); + m_strMimeType = TQString::fromLatin1("application/x-zip"); else if (m_strMimeType == "image/x-png") - m_strMimeType = TQString::tqfromLatin1("image/png"); + m_strMimeType = TQString::fromLatin1("image/png"); else if (m_strMimeType == "image/bmp") - m_strMimeType = TQString::tqfromLatin1("image/x-bmp"); + m_strMimeType = TQString::fromLatin1("image/x-bmp"); else if (m_strMimeType == "audio/mpeg" || m_strMimeType == "audio/x-mpeg" || m_strMimeType == "audio/mp3") - m_strMimeType = TQString::tqfromLatin1("audio/x-mp3"); + m_strMimeType = TQString::fromLatin1("audio/x-mp3"); else if (m_strMimeType == "audio/microsoft-wave") - m_strMimeType = TQString::tqfromLatin1("audio/x-wav"); + m_strMimeType = TQString::fromLatin1("audio/x-wav"); else if (m_strMimeType == "audio/midi") - m_strMimeType = TQString::tqfromLatin1("audio/x-midi"); + m_strMimeType = TQString::fromLatin1("audio/x-midi"); else if (m_strMimeType == "image/x-xpixmap") - m_strMimeType = TQString::tqfromLatin1("image/x-xpm"); + m_strMimeType = TQString::fromLatin1("image/x-xpm"); else if (m_strMimeType == "application/rtf") - m_strMimeType = TQString::tqfromLatin1("text/rtf"); + m_strMimeType = TQString::fromLatin1("text/rtf"); // Crypto ones.... else if (m_strMimeType == "application/pkix-cert" || m_strMimeType == "application/binary-certificate") { - m_strMimeType = TQString::tqfromLatin1("application/x-x509-ca-cert"); + m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert"); } // Prefer application/x-tgz or x-gzpostscript over application/x-gzip. @@ -3748,9 +3748,9 @@ try_again: { if ((m_request.url.path().right(7) == ".tar.gz") || (m_request.url.path().right(4) == ".tar")) - m_strMimeType = TQString::tqfromLatin1("application/x-tgz"); + m_strMimeType = TQString::fromLatin1("application/x-tgz"); if ((m_request.url.path().right(6) == ".ps.gz")) - m_strMimeType = TQString::tqfromLatin1("application/x-gzpostscript"); + m_strMimeType = TQString::fromLatin1("application/x-gzpostscript"); } // Some webservers say "text/plain" when they mean "application/x-bzip2" @@ -3758,15 +3758,15 @@ try_again: { TQString ext = m_request.url.path().right(4).upper(); if (ext == ".BZ2") - m_strMimeType = TQString::tqfromLatin1("application/x-bzip2"); + m_strMimeType = TQString::fromLatin1("application/x-bzip2"); else if (ext == ".PEM") - m_strMimeType = TQString::tqfromLatin1("application/x-x509-ca-cert"); + m_strMimeType = TQString::fromLatin1("application/x-x509-ca-cert"); else if (ext == ".SWF") - m_strMimeType = TQString::tqfromLatin1("application/x-shockwave-flash"); + m_strMimeType = TQString::fromLatin1("application/x-shockwave-flash"); else if (ext == ".PLS") - m_strMimeType = TQString::tqfromLatin1("audio/x-scpls"); + m_strMimeType = TQString::fromLatin1("audio/x-scpls"); else if (ext == ".WMV") - m_strMimeType = TQString::tqfromLatin1("video/x-ms-wmv"); + m_strMimeType = TQString::fromLatin1("video/x-ms-wmv"); } #if 0 @@ -3871,11 +3871,11 @@ void HTTPProtocol::addEncoding(TQString encoding, TQStringList &encs) //if ( m_cmd != CMD_COPY ) m_iSize = NO_SIZE; } else if ((encoding == "x-gzip") || (encoding == "gzip")) { - encs.append(TQString::tqfromLatin1("gzip")); + encs.append(TQString::fromLatin1("gzip")); } else if ((encoding == "x-bzip2") || (encoding == "bzip2")) { - encs.append(TQString::tqfromLatin1("bzip2")); // Not yet supported! + encs.append(TQString::fromLatin1("bzip2")); // Not yet supported! } else if ((encoding == "x-deflate") || (encoding == "deflate")) { - encs.append(TQString::tqfromLatin1("deflate")); + encs.append(TQString::fromLatin1("deflate")); } else { kdDebug(7113) << "(" << m_pid << ") Unknown encoding encountered. " << "Please write code. Encoding = \"" << encoding @@ -4270,7 +4270,7 @@ void HTTPProtocol::slotData(const TQByteArray &_d) if ( m_strMimeType.isEmpty() ) { - m_strMimeType = TQString::tqfromLatin1( DEFAULT_MIME_TYPE ); + m_strMimeType = TQString::fromLatin1( DEFAULT_MIME_TYPE ); kdDebug(7113) << "(" << m_pid << ") Using default mimetype: " << m_strMimeType << endl; } @@ -4711,7 +4711,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) TQCString u = m_request.url.url().latin1(); for(int i = u.length(); i--;) { - hash = (hash * 12211 + static_cast<const char>(u.tqat(i))) % 2147483563; + hash = (hash * 12211 + static_cast<const char>(u.at(i))) % 2147483563; } TQString hashString; @@ -4739,7 +4739,7 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) ok = false; time_t date; - time_t tqcurrentDate = time(0); + time_t currentDate = time(0); // URL if (ok && (!fgets(buffer, 400, fs))) @@ -4762,10 +4762,10 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) { date = (time_t) strtoul(buffer, 0, 10); m_request.creationDate = date; - if (m_maxCacheAge && (difftime(tqcurrentDate, date) > m_maxCacheAge)) + if (m_maxCacheAge && (difftime(currentDate, date) > m_maxCacheAge)) { m_request.bMustRevalidate = true; - m_request.expireDate = tqcurrentDate; + m_request.expireDate = currentDate; } } @@ -4779,14 +4779,14 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) { date = (time_t) strtoul(buffer, 0, 10); // After the expire date we need to revalidate. - if (!date || difftime(tqcurrentDate, date) >= 0) + if (!date || difftime(currentDate, date) >= 0) m_request.bMustRevalidate = true; m_request.expireDate = date; } else if (m_request.cache == CC_Refresh) { m_request.bMustRevalidate = true; - m_request.expireDate = tqcurrentDate; + m_request.expireDate = currentDate; } } @@ -5135,12 +5135,12 @@ void HTTPProtocol::configAuth( char *p, bool isForProxy ) if( isForProxy ) { ProxyAuthentication = f; - m_strProxyAuthorization = TQString::tqfromLatin1( strAuth ); + m_strProxyAuthorization = TQString::fromLatin1( strAuth ); } else { Authentication = f; - m_strAuthorization = TQString::tqfromLatin1( strAuth ); + m_strAuthorization = TQString::fromLatin1( strAuth ); } } @@ -5943,7 +5943,7 @@ TQString HTTPProtocol::createDigestAuth ( bool isForProxy ) for (int i = 0; i < count; i++ ) { - KURL u ( info.digestURI.tqat(i) ); + KURL u ( info.digestURI.at(i) ); send &= (m_request.url.protocol().lower() == u.protocol().lower()); send &= (m_request.hostname.lower() == u.host().lower()); diff --git a/kioslave/http/http_cache_cleaner.cpp b/kioslave/http/http_cache_cleaner.cpp index cc17d9729..02a07c712 100644 --- a/kioslave/http/http_cache_cleaner.cpp +++ b/kioslave/http/http_cache_cleaner.cpp @@ -44,7 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kdebug.h> -time_t tqcurrentDate; +time_t currentDate; int m_maxCacheAge; int m_maxCacheSize; @@ -109,7 +109,7 @@ FileInfo *readEntry( const TQString &filename) if (ok) { creationDate = (time_t) strtoul(buffer, 0, 10); - age = (int) difftime(tqcurrentDate, creationDate); + age = (int) difftime(currentDate, creationDate); if ( m_maxCacheAge && ( age > m_maxCacheAge)) { ok = false; // Expired @@ -125,7 +125,7 @@ FileInfo *readEntry( const TQString &filename) #if 0 time_t expireDate; expireDate = (time_t) strtoul(buffer, 0, 10); - if (expireDate && (expireDate < tqcurrentDate)) + if (expireDate && (expireDate < currentDate)) ok = false; // Expired #endif } @@ -213,7 +213,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) } } - tqcurrentDate = time(0); + currentDate = time(0); m_maxCacheAge = KProtocolManager::maxCacheAge(); m_maxCacheSize = KProtocolManager::maxCacheSize(); diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp index 136fba0b1..ec0a423a6 100644 --- a/kioslave/http/kcookiejar/kcookiejar.cpp +++ b/kioslave/http/kcookiejar/kcookiejar.cpp @@ -84,12 +84,12 @@ #define READ_BUFFER_SIZE 8192 #define IP_ADDRESS_EXPRESSION "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" -// Note with respect to TQString::tqfromLatin1( ) +// Note with respect to TQString::fromLatin1( ) // Cookies are stored as 8 bit data and passed to kio_http as // latin1 regardless of their actual encoding. // L1 is used to indicate latin1 constants -#define L1(x) TQString::tqfromLatin1(x) +#define L1(x) TQString::fromLatin1(x) template class TQPtrList<KHttpCookie>; template class TQPtrDict<KHttpCookieList>; @@ -154,9 +154,9 @@ KHttpCookie::KHttpCookie(const TQString &_host, // // Checks if a cookie has been expired // -bool KHttpCookie::isExpired(time_t tqcurrentDate) +bool KHttpCookie::isExpired(time_t currentDate) { - return (mExpireDate != 0) && (mExpireDate < tqcurrentDate); + return (mExpireDate != 0) && (mExpireDate < currentDate); } // @@ -479,7 +479,7 @@ static const char * parseNameValue(const char *header, // No '=' sign -> use string as the value, name is empty // (behavior found in Mozilla and IE) Name = ""; - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate( s - header ); Value = Value.stripWhiteSpace(); return (s); @@ -516,12 +516,12 @@ static const char * parseNameValue(const char *header, if ((*s=='\0') || (*s=='\n')) { // End of Name - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate(s - header); return (s); } } - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); // *s == '\"'; if (keepQuotes) Value.truncate( ++s - header ); @@ -542,7 +542,7 @@ static const char * parseNameValue(const char *header, while ((*s != '\0') && (*s != ';') && (*s != '\n')) s++; // End of Name - Value = TQString::tqfromLatin1(header); + Value = TQString::fromLatin1(header); Value.truncate( s - header ); Value = Value.stripWhiteSpace(); } @@ -618,7 +618,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn, return; } // Return numeric IPv4 addresses as is... - if ((_fqdn.tqat(0) >= TQChar('0')) && (_fqdn.tqat(0) <= TQChar('9'))) + if ((_fqdn.at(0) >= TQChar('0')) && (_fqdn.at(0) <= TQChar('9'))) { if (_fqdn.find(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) { @@ -1457,11 +1457,11 @@ bool KCookieJar::loadCookies(const TQString &_filename) if ((expDate == 0) || (expDate < curTime)) continue; - KHttpCookie *cookie = new KHttpCookie(TQString::tqfromLatin1(host), - TQString::tqfromLatin1(domain), - TQString::tqfromLatin1(path), - TQString::tqfromLatin1(name), - TQString::tqfromLatin1(value), + KHttpCookie *cookie = new KHttpCookie(TQString::fromLatin1(host), + TQString::fromLatin1(domain), + TQString::fromLatin1(path), + TQString::fromLatin1(name), + TQString::fromLatin1(value), expDate, protVer, secure, httpOnly, explicitPath); addCookie(cookie); diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h index 6d5d9f2e5..eb64485ea 100644 --- a/kioslave/http/kcookiejar/kcookiejar.h +++ b/kioslave/http/kcookiejar/kcookiejar.h @@ -89,7 +89,7 @@ public: time_t expireDate(void) { return mExpireDate; } int protocolVersion(void) { return mProtocolVersion; } bool isSecure(void) { return mSecure; } - bool isExpired(time_t tqcurrentDate); + bool isExpired(time_t currentDate); bool isCrossDomain(void) { return mCrossDomain; } bool isHttpOnly(void) { return mHttpOnly; } bool hasExplicitPath(void) { return mExplicitPath; } diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp index 0ee01d9f0..e59533e23 100644 --- a/kioslave/http/kcookiejar/kcookiewin.cpp +++ b/kioslave/http/kcookiejar/kcookiewin.cpp @@ -40,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqaccel.h> #include <tqlabel.h> #include <tqwidget.h> -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <tqdatetime.h> #include <tqmessagebox.h> diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index 1ce1c4d8f..0ad238ab7 100644 --- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp +++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp @@ -72,12 +72,12 @@ static void popArg(TQString &command, TQCString & line) int i = line.find(' '); if (i != -1) { - command = TQString::tqfromLatin1(line.left(i)); + command = TQString::fromLatin1(line.left(i)); line = line.mid(i+1); } else { - command = TQString::tqfromLatin1(line); + command = TQString::fromLatin1(line); line = 0; } } @@ -158,7 +158,7 @@ static void processCheck(TQCString &line) if (url.isEmpty()) FAIL(TQString("Missing URL")); - TQString expectedCookies = TQString::tqfromLatin1(line); + TQString expectedCookies = TQString::fromLatin1(line); TQString cookies = jar->findCookies(urlStr, false, 0, 0).stripWhiteSpace(); if (cookies != expectedCookies) @@ -246,8 +246,8 @@ int main(int argc, char *argv[]) TQCString arg2; TQString result; - lastYear = new TQCString(TQString("Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::tqcurrentDate().year()-1).utf8()); - nextYear = new TQCString(TQString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::tqcurrentDate().year()+1).utf8()); + lastYear = new TQCString(TQString("Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()-1).utf8()); + nextYear = new TQCString(TQString(" expires=Fri, 04-May-%1 01:00:00 GMT").arg(TQDate::currentDate().year()+1).utf8()); KAboutData about("kcookietest", "kcookietest", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian"); KCmdLineArgs::init( argc, argv, &about); diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp index 9e5691654..586513956 100644 --- a/kioslave/iso/iso.cpp +++ b/kioslave/iso/iso.cpp @@ -150,7 +150,7 @@ bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int star path.truncate( len - 1 ); } else - path = TQString::tqfromLatin1("/"); + path = TQString::fromLatin1("/"); kdDebug() << "Found. isoFile=" << isoFile << " path=" << path << endl; break; } @@ -259,10 +259,10 @@ void kio_isoProtocol::listDir( const KURL & url ) if ( path.isEmpty() ) { - KURL redir( TQString::tqfromLatin1( "iso:/") ); + KURL redir( TQString::fromLatin1( "iso:/") ); kdDebug() << "url.path()==" << url.path() << endl; if (url.hasRef()) redir.setRef(url.htmlRef()); - redir.setPath( url.path() + TQString::tqfromLatin1("/") ); + redir.setPath( url.path() + TQString::fromLatin1("/") ); kdDebug() << "kio_isoProtocol::listDir: redirection " << redir.url() << endl; redirection( redir ); finished(); @@ -356,7 +356,7 @@ void kio_isoProtocol::stat( const KURL & url ) const KArchiveEntry* isoEntry; if ( path.isEmpty() ) { - path = TQString::tqfromLatin1( "/" ); + path = TQString::fromLatin1( "/" ); isoEntry = root; } else { isoEntry = root->entry( path ); @@ -407,8 +407,8 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat ptrblock_bytes = (nblocks+1) * 4; pointer_block=isoFileEntry->data( hdr->header_size << 2, ptrblock_bytes ); if (pointer_block.size() == ptrblock_bytes && - inbuf.tqresize(block_size2) && - outbuf.tqresize(block_size)) { + inbuf.resize(block_size2) && + outbuf.resize(block_size)) { pptr = pointer_block.data(); } else { diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp index 7b682a783..47f71511d 100644 --- a/kioslave/iso/kiso.cpp +++ b/kioslave/iso/kiso.cpp @@ -192,7 +192,7 @@ static int readf(char *buf, int start, int len,void *udata) { TQIODevice* dev = ( static_cast<KIso*> (udata) )->device(); - if (dev->tqat(start<<11)) { + if (dev->at(start<<11)) { if ((dev->readBlock(buf, len<<11)) != -1) return (len); } kdDebug() << "KIso::ReadRequest failed start: " << start << " len: " << len << endl; diff --git a/kioslave/iso/kisofile.cpp b/kioslave/iso/kisofile.cpp index 5235ea4a0..afac16b74 100644 --- a/kioslave/iso/kisofile.cpp +++ b/kioslave/iso/kisofile.cpp @@ -42,8 +42,8 @@ TQByteArray KIsoFile::data(long long pos, int count) const { TQByteArray r; int rlen; - if ( archive()->device()->tqat(position()+pos) && - r.tqresize( ((pos+count) < size()) ? count : size()-pos) ) { + if ( archive()->device()->at(position()+pos) && + r.resize( ((pos+count) < size()) ? count : size()-pos) ) { rlen=archive()->device()->readBlock( r.data(), r.size() ); if (rlen ==- 1) r.resize(0); else if (rlen != (int)r.size()) r.resize(rlen); diff --git a/kjs/internal.cpp b/kjs/internal.cpp index c796cddd5..25f7b6e31 100644 --- a/kjs/internal.cpp +++ b/kjs/internal.cpp @@ -52,7 +52,7 @@ extern int kjsyyparse(); using namespace KJS; namespace KJS { - /* work around some strict tqalignment requirements + /* work around some strict alignment requirements for double variables on some architectures (e.g. PA-RISC) */ typedef union { unsigned char b[8]; double d; } kjs_double_t; diff --git a/kjs/lexer.cpp b/kjs/lexer.cpp index 55a6d8fa5..054defb88 100644 --- a/kjs/lexer.cpp +++ b/kjs/lexer.cpp @@ -604,7 +604,7 @@ bool Lexer::isIdentLetter(unsigned short c) // Uppercase letter (Lu), Lowercase letter (Ll), // Titlecase letter (Lt)", Modifier letter (Lm), // 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' || c >= 'A' && c <= 'Z' || // A with grave - O with diaeresis diff --git a/kjs/lexer.h b/kjs/lexer.h index da7c5ac7e..c6cb6aa88 100644 --- a/kjs/lexer.h +++ b/kjs/lexer.h @@ -144,7 +144,7 @@ namespace KJS { int bol; // begin of line #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; UString **strings; diff --git a/kjs/regexp.cpp b/kjs/regexp.cpp index c10911693..06defcc53 100644 --- a/kjs/regexp.cpp +++ b/kjs/regexp.cpp @@ -38,7 +38,7 @@ RegExp::UTF8SupportState RegExp::utf8Support = RegExp::Unknown; RegExp::RegExp(const UString &p, int f) : 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 if (utf8Support == Unknown) { int supported; @@ -64,13 +64,13 @@ RegExp::RegExp(const UString &p, int f) escape = false; // we only care about \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 unsigned short u = 0; int j = 0; for (j = 0; j < 4; ++j) { - if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].tqunicode())) { - u = (u << 4) + Lexer::convertHex(p[i + 1].tqunicode()); + if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].unicode())) { + u = (u << 4) + Lexer::convertHex(p[i + 1].unicode()); ++i; } else { // sequence incomplete. restore index. @@ -222,7 +222,7 @@ void RegExp::prepareUtf8(const UString& s) int *posOut = originalPos; const UChar *d = s.data(); for (int i = 0; i != length; ++i) { - unsigned short c = d[i].tqunicode(); + unsigned short c = d[i].unicode(); int sequenceLen; if (c < 0x80) { diff --git a/kjs/regexp_object.cpp b/kjs/regexp_object.cpp index 7ab223d73..edd2bbeca 100644 --- a/kjs/regexp_object.cpp +++ b/kjs/regexp_object.cpp @@ -292,7 +292,7 @@ RegExp* RegExpObjectImp::makeEngine(ExecState *exec, const UString &p, const Val // Check for validity of flags for (int pos = 0; pos < flags.size(); ++pos) { - switch (flags[pos].tqunicode()) { + switch (flags[pos].unicode()) { case 'g': case 'i': case 'm': diff --git a/kjs/ustring.cpp b/kjs/ustring.cpp index 85eadc29c..36f201863 100644 --- a/kjs/ustring.cpp +++ b/kjs/ustring.cpp @@ -134,7 +134,7 @@ static int statBufferSize = 0; UChar UChar::toLower() const { - // ### properly support tqunicode tolower + // ### properly support unicode tolower if (uc >= 256) return *this; @@ -746,7 +746,7 @@ unsigned int UString::toStrictUInt32(bool *ok) const if (len == 0) return 0; 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 (c == '0') { @@ -782,7 +782,7 @@ unsigned int UString::toStrictUInt32(bool *ok) const } // Get next character. - c = (++p)->tqunicode(); + c = (++p)->unicode(); } } diff --git a/kjs/ustring.h b/kjs/ustring.h index 70dd3d7d7..0cdfa3f0f 100644 --- a/kjs/ustring.h +++ b/kjs/ustring.h @@ -79,7 +79,7 @@ namespace KJS { /** * @return the 16 bit Unicode value of the character */ - unsigned short tqunicode() const { return uc; } + unsigned short unicode() const { return uc; } public: /** * @return The character converted to lower case. @@ -132,7 +132,7 @@ namespace KJS { /** * @return Unicode value. */ - unsigned short tqunicode() const { return ref().uc; } + unsigned short unicode() const { return ref().uc; } /** * @return Lower byte. */ @@ -158,7 +158,7 @@ namespace KJS { 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 diff --git a/kmdi/kmdi/dockcontainer.cpp b/kmdi/kmdi/dockcontainer.cpp index 16c4438c4..4b947d3ce 100644 --- a/kmdi/kmdi/dockcontainer.cpp +++ b/kmdi/kmdi/dockcontainer.cpp @@ -25,7 +25,7 @@ #include "kdockwidget_private.h" #include <tqwidgetstack.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <tqtooltip.h> #include <kmultitabbar.h> @@ -633,7 +633,7 @@ void DockContainer::prevToolView() { if (pos==-1) return; pos--; if (pos<0) pos=tabs->count()-1; - KMultiTabBarTab *tab=tabs->tqat(pos); + KMultiTabBarTab *tab=tabs->at(pos); if (!tab) return; //can never happen here, but who knows m_tb->setTab(tab->id(),true); tabClicked(tab->id()); @@ -645,7 +645,7 @@ void DockContainer::nextToolView() { if (pos==-1) return; pos++; if (pos>=(int)tabs->count()) pos=0; - KMultiTabBarTab *tab=tabs->tqat(pos); + KMultiTabBarTab *tab=tabs->at(pos); if (!tab) return; //can never happen here, but who knows m_tb->setTab(tab->id(),true); tabClicked(tab->id()); diff --git a/kmdi/kmdi/guiclient.cpp b/kmdi/kmdi/guiclient.cpp index b58b538c7..1233bc64b 100644 --- a/kmdi/kmdi/guiclient.cpp +++ b/kmdi/kmdi/guiclient.cpp @@ -68,7 +68,7 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name) if ( domDocument().documentElement().isNull() ) { - TQString completeDescription = TQString::tqfromLatin1( guiDescription ).arg( actionListName ); + TQString completeDescription = TQString::fromLatin1( guiDescription ).arg( actionListName ); setXML( completeDescription, false /*merge*/ ); } @@ -100,7 +100,7 @@ GUIClient::~GUIClient() { // actionCollection()->writeShortcutSettings( "KMDI Shortcuts", kapp->config() ); for (uint i=0;i<m_toolViewActions.count();i++) - disconnect(m_toolViewActions.tqat(i),0,this,0); + disconnect(m_toolViewActions.at(i),0,this,0); m_toolViewActions.setAutoDelete( false ); m_toolViewActions.clear(); @@ -119,7 +119,7 @@ void GUIClient::setupActions() if (m_toolViewActions.count()<3) { for (uint i=0;i<m_toolViewActions.count();i++) - addList.append(m_toolViewActions.tqat(i)); + addList.append(m_toolViewActions.at(i)); } else addList.append(m_toolMenu); diff --git a/kmdi/kmdi/mainwindow.cpp b/kmdi/kmdi/mainwindow.cpp index 358791ab0..7d6558750 100644 --- a/kmdi/kmdi/mainwindow.cpp +++ b/kmdi/kmdi/mainwindow.cpp @@ -46,7 +46,7 @@ #include <assert.h> #include <tqcursor.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqobjectlist.h> #include <tqpopupmenu.h> #include <tqmenubar.h> @@ -64,7 +64,7 @@ #include <tqtoolbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstring.h> #include <tqmap.h> #include <tqvaluelist.h> diff --git a/kmdi/kmdi/tabwidget.cpp b/kmdi/kmdi/tabwidget.cpp index 869dbefcb..2d9603bf5 100644 --- a/kmdi/kmdi/tabwidget.cpp +++ b/kmdi/kmdi/tabwidget.cpp @@ -182,7 +182,7 @@ void TabWidget::insertTab ( TQWidget * child, const TQString & label, int index) KTabWidget::insertTab(child,label,index); showPage(child); maybeShow(); - tabBar()->tqrepaint(); + tabBar()->repaint(); } void TabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index ) @@ -190,7 +190,7 @@ void TabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const T KTabWidget::insertTab(child,iconset,label,index); showPage(child); maybeShow(); - tabBar()->tqrepaint(); + tabBar()->repaint(); } void TabWidget::insertTab ( TQWidget * child, TQTab * tab, int index) @@ -198,7 +198,7 @@ void TabWidget::insertTab ( TQWidget * child, TQTab * tab, int index) KTabWidget::insertTab(child,tab,index); showPage(child); maybeShow(); - tabBar()->tqrepaint(); + tabBar()->repaint(); } void TabWidget::removePage ( TQWidget * w ) diff --git a/kmdi/kmdichildarea.cpp b/kmdi/kmdichildarea.cpp index 684c799df..fe28fdff9 100644 --- a/kmdi/kmdichildarea.cpp +++ b/kmdi/kmdichildarea.cpp @@ -424,10 +424,10 @@ void KMdiChildArea::cascadeMaximized() childFrm->move( pnt ); TQSize curSize( width() - pnt.x(), height() - pnt.y() ); - if ( ( childFrm->tqminimumSize().width() > curSize.width() ) || - ( childFrm->tqminimumSize().height() > curSize.height() ) ) + if ( ( childFrm->minimumSize().width() > curSize.width() ) || + ( childFrm->minimumSize().height() > curSize.height() ) ) { - childFrm->resize( childFrm->tqminimumSize() ); + childFrm->resize( childFrm->minimumSize() ); } else childFrm->resize( curSize ); diff --git a/kmdi/kmdichildfrm.cpp b/kmdi/kmdichildfrm.cpp index c3e4fb9a1..afceb2e60 100644 --- a/kmdi/kmdichildfrm.cpp +++ b/kmdi/kmdichildfrm.cpp @@ -278,7 +278,7 @@ void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e ) if ( !m_pClient ) return; - if ( m_pClient->tqminimumSize() == m_pClient->tqmaximumSize() ) + if ( m_pClient->minimumSize() == m_pClient->maximumSize() ) return; if ( m_bResizing ) @@ -329,11 +329,11 @@ void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos ) // it could be the client forces the childframe to enlarge its minimum size if ( m_pClient ) { - minWidth = m_pClient->tqminimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; - minHeight = m_pClient->tqminimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + + minWidth = m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; + minHeight = m_pClient->minimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR; - maxWidth = m_pClient->tqmaximumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; - maxHeight = m_pClient->tqmaximumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + + maxWidth = m_pClient->maximumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER; + maxHeight = m_pClient->maximumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR; } @@ -524,7 +524,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) // client min / max size / layout behavior don't change // set frame max size indirectly by setting the clients max size to // it's current value (calls setMaxSize() of frame) - m_pClient->setMaximumSize( m_pClient->tqmaximumSize().width(), m_pClient->tqmaximumSize().height() ); + m_pClient->setMaximumSize( m_pClient->maximumSize().width(), m_pClient->maximumSize().height() ); m_pMaximize->setPixmap( *m_pMaxButtonPixmap ); setGeometry( m_restoredRect ); break; @@ -534,9 +534,9 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) // restore client min / max size / layout behavior m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.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_pMaximize->setPixmap( *m_pMaxButtonPixmap ); @@ -558,9 +558,9 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) // restore client min / max size / layout behavior m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.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 ); // reset to maximize-captionbar @@ -608,17 +608,17 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) m_pClient->m_stateChanged = true; m_state = state; // save client min / max size / layout behavior - m_oldClientMinSize = m_pClient->tqminimumSize(); - m_oldClientMaxSize = m_pClient->tqmaximumSize(); - if ( m_pClient->tqlayout() != 0L ) + m_oldClientMinSize = m_pClient->minimumSize(); + m_oldClientMaxSize = m_pClient->maximumSize(); + if ( m_pClient->layout() != 0L ) { - m_oldLayoutResizeMode = m_pClient->tqlayout() ->tqresizeMode(); + m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode(); } m_pClient->setMinimumSize( 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(); m_pManager->childMinimized( this, true ); @@ -627,18 +627,18 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) m_pClient->m_stateChanged = true; m_state = state; // save client min / max size / layout behavior - m_oldClientMinSize = m_pClient->tqminimumSize(); - m_oldClientMaxSize = m_pClient->tqmaximumSize(); - if ( m_pClient->tqlayout() != 0L ) + m_oldClientMinSize = m_pClient->minimumSize(); + m_oldClientMaxSize = m_pClient->maximumSize(); + if ( m_pClient->layout() != 0L ) { - m_oldLayoutResizeMode = m_pClient->tqlayout() ->tqresizeMode(); + m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode(); } m_restoredRect = geometry(); m_pClient->setMinimumSize( 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(); m_pManager->childMinimized( this, false ); @@ -694,7 +694,7 @@ void KMdiChildFrm::setCaption( const TQString& text ) void KMdiChildFrm::enableClose( bool bEnable ) { m_pClose->setEnabled( bEnable ); - m_pClose->tqrepaint( false ); + m_pClose->repaint( false ); } //============ setIcon ==================// @@ -779,8 +779,8 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) { //reparent to this widget , no flags , point , show it TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos ); - TQSize mincs = w->tqminimumSize(); - TQSize maxcs = w->tqmaximumSize(); + TQSize mincs = w->minimumSize(); + TQSize maxcs = w->maximumSize(); w->setMinimumSize( 0, 0 ); w->setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX ); @@ -798,11 +798,11 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) TQObject::connect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) ); if ( m_pClient->minimumWidth() > m_pManager->m_defaultChildFrmSize.width() ) - setMinimumWidth( m_pClient->tqminimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER ); + setMinimumWidth( m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER ); if ( m_pClient->minimumHeight() > m_pManager->m_defaultChildFrmSize.height() ) { - setMinimumHeight( m_pClient->tqminimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + + setMinimumHeight( m_pClient->minimumSize().height() + KMDI_CHILDFRM_DOUBLE_BORDER + m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR ); } } @@ -826,8 +826,8 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) if ( focusedChildWidget != 0 ) nameOfFocusedWidget = focusedChildWidget->name(); - TQSize mins = m_pClient->tqminimumSize(); - TQSize maxs = m_pClient->tqmaximumSize(); + TQSize mins = m_pClient->minimumSize(); + TQSize maxs = m_pClient->maximumSize(); m_pClient->reparent( 0, 0, mapToGlobal( pos() ) - pos() + positionOffset, isVisible() ); m_pClient->setMinimumSize( mins.width(), mins.height() ); m_pClient->setMaximumSize( maxs.width(), maxs.height() ); diff --git a/kmdi/kmdichildfrm.h b/kmdi/kmdichildfrm.h index 0fe2cd2b2..53a61ed07 100644 --- a/kmdi/kmdichildfrm.h +++ b/kmdi/kmdichildfrm.h @@ -33,7 +33,7 @@ #include <tqpushbutton.h> #include <tqlabel.h> #include <tqdatetime.h> -#include <tqlayout.h> +#include <layout.h> #include <tqdict.h> diff --git a/kmdi/kmdichildfrmcaption.cpp b/kmdi/kmdichildfrmcaption.cpp index 062fa6261..9ebbefb34 100644 --- a/kmdi/kmdichildfrmcaption.cpp +++ b/kmdi/kmdichildfrmcaption.cpp @@ -182,7 +182,7 @@ void KMdiChildFrmCaption::setActive( bool bActive ) m_pParent->m_pManager->m_captionInactiveBackColor ); m_bActive = bActive; - tqrepaint( false ); + repaint( false ); } //=============== setCaption ===============// @@ -190,7 +190,7 @@ void KMdiChildFrmCaption::setActive( bool bActive ) void KMdiChildFrmCaption::setCaption( const TQString& text ) { m_szCaption = text; - tqrepaint( false ); + repaint( false ); } //============== heightHint ===============// diff --git a/kmdi/kmdidockcontainer.cpp b/kmdi/kmdidockcontainer.cpp index 71b154a14..f488df509 100644 --- a/kmdi/kmdidockcontainer.cpp +++ b/kmdi/kmdidockcontainer.cpp @@ -24,7 +24,7 @@ #include "kdockwidget_private.h" #include <tqwidgetstack.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <tqtooltip.h> #include <kmultitabbar.h> @@ -826,7 +826,7 @@ void KMdiDockContainer::prevToolView() if ( pos < 0 ) pos = tabs->count() - 1; - KMultiTabBarTab *tab = tabs->tqat( pos ); + KMultiTabBarTab *tab = tabs->at( pos ); if ( !tab ) return ; //can never happen here, but who knows @@ -847,7 +847,7 @@ void KMdiDockContainer::nextToolView() if ( pos >= ( int ) tabs->count() ) pos = 0; - KMultiTabBarTab *tab = tabs->tqat( pos ); + KMultiTabBarTab *tab = tabs->at( pos ); if ( !tab ) return ; //can never happen here, but who knows diff --git a/kmdi/kmdidocumentviewtabwidget.cpp b/kmdi/kmdidocumentviewtabwidget.cpp index 7656bb358..a75000148 100644 --- a/kmdi/kmdidocumentviewtabwidget.cpp +++ b/kmdi/kmdidocumentviewtabwidget.cpp @@ -54,7 +54,7 @@ void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQString & l KTabWidget::insertTab( child, label, index ); showPage( child ); TQTimer::singleShot(0, this, TQT_SLOT(maybeShow())); - tabBar() ->tqrepaint(); + tabBar() ->repaint(); } void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index ) @@ -62,7 +62,7 @@ void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQIconSet & KTabWidget::insertTab( child, iconset, label, index ); showPage( child ); TQTimer::singleShot(0, this, TQT_SLOT(maybeShow())); - tabBar() ->tqrepaint(); + tabBar() ->repaint(); } void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, TQTab * tab, int index ) @@ -70,7 +70,7 @@ void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, TQTab * tab, int i KTabWidget::insertTab( child, tab, index ); showPage( child ); TQTimer::singleShot(0, this, TQT_SLOT(maybeShow())); - tabBar() ->tqrepaint(); + tabBar() ->repaint(); } void KMdiDocumentViewTabWidget::removePage ( TQWidget * w ) diff --git a/kmdi/kmdiguiclient.cpp b/kmdi/kmdiguiclient.cpp index 4ac95c4fe..0057172d6 100644 --- a/kmdi/kmdiguiclient.cpp +++ b/kmdi/kmdiguiclient.cpp @@ -128,7 +128,7 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c if ( domDocument().documentElement().isNull() ) { - TQString completeDescription = TQString::tqfromLatin1( guiDescription ) + TQString completeDescription = TQString::fromLatin1( guiDescription ) .arg( actionListName ); setXML( completeDescription, false /*merge*/ ); @@ -174,7 +174,7 @@ KMDIGUIClient::~KMDIGUIClient() // actionCollection()->writeShortcutSettings( "KMDI Shortcuts", kapp->config() ); for ( uint i = 0;i < m_toolViewActions.count();i++ ) - disconnect( m_toolViewActions.tqat( i ), 0, this, 0 ); + disconnect( m_toolViewActions.at( i ), 0, this, 0 ); m_toolViewActions.setAutoDelete( false ); m_toolViewActions.clear(); @@ -230,7 +230,7 @@ void KMDIGUIClient::setupActions() TQPtrList<KAction> addList; if ( m_toolViewActions.count() < 3 ) for ( uint i = 0;i < m_toolViewActions.count();i++ ) - addList.append( m_toolViewActions.tqat( i ) ); + addList.append( m_toolViewActions.at( i ) ); else addList.append( m_toolMenu ); if ( m_mdiMode == KMdi::IDEAlMode ) diff --git a/kmdi/kmdimainfrm.cpp b/kmdi/kmdimainfrm.cpp index 4ac49df4e..246398053 100644 --- a/kmdi/kmdimainfrm.cpp +++ b/kmdi/kmdimainfrm.cpp @@ -38,7 +38,7 @@ #include <assert.h> #include <tqcursor.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqobjectlist.h> #include <tqpopupmenu.h> #include <tqmenubar.h> @@ -57,9 +57,9 @@ #include <tqtoolbutton.h> #include <tqdockarea.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstring.h> #include <tqmap.h> #include <tqvaluelist.h> @@ -701,7 +701,7 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow ) #ifdef Q_WS_X11 if ( mdiMode() == KMdi::ToplevelMode ) { - XSetTransientForHint( qt_xdisplay(), pWnd->winId(), tqtopLevelWidget() ->winId() ); + XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() ); } #endif @@ -711,7 +711,7 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow ) #ifdef Q_WS_X11 if ( mdiMode() == KMdi::ToplevelMode ) { - XSetTransientForHint( qt_xdisplay(), pWnd->winId(), tqtopLevelWidget() ->winId() ); + XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() ); } #endif @@ -1659,8 +1659,8 @@ void KMdiMainFrm::finishTabPageMode() if ( pView->isToolView() ) continue; kdDebug(760) << "KMdiMainFrm::finishTabPageMode: in loop" << endl; - TQSize mins = pView->tqminimumSize(); - TQSize maxs = pView->tqmaximumSize(); + TQSize mins = pView->minimumSize(); + TQSize maxs = pView->maximumSize(); TQSize sz = pView->size(); TQWidget* pParent = pView->parentWidget(); TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset ); @@ -2075,8 +2075,8 @@ void KMdiMainFrm::finishIDEAlMode( bool full ) KMdiChildView* pView = it.current(); if ( pView->isToolView() ) continue; - TQSize mins = pView->tqminimumSize(); - TQSize maxs = pView->tqmaximumSize(); + TQSize mins = pView->minimumSize(); + TQSize maxs = pView->maximumSize(); TQSize sz = pView->size(); TQWidget* pParent = pView->parentWidget(); TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset ); @@ -2733,7 +2733,7 @@ void KMdiMainFrm::windowMenuItemActivated( int id ) if ( id < 100 ) return ; id -= 100; - KMdiChildView *pView = m_pDocumentViews->tqat( id ); + KMdiChildView *pView = m_pDocumentViews->at( id ); if ( !pView ) return ; if ( pView->isMinimized() ) @@ -2759,7 +2759,7 @@ void KMdiMainFrm::dockMenuItemActivated( int id ) if ( id < 100 ) return ; id -= 100; - KMdiChildView *pView = m_pDocumentViews->tqat( id ); + KMdiChildView *pView = m_pDocumentViews->at( id ); if ( !pView ) return ; if ( pView->isMinimized() ) diff --git a/kmdi/kmdimainfrm.h b/kmdi/kmdimainfrm.h index 5143c8c68..af2134a39 100644 --- a/kmdi/kmdimainfrm.h +++ b/kmdi/kmdimainfrm.h @@ -142,7 +142,7 @@ public: * use fakeSDIApplication() to fake it and isFakingSDIApplication() to query whether or not an SDI * interface is being faked. * - * You can dynamically change the tqshape of the attached MDI views using setFrameDecorOfAttachedViews(). + * You can dynamically change the shape of the attached MDI views using setFrameDecorOfAttachedViews(). * * Additionally, here's a hint how to restore the mainframe's settings from config file: * \code diff --git a/kmdi/kmditaskbar.cpp b/kmdi/kmditaskbar.cpp index 70141a110..09b212734 100644 --- a/kmdi/kmditaskbar.cpp +++ b/kmdi/kmditaskbar.cpp @@ -341,8 +341,8 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) // if there's enough space, use actual width int buttonCount = m_pButtonList->count(); int tbHandlePixel; - tbHandlePixel = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); - int buttonAreaWidth = taskBarWidth - tbHandlePixel - tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5; + tbHandlePixel = tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + int buttonAreaWidth = taskBarWidth - tbHandlePixel - tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5; if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) ) { for ( b = m_pButtonList->first();b;b = m_pButtonList->next() ) diff --git a/kmdi/test/hello.cpp b/kmdi/test/hello.cpp index e00a4d705..d92233ea6 100644 --- a/kmdi/test/hello.cpp +++ b/kmdi/test/hello.cpp @@ -36,7 +36,7 @@ Hello::Hello( const char *title, const char *text, TQWidget *parentWidget ) void Hello::animate() { b = (b + 1) & 15; - tqrepaint( false ); + repaint( false ); } diff --git a/kmdi/test/mainwidget.cpp b/kmdi/test/mainwidget.cpp index e8aa8da1d..be667e39a 100644 --- a/kmdi/test/mainwidget.cpp +++ b/kmdi/test/mainwidget.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <tqlayout.h> +#include <layout.h> #include <tqmenubar.h> #include <tqtoolbar.h> #include <tqmultilineedit.h> diff --git a/kmdi/test/mainwidget.h b/kmdi/test/mainwidget.h index 953512005..e1ba58c3f 100644 --- a/kmdi/test/mainwidget.h +++ b/kmdi/test/mainwidget.h @@ -19,7 +19,7 @@ #define MAINWIDGET_H #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqdom.h> #include <kmdimainfrm.h> diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp index cda530e86..b87ba5d74 100644 --- a/knewstuff/downloaddialog.cpp +++ b/knewstuff/downloaddialog.cpp @@ -36,11 +36,11 @@ #include <knewstuff/knewstuffgeneric.h> #include <knewstuff/engine.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqdom.h> #include <tqlabel.h> -#include <tqtextbrowser.h> +#include <textbrowser.h> #include <tqtabwidget.h> #include <tqtimer.h> // hack @@ -182,9 +182,9 @@ void DownloadDialog::clear() kdDebug() << "clear listviews in " << v << endl; if(v) { - (*(v->tqat(0)))->clear(); - (*(v->tqat(1)))->clear(); - (*(v->tqat(2)))->clear(); + (*(v->at(0)))->clear(); + (*(v->at(1)))->clear(); + (*(v->at(2)))->clear(); //delete (*it); } @@ -570,7 +570,7 @@ void DownloadDialog::install(Entry *e) if(currentEntryItem() == m_entryitem) { TQPushButton *in; - in = *(m_buttons[d->m_page]->tqat(0)); + in = *(m_buttons[d->m_page]->at(0)); if(in) in->setEnabled(false); } @@ -625,8 +625,8 @@ void DownloadDialog::slotTab() else { TQPushButton *de, *in; - in = *(m_buttons[d->m_page]->tqat(0)); - de = *(m_buttons[d->m_page]->tqat(1)); + in = *(m_buttons[d->m_page]->at(0)); + de = *(m_buttons[d->m_page]->at(1)); if(in) in->setEnabled(false); if(de) de->setEnabled(false); @@ -705,8 +705,8 @@ void DownloadDialog::slotSelected() else enabled = true; TQPushButton *de, *in; - in = *(m_buttons[d->m_page]->tqat(0)); - de = *(m_buttons[d->m_page]->tqat(1)); + in = *(m_buttons[d->m_page]->at(0)); + de = *(m_buttons[d->m_page]->at(1)); if(in) in->setEnabled(enabled); if(de) de->setEnabled(true); } @@ -747,9 +747,9 @@ void DownloadDialog::slotPage(TQWidget *w) d->m_page = w; - lv_r = *(m_map[w]->tqat(0)); - lv_d = *(m_map[w]->tqat(1)); - lv_l = *(m_map[w]->tqat(2)); + lv_r = *(m_map[w]->at(0)); + lv_d = *(m_map[w]->at(1)); + lv_l = *(m_map[w]->at(2)); p = m_providers[w]; m_rt = m_rts[w]; diff --git a/knewstuff/ghns.cpp b/knewstuff/ghns.cpp index 90596da3d..cfc94cd40 100644 --- a/knewstuff/ghns.cpp +++ b/knewstuff/ghns.cpp @@ -20,9 +20,9 @@ */ #include <iostream> -#include <tqlayout.h> +#include <layout.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqlabel.h> #include <kaboutdata.h> diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp index 8438e25ea..c4249483c 100644 --- a/knewstuff/knewstuffgeneric.cpp +++ b/knewstuff/knewstuffgeneric.cpp @@ -20,7 +20,7 @@ */ #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqdir.h> #include <kdebug.h> diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp index a66258701..f87ba458e 100644 --- a/knewstuff/providerdialog.cpp +++ b/knewstuff/providerdialog.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqlayout.h> +#include <layout.h> #include <tqstring.h> #include <tqlabel.h> diff --git a/knewstuff/testnewstuff.cpp b/knewstuff/testnewstuff.cpp index b0c380c68..84007f67d 100644 --- a/knewstuff/testnewstuff.cpp +++ b/knewstuff/testnewstuff.cpp @@ -20,9 +20,9 @@ #include <iostream> -#include <tqlayout.h> +#include <layout.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kaboutdata.h> #include <kapplication.h> diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp index cecc67e32..28c454926 100644 --- a/knewstuff/uploaddialog.cpp +++ b/knewstuff/uploaddialog.cpp @@ -20,7 +20,7 @@ #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqspinbox.h> #include <tqstring.h> diff --git a/kparts/browserextension.cpp b/kparts/browserextension.cpp index e3ae1a516..2fc071ba8 100644 --- a/kparts/browserextension.cpp +++ b/kparts/browserextension.cpp @@ -20,13 +20,13 @@ #include "browserextension.h" #include <tqapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqtimer.h> #include <tqobjectlist.h> #include <tqmetaobject.h> #include <tqregexp.h> #include <tqstrlist.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <kdebug.h> #include <klocale.h> @@ -370,7 +370,7 @@ BrowserExtension::BrowserExtension( KParts::ReadOnlyPart *parent, // they're supported or not ActionSlotMap::ConstIterator it = s_actionSlotMap->begin(); ActionSlotMap::ConstIterator itEnd = s_actionSlotMap->end(); - TQStrList slotNames = tqmetaObject()->slotNames(); + TQStrList slotNames = metaObject()->slotNames(); for ( int i=0 ; it != itEnd ; ++it, ++i ) { // Does the extension have a slot with the name of this action ? @@ -452,7 +452,7 @@ void BrowserExtension::slotCompleted() void BrowserExtension::pasteRequest() { 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. url.remove(TQRegExp("[\\ ]*\\n+[\\ ]*")); diff --git a/kparts/browserextension.h b/kparts/browserextension.h index 364e300c4..17bf9d65e 100644 --- a/kparts/browserextension.h +++ b/kparts/browserextension.h @@ -446,7 +446,7 @@ public: * Checking if the extension implements a certain slot can be done like this: * * \code - * extension->tqmetaObject()->slotNames().contains( actionName + "()" ) + * extension->metaObject()->slotNames().contains( actionName + "()" ) * \endcode * * (note that @p actionName is the iterator's key value if already diff --git a/kparts/browserinterface.cpp b/kparts/browserinterface.cpp index 6882132fe..ae66dd6c0 100644 --- a/kparts/browserinterface.cpp +++ b/kparts/browserinterface.cpp @@ -19,7 +19,7 @@ BrowserInterface::~BrowserInterface() void BrowserInterface::callMethod( const char *name, const TQVariant &argument ) { - int slot = tqmetaObject()->findSlot( name ); + int slot = metaObject()->findSlot( name ); if ( slot == -1 ) return; diff --git a/kparts/browserrun.cpp b/kparts/browserrun.cpp index c617a5f99..0500e0631 100644 --- a/kparts/browserrun.cpp +++ b/kparts/browserrun.cpp @@ -209,7 +209,7 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& !m_strURL.isLocalFile() ) { if ( isTextExecutable(mimeType) ) - mimeType = TQString::tqfromLatin1("text/plain"); // view, don't execute + mimeType = TQString::fromLatin1("text/plain"); // view, don't execute kdDebug(1000) << "BrowserRun: ask for saving" << endl; KService::Ptr offer = KServiceTypeProfile::preferredService(mimeType, "Application"); // ... -> ask whether to save @@ -313,7 +313,7 @@ BrowserRun::AskSaveResult BrowserRun::askSave( const KURL & url, KService::Ptr o int choice = KMessageBox::questionYesNoCancel( 0L, question, url.host(), KStdGuiItem::saveAs(), openText, - TQString::tqfromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! + TQString::fromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel ); // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC @@ -351,7 +351,7 @@ BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const TQ int choice = KMessageBox::questionYesNoCancel( 0L, question, url.host(), KStdGuiItem::saveAs(), KGuiItem( i18n( "&Open" ), "fileopen"), - TQString::tqfromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! + TQString::fromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel ); // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC } diff --git a/kparts/browserrun.h b/kparts/browserrun.h index 0a0ec1be4..79a7386c6 100644 --- a/kparts/browserrun.h +++ b/kparts/browserrun.h @@ -98,7 +98,7 @@ namespace KParts { */ TQString contentDisposition() const; - bool serverSuggestsSave() const { return contentDisposition() == TQString::tqfromLatin1("attachment"); } + bool serverSuggestsSave() const { return contentDisposition() == TQString::fromLatin1("attachment"); } enum AskSaveResult { Save, Open, Cancel }; /** diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h index ac37cabfe..67f98a90f 100644 --- a/kparts/componentfactory.h +++ b/kparts/componentfactory.h @@ -63,7 +63,7 @@ namespace KParts const TQStringList &args = TQStringList() ) { TQObject *object = factory->create( parent, name, - T::tqstaticMetaObject()->className(), + T::staticMetaObject()->className(), args ); T *result = tqt_dynamic_cast<T *>( object ); @@ -101,7 +101,7 @@ namespace KParts { KParts::Part *object = factory->createPart( parentWidget, widgetName, parent, name, - T::tqstaticMetaObject()->className(), + T::staticMetaObject()->className(), args ); T *result = tqt_dynamic_cast<T *>( object ); @@ -376,7 +376,7 @@ namespace KParts const TQStringList &args = TQStringList(), int *error = 0 ) { - KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::tqfromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); + KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::fromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); if ( offers.isEmpty() ) { if ( error ) diff --git a/kparts/dockmainwindow.cpp b/kparts/dockmainwindow.cpp index 461bc0ec3..9f7703ab6 100644 --- a/kparts/dockmainwindow.cpp +++ b/kparts/dockmainwindow.cpp @@ -76,7 +76,7 @@ void DockMainWindow::createGUI( Part * part ) KXMLGUIFactory *factory = guiFactory(); - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); TQPtrList<Plugin> plugins; @@ -117,7 +117,7 @@ void DockMainWindow::createGUI( Part * part ) } - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); d->m_activePart = part; } diff --git a/kparts/mainwindow.cpp b/kparts/mainwindow.cpp index facc5a0ec..c0c4cd086 100644 --- a/kparts/mainwindow.cpp +++ b/kparts/mainwindow.cpp @@ -93,7 +93,7 @@ void MainWindow::createGUI( Part * part ) assert( factory ); - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); TQPtrList<Plugin> plugins; @@ -137,7 +137,7 @@ void MainWindow::createGUI( Part * part ) applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); } - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); d->m_activePart = part; } diff --git a/kparts/part.cpp b/kparts/part.cpp index aacdf4c74..6d34160ca 100644 --- a/kparts/part.cpp +++ b/kparts/part.cpp @@ -29,7 +29,7 @@ #include <tqpoint.h> #include <tqpointarray.h> #include <tqpainter.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqfileinfo.h> #include <kinstance.h> @@ -114,7 +114,7 @@ void PartBase::setInstance( KInstance *inst, bool bLoadPlugins ) // install 'instancename'data resource type KGlobal::dirs()->addResourceType( inst->instanceName() + "data", KStandardDirs::kde_default( "data" ) - + TQString::tqfromLatin1( inst->instanceName() ) + '/' ); + + TQString::fromLatin1( inst->instanceName() ) + '/' ); if ( bLoadPlugins ) loadPlugins( m_obj, this, instance() ); } @@ -365,7 +365,7 @@ bool ReadOnlyPart::openURL( const KURL &url ) KURL destURL; destURL.setPath( m_file ); d->m_job = KIO::file_copy( m_url, destURL, 0600, true, false, d->m_showProgressInfo ); - d->m_job->setWindow( widget() ? widget()->tqtopLevelWidget() : 0 ); + d->m_job->setWindow( widget() ? widget()->topLevelWidget() : 0 ); emit started( d->m_job ); connect( d->m_job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) ); return true; @@ -638,7 +638,7 @@ bool ReadWritePart::saveToURL() return false; } d->m_uploadJob = KIO::file_move( uploadUrl, m_url, -1, true /*overwrite*/ ); - d->m_uploadJob->setWindow( widget() ? widget()->tqtopLevelWidget() : 0 ); + d->m_uploadJob->setWindow( widget() ? widget()->topLevelWidget() : 0 ); connect( d->m_uploadJob, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotUploadFinished (KIO::Job *) ) ); return true; } diff --git a/kparts/partmanager.cpp b/kparts/partmanager.cpp index ca8a3a76d..97a8b9961 100644 --- a/kparts/partmanager.cpp +++ b/kparts/partmanager.cpp @@ -206,7 +206,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev ) { TQPoint pos; - if ( !d->m_managedTopLevelWidgets.containsRef( w->tqtopLevelWidget() ) ) + if ( !d->m_managedTopLevelWidgets.containsRef( w->topLevelWidget() ) ) return false; if ( d->m_bIgnoreScrollBars && w->inherits( TQSCROLLBAR_OBJECT_NAME_STRING ) ) diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp index a42839c23..c9b0d2e36 100644 --- a/kparts/plugin.cpp +++ b/kparts/plugin.cpp @@ -68,7 +68,7 @@ TQString Plugin::xmlFile() const if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) ) return path; - TQString absPath = locate( "data", TQString::tqfromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); + TQString absPath = locate( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); assert( !absPath.isEmpty() ); return absPath; } @@ -80,7 +80,7 @@ TQString Plugin::localXMLFile() const if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) ) return path; - TQString absPath = locateLocal( "data", TQString::tqfromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); + TQString absPath = locateLocal( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); assert( !absPath.isEmpty() ); return absPath; } @@ -104,7 +104,7 @@ TQValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance for (; pIt != pEnd; ++pIt ) { TQFileInfo fInfo( *pIt ); - if ( fInfo.extension() == TQString::tqfromLatin1( "desktop" ) ) + if ( fInfo.extension() == TQString::fromLatin1( "desktop" ) ) continue; TQMap<TQString,TQStringList>::Iterator mapIt = sortedPlugins.find( fInfo.fileName() ); diff --git a/kparts/statusbarextension.cpp b/kparts/statusbarextension.cpp index 3e64bcece..a90a50689 100644 --- a/kparts/statusbarextension.cpp +++ b/kparts/statusbarextension.cpp @@ -135,7 +135,7 @@ KStatusBar * StatusBarExtension::statusBar() const { if ( !m_statusBar ) { TQWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget(); - KMainWindow* mw = tqt_dynamic_cast<KMainWindow *>( w->tqtopLevelWidget() ); + KMainWindow* mw = tqt_dynamic_cast<KMainWindow *>( w->topLevelWidget() ); if ( mw ) m_statusBar = mw->statusBar(); } diff --git a/kparts/tests/notepad.cpp b/kparts/tests/notepad.cpp index e0857a51e..311a49372 100644 --- a/kparts/tests/notepad.cpp +++ b/kparts/tests/notepad.cpp @@ -5,7 +5,7 @@ #include <tqsplitter.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqmultilineedit.h> #include <kaboutdata.h> diff --git a/kparts/tests/parts.cpp b/kparts/tests/parts.cpp index d932a168f..2d4409dda 100644 --- a/kparts/tests/parts.cpp +++ b/kparts/tests/parts.cpp @@ -6,7 +6,7 @@ #include <tqcheckbox.h> #include <tqfile.h> #include <tqdir.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqmultilineedit.h> #include <tqlineedit.h> #include <tqvbox.h> diff --git a/krandr/ktimerdialog.cpp b/krandr/ktimerdialog.cpp index 0be416be7..760715300 100644 --- a/krandr/ktimerdialog.cpp +++ b/krandr/ktimerdialog.cpp @@ -20,7 +20,7 @@ */ #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvbox.h> #include <tqtimer.h> #include <tqprogressbar.h> diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc index 86f8e6bd0..b4f21e5fe 100644 --- a/krandr/libkrandr.cc +++ b/krandr/libkrandr.cc @@ -55,7 +55,7 @@ unsigned int reverse_bits(register unsigned int x) TQString exec(const char * cmd) { TQString bashcommand = cmd; bashcommand = bashcommand.replace("\"", "\\\""); - bashcommand = TQString("/bin/bash -c \"%1\" 2>&1").tqarg(bashcommand); + bashcommand = TQString("/bin/bash -c \"%1\" 2>&1").arg(bashcommand); FILE* pipe = popen(bashcommand.ascii(), "r"); if (!pipe) return "ERROR"; char buffer[128]; @@ -82,7 +82,7 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa TQString retval; if (profileName != NULL) { - t_config = new KSimpleConfig( TQString::tqfromLatin1( "kiccconfigrc" )); + t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); } else { t_systemconfig = new KSimpleConfig( kde_confdir + TQString("/kicc/kiccconfigrc") ); @@ -268,7 +268,7 @@ TQString KRandrSimpleAPI::applyIccConfiguration(TQString profileName, TQString k int screenNumber = 0; TQString errorstr = ""; - t_config = new KSimpleConfig( TQString::tqfromLatin1( "kiccconfigrc" )); + t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); // Find all screens if (isValid() == true) { @@ -372,7 +372,7 @@ TQString KRandrSimpleAPI::getCurrentProfile () { TQString profileName; KSimpleConfig *t_config; - t_config = new KSimpleConfig( TQString::tqfromLatin1( "kiccconfigrc" )); + t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); profileName = t_config->readEntry("CurrentProfile"); delete t_config; return profileName; @@ -1071,11 +1071,11 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() { if (cur_screen) { screendata->screen_connected = true; for (int j = 0; j < cur_screen->numSizes(); j++) { - screendata->resolutions.append(i18n("%1 x %2").tqarg(cur_screen->pixelSize(j).width()).tqarg(cur_screen->pixelSize(j).height())); + screendata->resolutions.append(i18n("%1 x %2").arg(cur_screen->pixelSize(j).width()).arg(cur_screen->pixelSize(j).height())); } screendata->current_resolution_index = 0; if (current_crtc) { - screendata->current_resolution_index = screendata->resolutions.findIndex(i18n("%1 x %2").tqarg(current_crtc->info->width).tqarg(current_crtc->info->height)); + screendata->current_resolution_index = screendata->resolutions.findIndex(i18n("%1 x %2").arg(current_crtc->info->width).arg(current_crtc->info->height)); } if (screendata->current_resolution_index < 0) { screendata->current_resolution_index = cur_screen->proposedSize(); diff --git a/krandr/randr.cpp b/krandr/randr.cpp index 85f360f52..bd57fdc9f 100644 --- a/krandr/randr.cpp +++ b/krandr/randr.cpp @@ -691,7 +691,7 @@ const TQString& RandRDisplay::version() const void RandRDisplay::setCurrentScreen(int index) { m_currentScreenIndex = index; - m_currentScreen = m_screens.tqat(m_currentScreenIndex); + m_currentScreen = m_screens.at(m_currentScreenIndex); Q_ASSERT(m_currentScreen); } @@ -719,7 +719,7 @@ int RandRDisplay::numScreens() const RandRScreen* RandRDisplay::screen(int index) { - return m_screens.tqat(index); + return m_screens.at(index); } RandRScreen* RandRDisplay::currentScreen() diff --git a/kresources/configdialog.cpp b/kresources/configdialog.cpp index bbebc47a3..a78fb7c7f 100644 --- a/kresources/configdialog.cpp +++ b/kresources/configdialog.cpp @@ -27,7 +27,7 @@ #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcheckbox.h> #include "factory.h" diff --git a/kresources/configpage.cpp b/kresources/configpage.cpp index fa098b105..4aea559ff 100644 --- a/kresources/configpage.cpp +++ b/kresources/configpage.cpp @@ -23,7 +23,7 @@ #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> #include <kcombobox.h> @@ -106,9 +106,9 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name ) TQGroupBox *groupBox = new TQGroupBox( i18n( "Resources" ), this ); groupBox->setColumnLayout(0, Qt::Vertical ); - groupBox->tqlayout()->setSpacing( 6 ); - groupBox->tqlayout()->setMargin( 11 ); - TQGridLayout *groupBoxLayout = new TQGridLayout( groupBox->tqlayout(), 2, 2 ); + groupBox->layout()->setSpacing( 6 ); + groupBox->layout()->setMargin( 11 ); + TQGridLayout *groupBoxLayout = new TQGridLayout( groupBox->layout(), 2, 2 ); mFamilyCombo = new KComboBox( false, groupBox ); groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 ); @@ -130,7 +130,7 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name ) mEditButton->setEnabled( false ); mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), TQT_TQOBJECT(this), TQT_SLOT(slotStandard()) ); mStandardButton->setEnabled( false ); - buttonBox->tqlayout(); + buttonBox->layout(); groupBoxLayout->addWidget( buttonBox, 1, 1 ); diff --git a/kresources/kcmkresources.cpp b/kresources/kcmkresources.cpp index 41fdb91fe..722c604df 100644 --- a/kresources/kcmkresources.cpp +++ b/kresources/kcmkresources.cpp @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqlayout.h> +#include <layout.h> #include <kaboutdata.h> #include <kgenericfactory.h> diff --git a/kresources/manager.h b/kresources/manager.h index c11ecaab5..ab1562716 100644 --- a/kresources/manager.h +++ b/kresources/manager.h @@ -335,7 +335,7 @@ class Manager : private ManagerNotifier ++it ) { TQString desc = mFactory->typeName( *it ); if ( !mFactory->typeDescription( *it ).isEmpty() ) - desc += TQString::tqfromLatin1(" (") + mFactory->typeDescription( *it ) + TQString::tqfromLatin1(")"); + desc += TQString::fromLatin1(" (") + mFactory->typeDescription( *it ) + TQString::fromLatin1(")"); typeDescs.append( desc ); } diff --git a/kresources/resource.h b/kresources/resource.h index eec790bbe..cb9dadfc6 100644 --- a/kresources/resource.h +++ b/kresources/resource.h @@ -144,7 +144,7 @@ class ResourceExampleConfig : public KRES::ResourceConfigWidget <B>resourceexampleconfig.cpp</B>: \code -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <kresources/resourceconfigwidget.h> #include "resourceexample.h" diff --git a/kresources/selectdialog.cpp b/kresources/selectdialog.cpp index 5ae9bdcea..869775989 100644 --- a/kresources/selectdialog.cpp +++ b/kresources/selectdialog.cpp @@ -27,7 +27,7 @@ #include <kmessagebox.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include "resource.h" @@ -66,7 +66,7 @@ SelectDialog::SelectDialog( TQPtrList<Resource> list, TQWidget *parent, // setup listbox uint counter = 0; for ( uint i = 0; i < list.count(); ++i ) { - Resource *resource = list.tqat( i ); + Resource *resource = list.at( i ); if ( resource && !resource->readOnly() ) { mResourceMap.insert( counter, resource ); mResourceId->insertItem( resource->resourceName() ); diff --git a/krsync/krsync.h b/krsync/krsync.h index c9273f697..dedefa8f4 100644 --- a/krsync/krsync.h +++ b/krsync/krsync.h @@ -41,7 +41,7 @@ #include <tqpainter.h> #include <tqpixmap.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqstring.h> #include <tqregexp.h> diff --git a/krsync/rsyncconfigdialog.cpp b/krsync/rsyncconfigdialog.cpp index b51fa4756..a16871086 100644 --- a/krsync/rsyncconfigdialog.cpp +++ b/krsync/rsyncconfigdialog.cpp @@ -60,7 +60,7 @@ #include <tqpainter.h> #include <tqpixmap.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqstring.h> #include <tqregexp.h> @@ -121,13 +121,13 @@ RsyncConfigDialog::RsyncConfigDialog(TQWidget* parent, const char* name, mCancelText = actionButton(KDialogBase::Cancel)->text(); 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); - tqlayout->addWidget(mLabel); + layout->addWidget(mLabel); // Create an exclusive button group TQButtonGroup *layoutg = new TQButtonGroup( 1, Qt::Horizontal, i18n("Synchronization Method")+TQString(":"), mainWidget); - tqlayout->addWidget( layoutg ); + layout->addWidget( layoutg ); layoutg->setExclusive( TRUE ); // Insert radiobuttons @@ -147,7 +147,7 @@ RsyncConfigDialog::RsyncConfigDialog(TQWidget* parent, const char* name, // Create an exclusive button group TQButtonGroup *layoutm = new TQButtonGroup( 1, Qt::Horizontal, i18n("Remote Folder")+TQString(":"), mainWidget); - tqlayout->addWidget( layoutm ); + layout->addWidget( layoutm ); layoutg->setExclusive( TRUE ); m_rsync_txt = new TQLineEdit(layoutm); @@ -157,7 +157,7 @@ RsyncConfigDialog::RsyncConfigDialog(TQWidget* parent, const char* name, // Create an exclusive button group TQButtonGroup *layouta = new TQButtonGroup( 1, Qt::Horizontal, i18n("Automatic Synchronization")+TQString(":"), mainWidget); - tqlayout->addWidget( layouta ); + layout->addWidget( layouta ); layouta->setExclusive( FALSE ); m_sync_auto_logout_cb = new TQCheckBox(layouta); diff --git a/kspell2/broker.cpp b/kspell2/broker.cpp index 0149dace1..7f572bb01 100644 --- a/kspell2/broker.cpp +++ b/kspell2/broker.cpp @@ -189,8 +189,8 @@ void Broker::loadPlugin( const TQString& pluginId ) kdDebug()<<"Loading plugin " << pluginId << endl; Client *client = KParts::ComponentFactory::createInstanceFromQuery<Client>( - TQString::tqfromLatin1( "KSpell/Client" ), - TQString::tqfromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), + TQString::fromLatin1( "KSpell/Client" ), + TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, TQStringList(), &error ); if ( client ) diff --git a/kspell2/plugins/aspell/kspell_aspelldict.cpp b/kspell2/plugins/aspell/kspell_aspelldict.cpp index 6687f2106..b829e9bf4 100644 --- a/kspell2/plugins/aspell/kspell_aspelldict.cpp +++ b/kspell2/plugins/aspell/kspell_aspelldict.cpp @@ -22,7 +22,7 @@ #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> using namespace KSpell2; diff --git a/kspell2/plugins/hspell/kspell_hspelldict.cpp b/kspell2/plugins/hspell/kspell_hspelldict.cpp index 04f055e86..5ece8811c 100644 --- a/kspell2/plugins/hspell/kspell_hspelldict.cpp +++ b/kspell2/plugins/hspell/kspell_hspelldict.cpp @@ -23,7 +23,7 @@ #include "kspell_hspelldict.h" #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> using namespace KSpell2; diff --git a/kspell2/plugins/ispell/ispell_checker.h b/kspell2/plugins/ispell/ispell_checker.h index df72fe7b4..00c6d0268 100644 --- a/kspell2/plugins/ispell/ispell_checker.h +++ b/kspell2/plugins/ispell/ispell_checker.h @@ -36,7 +36,7 @@ #include <tqstringlist.h> #include <tqvaluelist.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqstring.h> @@ -112,7 +112,7 @@ private: /* 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 */ char myupper(ichar_t c); diff --git a/kspell2/plugins/ispell/makedent.cpp b/kspell2/plugins/ispell/makedent.cpp index 0aeba8a1c..9c168dc17 100644 --- a/kspell2/plugins/ispell/makedent.cpp +++ b/kspell2/plugins/ispell/makedent.cpp @@ -903,7 +903,7 @@ ISpellChecker::findfiletype (const char *name, int searchnames, int *deformatter /* 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 TODO: this is just a workaround to keep us from crashing. diff --git a/kspell2/tests/test_highlighter.cpp b/kspell2/tests/test_highlighter.cpp index ce5c64501..d49834a0e 100644 --- a/kspell2/tests/test_highlighter.cpp +++ b/kspell2/tests/test_highlighter.cpp @@ -25,7 +25,7 @@ #include <kapplication.h> #include <kdebug.h> -#include <tqtextedit.h> +#include <textedit.h> int main( int argc, char** argv ) { diff --git a/kspell2/ui/configwidget.cpp b/kspell2/ui/configwidget.cpp index 6d98955ae..c9cce08a3 100644 --- a/kspell2/ui/configwidget.cpp +++ b/kspell2/ui/configwidget.cpp @@ -29,7 +29,7 @@ #include <klocale.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> using namespace KSpell2; diff --git a/kspell2/ui/highlighter.cpp b/kspell2/ui/highlighter.cpp index 2d185462d..231e8be1e 100644 --- a/kspell2/ui/highlighter.cpp +++ b/kspell2/ui/highlighter.cpp @@ -27,7 +27,7 @@ #include <kconfig.h> #include <kdebug.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqtimer.h> #include <tqcolor.h> #include <tqdict.h> diff --git a/kspell2/ui/kspell2ui.ui b/kspell2/ui/kspell2ui.ui index c196c3807..e221c69ba 100644 --- a/kspell2/ui/kspell2ui.ui +++ b/kspell2/ui/kspell2ui.ui @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>430</width> <height>300</height> @@ -87,7 +87,7 @@ <property name="text"> <string>... the <b>misspelled</b> word shown in context ...</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignCenter</set> </property> <property name="toolTip" stdset="0"> diff --git a/kstyles/asteroid/asteroid.cpp b/kstyles/asteroid/asteroid.cpp index 59b37df83..362ebd1b5 100644 --- a/kstyles/asteroid/asteroid.cpp +++ b/kstyles/asteroid/asteroid.cpp @@ -20,7 +20,7 @@ #include <tqlistbox.h> #include <tqslider.h> #include <tqpushbutton.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqlineedit.h> #include <tqtoolbar.h> #include <tqcheckbox.h> @@ -108,7 +108,7 @@ void AsteroidStyle::polish(TQWidget *w) { /* Screwing with the palette is fun! and required in order to make it feel 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, TQColor(128, 128, 128)); wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to? @@ -149,10 +149,10 @@ void AsteroidStyle::unPolish(TQWidget *w) void AsteroidStyle::polish( TQApplication* app) { - TQPalette wp = TQApplication::tqpalette(); + TQPalette wp = TQApplication::palette(); 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? - TQApplication::tqsetPalette( wp, TRUE ); + TQApplication::setPalette( wp, TRUE ); } /*! \reimp @@ -289,7 +289,7 @@ void AsteroidStyle::drawKStylePrimitive(KStylePrimitive ksp, } } -int AsteroidStyle::tqstyleHint( TQ_StyleHint stylehint, +int AsteroidStyle::styleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -309,7 +309,7 @@ int AsteroidStyle::tqstyleHint( TQ_StyleHint stylehint, return 1; default: - return KStyle::tqstyleHint(stylehint, widget, option, returnData); + return KStyle::styleHint(stylehint, widget, option, returnData); } } @@ -613,13 +613,13 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, p->drawPolygon(TQPointArray(24, outside)); } p->setPen(cg.mid()); - p->tqdrawPolyline(TQPointArray(24, outside), 0, 12); + p->drawPolyline(TQPointArray(24, outside), 0, 12); p->setPen(cg.light()); - p->tqdrawPolyline(TQPointArray(24, outside), 12, 12); + p->drawPolyline(TQPointArray(24, outside), 12, 12); p->setPen(cg.dark()); - p->tqdrawPolyline(TQPointArray(20, inside), 0, 10); + p->drawPolyline(TQPointArray(20, inside), 0, 10); p->setPen(cg.background()); - p->tqdrawPolyline(TQPointArray(20, inside), 10, 10); + p->drawPolyline(TQPointArray(20, inside), 10, 10); break; } @@ -907,8 +907,8 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } if (sf & Style_Down) { - p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), - tqpixelMetric(PM_ButtonShiftVertical)); + p->translate(pixelMetric(PM_ButtonShiftHorizontal), + pixelMetric(PM_ButtonShiftVertical)); } a.translate((x + w/2), (y + (h-1)/2)); @@ -916,8 +916,8 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, p->drawPoint(a[6]); if (sf & Style_Down) { - p->translate(-tqpixelMetric(PM_ButtonShiftHorizontal), - -tqpixelMetric(PM_ButtonShiftVertical)); + p->translate(-pixelMetric(PM_ButtonShiftHorizontal), + -pixelMetric(PM_ButtonShiftVertical)); } break; @@ -929,7 +929,7 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } } -void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, +void AsteroidStyle::drawControl(TQ_ControlElement ce, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -977,7 +977,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, bool lastTab = (tb->indexOf( t->identifier() ) == tb->count()-1) ? TRUE : FALSE; TQRect r2( r ); - if ( tb->tqshape() == TQTabBar::RoundedAbove ) { + if ( tb->shape() == TQTabBar::RoundedAbove ) { p->setPen( cg.light() ); p->drawLine( r2.left(), r2.bottom()-1, r2.right(), r2.bottom()-1 ); if ( r2.left() == 0 ) @@ -1015,8 +1015,8 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, x2++; p->drawLine( x2, r2.top() + 2, x2, r2.bottom() - (selected ? (lastTab ? 0:1) :2)); - } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) { - bool rightAligned = tqstyleHint( SH_TabBar_Alignment, tb ) == TQt::AlignRight; + } else if ( tb->shape() == TQTabBar::RoundedBelow ) { + bool rightAligned = styleHint( SH_TabBar_Alignment, tb ) == TQt::AlignRight; bool firstTab = tb->indexOf( t->identifier() ) == 0; if ( selected ) { p->fillRect( TQRect( r2.left()+1, r2.top(), r2.width()-3, 1), @@ -1060,7 +1060,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, p->drawLine( r2.left(), r2.top() + (selected ? 0 : 2), r2.left(), r2.bottom() - 2 ); } else { - TQCommonStyle::tqdrawControl(ce, p, w, r, cg, sf, o); + TQCommonStyle::drawControl(ce, p, w, r, cg, sf, o); } break; } @@ -1074,16 +1074,16 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQTab * t = o.tab(); const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); TQRect tr = r; if ( t->identifier() == tb->currentTab() ) tr.setBottom( tr.bottom() - - tqpixelMetric( TQStyle::PM_DefaultFrameWidth, tb ) ); + pixelMetric( TQStyle::PM_DefaultFrameWidth, tb ) ); - int tqalignment = TQt::AlignCenter | TQt::ShowPrefix; - if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) - tqalignment |= TQt::NoAccel; + int alignment = TQt::AlignCenter | TQt::ShowPrefix; + if (!styleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + alignment |= TQt::NoAccel; tr.setWidth(tr.width()+4); // Compensate for text appearing too far to the left // TQRect tr_offset = TQRect(tr.x()+ETCH_X_OFFSET, tr.y()+ETCH_Y_OFFSET, tr.width(), tr.height()); TQRect tr_offset = TQRect(tr.x()+0, tr.y()+0, tr.width(), tr.height()); @@ -1098,7 +1098,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.light() ); etchedcg.setColor( TQColorGroup::BrightText, cg.light() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.light() ); - drawItem( p, tr_offset, tqalignment, etchedcg, enabled, 0, t->text() ); + drawItem( p, tr_offset, alignment, etchedcg, enabled, 0, t->text() ); p->setPen( cg.dark() ); etchedcg.setColor( TQColorGroup::Text, cg.dark() ); etchedcg.setColor( TQColorGroup::Mid, cg.dark() ); @@ -1107,11 +1107,11 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.dark() ); etchedcg.setColor( TQColorGroup::BrightText, cg.dark() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.dark() ); - drawItem( p, tr, tqalignment, etchedcg, enabled, 0, t->text() ); + drawItem( p, tr, alignment, etchedcg, enabled, 0, t->text() ); p->setPen(savePen); } else { - drawItem( p, tr, tqalignment, cg, enabled, 0, t->text() ); + drawItem( p, tr, alignment, cg, enabled, 0, t->text() ); } if ( (sf & Style_HasFocus) && !t->text().isEmpty() ) @@ -1126,11 +1126,11 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, const TQCheckBox *checkbox = (const TQCheckBox *) w; const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); - int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; - if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) - tqalignment |= TQt::NoAccel; + int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + if (!styleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + alignment |= TQt::NoAccel; //TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height()); TQRect r_offset = TQRect(r.x()+0, r.y()+0, r.width(), r.height()); @@ -1145,7 +1145,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.light() ); etchedcg.setColor( TQColorGroup::BrightText, cg.light() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.light() ); - drawItem(p, r_offset, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); + drawItem(p, r_offset, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); p->setPen( cg.dark() ); etchedcg.setColor( TQColorGroup::Text, cg.dark() ); etchedcg.setColor( TQColorGroup::Mid, cg.dark() ); @@ -1154,15 +1154,15 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.dark() ); etchedcg.setColor( TQColorGroup::BrightText, cg.dark() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.dark() ); - drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); + drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); p->setPen(savePen); } else { - drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); + drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); } if (sf & Style_HasFocus) { - TQRect fr = tqvisualRect(subRect(SR_CheckBoxFocusRect, w), w); + TQRect fr = visualRect(subRect(SR_CheckBoxFocusRect, w), w); tqdrawPrimitive(TQStyle::PE_FocusRect, p, fr, cg, sf); } #endif @@ -1175,11 +1175,11 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, const TQRadioButton *radiobutton = (const TQRadioButton *) w; const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); - int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; - if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) - tqalignment |= TQt::NoAccel; + int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + if (!styleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + alignment |= TQt::NoAccel; // TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height()); TQRect r_offset = TQRect(r.x()+0, r.y()+0, r.width(), r.height()); @@ -1194,7 +1194,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.light() ); etchedcg.setColor( TQColorGroup::BrightText, cg.light() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.light() ); - drawItem(p, r_offset, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); + drawItem(p, r_offset, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); p->setPen( cg.dark() ); etchedcg.setColor( TQColorGroup::Text, cg.dark() ); etchedcg.setColor( TQColorGroup::Mid, cg.dark() ); @@ -1203,13 +1203,13 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.dark() ); etchedcg.setColor( TQColorGroup::BrightText, cg.dark() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.dark() ); - drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); + drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); p->setPen(savePen); } - drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, enabled, radiobutton->pixmap(), radiobutton->text()); + drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, enabled, radiobutton->pixmap(), radiobutton->text()); if (sf & Style_HasFocus) { - TQRect fr = tqvisualRect(subRect(SR_RadioButtonFocusRect, w), w); + TQRect fr = visualRect(subRect(SR_RadioButtonFocusRect, w), w); tqdrawPrimitive(TQStyle::PE_FocusRect, p, fr, cg, sf); } #endif @@ -1343,7 +1343,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, bool focused = sf & Style_HasFocus; bool down = sf & Style_Down; bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | AlignHCenter | ShowPrefix | DontClip | SingleLine; if (active && focused) { @@ -1390,13 +1390,13 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, case CE_PushButtonLabel: { const TQPushButton *pb = dynamic_cast<const TQPushButton *>(w); const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | AlignHCenter | ShowPrefix | DontClip | SingleLine; int dx = 0; if (sf & Style_Down) { - p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), - tqpixelMetric(PM_ButtonShiftVertical)); + p->translate(pixelMetric(PM_ButtonShiftHorizontal), + pixelMetric(PM_ButtonShiftVertical)); } if (pb->iconSet() && !pb->iconSet()->isNull()) { @@ -1425,7 +1425,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, } 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()) { TQRect tpr(dx, r.y(), r.width()-dx, r.height()); TQRect tr(p->boundingRect(tpr, text_flags, pb->text())); @@ -1458,7 +1458,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, const TQHeader *hw = dynamic_cast<const TQHeader *>(w); int hs = o.headerSection(); const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; TQIconSet *is = hw->iconSet(hs); @@ -1513,7 +1513,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, bool disabled = !mi->isEnabled(); bool checkable = pum->isCheckable(); bool enabled = mi->isEnabled(); - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); int xpos = x; int xm = itemFrame + checkcol + itemHMargin; @@ -1553,7 +1553,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, pmr.moveCenter(cr.center()); if (backwards) - pmr = tqvisualRect(pmr, r); + pmr = visualRect(pmr, r); p->setPen(cg.highlightedText()); p->drawPixmap(pmr.topLeft(), pixmap); @@ -1572,7 +1572,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQRect rr = TQRect(xp, y, checkcol, sh); if (backwards) { - rr = tqvisualRect(rr, r); + rr = visualRect(rr, r); } tqdrawPrimitive(PE_CheckMark, p, rr, cg, cflags); @@ -1624,8 +1624,8 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQRect rr = TQRect(xp, y+m, tab, sh-(2*m)); TQRect rr_offset = TQRect(xp+ETCH_X_OFFSET, y+m+ETCH_Y_OFFSET, tab, sh-(2*m)); if (backwards) { - rr = tqvisualRect(rr, r); - rr_offset = tqvisualRect(rr_offset, r); + rr = visualRect(rr, r); + rr_offset = visualRect(rr_offset, r); } if POPUPMENUITEM_TEXT_ETCH_CONDITIONS { @@ -1642,8 +1642,8 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQRect rr = TQRect(xpos, y+m, sw-xm-tab+1, sh-(2*m)); TQRect rr_offset = TQRect(xpos+ETCH_X_OFFSET, y+m+ETCH_Y_OFFSET, sw-xm-tab+1, sh-(2*m)); if (backwards) { - rr = tqvisualRect(rr, r); - rr_offset = tqvisualRect(rr_offset, r); + rr = visualRect(rr, r); + rr_offset = visualRect(rr_offset, r); text_flags |= AlignRight; } @@ -1668,7 +1668,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, } if (mi->popup()) { - int dim = tqpixelMetric(PM_MenuButtonIndicator); + int dim = pixelMetric(PM_MenuButtonIndicator); xpos = x + sw - arrowHMargin - 2 * itemFrame - dim; @@ -1680,7 +1680,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQRect rr = TQRect(xpos, y + sh/2 - dim/2, dim, dim); if (backwards) - rr = tqvisualRect(rr, r); + rr = visualRect(rr, r); tqdrawPrimitive((backwards ? PE_ArrowLeft : PE_ArrowRight), p, rr, cg, Style_Enabled); } @@ -1688,12 +1688,12 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, } default: { - KStyle::tqdrawControl(ce, p, w, r, cg, sf, o); + KStyle::drawControl(ce, p, w, r, cg, sf, o); } } } -void AsteroidStyle::tqdrawControlMask(TQ_ControlElement ce, +void AsteroidStyle::drawControlMask(TQ_ControlElement ce, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1733,12 +1733,12 @@ void AsteroidStyle::tqdrawControlMask(TQ_ControlElement ce, CE_HeaderLabel */ default: { - KStyle::tqdrawControlMask(ce, p, w, r, o); + KStyle::drawControlMask(ce, p, w, r, o); } } } -void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, +void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1762,7 +1762,7 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, case CC_ListView: { if ( sc & SC_ListView ) { - TQCommonStyle::tqdrawComplexControl( cc, p, w, r, cg, sf, sc, sa, o ); + TQCommonStyle::drawComplexControl( cc, p, w, r, cg, sf, sc, sa, o ); } if ( sc & ( SC_ListViewBranch | SC_ListViewExpand ) ) { if (o.isDefault()) @@ -1960,7 +1960,7 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, TQRect hr(sw - handle_offset-1, y+2, handle_width, sh-4); int hrx, hry, hrx2, hry2; hr.coords(&hrx, &hry, &hrx2, &hry2); - if (backwards) { hr = tqvisualRect(hr, r); } + if (backwards) { hr = visualRect(hr, r); } p->drawRect(hr); @@ -1991,7 +1991,7 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, pmr.moveBy(1, 1); } - if (backwards) { pmr = tqvisualRect(pmr, r); } + if (backwards) { pmr = visualRect(pmr, r); } p->setPen(cg.foreground()); p->drawPixmap(pmr.topLeft(), downArrow); @@ -2008,8 +2008,8 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, if ( toolbutton->backgroundMode() != TQt::PaletteButton ) c.setBrush( TQColorGroup::Button, toolbutton->paletteBackgroundColor() ); TQRect button, menuarea; - button = tqvisualRect( querySubControlMetrics(cc, w, SC_ToolButton, o), w ); - menuarea = tqvisualRect( querySubControlMetrics(cc, w, SC_ToolButtonMenu, o), w ); + button = visualRect( querySubControlMetrics(cc, w, SC_ToolButton, o), w ); + menuarea = visualRect( querySubControlMetrics(cc, w, SC_ToolButtonMenu, o), w ); SFlags bflags = sf; SFlags mflags = sf; @@ -2077,7 +2077,7 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, /* Turn these off for now */ // Draw the tickmarks /*if (controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, &p2, + TQCommonStyle::drawComplexControl(control, &p2, r, cg, flags, SC_SliderTickmarks, sa, o);*/ // Draw the slider handle @@ -2126,12 +2126,12 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, default: { - KStyle::tqdrawComplexControl(cc, p, w, r, cg, sf, sc, sa, o); + KStyle::drawComplexControl(cc, p, w, r, cg, sf, sc, sa, o); } } } -void AsteroidStyle::tqdrawComplexControlMask(TQ_ComplexControl cc, +void AsteroidStyle::drawComplexControlMask(TQ_ComplexControl cc, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -2149,12 +2149,12 @@ void AsteroidStyle::tqdrawComplexControlMask(TQ_ComplexControl cc, CC_ListView */ default: { - KStyle::tqdrawComplexControlMask(cc, p, w, r, o); + KStyle::drawComplexControlMask(cc, p, w, r, o); } } } -int AsteroidStyle::tqpixelMetric(PixelMetric pm, const TQWidget *w) const +int AsteroidStyle::pixelMetric(PixelMetric pm, const TQWidget *w) const { switch (pm) { /* PixelMetrics available are: @@ -2248,7 +2248,7 @@ int AsteroidStyle::tqpixelMetric(PixelMetric pm, const TQWidget *w) const if (w && w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { return 3; } else { - return KStyle::tqpixelMetric(pm, w); + return KStyle::pixelMetric(pm, w); } } @@ -2274,7 +2274,7 @@ int AsteroidStyle::tqpixelMetric(PixelMetric pm, const TQWidget *w) const return TQMAX( 4, TQApplication::globalStrut().width() ); default: { - return KStyle::tqpixelMetric(pm, w); + return KStyle::pixelMetric(pm, w); } } } @@ -2454,7 +2454,7 @@ TQSize AsteroidStyle::tqsizeFromContents(ContentsType ct, } case CT_ComboBox: { - int padding = (tqpixelMetric(PM_DefaultFrameWidth, w) * 2) + 1; + int padding = (pixelMetric(PM_DefaultFrameWidth, w) * 2) + 1; return TQSize(s.width() + 21, s.height() + padding); } diff --git a/kstyles/asteroid/asteroid.h b/kstyles/asteroid/asteroid.h index e8516c6e1..7b513896b 100644 --- a/kstyles/asteroid/asteroid.h +++ b/kstyles/asteroid/asteroid.h @@ -42,7 +42,7 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, + int styleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; @@ -53,7 +53,7 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawControl(TQ_ControlElement, + void drawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, @@ -61,13 +61,13 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawControlMask(TQ_ControlElement, + void drawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; - void tqdrawComplexControl(TQ_ComplexControl, + void drawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, @@ -77,13 +77,13 @@ public: SCFlags active = SC_None, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawComplexControlMask(TQ_ComplexControl, + void drawComplexControlMask(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &r, const TQStyleOption & = TQStyleOption::Default) const; - int tqpixelMetric(PixelMetric, const TQWidget * = 0) const; + int pixelMetric(PixelMetric, const TQWidget * = 0) const; int kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) const; diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp index 318b0f207..f42ff4061 100644 --- a/kstyles/highcolor/highcolor.cpp +++ b/kstyles/highcolor/highcolor.cpp @@ -317,7 +317,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( sunken ) kDrawBeButton( p, x, y, w, h, cg, true, - &cg.tqbrush(TQColorGroup::Mid) ); + &cg.brush(TQColorGroup::Mid) ); else if ( flags & Style_MouseOver && !flat ) { TQBrush brush(cg.button().light(110)); @@ -367,7 +367,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, cg.button(), false); } else kDrawBeButton(p, x, y, w, h, cg, false, - &cg.tqbrush(TQColorGroup::Button)); + &cg.brush(TQColorGroup::Button)); break; } @@ -764,7 +764,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_WindowFrame: case PE_PanelLineEdit: { bool sunken = flags & Style_Sunken; - int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw == 2) { @@ -799,7 +799,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelDockWindow: { // Toolbar int x2 = r.x()+r.width()-1; int y2 = r.y()+r.height()-1; - int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) @@ -893,8 +893,8 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, p->save(); if ( flags & Style_Down ) - p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), - tqpixelMetric( PM_ButtonShiftVertical ) ); + p->translate( pixelMetric( PM_ButtonShiftHorizontal ), + pixelMetric( PM_ButtonShiftVertical ) ); if ( flags & Style_Enabled ) { a.translate( r.x() + r.width() / 2, r.y() + r.height() / 2 ); @@ -1096,7 +1096,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe, } -void HighColorStyle::tqdrawControl( TQ_ControlElement element, +void HighColorStyle::drawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1119,7 +1119,7 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, if ( btnDefault || button->autoDefault() ) { // Compensate for default indicator - static int di = tqpixelMetric( PM_ButtonDefaultIndicator ); + static int di = pixelMetric( PM_ButtonDefaultIndicator ); br.addCoords( di, di, -di, -di ); } @@ -1145,14 +1145,14 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, // Shift button contents if pushed. if ( active ) { - x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); - y += tqpixelMetric(PM_ButtonShiftVertical, widget); + x += pixelMetric(PM_ButtonShiftHorizontal, widget); + y += pixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); + int dx = pixelMetric( PM_MenuButtonIndicator, widget ); tqdrawPrimitive( PE_ArrowDown, p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), cg, flags, opt ); w -= dx; @@ -1193,25 +1193,25 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, if (button->isEnabled()) // Don't draw double-shadow when disabled for(i=0; i<2; i++) drawItem( p, TQRect(x+i+1, y+1, w, h), AlignCenter | ShowPrefix, - button->tqcolorGroup(), button->isEnabled(), NULL, + button->colorGroup(), button->isEnabled(), NULL, button->text(), -1, - active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() ); + active ? &button->colorGroup().dark() : &button->colorGroup().mid() ); // Normal Text for(i=0; i<2; i++) drawItem( p, TQRect(x+i, y, w, h), AlignCenter | ShowPrefix, - button->tqcolorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL, + button->colorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL, button->text(), -1, - active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); + active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); } else - drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->tqcolorGroup(), + drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); + active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); // Draw a focus rect if the button has focus if ( flags & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - TQStyle::tqvisualRect(subRect(SR_PushButtonFocusRect, widget), widget), + TQStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget), cg, flags ); break; } @@ -1297,7 +1297,7 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, bool enabled = mi->isEnabled(); bool checkable = popupmenu->isCheckable(); bool active = flags & Style_Active; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); bool reverse = TQApplication::reverseLayout(); int x, y, w, h; r.rect( &x, &y, &w, &h ); @@ -1328,7 +1328,7 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, // Do we have an icon? if ( mi->iconSet() ) { TQIconSet::Mode mode; - TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r ); + TQRect cr = visualRect( TQRect(x, y, checkcol, h), r ); // Select the correct icon from the iconset if ( active ) @@ -1463,8 +1463,8 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = tqpixelMetric(PM_MenuButtonIndicator); - TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, + int dim = pixelMetric(PM_MenuButtonIndicator); + TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1484,12 +1484,12 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, } default: - KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + KStyle::drawControl(element, p, widget, r, cg, flags, opt); } } -void HighColorStyle::tqdrawControlMask( TQ_ControlElement element, +void HighColorStyle::drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1510,12 +1510,12 @@ void HighColorStyle::tqdrawControlMask( TQ_ControlElement element, } default: - KStyle::tqdrawControlMask(element, p, widget, r, opt); + KStyle::drawControlMask(element, p, widget, r, opt); } } -void HighColorStyle::tqdrawComplexControl( TQ_ComplexControl control, +void HighColorStyle::drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1566,7 +1566,7 @@ void HighColorStyle::tqdrawComplexControl( TQ_ComplexControl control, p->drawLine(x+1, y+2, x+1, y2-2); // Get the button bounding box - TQRect ar = TQStyle::tqvisualRect( + TQRect ar = TQStyle::visualRect( querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow), widget ); @@ -1585,7 +1585,7 @@ void HighColorStyle::tqdrawComplexControl( TQ_ComplexControl control, if ( controls & SC_ComboBoxEditField ) { const TQComboBox * cb = (const TQComboBox *) widget; - TQRect re = TQStyle::tqvisualRect( + TQRect re = TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField), widget ); @@ -1609,7 +1609,7 @@ void HighColorStyle::tqdrawComplexControl( TQ_ComplexControl control, p->fillRect( re.x(), re.y(), re.width(), re.height(), cg.brush( TQColorGroup::Highlight ) ); - TQRect re = TQStyle::tqvisualRect( + TQRect re = TQStyle::visualRect( subRect(SR_ComboBoxFocusRect, cb), widget); tqdrawPrimitive( PE_FocusRect, p, re, cg, @@ -1697,14 +1697,14 @@ void HighColorStyle::tqdrawComplexControl( TQ_ComplexControl control, default: - KStyle::tqdrawComplexControl(control, p, widget, + KStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; } } -void HighColorStyle::tqdrawComplexControlMask( TQ_ComplexControl control, +void HighColorStyle::drawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1726,7 +1726,7 @@ void HighColorStyle::tqdrawComplexControlMask( TQ_ComplexControl control, } default: - KStyle::tqdrawComplexControlMask(control, p, widget, r, opt); + KStyle::drawComplexControlMask(control, p, widget, r, opt); } } @@ -1769,11 +1769,11 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const int dbw1 = 0, dbw2 = 0; if (button->isDefault() || button->autoDefault()) { - dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget); + dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget); dbw2 = dbw1 * 2; } - int dfw1 = tqpixelMetric(PM_DefaultFrameWidth, widget) * 2, + int dfw1 = pixelMetric(PM_DefaultFrameWidth, widget) * 2, dfw2 = dfw1 * 2; return TQRect(wrect.x() + dfw1 + dbw1 + 1, @@ -1785,7 +1785,7 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const } -int HighColorStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const +int HighColorStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const { switch(m) { @@ -1818,7 +1818,7 @@ int HighColorStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const } default: - return KStyle::tqpixelMetric(m, widget); + return KStyle::pixelMetric(m, widget); } } @@ -1836,8 +1836,8 @@ TQSize HighColorStyle::tqsizeFromContents( ContentsType contents, const TQPushButton* button = (const TQPushButton*) widget; int w = contentSize.width(); int h = contentSize.height(); - int bm = tqpixelMetric( PM_ButtonMargin, widget ); - int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = pixelMetric( PM_ButtonMargin, widget ); + int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; w += bm + fw + 6; // ### Add 6 to make way for bold font. h += bm + fw; @@ -1849,7 +1849,7 @@ TQSize HighColorStyle::tqsizeFromContents( ContentsType contents, if ( type != HighColor ) { // Compensate for default indicator - int di = tqpixelMetric( PM_ButtonDefaultIndicator ); + int di = pixelMetric( PM_ButtonDefaultIndicator ); w += di * 2; h += di * 2; } @@ -1926,7 +1926,7 @@ TQSize HighColorStyle::tqsizeFromContents( ContentsType contents, } -// Fix Qt's wacky image tqalignment +// Fix Qt's wacky image alignment TQPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap, const TQWidget* widget, const TQStyleOption& opt) const @@ -1958,12 +1958,12 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event ) if ( (event->type() == TQEvent::Enter) && (button->isEnabled()) ) { hoverWidget = button; - button->tqrepaint( false ); + button->repaint( false ); } else if ( (event->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget)) ) { hoverWidget = 0L; - button->tqrepaint( false ); + button->repaint( false ); } } else if ( object->parent() && !qstrcmp( object->name(), kdeToolbarWidget ) ) { @@ -1992,7 +1992,7 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event ) if (tb) horiz_grad = tb->orientation() == Qt::Vertical; TQPainter p( widget ); - renderGradient(&p, r, parent->tqcolorGroup().button(), horiz_grad, + renderGradient(&p, r, parent->colorGroup().button(), horiz_grad, x_offset, y_offset, pr.width(), pr.height()); return false; // Now draw the contents @@ -2006,11 +2006,11 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event ) TQWidget *widget = TQT_TQWIDGET(object); TQRect wr = widget->rect(), tr = toolbar->rect(); TQPainter p( widget ); - renderGradient(&p, wr, toolbar->tqcolorGroup().button(), + renderGradient(&p, wr, toolbar->colorGroup().button(), toolbar->orientation() == Qt::Vertical, wr.x(), wr.y(), tr.width() - 2, tr.height() - 2); - p.setPen( toolbar->tqcolorGroup().dark() ); + p.setPen( toolbar->colorGroup().dark() ); if ( toolbar->orientation() == Qt::Horizontal ) p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 ); else diff --git a/kstyles/highcolor/highcolor.h b/kstyles/highcolor/highcolor.h index 14f9056e5..ff0fce2d7 100644 --- a/kstyles/highcolor/highcolor.h +++ b/kstyles/highcolor/highcolor.h @@ -86,7 +86,7 @@ class HighColorStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawControl( TQ_ControlElement element, + void drawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -94,13 +94,13 @@ class HighColorStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawControlMask( TQ_ControlElement element, + void drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawComplexControl( TQ_ComplexControl control, + void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -110,7 +110,7 @@ class HighColorStyle : public KStyle SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawComplexControlMask( TQ_ComplexControl control, + void drawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -126,7 +126,7 @@ class HighColorStyle : public KStyle int len = -1, const TQColor *penColor = 0 ) const; - int tqpixelMetric( PixelMetric m, + int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; TQSize tqsizeFromContents( ContentsType contents, diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp index 233fb7365..08baa83bc 100644 --- a/kstyles/highcontrast/config/highcontrastconfig.cpp +++ b/kstyles/highcontrast/config/highcontrastconfig.cpp @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. */ #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsettings.h> #include <kdialog.h> #include <kglobal.h> diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index 732a566c6..e6c3be350 100644 --- a/kstyles/highcontrast/highcontrast.cpp +++ b/kstyles/highcontrast/highcontrast.cpp @@ -706,13 +706,13 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, } case KPE_ListViewExpander: { - // TODO There is no tqpixelMetric associated with the + // TODO There is no pixelMetric associated with the // ListViewExpander in KStyle. // To have a properly large expander, the CC_ListView case of - // tqdrawComplexControl should be handled. + // drawComplexControl should be handled. // Probably it would be better to add a KPM_ListViewExpander metric // to the KStyle KStylePixelMetric enum, and have the KStyle - // tqdrawComplexControl handle it. + // drawComplexControl handle it. TQ_PrimitiveElement direction; if (flags & Style_On) { // Collapsed = On direction = PE_ArrowRight; @@ -733,7 +733,7 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, } -void HighContrastStyle::tqdrawControl (TQ_ControlElement element, +void HighContrastStyle::drawControl (TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -759,9 +759,9 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, drawRoundRect (p, r); const TQTabBar *tb = static_cast< const TQTabBar * >(widget); - TQTabBar::Shape tqshape = tb->tqshape(); - if (tqshape == TQTabBar::TriangularBelow || - tqshape == TQTabBar::RoundedBelow) { + TQTabBar::Shape shape = tb->shape(); + if (shape == TQTabBar::TriangularBelow || + shape == TQTabBar::RoundedBelow) { p->fillRect (r.left(), r.top(), r.width(), 2*basicLineWidth, p->pen().color()); @@ -793,7 +793,7 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, if (( btnDefault || button->autoDefault() ) && (button->isEnabled())) { // Compensate for default indicator - static int di = tqpixelMetric( PM_ButtonDefaultIndicator ); + static int di = pixelMetric( PM_ButtonDefaultIndicator ); addOffset (&br, di); } @@ -864,7 +864,7 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, // Does the button have a popup menu? if (popup) { - int dx = tqpixelMetric (PM_MenuButtonIndicator, widget); + int dx = pixelMetric (PM_MenuButtonIndicator, widget); drawArrow (p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), PE_ArrowDown); w -= dx; } @@ -1013,7 +1013,7 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, // Do we have an icon? if ( mi->iconSet() && !mi->iconSet()->isNull() ) { TQIconSet::Mode mode; - TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r ); + TQRect cr = visualRect( TQRect(x, y, checkcol, h), r ); // Select the correct icon from the iconset if (!(flags & Style_Enabled)) @@ -1122,8 +1122,8 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = tqpixelMetric(PM_MenuButtonIndicator); - TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, + int dim = pixelMetric(PM_MenuButtonIndicator); + TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1133,11 +1133,11 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, } default: - KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + KStyle::drawControl(element, p, widget, r, cg, flags, opt); } } -void HighContrastStyle::tqdrawControlMask (TQ_ControlElement element, +void HighContrastStyle::drawControlMask (TQ_ControlElement element, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1161,7 +1161,7 @@ void HighContrastStyle::tqdrawControlMask (TQ_ControlElement element, } default: { - KStyle::tqdrawControlMask (element, p, w, r, opt); + KStyle::drawControlMask (element, p, w, r, opt); } } } @@ -1180,7 +1180,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, +void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1201,7 +1201,7 @@ void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, setColorsText (p, cg, flags); drawRoundRect (p, r); - TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); + TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); if (flags & Style_HasFocus) { TQRect r3 (r); if (r2.left() > 0) @@ -1236,12 +1236,12 @@ void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, setColorsButton (p, cg, flags); // Draw arrows if required if (controls & SC_SpinWidgetDown) { - TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetDown), widget); + TQRect r2 = TQStyle::visualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetDown), widget); drawRoundRect (p, r2); drawArrow (p, r2, PE_SpinWidgetDown, 2*basicLineWidth); } if (controls & SC_SpinWidgetUp) { - TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetUp), widget); + TQRect r2 = TQStyle::visualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetUp), widget); drawRoundRect (p, r2); drawArrow (p, r2, PE_SpinWidgetUp, 2*basicLineWidth); } @@ -1316,7 +1316,7 @@ void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); // If we're have a branch or are expanded... if ( controls & (SC_ListViewBranch | SC_ListViewExpand) ) @@ -1462,13 +1462,13 @@ void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, } default: - KStyle::tqdrawComplexControl(control, p, widget, + KStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; } } -void HighContrastStyle::tqdrawComplexControlMask(TQ_ComplexControl c, +void HighContrastStyle::drawComplexControlMask(TQ_ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1482,7 +1482,7 @@ void HighContrastStyle::tqdrawComplexControlMask(TQ_ComplexControl c, break; } default: { - KStyle::tqdrawComplexControlMask (c, p, w, r, o); + KStyle::drawComplexControlMask (c, p, w, r, o); } } } @@ -1519,7 +1519,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, switch (control) { case CC_ComboBox : { - int arrow = tqpixelMetric (PM_ScrollBarExtent, widget); + int arrow = pixelMetric (PM_ScrollBarExtent, widget); switch (subcontrol) { case SC_ComboBoxFrame: @@ -1535,7 +1535,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, break; } case CC_SpinWidget : { - int arrow = tqpixelMetric (PM_ScrollBarExtent, 0); + int arrow = pixelMetric (PM_ScrollBarExtent, 0); switch (subcontrol) { case SC_SpinWidgetFrame: @@ -1563,7 +1563,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, } -int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const +int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const { //### TODO: Use the tab metrics changes from Ker. switch(m) @@ -1647,7 +1647,7 @@ int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) cons } default: - return KStyle::tqpixelMetric(m, widget); + return KStyle::pixelMetric(m, widget); } } @@ -1676,8 +1676,8 @@ TQSize HighContrastStyle::tqsizeFromContents( ContentsType contents, const TQPushButton* button = (const TQPushButton*) widget; int w = contentSize.width(); int h = contentSize.height(); - int bm = tqpixelMetric( PM_ButtonMargin, widget ); - int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = pixelMetric( PM_ButtonMargin, widget ); + int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; w += bm + fw + 6; // ### Add 6 to make way for bold font. h += bm + fw; @@ -1688,7 +1688,7 @@ TQSize HighContrastStyle::tqsizeFromContents( ContentsType contents, w = 80; // Compensate for default indicator - int di = tqpixelMetric( PM_ButtonDefaultIndicator ); + int di = pixelMetric( PM_ButtonDefaultIndicator ); w += di * 2; h += di * 2; } @@ -1713,7 +1713,7 @@ TQSize HighContrastStyle::tqsizeFromContents( ContentsType contents, case CT_ComboBox: { const TQComboBox *cb = static_cast< const TQComboBox* > (widget); int borderSize = (cb->editable() ? 4 : 2) * basicLineWidth; - int arrowSize = tqpixelMetric (PM_ScrollBarExtent, cb); + int arrowSize = pixelMetric (PM_ScrollBarExtent, cb); return TQSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize; } @@ -1811,7 +1811,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING))) { hoverWidget = widget; - widget->tqrepaint (false); + widget->repaint (false); } else if (event->type() == TQEvent::Leave && (widget->inherits (TQBUTTON_OBJECT_NAME_STRING) @@ -1820,7 +1820,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) { if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget)) hoverWidget = 0L; - widget->tqrepaint (false); + widget->repaint (false); } // Make sure the focus rectangle is shown correctly. else if (event->type() == TQEvent::FocusIn || event->type() == TQEvent::FocusOut) @@ -1834,9 +1834,9 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) } if (widgetparent) - widgetparent->tqrepaint (false); + widgetparent->repaint (false); else - widget->tqrepaint (false); + widget->repaint (false); } } diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h index 8967a0d4d..48a7c6e92 100644 --- a/kstyles/highcontrast/highcontrast.h +++ b/kstyles/highcontrast/highcontrast.h @@ -74,7 +74,7 @@ class HighContrastStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawControl( TQ_ControlElement element, + void drawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -82,13 +82,13 @@ class HighContrastStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawControlMask( TQ_ControlElement element, + void drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawComplexControl( TQ_ComplexControl control, + void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -98,7 +98,7 @@ class HighContrastStyle : public KStyle SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawComplexControlMask( TQ_ComplexControl control, + void drawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -120,7 +120,7 @@ class HighContrastStyle : public KStyle int len = -1, const TQColor *penColor = 0 ) const; - int tqpixelMetric( PixelMetric m, + int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; int kPixelMetric( KStylePixelMetric m, diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp index 18608205d..60bcdf5ae 100644 --- a/kstyles/keramik/genembed.cpp +++ b/kstyles/keramik/genembed.cpp @@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE. #include <tqimage.h> #include <tqmap.h> #include <tqregexp.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvaluevector.h> #include <kimageeffect.h> diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp index 2ca9ed360..8ebbe8683 100644 --- a/kstyles/keramik/keramik.cpp +++ b/kstyles/keramik/keramik.cpp @@ -147,8 +147,8 @@ namespace p->save(); /*if ( down ) - p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), - tqpixelMetric( PM_ButtonShiftVertical ) ); + p->translate( pixelMetric( PM_ButtonShiftHorizontal ), + pixelMetric( PM_ButtonShiftVertical ) ); */ if ( enabled ) { @@ -520,14 +520,14 @@ static void renderToolbarWidgetBackground(TQPainter* painter, const TQWidget* wi if (painter) { Keramik::GradientPainter::renderGradient( painter, widget->rect(), - widget->tqcolorGroup().button(), horiz_grad, false, + widget->colorGroup().button(), horiz_grad, false, x_offset, y_offset, toolWidth, toolHeight); } else { TQPainter p( widget ); Keramik::GradientPainter::renderGradient( &p, widget->rect(), - widget->tqcolorGroup().button(), horiz_grad, false, + widget->colorGroup().button(), horiz_grad, false, x_offset, y_offset, toolWidth, toolHeight); } } @@ -946,7 +946,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, //p->setPen( cg.shadow() ); //p->drawRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2); - //p->fillRect( tqvisualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) ); + //p->fillRect( visualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) ); //break; // GENERAL PANELS @@ -956,7 +956,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, if (kickerMode) { if (p->device() && p->device()->devType() == TQInternal::Widget && - TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->tqdevice()))->className()) == "FittsLawFrame" ) + TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->device()))->className()) == "FittsLawFrame" ) { int x2 = x + r.width() - 1; int y2 = y + r.height() - 1; @@ -978,7 +978,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_WindowFrame: { bool sunken = flags & Style_Sunken; - int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw == 2) { @@ -1016,7 +1016,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, int x2 = r.x()+r.width()-1; int y2 = r.y()+r.height()-1; - int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) { @@ -1036,7 +1036,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, int y = r.y(); int x2 = r.x() + r.width() - 1; int y2 = r.y() + r.height() - 1; - int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) @@ -1142,8 +1142,8 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, p->save(); if ( flags & Style_Down ) - p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), - tqpixelMetric( PM_ButtonShiftVertical ) ); + p->translate( pixelMetric( PM_ButtonShiftHorizontal ), + pixelMetric( PM_ButtonShiftVertical ) ); if ( flags & Style_Enabled ) { @@ -1325,7 +1325,7 @@ bool KeramikStyle::isFormWidget(const TQWidget* widget) const return true; } -void KeramikStyle::tqdrawControl( TQ_ControlElement element, +void KeramikStyle::drawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1383,15 +1383,15 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, // Shift button contents if pushed. if ( active ) { - x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); - y += tqpixelMetric(PM_ButtonShiftVertical, widget); + x += pixelMetric(PM_ButtonShiftHorizontal, widget); + y += pixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); + int dx = pixelMetric( PM_MenuButtonIndicator, widget ); if ( button->iconSet() && !button->iconSet()->isNull() && (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w ) { @@ -1399,7 +1399,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, } else { - tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), + tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), cg, flags, opt ); w -= dx; } @@ -1448,18 +1448,18 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, } if (cornArrow) //Draw over the icon - tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), + tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), cg, flags, opt ); } // Make the label indicate if the button is a default button or not - drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->tqcolorGroup(), + drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - &button->tqcolorGroup().buttonText() ); + &button->colorGroup().buttonText() ); if ( flags & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), + visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); break; } @@ -1488,7 +1488,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, // nr.setWidth(r.width()-2); //Account for shadow } - KStyle::tqdrawControl(element, p, widget, nr, cg, flags, opt); + KStyle::drawControl(element, p, widget, nr, cg, flags, opt); break; } @@ -1496,8 +1496,8 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, { const TQTabBar* tabBar = static_cast< const TQTabBar* >( widget ); - bool bottom = tabBar->tqshape() == TQTabBar::RoundedBelow || - tabBar->tqshape() == TQTabBar::TriangularBelow; + bool bottom = tabBar->shape() == TQTabBar::RoundedBelow || + tabBar->shape() == TQTabBar::TriangularBelow; if ( flags & Style_Selected ) { @@ -1553,7 +1553,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, tb->orientation() == Qt::Horizontal); } else - KStyle::tqdrawControl( (TQ_ControlElement)CE_DockWindowEmptyArea, p, + KStyle::drawControl( (TQ_ControlElement)CE_DockWindowEmptyArea, p, widget, r, cg, flags, opt ); break; } @@ -1609,7 +1609,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, bool enabled = mi->isEnabled(); bool checkable = popupmenu->isCheckable(); bool active = flags & Style_Active; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); bool reverse = TQApplication::reverseLayout(); if ( checkable ) checkcol = QMAX( checkcol, 20 ); @@ -1643,7 +1643,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, break; } - TQRect cr = tqvisualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r ); + TQRect cr = visualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r ); // Do we have an icon? if ( mi->iconSet() ) { @@ -1789,8 +1789,8 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = tqpixelMetric(PM_MenuButtonIndicator) - itemFrame; - TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, + int dim = pixelMetric(PM_MenuButtonIndicator) - itemFrame; + TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1916,11 +1916,11 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, default: - KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + KStyle::drawControl(element, p, widget, r, cg, flags, opt); } } -void KeramikStyle::tqdrawControlMask( TQ_ControlElement element, +void KeramikStyle::drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1928,7 +1928,7 @@ void KeramikStyle::tqdrawControlMask( TQ_ControlElement element, { p->fillRect(r, color1); maskMode = true; - tqdrawControl( 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; } @@ -1944,7 +1944,7 @@ bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const return false; } -void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, +void KeramikStyle::drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1999,7 +1999,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, //but that also alters height and not just width. //readjust height to fake the other metrics (plus clear //the other areas, as appropriate). The automasker - //will take care of the overall tqshape. + //will take care of the overall shape. if ( compact ) { forceSmallMode = true; @@ -2035,11 +2035,11 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, if (!compact) { ar.setWidth(ar.width()-13); - TQRect rr = tqvisualRect( TQRect( ar.x(), ar.y() + 4, + TQRect rr = visualRect( TQRect( ar.x(), ar.y() + 4, loader.size(keramik_ripple ).width(), ar.height() - 8 ), widget ); - ar = tqvisualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(), + ar = visualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(), 11, ar.height() ), widget ); @@ -2056,7 +2056,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, else //Size-constrained combo -- loose the ripple. { ar.setWidth(ar.width() - 7); - ar = tqvisualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget); + ar = visualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget); TQPointArray a; a.setPoints(TQCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow); @@ -2071,7 +2071,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, { if ( cb->editable() ) { - TQRect er = tqvisualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget ); + TQRect er = visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget ); er.addCoords( -2, -2, 2, 2 ); p2->fillRect( er, cg.base() ); tqdrawPrimitive( PE_PanelLineEdit, p2, er, cg ); @@ -2080,7 +2080,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, } else if ( cb->hasFocus() ) { - TQRect re = TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, cb), widget); + TQRect re = TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, cb), widget); if ( compact ) re.addCoords( 3, 3, 0, -3 ); p2->fillRect( re, cg.brush( TQColorGroup::Highlight ) ); @@ -2115,7 +2115,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, case CC_SpinWidget: { const TQSpinWidget* sw = static_cast< const TQSpinWidget* >( widget ); - TQRect br = tqvisualRect( querySubControlMetrics( (TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget ); + TQRect br = visualRect( querySubControlMetrics( (TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget ); if ( controls & SC_SpinWidgetButtonField ) { Keramik::SpinBoxPainter().draw( p, br, cg.button(), cg.background(), !sw->isEnabled() ); @@ -2139,7 +2139,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget ); if (highlightScrollBar && sb->parentWidget()) //Don't do the check if not highlighting anyway { - if (sb->parentWidget()->tqcolorGroup().button() != sb->tqcolorGroup().button()) + if (sb->parentWidget()->colorGroup().button() != sb->colorGroup().button()) customScrollMode = true; } bool horizontal = sb->orientation() == Qt::Horizontal; @@ -2313,14 +2313,14 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, case CC_TitleBar: titleBarMode = Regular; //Handle buttons on titlebar different from toolbuttons default: - KStyle::tqdrawComplexControl( control, p, widget, + KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); titleBarMode = None; } } -void KeramikStyle::tqdrawComplexControlMask( TQ_ComplexControl control, +void KeramikStyle::drawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -2329,8 +2329,8 @@ void KeramikStyle::tqdrawComplexControlMask( TQ_ComplexControl control, if (control == CC_ComboBox) { maskMode = true; - tqdrawComplexControl(CC_ComboBox, p, widget, r, - TQApplication::tqpalette().active(), Style_Default, + drawComplexControl(CC_ComboBox, p, widget, r, + TQApplication::palette().active(), Style_Default, SC_ComboBoxFrame,SC_None, opt); maskMode = false; @@ -2340,7 +2340,7 @@ void KeramikStyle::tqdrawComplexControlMask( TQ_ComplexControl control, } -int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const +int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const { switch(m) { @@ -2397,8 +2397,8 @@ int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const const TQTabBar* tb = ::tqqt_cast<const TQTabBar*>(widget); if (tb) { - if (tb->tqshape() == TQTabBar::RoundedBelow || - tb->tqshape() == TQTabBar::TriangularBelow) + if (tb->shape() == TQTabBar::RoundedBelow || + tb->shape() == TQTabBar::TriangularBelow) return 0; } @@ -2410,7 +2410,7 @@ int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const return titleBarH; default: - return KStyle::tqpixelMetric(m, widget); + return KStyle::pixelMetric(m, widget); } } @@ -2428,8 +2428,8 @@ TQSize KeramikStyle::tqsizeFromContents( ContentsType contents, { const TQPushButton* btn = static_cast< const TQPushButton* >( widget ); - int w = contentSize.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); - int h = contentSize.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); + int w = contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget ); + int h = contentSize.height() + 2 * pixelMetric( PM_ButtonMargin, widget ); if ( btn->text().isEmpty() && contentSize.width() < 32 ) return TQSize( w, h ); @@ -2623,7 +2623,7 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, { int range = sb->maxValue() - sb->minValue(); sliderlen = ( sb->pageStep() * maxlen ) / ( range + sb->pageStep() ); - slidermin = tqpixelMetric( PM_ScrollBarSliderMin, sb ); + slidermin = pixelMetric( PM_ScrollBarSliderMin, sb ); if ( sliderlen < slidermin ) sliderlen = slidermin; if ( sliderlen > maxlen ) sliderlen = maxlen; } @@ -2666,9 +2666,9 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, bool horizontal = sl->orientation() == Qt::Horizontal; TQSlider::TickSetting ticks = sl->tickmarks(); int pos = sl->sliderStart(); - int size = tqpixelMetric( PM_SliderControlThickness, widget ); - int handleSize = tqpixelMetric( PM_SliderThickness, widget ); - int len = tqpixelMetric( PM_SliderLength, widget ); + int size = pixelMetric( PM_SliderControlThickness, widget ); + int handleSize = pixelMetric( PM_SliderThickness, widget ); + int len = pixelMetric( PM_SliderLength, widget ); //Shrink the metrics if the widget is too small //to fit our normal values for them. @@ -2751,7 +2751,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) { TQWidget* button = TQT_TQWIDGET(object); hoverWidget = 0; - button->tqrepaint( false ); + button->repaint( false ); return false; } @@ -2761,7 +2761,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) if (event->type() == TQEvent::Enter && TQT_TQWIDGET(object)->isEnabled() ) { hoverWidget = TQT_TQWIDGET(object); - hoverWidget->tqrepaint( false ); + hoverWidget->repaint( false ); } return false; } @@ -2778,7 +2778,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) TQWidget* widget = TQT_TQWIDGET( object ); TQPainter p( widget ); 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); recursion = false; return true; @@ -2789,7 +2789,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) switch (event->type()) { #ifdef HAVE_X11_EXTENSIONS_SHAPE_H - //Combo dropdowns are tqshaped + //Combo dropdowns are shaped case TQEvent::Resize: { TQListBox* listbox = static_cast<TQListBox*>(TQT_TQWIDGET(object)); @@ -2825,8 +2825,8 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) { TQPainter p( listbox ); Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(), - listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Button ), - listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Background ) ); + listbox->palette().color( TQPalette::Normal, TQColorGroup::Button ), + listbox->palette().color( TQPalette::Normal, TQColorGroup::Background ) ); TQPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() ); recursion = true; @@ -2901,20 +2901,20 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) if ( toolbar->orientation() == Qt::Horizontal ) { - Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(), + Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(), true /*horizontal*/, false /*not a menu*/, 0, widget->y(), wr.width(), tr.height()); } else { - Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(), + Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(), false /*vertical*/, false /*not a menu*/, widget->x(), 0, tr.width(), wr.height()); } //Draw terminator line, too - p.setPen( toolbar->tqcolorGroup().mid() ); + p.setPen( toolbar->colorGroup().mid() ); if ( toolbar->orientation() == Qt::Horizontal ) p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 ); else diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h index b0f021aee..e177d56f8 100644 --- a/kstyles/keramik/keramik.h +++ b/kstyles/keramik/keramik.h @@ -70,7 +70,7 @@ public: SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawControl( TQ_ControlElement element, + void drawControl( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -78,13 +78,13 @@ public: SFlags flags = Style_Default, const TQStyleOption& opt = TQStyleOption::Default ) const; - void tqdrawControlMask( TQ_ControlElement element, + void drawControlMask( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect& r, const TQStyleOption& opt = TQStyleOption::Default ) const; - void tqdrawComplexControl( TQ_ComplexControl control, + void drawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -94,13 +94,13 @@ public: SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawComplexControlMask( TQ_ComplexControl control, + void drawComplexControlMask( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, const TQStyleOption& = TQStyleOption::Default ) const; - int tqpixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; + int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQSize tqsizeFromContents( ContentsType contents, const TQWidget* widget, diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index cb3ddf1fa..2da6acb66 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -57,7 +57,7 @@ #include <tqinputdialog.h> #include <tqintdict.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlcdnumber.h> #include <tqlineedit.h> #include <tqptrlist.h> @@ -92,9 +92,9 @@ #include <tqtabdialog.h> #include <qtableview.h> #include <tqtabwidget.h> -#include <tqtextbrowser.h> -#include <tqtextstream.h> -#include <tqtextview.h> +#include <textbrowser.h> +#include <textstream.h> +#include <textview.h> #include <tqtoolbar.h> #include <tqtoolbutton.h> #include <tqtooltip.h> @@ -1975,7 +1975,7 @@ void KLegacyStyle::polish(TQWidget *widget) { } GtkObject *gobj = gobj = priv->gtkDict.find(((metaobject) ? metaobject : - widget->tqmetaObject())); + widget->metaObject())); if (gobj) { if (gobj->font() && (*gobj->font() != TQApplication::font())) @@ -2181,7 +2181,7 @@ void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) { key.cachekey = 0; key.data.function = KLegacy::Box; - TQColorGroup g = btn->tqcolorGroup(); + TQColorGroup g = btn->colorGroup(); TQBrush fill = g.brush(TQColorGroup::Button); int x1, y1, x2, y2; btn->rect().coords(&x1, &y1, &x2, &y2); @@ -2741,7 +2741,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll (active & SubLine), x, y, buttonDim, buttonDim, - scrollbar->tqcolorGroup(), true); + scrollbar->colorGroup(), true); if (scrollbar->orientation() == Vertical) y = scrollbar->height() - buttonDim - defaultFrameWidth(); @@ -2753,7 +2753,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll (active & AddLine), x, y, buttonDim, buttonDim, - scrollbar->tqcolorGroup(), true); + scrollbar->colorGroup(), true); } p->drawPixmap(0, 0, buf); } @@ -2954,8 +2954,8 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo key.data.function = KLegacy::Extension; key.data.state = (! selected) ? KLegacy::Active : KLegacy::Normal; key.data.shadow = KLegacy::Out; - key.data.gapSide = (tabbar->tqshape() == TQTabBar::RoundedAbove || - tabbar->tqshape() == TQTabBar::TriangularAbove) ? + key.data.gapSide = (tabbar->shape() == TQTabBar::RoundedAbove || + tabbar->shape() == TQTabBar::TriangularAbove) ? KLegacy::Bottom : KLegacy::Top; int ry = tab->r.top(), rh = tab->r.height(); @@ -2963,8 +2963,8 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo if (! selected) { rh -= 2; - if (tabbar->tqshape() == TQTabBar::RoundedAbove || - tabbar->tqshape() == TQTabBar::TriangularAbove) + if (tabbar->shape() == TQTabBar::RoundedAbove || + tabbar->shape() == TQTabBar::TriangularAbove) ry += 2; } @@ -3261,7 +3261,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { obj->inherits(TQSLIDER_OBJECT_NAME_STRING) || obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING)) { priv->lastWidget = (TQWidget *) obj; - priv->lastWidget->tqrepaint(false); + priv->lastWidget->repaint(false); } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) { TQWidget *w = (TQWidget *) obj; @@ -3327,7 +3327,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { { if (obj == priv->lastWidget) { priv->lastWidget = 0; - ((TQWidget *) obj)->tqrepaint(false); + ((TQWidget *) obj)->repaint(false); } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || obj->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) { TQWidget *w = (TQWidget *) obj; @@ -3335,7 +3335,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { if (! w->isTopLevel()) { w->setBackgroundMode(TQWidget::X11ParentRelative); w->setBackgroundOrigin(TQWidget::WidgetOrigin); - w->tqrepaint(true); + w->repaint(true); } } @@ -3349,7 +3349,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { if (obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING) && (! (me->state() & (LeftButton | MidButton | RightButton)))) { priv->hovering = true; - ((TQWidget *) obj)->tqrepaint(false); + ((TQWidget *) obj)->repaint(false); priv->hovering = false; } diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp index 772dd41bc..9da0fdabd 100644 --- a/kstyles/kthemestyle/kthemebase.cpp +++ b/kstyles/kthemestyle/kthemebase.cpp @@ -70,7 +70,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey, TQString aValue = s->readEntry( pKey ); if ( !aValue.isEmpty() ) { - if ( aValue.tqat( 0 ) == '#' ) + if ( aValue.at( 0 ) == '#' ) { aRetColor.setNamedColor( aValue ); } @@ -1100,12 +1100,12 @@ TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg, lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 ); return ( new TQColorGroup( fg, bg, bg.light( highlightVal ), bg.dark( lowlightVal ), bg.dark( 120 ), - fg, TQApplication::tqpalette().active().base() ) ); + fg, TQApplication::palette().active().base() ) ); } else return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(), 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 if ( keys.contains( "GradientLow" ) ) prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(), - &TQApplication::tqpalette().active().background() ).name(); + &TQApplication::palette().active().background() ).name(); // Gradient high color if ( keys.contains( "GradientHigh" ) ) prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(), - &TQApplication::tqpalette().active().foreground() ).name(); + &TQApplication::palette().active().foreground() ).name(); // Extended color attributes if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) ) @@ -1413,7 +1413,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname // Blend intensity tmpStr = prop[ "Blend" ]; if ( tmpStr.isEmpty() ) - tmpStr = TQString::tqfromLatin1( "0.0" ); + tmpStr = TQString::fromLatin1( "0.0" ); blends[ i ] = tmpStr.toFloat(); // Bevel contrast @@ -1429,7 +1429,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 ) grLowColors[ i ] = new TQColor( readColorEntry( prop, "GrLow", - TQApplication::tqpalette().active(). + TQApplication::palette().active(). background() ) ); else grLowColors[ i ] = NULL; @@ -1438,7 +1438,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname if ( gradients[ i ] != GrNone ) grHighColors[ i ] = new TQColor( readColorEntry( prop, "GrHigh", - TQApplication::tqpalette().active(). + TQApplication::palette().active(). background() ) ); else grHighColors[ i ] = NULL; @@ -1450,9 +1450,9 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname if ( fg.isValid() || bg.isValid() ) { if ( !fg.isValid() ) - fg = TQApplication::tqpalette().active().foreground(); + fg = TQApplication::palette().active().foreground(); if ( !bg.isValid() ) - bg = TQApplication::tqpalette().active().background(); + bg = TQApplication::palette().active().background(); colors[ i ] = makeColorGroup( fg, bg, TQt::WindowsStyle ); } else @@ -1609,7 +1609,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal ) { if ( isColor( Background ) ) { - background = tqcolorGroup( pal.active(), Background ) + background = colorGroup( pal.active(), Background ) ->background(); } if ( isPixmap( Background ) ) @@ -1622,7 +1622,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal ) background.dark( lowlightVal ), background.dark( 120 ), baseText, buttonText /*CHECKME: BrightText*/, base, background ); - buttonText = tqcolorGroup( pre, PushButton ) ->foreground(); + buttonText = colorGroup( pre, PushButton ) ->foreground(); } TQColor disfg = foreground; diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h index 96faf57d5..63126337f 100644 --- a/kstyles/kthemestyle/kthemebase.h +++ b/kstyles/kthemestyle/kthemebase.h @@ -36,7 +36,7 @@ Copyright (C) 1998, 1999, 2000 KDE Team #include <tqstring.h> #include <kstyle.h> #include <tqsettings.h> -#include <tqpalette.h> // for QColorGroup +#include <palette.h> // for QColorGroup #include "kstyledirs.h" #include <tqmap.h> @@ -300,12 +300,12 @@ public: * If a color group is set in the theme configuration * that is used, otherwise defaultColor is returned. * - * @param defaultGroup The tqcolorGroup to set if one is available. + * @param defaultGroup The colorGroup to set if one is available. * * @param widget The widget whose color group to retrieve. * */ - const TQColorGroup* tqcolorGroup( const TQColorGroup &defaultGroup, + const TQColorGroup* colorGroup( const TQColorGroup &defaultGroup, WidgetType widget ) const; TQBrush pixmapBrush( const TQColorGroup &group, TQColorGroup::ColorRole role, @@ -508,9 +508,9 @@ protected: /** These are included for fuuture extension purposes.. */ - virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const + virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const { - return KStyle::tqpixelMetric( metric, widget ); + return KStyle::pixelMetric( metric, widget ); } virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, @@ -522,7 +522,7 @@ protected: } - virtual void tqdrawControl( TQ_ControlElement element, + virtual void drawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -530,21 +530,21 @@ protected: SFlags how = Style_Default, const TQStyleOption& opt = TQStyleOption::Default ) const { - KStyle::tqdrawControl( element, p, widget, + KStyle::drawControl( element, p, widget, r, cg, how, opt ); } - virtual void tqdrawControlMask( TQ_ControlElement element, + virtual void drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& opt = TQStyleOption::Default ) const { - KStyle::tqdrawControlMask( element, p, widget, r, opt ); + KStyle::drawControlMask( element, p, widget, r, opt ); } - virtual void tqdrawComplexControl( TQ_ComplexControl control, + virtual void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -554,7 +554,7 @@ protected: SCFlags active = SC_None, const TQStyleOption& opt = TQStyleOption::Default ) const { - KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); } @@ -572,12 +572,12 @@ protected: } - virtual int tqstyleHint( StyleHint sh, + virtual int styleHint( StyleHint sh, const TQWidget *widget = 0, const TQStyleOption& opt = TQStyleOption::Default, TQStyleHintReturn* returnData = 0 ) const { - return KStyle::tqstyleHint( sh, + return KStyle::styleHint( sh, widget, opt, returnData ); @@ -731,7 +731,7 @@ inline TQBrush KThemeBase::pixmapBrush( const TQColorGroup &group, return ( group.color( role ) ); } -inline const TQColorGroup* KThemeBase::tqcolorGroup( const TQColorGroup &defaultGroup, +inline const TQColorGroup* KThemeBase::colorGroup( const TQColorGroup &defaultGroup, WidgetType widget ) const { return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup ); diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index b9f2b4ba1..4fe0ea9b0 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -50,7 +50,7 @@ Port version 0.9.7 #define INCLUDE_MENUITEM_DEF #include <tqmenudata.h> #include <tqpopupmenu.h> -#include <tqpalette.h> +#include <palette.h> #include <tqtabbar.h> #include <tqtoolbutton.h> #include <kglobalsettings.h> @@ -186,8 +186,8 @@ void kDrawWindowsArrow ( TQPainter *p, const TQStyle* style, TQStyle::PrimitiveE p->save(); if ( down ) { - p->translate( style->tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ), - style->tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) ); + p->translate( style->pixelMetric( TQStyle::PM_ButtonShiftHorizontal ), + style->pixelMetric( TQStyle::PM_ButtonShiftVertical ) ); } if ( enabled ) @@ -226,8 +226,8 @@ TQSize KThemeStyle::tqsizeFromContents( ContentsType contents, const TQPushButton * button = ( const TQPushButton* ) widget; int w = contentSize.width(); int h = contentSize.height(); - int bm = tqpixelMetric( PM_ButtonMargin, widget ); - int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = pixelMetric( PM_ButtonMargin, widget ); + int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; w += bm + fw + 6; // ### Add 6 to make way for bold font. h += bm + fw; @@ -320,8 +320,8 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const { TQRect bounding = cb->rect(); - int cw = tqpixelMetric(PM_IndicatorWidth, widget); - int ch = tqpixelMetric(PM_IndicatorHeight, widget); + int cw = pixelMetric(PM_IndicatorWidth, widget); + int ch = pixelMetric(PM_IndicatorHeight, widget); TQRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4); @@ -331,7 +331,7 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const return KStyle::subRect(sr, widget); } -int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) const +int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) const { switch ( metric ) { @@ -361,26 +361,26 @@ int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) c if ( isPixmap( ExIndicatorOn ) ) return ( uncached( ExIndicatorOn ) ->size().width() ); else - return KThemeBase::tqpixelMetric ( metric, widget ); + return KThemeBase::pixelMetric ( metric, widget ); case PM_ExclusiveIndicatorHeight: if ( isPixmap( ExIndicatorOn ) ) return ( uncached( ExIndicatorOn ) ->size().height() ); else - return KThemeBase::tqpixelMetric ( metric, widget ); + return KThemeBase::pixelMetric ( metric, widget ); case PM_IndicatorWidth: if ( isPixmap( IndicatorOn ) ) return ( uncached( IndicatorOn ) ->size().width() ); else - return KThemeBase::tqpixelMetric ( metric, widget ); + return KThemeBase::pixelMetric ( metric, widget ); case PM_IndicatorHeight: if ( isPixmap( IndicatorOn ) ) return ( uncached( IndicatorOn ) ->size().height() ); else - return KThemeBase::tqpixelMetric ( metric, widget ); + return KThemeBase::pixelMetric ( metric, widget ); case PM_SliderLength: return ( sliderButtonLength() ); @@ -389,7 +389,7 @@ int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) c return ( splitWidth() ); default: - return KThemeBase::tqpixelMetric ( metric, widget ); + return KThemeBase::pixelMetric ( metric, widget ); } } @@ -458,7 +458,7 @@ void KThemeStyle::paletteChanged() void KThemeStyle::unPolish( TQApplication *app ) { - app->tqsetPalette( oldPalette, true ); + app->setPalette( oldPalette, true ); } bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event ) @@ -470,7 +470,7 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event ) { TQWidget *w = TQT_TQWIDGET(object); TQPoint pos(0, 0); - pos = w->mapTo(w->tqtopLevelWidget(), pos); + pos = w->mapTo(w->topLevelWidget(), pos); TQPixmap pix(uncached( Background )->size()); TQPainter p; p.begin(&pix); @@ -559,12 +559,12 @@ void KThemeStyle::polish( TQWidget *w ) TQPalette newPal( w->palette() ); if ( isColor( MenuItem ) ) { - newPal.setActive( *tqcolorGroup( newPal.active(), MenuItem ) ); - newPal.setDisabled( *tqcolorGroup( newPal.active(), MenuItem ) ); + newPal.setActive( *colorGroup( newPal.active(), MenuItem ) ); + newPal.setDisabled( *colorGroup( newPal.active(), MenuItem ) ); } if ( isColor( MenuItemDown ) ) { - newPal.setActive( *tqcolorGroup( newPal.active(), MenuItemDown ) ); + newPal.setActive( *colorGroup( newPal.active(), MenuItemDown ) ); } w->setPalette( newPal ); } @@ -578,11 +578,11 @@ void KThemeStyle::polish( TQWidget *w ) TQPalette newPal( w->palette() ); if ( isColor( IndicatorOff ) ) { - newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOff ) ); - newPal.setDisabled( *tqcolorGroup( newPal.active(), IndicatorOff ) ); + newPal.setActive( *colorGroup( newPal.active(), IndicatorOff ) ); + newPal.setDisabled( *colorGroup( newPal.active(), IndicatorOff ) ); } if ( isColor( IndicatorOn ) ) - newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOn ) ); + newPal.setActive( *colorGroup( newPal.active(), IndicatorOn ) ); w->setPalette( newPal ); } } @@ -593,12 +593,12 @@ void KThemeStyle::polish( TQWidget *w ) TQPalette newPal( w->palette() ); if ( isColor( ExIndicatorOff ) ) { - newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOff ) ); - newPal.setDisabled( *tqcolorGroup( newPal.active(), + newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOff ) ); + newPal.setDisabled( *colorGroup( newPal.active(), ExIndicatorOff ) ); } if ( isColor( ExIndicatorOn ) ) - newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOn ) ); + newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOn ) ); w->setPalette( newPal ); } } @@ -650,7 +650,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h, if ( gradientHint( type ) == GrReverseBevel ) { int i; - bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h, + bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h, TQt::CopyROP, true ); p->setPen( g.text() ); for ( i = 0; i < borderWidth( type ); ++i, ++x, ++y, w -= 2, h -= 2 ) @@ -690,7 +690,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h, } if ( borderPixmap( type ) ) { - bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h, + bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h, TQt::CopyROP, false ); } else @@ -757,7 +757,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe return ; } - const TQColorGroup *cg = tqcolorGroup( g, widget ); + const TQColorGroup *cg = colorGroup( g, widget ); // Standard arrow types if ( arrowType() == MotifArrow ) { @@ -791,8 +791,8 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe p->save(); if ( flags & Style_Down ) - p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), - tqpixelMetric( PM_ButtonShiftVertical ) ); + p->translate( pixelMetric( PM_ButtonShiftHorizontal ), + pixelMetric( PM_ButtonShiftVertical ) ); if ( flags & Style_Enabled ) { @@ -847,7 +847,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe case PE_ButtonBevel: { WidgetType type = ( sunken || on || down ) ? BevelDown : Bevel; - drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, type ), ( sunken || on || down ), false, type ); + drawBaseButton( p, x, y, w, h, *colorGroup( g, type ), ( sunken || on || down ), false, type ); handled = true; break; } @@ -860,7 +860,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe } case PE_PanelDockWindow: { - drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, ToolBar ), false, false, + drawBaseButton( p, x, y, w, h, *colorGroup( g, ToolBar ), false, false, ToolBar ); handled = true; break; @@ -939,7 +939,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe } case PE_Splitter: { - drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, Splitter ), false, false, + drawBaseButton( p, x, y, w, h, *colorGroup( g, Splitter ), false, false, Splitter ); handled = true; break; @@ -978,10 +978,10 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe if ( !isPixmap( widget ) ) { - p->fillRect( r, tqcolorGroup( g, widget ) ->brush( TQColorGroup::Background ) ); + p->fillRect( r, colorGroup( g, widget ) ->brush( TQColorGroup::Background ) ); // Do the borders and frame drawShade( p, r.x(), r.y(), r.width(), - r.height(), *tqcolorGroup( g, widget ), true, false, + r.height(), *colorGroup( g, widget ), true, false, highlightWidth( widget ), borderWidth( widget ), shade() ); } else @@ -992,7 +992,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe *scalePixmap( r.width(), r.height(), widget ) ); drawShade( p, r.x(), r.y(), r.width(), - r.height(), *tqcolorGroup( g, widget ), true, false, + r.height(), *colorGroup( g, widget ), true, false, highlightWidth( widget ), borderWidth( widget ), shade() ); } @@ -1003,12 +1003,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe { bool horizontal = ( flags & Style_Horizontal ); drawBaseButton( p, r.x(), r.y(), r.width(), r.height(), - *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), down, false, down ? ScrollButtonDown : ScrollButton ); tqdrawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p , TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ), - *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), flags ); handled = true; @@ -1018,12 +1018,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe { bool horizontal = ( flags & Style_Horizontal ); drawBaseButton( p, r.x(), r.y(), r.width(), r.height(), - *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), down, false, down ? ScrollButtonDown : ScrollButton ); tqdrawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p , TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ), - *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), flags ); handled = true; break; @@ -1039,7 +1039,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe active ? HScrollBarSliderDown : HScrollBarSlider : active ? VScrollBarSliderDown : VScrollBarSlider; drawBaseButton( p, r.x()+offsetH, r.y()+offsetV, r.width()-2*offsetH, - r.height()-2*offsetV, *tqcolorGroup( g, widget ), active, false, + r.height()-2*offsetV, *colorGroup( g, widget ), active, false, widget ); int spaceW = horizontal ? r.width() - decoWidth( widget ) - 4 : @@ -1087,7 +1087,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const return menuCache; } - const TQColorGroup *g = tqcolorGroup( TQApplication::tqpalette().active(), MenuBar); + const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar); menuCache = new TQPixmap ( w, h ); TQPainter p(menuCache); @@ -1097,7 +1097,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const } -void KThemeStyle::tqdrawControl( ControlElement element, +void KThemeStyle::drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1116,9 +1116,9 @@ void KThemeStyle::tqdrawControl( ControlElement element, { const TQPushButton * btn = ( const TQPushButton* ) widget; bool sunken = btn->isOn() || btn->isDown(); - int diw = tqpixelMetric( PM_ButtonDefaultIndicator, btn ); + int diw = pixelMetric( PM_ButtonDefaultIndicator, btn ); drawBaseButton( p, diw, diw, w - 2 * diw, h - 2 * diw, - *tqcolorGroup( btn->tqcolorGroup(), sunken ? PushButtonDown : + *colorGroup( btn->colorGroup(), sunken ? PushButtonDown : PushButton ), sunken, roundButton(), sunken ? PushButtonDown : PushButton ); // TODO if diw, draw fancy default button indicator @@ -1135,15 +1135,15 @@ void KThemeStyle::tqdrawControl( ControlElement element, // Shift button contents if pushed. if ( active ) { - x += tqpixelMetric( PM_ButtonShiftHorizontal, widget ); - y += tqpixelMetric( PM_ButtonShiftVertical, widget ); + x += pixelMetric( PM_ButtonShiftHorizontal, widget ); + y += pixelMetric( PM_ButtonShiftVertical, widget ); how |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); + int dx = pixelMetric( PM_MenuButtonIndicator, widget ); tqdrawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ), cg, how, opt ); w -= dx; @@ -1185,42 +1185,42 @@ void KThemeStyle::tqdrawControl( ControlElement element, // Text shadow for ( i = 0; i < 2; i++ ) drawItem( p, TQRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix, - button->tqcolorGroup(), button->isEnabled(), NULL, + button->colorGroup(), button->isEnabled(), NULL, button->text(), -1, - active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() ); + active ? &button->colorGroup().dark() : &button->colorGroup().mid() ); // Normal Text for ( i = 0; i < 2; i++ ) drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix, - button->tqcolorGroup(), true, i == 0 ? button->pixmap() : NULL, + button->colorGroup(), true, i == 0 ? button->pixmap() : NULL, button->text(), -1, - active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); + active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); } else { if ( button->isEnabled() ) { - drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(), + drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(), true, button->pixmap(), button->text(), -1, - active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); + active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); } else { //TODO: Handle reversed - drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(), + drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(), true, button->pixmap(), button->text(), -1, - &button->tqcolorGroup().light() ); + &button->colorGroup().light() ); - drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(), + drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(), true, button->pixmap(), button->text(), -1, - &button->tqcolorGroup().buttonText() ); + &button->colorGroup().buttonText() ); } } // Draw a focus rect if the button has focus if ( how & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), + TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, how ); handled = true; break; @@ -1239,10 +1239,10 @@ void KThemeStyle::tqdrawControl( ControlElement element, case CE_TabBarTab: { const TQTabBar* tb = ( const TQTabBar* ) widget; - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); bool selected = how & Style_Selected; WidgetType widget = selected ? ActiveTab : InactiveTab; - const TQColorGroup *cg = tqcolorGroup( tb->tqcolorGroup(), widget ); + const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget ); int i; int x2 = x + w - 1, y2 = y + h - 1; int bWidth = borderWidth( widget ); @@ -1253,7 +1253,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, if ( !selected ) { p->fillRect( x, y, x2 - x + 1, 2, - tb->tqpalette().active().brush( TQColorGroup::Background ) ); + tb->palette().active().brush( TQColorGroup::Background ) ); y += 2; } p->setPen( cg->text() ); @@ -1315,8 +1315,8 @@ void KThemeStyle::tqdrawControl( ControlElement element, else p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() ); } - else if ( tb->tqshape() == TQTabBar::RoundedBelow || - tb->tqshape() == TQTabBar::TriangularBelow ) + else if ( tb->shape() == TQTabBar::RoundedBelow || + tb->shape() == TQTabBar::TriangularBelow ) { if ( widget == ActiveTab ) widget = RotActiveTab; @@ -1326,7 +1326,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, if ( !selected ) { p->fillRect( x, y2 - 2, x2 - x + 1, 2, - tb->tqpalette().active().brush( TQColorGroup::Background ) ); + tb->palette().active().brush( TQColorGroup::Background ) ); y2 -= 2; } p->setPen( cg->text() ); @@ -1398,7 +1398,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, TQRect pr = mb->rect(); bool active = how & Style_Active; //bool focused = how & Style_HasFocus; - const TQColorGroup *g = tqcolorGroup( cg, active ? MenuBarItem : MenuBar ); + const TQColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar ); TQColor btext = g->buttonText(); TQPixmap* cache = makeMenuBarCache(pr.width(), pr.height()); @@ -1440,10 +1440,10 @@ void KThemeStyle::tqdrawControl( ControlElement element, bool enabled = (mi? mi->isEnabled():true); bool checkable = popupmenu->isCheckable(); bool active = how & Style_Active; - bool etchtext = tqstyleHint( SH_EtchDisabledText, 0 ); + bool etchtext = styleHint( SH_EtchDisabledText, 0 ); bool reverse = TQApplication::reverseLayout(); - const TQColorGroup& cg_ours = *tqcolorGroup( cg, active ? MenuItemDown : MenuItem ); + const TQColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem ); //TQColor btext = cg_ours.buttonText(); @@ -1465,7 +1465,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, drawBaseButton( p, x, y, w, h, cg_ours, true, false, MenuItemDown ); else { - drawShade( p, x, y, w, h, *tqcolorGroup( cg_ours, MenuItem ), false, false, + drawShade( p, x, y, w, h, *colorGroup( cg_ours, MenuItem ), false, false, highlightWidth( MenuItem ), borderWidth( MenuItem ), shade() ); int dw = decoWidth( MenuItem ); @@ -1475,7 +1475,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, x + dw, y + dw, w - dw * 2, h - dw * 2, cg_ours.brush( TQColorGroup::Background ) ); //cg.brush( TQColorGroup::Background )); - //tqcolorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) ); + //colorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) ); } else { @@ -1493,7 +1493,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, if ( mi->iconSet() ) { TQIconSet::Mode mode; - TQRect cr = tqvisualRect( TQRect( x, y, checkcol, h ), r ); + TQRect cr = visualRect( TQRect( x, y, checkcol, h ), r ); // Select the correct icon from the iconset if ( active ) @@ -1504,7 +1504,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, // Do we have an icon and are checked at the same time? // Then draw a "pressed" background behind the icon if ( checkable && mi->isChecked() ) //!active && -- ?? - drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *tqcolorGroup( cg_ours, BevelDown ), true, false, BevelDown ); + drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *colorGroup( cg_ours, BevelDown ), true, false, BevelDown ); // Draw the icon TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode ); @@ -1644,7 +1644,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, { PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; int dim = 10 - itemFrame; //We're not very useful to inherit off, so just hardcode.. - TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, + TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, y + h / 2 - dim / 2, dim, dim ), r ); // Draw an arrow at the far end of the menu item @@ -1668,7 +1668,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, case CE_ProgressBarGroove: { TQBrush bg; - const TQColorGroup * cg2 = tqcolorGroup( cg, ProgressBg ); + const TQColorGroup * cg2 = colorGroup( cg, ProgressBg ); qDrawWinPanel( p, r, *cg2, true ); bg.setColor( cg2->color( TQColorGroup::Background ) ); if ( isPixmap( ProgressBg ) ) @@ -1715,13 +1715,13 @@ void KThemeStyle::tqdrawControl( ControlElement element, } if ( !reverse ) - drawBaseButton( p, x + pstep, y, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar ); + drawBaseButton( p, x + pstep, y, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar ); else { //TODO:Optimize TQPixmap buf( width, h ); TQPainter p2( &buf ); - drawBaseButton( &p2, 0, 0, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar ); + drawBaseButton( &p2, 0, 0, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar ); p2.end(); TQPixmap mirroredPix = TQPixmap( TQImage(buf.convertToImage()).mirror( true, false ) ); bitBlt( p->device(), x + w - width - pstep, y, &mirroredPix ); @@ -1736,12 +1736,12 @@ void KThemeStyle::tqdrawControl( ControlElement element, }; if ( !handled ) - KThemeBase::tqdrawControl( element, + KThemeBase::drawControl( element, p, widget, r, cg, how, opt ); } -void KThemeStyle::tqdrawControlMask( ControlElement element, +void KThemeStyle::drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1765,7 +1765,7 @@ void KThemeStyle::tqdrawControlMask( ControlElement element, }; if ( !handled ) - KThemeBase::tqdrawControlMask( element, + KThemeBase::drawControlMask( element, p, widget, r, opt ); } @@ -1792,12 +1792,12 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, bool horizontal = slider->orientation() == Qt::Horizontal; if ( horizontal ) { - drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, SliderGroove ), true, + drawBaseButton( p, x, y, w, h, *colorGroup( cg, SliderGroove ), true, false, SliderGroove ); } else { - drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, RotSliderGroove ), true, + drawBaseButton( p, x, y, w, h, *colorGroup( cg, RotSliderGroove ), true, false, RotSliderGroove ); } } @@ -1926,10 +1926,10 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, case KPE_GeneralHandle: { if ( w > h ) - drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, HBarHandle ), false, false, + drawBaseButton( p, x, y, w, h, *colorGroup( cg, HBarHandle ), false, false, HBarHandle ); else - drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, VBarHandle ), false, false, + drawBaseButton( p, x, y, w, h, *colorGroup( cg, VBarHandle ), false, false, VBarHandle ); handled = true; @@ -1951,7 +1951,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, -void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * p, const TQWidget * widget, +void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & g, SFlags how , SCFlags controls, SCFlags active, const TQStyleOption & opt ) const @@ -1978,7 +1978,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * { WidgetType widget = ( down || on ) ? ToolButtonDown : ToolButton; - drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *tqcolorGroup( g, widget ), down || on, false, + drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *colorGroup( g, widget ), down || on, false, widget ); // int m = decoWidth( widget ); @@ -2014,7 +2014,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * bool sunken = ( active == SC_ComboBoxArrow ); //No frame, edit box and button for now? WidgetType widget = sunken ? ComboBoxDown : ComboBox; - drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, widget ), sunken, + drawBaseButton( p, x, y, w, h, *colorGroup( g, widget ), sunken, roundComboBox(), widget ); controls ^= SC_ComboBoxFrame; @@ -2023,7 +2023,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * if ( controls & SC_ComboBoxArrow ) { bool sunken = ( active == SC_ComboBoxArrow ); - TQRect ar = TQStyle::tqvisualRect( + TQRect ar = TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ), widget ); ar.rect( &x, &y, &w, &h ); @@ -2042,8 +2042,8 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * else { - mtfstyle->tqdrawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *tqcolorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt ); - qDrawShadeRect( p, x, y, w, h, *tqcolorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3, + mtfstyle->tqdrawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *colorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt ); + qDrawShadeRect( p, x, y, w, h, *colorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3, } controls ^= SC_ComboBoxArrow; } @@ -2116,7 +2116,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * if ( !handled ) { - KThemeBase::tqdrawComplexControl ( control, p, widget, + KThemeBase::drawComplexControl ( control, p, widget, r, g, how , controls, active, opt ); @@ -2185,7 +2185,7 @@ void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h, p->fillRect( x, y, w, h, fillBrush ); } -int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, TQStyleHintReturn *shr ) const +int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, TQStyleHintReturn *shr ) const { switch ( sh ) { @@ -2207,7 +2207,7 @@ int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOpti return NoBackground; default: - return KThemeBase::tqstyleHint( sh, w, opt, shr ); + return KThemeBase::styleHint( sh, w, opt, shr ); }; } diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h index 4fbde91b1..6c2c0e332 100644 --- a/kstyles/kthemestyle/kthemestyle.h +++ b/kstyles/kthemestyle/kthemestyle.h @@ -79,13 +79,13 @@ public: KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null ); ~KThemeStyle(); - virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const; + virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const; virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - virtual void tqdrawControl( ControlElement element, + virtual void drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -93,14 +93,14 @@ public: SFlags how = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - virtual void tqdrawControlMask( ControlElement element, + virtual void drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - virtual void tqdrawComplexControl( TQ_ComplexControl control, + virtual void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -119,7 +119,7 @@ public: const TQStyleOption& = TQStyleOption::Default ) const; - virtual int tqstyleHint( StyleHint sh, + virtual int styleHint( StyleHint sh, const TQWidget *widget = 0, const TQStyleOption& = TQStyleOption::Default, TQStyleHintReturn* returnData = 0 ) const; @@ -192,7 +192,7 @@ public: * @param w The rectangle width. * @param h The rectangle height. * @param sunken Draws a sunken style if @p true. - * @param rounded Draws a rounded tqshape if @p true. Requires bWidth to be + * @param rounded Draws a rounded shape if @p true. Requires bWidth to be * at least 1. * @param hWidth The highlight width. * @param bWidth The border width. diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp index bb9373bed..2614b928a 100644 --- a/kstyles/light/lightstyle-v2.cpp +++ b/kstyles/light/lightstyle-v2.cpp @@ -25,7 +25,7 @@ #include "tqmenubar.h" #include "tqapplication.h" #include "tqpainter.h" -#include "tqpalette.h" +#include "palette.h" #include "tqframe.h" #include "tqpushbutton.h" #include "tqdrawutil.h" @@ -33,7 +33,7 @@ #include "tqscrollbar.h" #include "tqtabbar.h" #include "tqguardedptr.h" -#include "tqlayout.h" +#include "layout.h" #include "tqlineedit.h" #include "tqimage.h" #include "tqcombobox.h" @@ -160,11 +160,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken)) - fill = &cg.tqbrush(TQColorGroup::Midlight); + fill = &cg.brush(TQColorGroup::Midlight); else - fill = &cg.tqbrush(TQColorGroup::Button); + fill = &cg.brush(TQColorGroup::Button); } else - fill = &cg.tqbrush(TQColorGroup::Background); + fill = &cg.brush(TQColorGroup::Background); drawLightBevel(p, r, cg, flags, fill); break; } @@ -177,11 +177,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & TQStyle::Style_Enabled) { if (sunken) - thefill = cg.tqbrush(TQColorGroup::Midlight); + thefill = cg.brush(TQColorGroup::Midlight); else - thefill = cg.tqbrush(TQColorGroup::Button); + thefill = cg.brush(TQColorGroup::Button); } else - thefill = cg.tqbrush(TQColorGroup::Background); + thefill = cg.brush(TQColorGroup::Background); p->setPen(cg.dark()); p->drawLine(r.topLeft(), r.topRight()); @@ -225,11 +225,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_Indicator: const TQBrush *fill; if (! (flags & Style_Enabled)) - fill = &cg.tqbrush(TQColorGroup::Background); + fill = &cg.brush(TQColorGroup::Background); else if (flags & Style_Down) - fill = &cg.tqbrush(TQColorGroup::Mid); + fill = &cg.brush(TQColorGroup::Mid); else - fill = &cg.tqbrush(TQColorGroup::Base); + fill = &cg.brush(TQColorGroup::Base); drawLightBevel(p, r, cg, flags | Style_Sunken, fill); p->setPen(cg.text()); @@ -266,7 +266,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, cr.addCoords(2, 2, -2, -2); 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->drawArc(r, 0, 16*360); @@ -308,7 +308,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPixmap pm(r.height(), r.width()); TQPainter p2(&pm); p2.fillRect(0, 0, pm.width(), pm.height(), - cg.tqbrush(TQColorGroup::Highlight)); + cg.brush(TQColorGroup::Highlight)); p2.setPen(cg.highlightedText()); p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title); p2.end(); @@ -332,7 +332,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, } } else { if (drawTitle) { - p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight)); + p->fillRect(r, cg.brush(TQColorGroup::Highlight)); p->setPen(cg.highlightedText()); p->drawText(r, AlignCenter, title); } else { @@ -406,7 +406,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_WindowFrame: { int lw = data.isDefault() ? - tqpixelMetric(PM_DefaultFrameWidth) : data.lineWidth(); + pixelMetric(PM_DefaultFrameWidth) : data.lineWidth(); if ( ! ( flags & Style_Sunken ) ) flags |= Style_Raised; @@ -420,11 +420,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelDockWindow: { int lw = data.isDefault() ? - tqpixelMetric(PM_DockWindowFrameWidth) : data.lineWidth(); + pixelMetric(PM_DockWindowFrameWidth) : data.lineWidth(); if (lw == 2) drawLightBevel(p, r, cg, flags | Style_Raised, - &cg.tqbrush(TQColorGroup::Button)); + &cg.brush(TQColorGroup::Button)); else TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data); break; @@ -433,10 +433,10 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelMenuBar: { int lw = data.isDefault() ? - tqpixelMetric(PM_MenuBarFrameWidth) : data.lineWidth(); + pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth(); if (lw == 2) - drawLightBevel(p, r, cg, flags, &cg.tqbrush(TQColorGroup::Button)); + drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button)); else TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data); break; @@ -460,7 +460,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, pe = PE_ArrowUp; } - p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? + p->fillRect(fr, cg.brush((flags & Style_Down) ? TQColorGroup::Midlight : TQColorGroup::Background)); tqdrawPrimitive(pe, p, ar, cg, flags); @@ -485,7 +485,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, pe = PE_ArrowDown; } - p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? + p->fillRect(fr, cg.brush((flags & Style_Down) ? TQColorGroup::Midlight : TQColorGroup::Background)); tqdrawPrimitive(pe, p, ar, cg, flags); @@ -511,7 +511,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, 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::Mid)); break; @@ -538,7 +538,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, drawLightBevel(p, fr, cg, ((flags | Style_Down) ^ Style_Down) | ((flags & Style_Enabled) ? Style_Raised : Style_Default), - &cg.tqbrush(TQColorGroup::Button)); + &cg.brush(TQColorGroup::Button)); break; } @@ -616,7 +616,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, } } -void LightStyleV2::tqdrawControl( TQ_ControlElement control, +void LightStyleV2::drawControl( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -635,7 +635,7 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, tr.addCoords(0, 0, 0, -1); fr.addCoords(2, 2, -2, -2); - if ( tb->tqshape() == TQTabBar::RoundedBelow || tb->tqshape() == TQTabBar::TriangularBelow) { + if ( tb->shape() == TQTabBar::RoundedBelow || tb->shape() == TQTabBar::TriangularBelow) { tr = r; tr.addCoords(0, 1, 0, 0); fr = r; fr.addCoords(2, 2,-2, -4); below = true; @@ -790,7 +790,7 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); p->setPen(cg.mid().dark(120)); p->drawLine(r.left() + 12, r.top() + 1, @@ -803,11 +803,11 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, if (flags & Style_Active) qDrawShadePanel(p, r, cg, true, 1, - &cg.tqbrush(TQColorGroup::Midlight)); + &cg.brush(TQColorGroup::Midlight)); else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); if ( !mi ) break; @@ -826,16 +826,16 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, bool reverse = TQApplication::reverseLayout(); if ( reverse ) { - cr = tqvisualRect( cr, r ); - sr = tqvisualRect( sr, r ); - tr = tqvisualRect( tr, r ); - ir = tqvisualRect( ir, r ); + cr = visualRect( cr, r ); + sr = visualRect( sr, r ); + tr = visualRect( tr, r ); + ir = visualRect( ir, r ); } if (mi->isChecked() && ! (flags & Style_Active) & (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()) { TQIconSet::Mode mode = @@ -936,13 +936,13 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, case CE_MenuBarEmptyArea: { - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); break; } case CE_DockWindowEmptyArea: { - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); break; } @@ -950,9 +950,9 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, case CE_MenuBarItem: { 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 - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); if (data.isDefault()) break; @@ -965,16 +965,16 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, } case CE_ProgressBarGroove: - drawLightBevel(p, r, cg, Style_Sunken, &cg.tqbrush(TQColorGroup::Background)); + drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(TQColorGroup::Background)); break; default: - TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data); + TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data); break; } } -void LightStyleV2::tqdrawControlMask( TQ_ControlElement control, +void LightStyleV2::drawControlMask( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -986,7 +986,7 @@ void LightStyleV2::tqdrawControlMask( TQ_ControlElement control, break; default: - TQCommonStyle::tqdrawControlMask(control, p, widget, r, data); + TQCommonStyle::drawControlMask(control, p, widget, r, data); break; } } @@ -1001,7 +1001,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const const TQPushButton *button = (const TQPushButton *) widget; int dbw1 = 0, dbw2 = 0; if (button->isDefault() || button->autoDefault()) { - dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget); + dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget); dbw2 = dbw1 * 2; } @@ -1019,7 +1019,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const return rect; } -void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, +void LightStyleV2::drawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -1035,25 +1035,25 @@ void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, const TQComboBox *combobox = (const TQComboBox *) widget; TQRect frame, arrow, field; frame = - TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxFrame, data), widget); arrow = - TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow, data), widget); field = - TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, data), widget); if ((controls & SC_ComboBoxFrame) && frame.isValid()) drawLightBevel(p, frame, cg, flags | Style_Raised, - &cg.tqbrush(TQColorGroup::Button)); + &cg.brush(TQColorGroup::Button)); if ((controls & SC_ComboBoxArrow) && arrow.isValid()) { if (active == SC_ComboBoxArrow) - p->fillRect(arrow, cg.tqbrush(TQColorGroup::Mid)); + p->fillRect(arrow, cg.brush(TQColorGroup::Mid)); arrow.addCoords(4, 2, -2, -2); tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags); } @@ -1069,9 +1069,9 @@ void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, if (flags & Style_HasFocus) { if (! combobox->editable()) { - p->fillRect( field, cg.tqbrush( TQColorGroup::Highlight ) ); + p->fillRect( field, cg.brush( TQColorGroup::Highlight ) ); TQRect fr = - TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ), + TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); tqdrawPrimitive( PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder, @@ -1098,7 +1098,7 @@ void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, if ((controls & SC_SpinWidgetFrame) && frame.isValid()) drawLightBevel(p, frame, cg, flags | Style_Sunken, - &cg.tqbrush(TQColorGroup::Base)); + &cg.brush(TQColorGroup::Base)); if ((controls & SC_SpinWidgetUp) && up.isValid()) { TQ_PrimitiveElement pe = PE_SpinWidgetUp; @@ -1109,7 +1109,7 @@ void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, p->drawLine(up.topLeft(), up.bottomLeft()); up.addCoords(1, 0, 0, 0); - p->fillRect(up, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(up, cg.brush(TQColorGroup::Button)); if (active == SC_SpinWidgetUp) p->setPen(cg.mid()); else @@ -1142,7 +1142,7 @@ void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, p->drawLine(down.topLeft(), down.bottomLeft()); down.addCoords(1, 0, 0, 0); - p->fillRect(down, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(down, cg.brush(TQColorGroup::Button)); if (active == SC_SpinWidgetDown) p->setPen(cg.mid()); else @@ -1274,30 +1274,30 @@ void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) | ((flags & Style_Enabled) ? Style_Sunken : Style_Default), - &cg.tqbrush(TQColorGroup::Midlight)); + &cg.brush(TQColorGroup::Midlight)); } if ((controls & SC_SliderHandle) && handle.isValid()) { drawLightBevel(p, handle, cg, ((flags | Style_Down) ^ Style_Down) | ((flags & Style_Enabled) ? Style_Raised : Style_Default), - &cg.tqbrush(TQColorGroup::Button)); + &cg.brush(TQColorGroup::Button)); } if (controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data ); break; } case CC_ListView: // use the base style for CC_ListView - singleton->basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags, + singleton->basestyle->drawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; default: - TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; } @@ -1315,7 +1315,7 @@ TQRect LightStyleV2::querySubControlMetrics( TQ_ComplexControl control, { const TQScrollBar *scrollbar = (const TQScrollBar *) widget; int sliderstart = scrollbar->sliderStart(); - int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); + int sbextent = pixelMetric(PM_ScrollBarExtent, widget); int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ? scrollbar->width() : scrollbar->height()) - (sbextent * 3); int sliderlen; @@ -1326,7 +1326,7 @@ TQRect LightStyleV2::querySubControlMetrics( TQ_ComplexControl control, sliderlen = (scrollbar->pageStep() * maxlen) / (range + scrollbar->pageStep()); - int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1413,7 +1413,7 @@ TQStyle::SubControl LightStyleV2::querySubControl( TQ_ComplexControl control, return ret; } -int LightStyleV2::tqpixelMetric( PixelMetric metric, +int LightStyleV2::pixelMetric( PixelMetric metric, const TQWidget *widget ) const { int ret; @@ -1468,7 +1468,7 @@ int LightStyleV2::tqpixelMetric( PixelMetric metric, case PM_SliderLength: case PM_SliderControlThickness: - ret = singleton->basestyle->tqpixelMetric( metric, widget ); + ret = singleton->basestyle->pixelMetric( metric, widget ); break; case PM_MaximumDragDistance: @@ -1476,7 +1476,7 @@ int LightStyleV2::tqpixelMetric( PixelMetric metric, break; default: - ret = TQCommonStyle::tqpixelMetric(metric, widget); + ret = TQCommonStyle::pixelMetric(metric, widget); break; } @@ -1590,7 +1590,7 @@ TQSize LightStyleV2::tqsizeFromContents( ContentsType contents, return ret; } -int LightStyleV2::tqstyleHint( TQ_StyleHint stylehint, +int LightStyleV2::styleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -1615,7 +1615,7 @@ int LightStyleV2::tqstyleHint( TQ_StyleHint stylehint, break; default: - ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData); + ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData); break; } diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h index 9b54e5427..c4be4c0f3 100644 --- a/kstyles/light/lightstyle-v2.h +++ b/kstyles/light/lightstyle-v2.h @@ -48,15 +48,15 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void tqdrawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void drawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void tqdrawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void drawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default) const; TQRect subRect(SubRect, const TQWidget *) const; - void tqdrawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, + void drawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default ) const; @@ -67,12 +67,12 @@ public: SubControl querySubControl(TQ_ComplexControl, const TQWidget *, const TQPoint &, const TQStyleOption &data = TQStyleOption::Default ) const; - int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const; + int pixelMetric(PixelMetric, const TQWidget * = 0 ) const; TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, const TQStyleOption & = TQStyleOption::Default ) const; - int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, + int styleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp index 1493322fa..3f5f5bab7 100644 --- a/kstyles/light/lightstyle-v3.cpp +++ b/kstyles/light/lightstyle-v3.cpp @@ -26,7 +26,7 @@ #include "tqapplication.h" #include "tqcheckbox.h" #include "tqpainter.h" -#include "tqpalette.h" +#include "palette.h" #include "tqframe.h" #include "tqpushbutton.h" #include "tqdrawutil.h" @@ -34,7 +34,7 @@ #include "tqscrollbar.h" #include "tqtabbar.h" #include "tqguardedptr.h" -#include "tqlayout.h" +#include "layout.h" #include "tqlineedit.h" #include "tqimage.h" #include "tqcombobox.h" @@ -249,7 +249,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, // fill the header if ( ! br.isValid() ) break; - p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? + p->fillRect( br, cg.brush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); // 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 | TQStyle::Style_On | TQStyle::Style_Sunken)) - fill = &cg.tqbrush(TQColorGroup::Midlight); + fill = &cg.brush(TQColorGroup::Midlight); else - fill = &cg.tqbrush(TQColorGroup::Button); + fill = &cg.brush(TQColorGroup::Button); } else - fill = &cg.tqbrush(TQColorGroup::Background); + fill = &cg.brush(TQColorGroup::Background); bool etch = true; if ( flags & Style_ButtonDefault ) { @@ -278,7 +278,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, br.addCoords( 1, 1, -1, -1 ); } drawLightBevel( p, br, cg, flags, - tqpixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ), + pixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ), etch, true, fill ); break; } @@ -289,12 +289,12 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken)) - fill = &cg.tqbrush(TQColorGroup::Midlight); + fill = &cg.brush(TQColorGroup::Midlight); else - fill = &cg.tqbrush(TQColorGroup::Button); + fill = &cg.brush(TQColorGroup::Button); } else - fill = &cg.tqbrush(TQColorGroup::Background); - drawLightBevel( p, r, cg, flags, tqpixelMetric( PM_DefaultFrameWidth ), + fill = &cg.brush(TQColorGroup::Background); + drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ), false, true, fill ); break; @@ -306,11 +306,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & TQStyle::Style_Enabled) { if (sunken) - thefill = cg.tqbrush(TQColorGroup::Midlight); + thefill = cg.brush(TQColorGroup::Midlight); else - thefill = cg.tqbrush(TQColorGroup::Button); + thefill = cg.brush(TQColorGroup::Button); } else - thefill = cg.tqbrush(TQColorGroup::Background); + thefill = cg.brush(TQColorGroup::Background); p->setPen( cg.dark() ); p->drawLine(r.topLeft(), r.topRight()); @@ -353,11 +353,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_Indicator: const TQBrush *fill; if (! (flags & Style_Enabled)) - fill = &cg.tqbrush(TQColorGroup::Background); + fill = &cg.brush(TQColorGroup::Background); else if (flags & Style_Down) - fill = &cg.tqbrush(TQColorGroup::Mid); + fill = &cg.brush(TQColorGroup::Mid); else - fill = &cg.tqbrush(TQColorGroup::Base); + fill = &cg.brush(TQColorGroup::Base); drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill ); p->setPen(cg.text()); @@ -395,7 +395,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, cr.addCoords( 2, 2, -2, -2 ); 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() : ( flags & Style_Enabled ? cg.base() : cg.background() ) ); @@ -440,7 +440,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPixmap pm(r.height(), r.width()); TQPainter p2(&pm); p2.fillRect(0, 0, pm.width(), pm.height(), - cg.tqbrush(TQColorGroup::Highlight)); + cg.brush(TQColorGroup::Highlight)); p2.setPen(cg.highlightedText()); p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title); p2.end(); @@ -461,7 +461,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, } } else { if (drawTitle) { - p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight)); + p->fillRect(r, cg.brush(TQColorGroup::Highlight)); p->setPen(cg.highlightedText()); p->drawText(r, AlignCenter, title); } else { @@ -526,13 +526,13 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.tqbrush( TQColorGroup::Button ) ); + p->fillRect( br, cg.brush( TQColorGroup::Button ) ); break; } case PE_PanelPopup: drawLightBevel( p, r, cg, flags, - ( data.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : + ( data.isDefault() ? pixelMetric(PM_DefaultFrameWidth) : data.lineWidth() ), false, true ); break; @@ -545,7 +545,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, int cover = 0; int reallw = ( data.isDefault() ? - tqpixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() ); + pixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() ); cover = reallw - 1; if ( ! ( flags & Style_Sunken ) ) @@ -573,16 +573,16 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelDockWindow: drawLightBevel( p, r, cg, flags, ( data.isDefault() ? - tqpixelMetric(PM_DefaultFrameWidth) : + pixelMetric(PM_DefaultFrameWidth) : data.lineWidth() ), false, false, - &cg.tqbrush( TQColorGroup::Button ) ); + &cg.brush( TQColorGroup::Button ) ); break; case PE_PanelMenuBar: drawLightBevel( p, r, cg, flags, ( data.isDefault() ? - tqpixelMetric(PM_MenuBarFrameWidth) : + pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth() ), false, false, - &cg.tqbrush( TQColorGroup::Button ) ); + &cg.brush( TQColorGroup::Button ) ); break; case PE_ScrollBarSubLine: @@ -608,7 +608,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? + p->fillRect( br, cg.brush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); br.addCoords( 2, 2, -2, -2 ); @@ -642,7 +642,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? + p->fillRect( br, cg.brush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); br.addCoords( 2, 2, -2, -2 ); @@ -673,7 +673,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? + p->fillRect( br, cg.brush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); break; @@ -699,7 +699,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? + p->fillRect( br, cg.brush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); break; @@ -729,7 +729,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, p->drawLine( br.topRight(), br.bottomRight() ); br.addCoords( 1, 1, -1, -1 ); - p->fillRect( br, cg.tqbrush( TQColorGroup::Highlight ) ); + p->fillRect( br, cg.brush( TQColorGroup::Highlight ) ); break; } @@ -804,7 +804,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, } } -void LightStyleV3::tqdrawControl( TQ_ControlElement control, +void LightStyleV3::drawControl( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -818,7 +818,7 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, const TQTabBar *tb = (const TQTabBar *) widget; TQRect br = r; - if ( tb->tqshape() == TQTabBar::RoundedAbove ) { + if ( tb->shape() == TQTabBar::RoundedAbove ) { if ( ! ( flags & Style_Selected ) ) { p->setPen( cg.background() ); p->drawLine( br.left(), br.bottom(), @@ -847,13 +847,13 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, if ( flags & Style_Selected ) { - p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.tqbrush(TQColorGroup::Highlight)); + p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.brush(TQColorGroup::Highlight)); br.addCoords( 1, 1, -4, 0 ); } else br.addCoords( 1, 1, -1, 0 ); p->fillRect( br, cg.background() ); - } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) { + } else if ( tb->shape() == TQTabBar::RoundedBelow ) { if ( ! ( flags & Style_Selected ) ) { p->setPen( cg.background() ); p->drawLine( br.left(), br.top(), @@ -885,7 +885,7 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, if ( flags & Style_Selected ) { - p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.tqbrush(TQColorGroup::Highlight)); + p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.brush(TQColorGroup::Highlight)); br.addCoords( 1, 0, -3, -1 ); } else @@ -893,7 +893,7 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, p->fillRect( br, cg.background() ); } else - TQCommonStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); + TQCommonStyle::drawControl( control, p, widget, r, cg, flags, data ); break; } @@ -911,7 +911,7 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); p->setPen( cg.mid() ); p->drawLine(r.left() + 12, r.top() + 1, r.right() - 12, r.top() + 1); @@ -923,11 +923,11 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, if (flags & Style_Active) qDrawShadePanel(p, r, cg, true, 1, - &cg.tqbrush(TQColorGroup::Midlight)); + &cg.brush(TQColorGroup::Midlight)); else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); if ( !mi ) break; @@ -946,16 +946,16 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, bool reverse = TQApplication::reverseLayout(); if ( reverse ) { - cr = tqvisualRect( cr, r ); - sr = tqvisualRect( sr, r ); - tr = tqvisualRect( tr, r ); - ir = tqvisualRect( ir, r ); + cr = visualRect( cr, r ); + sr = visualRect( sr, r ); + tr = visualRect( tr, r ); + ir = visualRect( ir, r ); } if (mi->isChecked() && ! (flags & Style_Active) & (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()) { TQIconSet::Mode mode = @@ -1057,16 +1057,16 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, case CE_MenuBarEmptyArea: { - p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); + p->fillRect(r, cg.brush(TQColorGroup::Button)); break; } case CE_MenuBarItem: { 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 - p->fillRect( r, cg.tqbrush( TQColorGroup::Button ) ); + p->fillRect( r, cg.brush( TQColorGroup::Button ) ); if (data.isDefault()) break; @@ -1079,17 +1079,17 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, } case CE_ProgressBarGroove: - drawLightBevel( p, r, cg, Style_Sunken, tqpixelMetric( PM_DefaultFrameWidth ), - true, true, &cg.tqbrush( TQColorGroup::Background ) ); + drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ), + true, true, &cg.brush( TQColorGroup::Background ) ); break; default: - TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data); + TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data); break; } } -void LightStyleV3::tqdrawControlMask( TQ_ControlElement control, +void LightStyleV3::drawControlMask( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1101,7 +1101,7 @@ void LightStyleV3::tqdrawControlMask( TQ_ControlElement control, break; default: - TQCommonStyle::tqdrawControlMask(control, p, widget, r, data); + TQCommonStyle::drawControlMask(control, p, widget, r, data); break; } } @@ -1114,7 +1114,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const case SR_PushButtonFocusRect: { rect = TQCommonStyle::subRect( SR_PushButtonContents, widget ); - int bm = tqpixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2; + int bm = pixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2; rect.addCoords( hbm, hbm, -hbm, -hbm ); break; } @@ -1151,7 +1151,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const return rect; } -void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, +void LightStyleV3::drawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -1167,15 +1167,15 @@ void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, const TQComboBox *combobox = (const TQComboBox *) widget; TQRect frame, arrow, field; frame = - TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxFrame, data), widget); arrow = - TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow, data), widget); field = - TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, data), widget); @@ -1185,7 +1185,7 @@ void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, if ((controls & SC_ComboBoxArrow) && arrow.isValid()) { drawLightEtch( p, arrow, cg.button(), ( active == SC_ComboBoxArrow ) ); 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); tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags); } @@ -1194,9 +1194,9 @@ void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, if (flags & Style_HasFocus) { if (! combobox->editable()) { TQRect fr = - TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ), + TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); - p->fillRect( fr, cg.tqbrush( TQColorGroup::Highlight ) ); + p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) ); tqdrawPrimitive( PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder, TQStyleOption(cg.highlight())); @@ -1205,8 +1205,8 @@ void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, p->setPen(cg.highlightedText()); } else { p->fillRect( field, ( ( flags & Style_Enabled ) ? - cg.tqbrush( TQColorGroup::Base ) : - cg.tqbrush( TQColorGroup::Background ) ) ); + cg.brush( TQColorGroup::Base ) : + cg.brush( TQColorGroup::Background ) ) ); p->setPen( cg.text() ); } } @@ -1236,7 +1236,7 @@ void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, p->drawLine( up.topLeft(), up.bottomLeft() ); 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 ) ); up.addCoords( 1, 0, 0, 0 ); @@ -1254,7 +1254,7 @@ void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, p->drawLine( down.topLeft(), down.bottomLeft() ); 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 ) ); down.addCoords( 1, 0, 0, 0 ); @@ -1409,19 +1409,19 @@ void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, } if (controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data ); break; } case CC_ListView: // use the base style for CC_ListView - basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags, + basestyle->drawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; default: - TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; } @@ -1437,8 +1437,8 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, switch (control) { case CC_ComboBox: { - int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ); - int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow + int fw = pixelMetric( PM_DefaultFrameWidth, widget ); + int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow switch ( sc ) { case SC_ComboBoxFrame: @@ -1463,7 +1463,7 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, { const TQScrollBar *scrollbar = (const TQScrollBar *) widget; int sliderstart = scrollbar->sliderStart(); - int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); + int sbextent = pixelMetric(PM_ScrollBarExtent, widget); int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ? scrollbar->width() : scrollbar->height()) - (sbextent * 3); int sliderlen; @@ -1474,7 +1474,7 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, sliderlen = (scrollbar->pageStep() * maxlen) / (range + scrollbar->pageStep()); - int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1538,8 +1538,8 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, case CC_Slider: { const TQSlider *slider = (const TQSlider *) widget; - int tickOffset = tqpixelMetric( PM_SliderTickmarkOffset, widget ); - int thickness = tqpixelMetric( PM_SliderControlThickness, widget ); + int tickOffset = pixelMetric( PM_SliderTickmarkOffset, widget ); + int thickness = pixelMetric( PM_SliderControlThickness, widget ); switch ( sc ) { case SC_SliderGroove: @@ -1552,7 +1552,7 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, case SC_SliderHandle: { int pos = slider->sliderStart(); - int len = tqpixelMetric( PM_SliderLength, widget ); + int len = pixelMetric( PM_SliderLength, widget ); if ( slider->orientation() == Qt::Horizontal ) ret.setRect( pos + 2, tickOffset + 2, len - 4, thickness - 4 ); @@ -1594,7 +1594,7 @@ TQStyle::SubControl LightStyleV3::querySubControl( TQ_ComplexControl control, return ret; } -int LightStyleV3::tqpixelMetric( PixelMetric metric, +int LightStyleV3::pixelMetric( PixelMetric metric, const TQWidget *widget ) const { int ret; @@ -1691,7 +1691,7 @@ int LightStyleV3::tqpixelMetric( PixelMetric metric, break; default: - ret = TQCommonStyle::tqpixelMetric(metric, widget); + ret = TQCommonStyle::pixelMetric(metric, widget); break; } @@ -1708,8 +1708,8 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents, switch (contents) { case CT_ComboBox: { - int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; - int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow + int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow int w = contentsSize.width(); int h = contentsSize.height(); @@ -1729,7 +1729,7 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents, const TQPushButton *button = (const TQPushButton *) widget; ret = TQCommonStyle::tqsizeFromContents( contents, widget, contentsSize, data ); int w = ret.width(), h = ret.height(); - int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget ) * 2; + int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ) * 2; int mw = 80 - dbi, mh = 25 - dbi; // only expand the button if we are displaying text... @@ -1818,7 +1818,7 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents, return ret; } -int LightStyleV3::tqstyleHint( TQ_StyleHint stylehint, +int LightStyleV3::styleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -1847,7 +1847,7 @@ int LightStyleV3::tqstyleHint( TQ_StyleHint stylehint, break; default: - ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData); + ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData); break; } diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h index a76279bfa..a07bf6e53 100644 --- a/kstyles/light/lightstyle-v3.h +++ b/kstyles/light/lightstyle-v3.h @@ -52,15 +52,15 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void tqdrawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void drawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void tqdrawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void drawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default) const; TQRect subRect(SubRect, const TQWidget *) const; - void tqdrawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, + void drawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default ) const; @@ -71,12 +71,12 @@ public: SubControl querySubControl(TQ_ComplexControl, const TQWidget *, const TQPoint &, const TQStyleOption &data = TQStyleOption::Default ) const; - int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const; + int pixelMetric(PixelMetric, const TQWidget * = 0 ) const; TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, const TQStyleOption & = TQStyleOption::Default ) const; - int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, + int styleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; diff --git a/kstyles/plastik/config/plastikconf.cpp b/kstyles/plastik/config/plastikconf.cpp index 70d4f6cfa..5412a61bf 100644 --- a/kstyles/plastik/config/plastikconf.cpp +++ b/kstyles/plastik/config/plastikconf.cpp @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. */ #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqhbox.h> #include <tqsettings.h> #include <tqcolor.h> diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp index d935a0ee5..609ec91b2 100644 --- a/kstyles/plastik/plastik.cpp +++ b/kstyles/plastik/plastik.cpp @@ -885,21 +885,21 @@ void PlastikStyle::renderPanel(TQPainter *p, r.coords(&x, &y, &x2, &y2); if (kickerMode && - p->tqdevice() && p->tqdevice()->devType() == TQInternal::Widget && - TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->tqdevice()))->className()) == "FittsLawFrame") { + p->device() && p->device()->devType() == TQInternal::Widget && + TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->device()))->className()) == "FittsLawFrame") { // Stolen wholesale from Keramik. I don't like it, but oh well. if (sunken) { const TQCOORD corners[] = { x2, y, x2, y2, x, y2, x, y }; p->setPen(g.background().dark()); p->drawConvexPolygon(TQPointArray(4, corners)); p->setPen(g.background().light()); - p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); + p->drawPolyline(TQPointArray(4, corners), 0, 3); } else { const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 }; p->setPen(g.background().dark()); p->drawPolygon(TQPointArray(4, corners)); p->setPen(g.background().light()); - p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); + p->drawPolyline(TQPointArray(4, corners), 0, 3); } } else { renderContour(p, r, g.background(), getColor(g, PanelContour) ); @@ -1483,7 +1483,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, if(!kickerMode) { // detect if this is the left most header item bool isFirst = false; - TQHeader *header = dynamic_cast<TQHeader*>(p->tqdevice() ); + TQHeader *header = dynamic_cast<TQHeader*>(p->device() ); if (header) { isFirst = header->mapToIndex(header->sectionAt(r.x() ) ) == 0; } @@ -1819,7 +1819,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, // -------------- case PE_Splitter: { // highlight on mouse over - TQColor color = (static_cast<TQPaintDevice*>(static_cast<TQWidget*>(hoverWidget)) == static_cast<TQPaintDevice*>(p->tqdevice()))?TQColor(cg.background().light(100+_contrast)):cg.background(); + TQColor color = (static_cast<TQPaintDevice*>(static_cast<TQWidget*>(hoverWidget)) == static_cast<TQPaintDevice*>(p->device()))?TQColor(cg.background().light(100+_contrast)):cg.background(); p->fillRect(r, color); if (w > h) { if (h > 4) { @@ -1862,9 +1862,9 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, bool isEnabled = true; // panel is highlighted by default if it has focus, but if we have access to the // widget itself we can try to avoid highlighting in case it's readOnly or disabled. - if (p->tqdevice() && dynamic_cast<TQLineEdit*>(p->tqdevice())) + if (p->device() && dynamic_cast<TQLineEdit*>(p->device())) { - TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->tqdevice()); + TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->device()); isReadOnly = lineEdit->isReadOnly(); isEnabled = lineEdit->isEnabled(); } @@ -1881,7 +1881,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, // only thing we know is that khtml buffers its widgets into a pixmap. So // when the paint device is a TQPixmap, chances are high that we are in khtml. // It's possible that this breaks other things, so let's see how it works... - if (p->tqdevice() && dynamic_cast<TQPixmap*>(p->tqdevice() ) ) { + if (p->device() && dynamic_cast<TQPixmap*>(p->device() ) ) { contourFlags += Draw_AlphaBlend; } @@ -1942,7 +1942,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, case PE_PanelMenuBar: case PE_PanelDockWindow: { // fix for toolbar lag (from Mosfet Liquid) - TQWidget* w = dynamic_cast<TQWidget*>(p->tqdevice()); + TQWidget* w = dynamic_cast<TQWidget*>(p->device()); if(w && w->backgroundMode() == PaletteButton) w->setBackgroundMode(PaletteBackground); p->fillRect(r, cg.brush(TQColorGroup::Background)); @@ -2095,11 +2095,11 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } } - const TQWMatrix oldMatrix( p->tqworldMatrix() ); + const TQWMatrix oldMatrix( p->worldMatrix() ); if (flags & Style_Down) { - p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), - tqpixelMetric(PM_ButtonShiftVertical)); + p->translate(pixelMetric(PM_ButtonShiftHorizontal), + pixelMetric(PM_ButtonShiftVertical)); } a.translate((r.x()+r.width()/2), (r.y()+r.height()/2)); @@ -2139,7 +2139,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } -void PlastikStyle::tqdrawControl(TQ_ControlElement element, +void PlastikStyle::drawControl(TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -2301,7 +2301,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, if(cw) cornerWidget = true; } - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); bool selected = false; if (flags & Style_Selected) selected = true; TabPosition pos; @@ -2337,7 +2337,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget); break; default: - KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + KStyle::drawControl(element, p, widget, r, cg, flags, opt); } break; @@ -2380,15 +2380,15 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, // Shift button contents if pushed. if ( active ) { - x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); - y += tqpixelMetric(PM_ButtonShiftVertical, widget); + x += pixelMetric(PM_ButtonShiftHorizontal, widget); + y += pixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); + int dx = pixelMetric( PM_MenuButtonIndicator, widget ); if ( button->iconSet() && !button->iconSet()->isNull() && (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w ) { @@ -2397,7 +2397,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, else { p->setPen(cg.buttonText()); - tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), + tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), cg, flags, opt ); w -= dx; } @@ -2423,7 +2423,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap ); if (cornArrow) //Draw over the icon - tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), + tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), cg, flags, opt ); @@ -2433,14 +2433,14 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, } // Make the label indicate if the button is a default button or not - drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(), + drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - &button->tqcolorGroup().buttonText() ); + &button->colorGroup().buttonText() ); if ( flags & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), + visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); break; } @@ -2490,7 +2490,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, bool enabled = mi->isEnabled(); bool checkable = popupmenu->isCheckable(); bool active = flags & Style_Active; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); bool reverse = TQApplication::reverseLayout(); if ( checkable ) checkcol = QMAX( checkcol, 20 ); @@ -2525,7 +2525,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, break; } - TQRect cr = tqvisualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r ); + TQRect cr = visualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r ); // Do we have an icon? if ( mi->iconSet() ) { @@ -2669,8 +2669,8 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = tqpixelMetric(PM_MenuButtonIndicator) - 1; - TQRect vr = tqvisualRect( TQRect( r.x() + r.width() - 5 - 1 - dim, + int dim = pixelMetric(PM_MenuButtonIndicator) - 1; + TQRect vr = visualRect( TQRect( r.x() + r.width() - 5 - 1 - dim, r.y() + r.height() / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -2706,11 +2706,11 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, break; default: - KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + KStyle::drawControl(element, p, widget, r, cg, flags, opt); } } -void PlastikStyle::tqdrawControlMask(TQ_ControlElement element, +void PlastikStyle::drawControlMask(TQ_ControlElement element, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -2725,12 +2725,12 @@ void PlastikStyle::tqdrawControlMask(TQ_ControlElement element, } default: { - KStyle::tqdrawControlMask (element, p, w, r, opt); + KStyle::drawControlMask (element, p, w, r, opt); } } } -void PlastikStyle::tqdrawComplexControlMask(TQ_ComplexControl c, +void PlastikStyle::drawComplexControlMask(TQ_ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -2746,12 +2746,12 @@ void PlastikStyle::tqdrawComplexControlMask(TQ_ComplexControl c, break; } default: { - KStyle::tqdrawComplexControlMask (c, p, w, r, o); + KStyle::drawComplexControlMask (c, p, w, r, o); } } } -void PlastikStyle::tqdrawComplexControl(TQ_ComplexControl control, +void PlastikStyle::drawComplexControl(TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -3141,7 +3141,7 @@ void PlastikStyle::tqdrawComplexControl(TQ_ComplexControl control, } default: - KStyle::tqdrawComplexControl(control, p, widget, + KStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; @@ -3246,15 +3246,15 @@ TQRect PlastikStyle::querySubControlMetrics(TQ_ComplexControl control, } } -int PlastikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const +int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const { switch(m) { // TABS // ---- case PM_TabBarTabVSpace: { const TQTabBar * tb = (const TQTabBar *) widget; - if (tb->tqshape() == TQTabBar::RoundedAbove || - tb->tqshape() == TQTabBar::RoundedBelow) + if (tb->shape() == TQTabBar::RoundedAbove || + tb->shape() == TQTabBar::RoundedBelow) return 12; else return 4; @@ -3343,7 +3343,7 @@ int PlastikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const } default: - return KStyle::tqpixelMetric(m, widget); + return KStyle::pixelMetric(m, widget); } } @@ -3412,8 +3412,8 @@ TQSize PlastikStyle::tqsizeFromContents(ContentsType t, { const TQPushButton* btn = static_cast<const TQPushButton*>(widget); - int w = s.width() + 2 * tqpixelMetric(PM_ButtonMargin, widget); - int h = s.height() + 2 * tqpixelMetric(PM_ButtonMargin, widget); + int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget); + int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget); if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h); return TQSize( w+25, h+5 ); @@ -3434,7 +3434,7 @@ TQSize PlastikStyle::tqsizeFromContents(ContentsType t, return KStyle::tqsizeFromContents (t, widget, s, opt); } -int PlastikStyle::tqstyleHint( TQ_StyleHint stylehint, +int PlastikStyle::styleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -3444,7 +3444,7 @@ int PlastikStyle::tqstyleHint( TQ_StyleHint stylehint, return 96; // Motif-like delay... default: - return KStyle::tqstyleHint(stylehint, widget, option, returnData); + return KStyle::styleHint(stylehint, widget, option, returnData); } } @@ -3464,14 +3464,14 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) TQWidget* spinbox = widget->parentWidget(); if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut)) { - spinbox->tqrepaint(false); + spinbox->repaint(false); } return false; } if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut)) { - widget->tqrepaint(false); + widget->repaint(false); } return false; } @@ -3485,13 +3485,13 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) { TQWidget* button = TQT_TQWIDGET(obj); hoverWidget = button; - button->tqrepaint(false); + button->repaint(false); } else if ((ev->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(hoverWidget)) ) { TQWidget* button = TQT_TQWIDGET(obj); hoverWidget = 0; - button->tqrepaint(false); + button->repaint(false); } return false; } @@ -3501,7 +3501,7 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) TQWidget* tabbar = TQT_TQWIDGET(obj); hoverWidget = tabbar; hoverTab = 0; - tabbar->tqrepaint(false); + tabbar->repaint(false); } else if (ev->type() == TQEvent::MouseMove) { @@ -3512,15 +3512,15 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) // avoid unnecessary repaints (which otherwise would occour on every // MouseMove event causing high cpu load). - bool tqrepaint = true; + bool repaint = true; TQTab *tab = tabbar->selectTab(me->pos() ); if (hoverTab == tab) - tqrepaint = false; + repaint = false; hoverTab = tab; - if (tqrepaint) - tabbar->tqrepaint(false); + if (repaint) + tabbar->repaint(false); } } else if (ev->type() == TQEvent::Leave) @@ -3528,7 +3528,7 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) TQWidget* tabbar = TQT_TQWIDGET(obj); hoverWidget = 0; hoverTab = 0; - tabbar->tqrepaint(false); + tabbar->repaint(false); } return false; } diff --git a/kstyles/plastik/plastik.h b/kstyles/plastik/plastik.h index 6fa325db9..fbac34232 100644 --- a/kstyles/plastik/plastik.h +++ b/kstyles/plastik/plastik.h @@ -81,7 +81,7 @@ public: SFlags flags = Style_Default, const TQStyleOption &opt = TQStyleOption::Default ) const; - void tqdrawControl(TQ_ControlElement element, + void drawControl(TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -89,9 +89,9 @@ public: SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawControlMask( TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; + void drawControlMask( TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; - void tqdrawComplexControl(TQ_ComplexControl control, + void drawComplexControl(TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -101,7 +101,7 @@ public: SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - int tqpixelMetric(PixelMetric m, + int pixelMetric(PixelMetric m, const TQWidget *widget = 0 ) const; TQRect subRect(SubRect r, @@ -112,7 +112,7 @@ public: SubControl subcontrol, const TQStyleOption &opt = TQStyleOption::Default ) const; - void tqdrawComplexControlMask(TQStyle::TQ_ComplexControl c, + void drawComplexControlMask(TQStyle::TQ_ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -123,7 +123,7 @@ public: const TQSize &s, const TQStyleOption &o) const; - int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, + int styleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index f1416526e..4c8a7ad5b 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -22,7 +22,7 @@ #endif #include <tqmenudata.h> -#include <tqpalette.h> +#include <palette.h> #include <tqbitmap.h> #include <tqtabbar.h> #include <tqpointarray.h> @@ -92,7 +92,7 @@ scrollBarControlsMetrics int extent = horizontal ? sb->height() : sb->width(); - TQColorGroup g = sb->tqcolorGroup(); + TQColorGroup g = sb->colorGroup(); if (sliderStart > sliderMax) sliderStart = sliderMax; @@ -303,12 +303,12 @@ WebStyle::eventFilter(TQObject * o, TQEvent * e) if (e->type() == TQEvent::Enter) { _highlightedButton = pb; - pb->tqrepaint(false); + pb->repaint(false); } else if (e->type() == TQEvent::Leave) { _highlightedButton = 0; - pb->tqrepaint(false); + pb->repaint(false); } return false; @@ -371,14 +371,14 @@ WebStyle::drawPushButton(TQPushButton * b, TQPainter * p) bool sunken(b->isDown() || b->isOn()); bool hl(_highlightedButton == b); - TQColor bg(b->tqcolorGroup().button()); + TQColor bg(b->colorGroup().button()); p->save(); - p->fillRect(b->rect(), b->tqcolorGroup().brush(TQColorGroup::Background)); + p->fillRect(b->rect(), b->colorGroup().brush(TQColorGroup::Background)); if (b->isDefault()) { - TQColor c(hl ? b->tqcolorGroup().highlight() : b->tqcolorGroup().mid()); + TQColor c(hl ? b->colorGroup().highlight() : b->colorGroup().mid()); p->setPen(contrastingForeground(c, bg)); @@ -391,26 +391,26 @@ WebStyle::drawPushButton(TQPushButton * b, TQPainter * p) 4, b->width() - 8, b->height() - 8, - b->tqcolorGroup().brush(TQColorGroup::Button) + b->colorGroup().brush(TQColorGroup::Button) ); if (b->isEnabled()) { if (sunken) { - p->setPen(contrastingForeground(b->tqcolorGroup().light(), bg)); + p->setPen(contrastingForeground(b->colorGroup().light(), bg)); } else { if (hl) - p->setPen(contrastingForeground(b->tqcolorGroup().highlight(), bg)); + p->setPen(contrastingForeground(b->colorGroup().highlight(), bg)); else - p->setPen(contrastingForeground(b->tqcolorGroup().mid(), bg)); + p->setPen(contrastingForeground(b->colorGroup().mid(), bg)); } } else { - p->setPen(b->tqcolorGroup().button()); + p->setPen(b->colorGroup().button()); } drawFunkyRect(p, 3, 3, b->width() - 6, b->height() - 6, true); @@ -459,7 +459,7 @@ WebStyle::drawScrollBarControls rSlider ); - TQColorGroup g(sb->tqcolorGroup()); + TQColorGroup g(sb->colorGroup()); if (controls & AddLine && rAdd.isValid()) { @@ -754,7 +754,7 @@ WebStyle::drawExclusiveIndicator p->setBrush(g.brush(TQColorGroup::Background)); - // Avoid mistqshapen ellipses. Qt or X bug ? Who knows... + // Avoid misshapen ellipses. Qt or X bug ? Who knows... if (0 == w % 2) --w; @@ -1450,14 +1450,14 @@ WebStyle::drawTab { TQRect r(tab->rect()); - TQColorGroup g(tabBar->tqcolorGroup()); + TQColorGroup g(tabBar->colorGroup()); p->save(); p->setPen(selected ? g.dark() : g.mid()); p->fillRect(r, g.brush(TQColorGroup::Background)); - switch (tabBar->tqshape()) + switch (tabBar->shape()) { case TQTabBar::RoundedAbove: case TQTabBar::TriangularAbove: diff --git a/kstyles/web/webstyle.h b/kstyles/web/webstyle.h index 5cd930c73..fffcbb965 100644 --- a/kstyles/web/webstyle.h +++ b/kstyles/web/webstyle.h @@ -21,7 +21,7 @@ #define WEB_STYLE_H #include <kstyle.h> -#include <tqpalette.h> +#include <palette.h> class TQPainter; class TQScrollBar; diff --git a/kunittest/module.h b/kunittest/module.h index 4213ddcf0..7f4b24789 100644 --- a/kunittest/module.h +++ b/kunittest/module.h @@ -48,7 +48,7 @@ namespace KUnitTest * @code KUNITTEST_MODULE(kunittest_samplemodule,"TestSuite") @endcode */ #define KUNITTEST_MODULE(library,suite) \ - static const TQString s_kunittest_suite = TQString::tqfromLatin1(suite); \ + static const TQString s_kunittest_suite = TQString::fromLatin1(suite); \ class library##Module : public TQObject \ { \ public: \ @@ -93,7 +93,7 @@ namespace KUnitTest tester##ModuleAutoregister() \ { \ KUnitTest::Tester *test = new tester(); \ - TQString name = s_kunittest_suite + TQString::tqfromLatin1("::") + TQString::fromLocal8Bit(#tester); \ + TQString name = s_kunittest_suite + TQString::fromLatin1("::") + TQString::fromLocal8Bit(#tester); \ test->setName(name.local8Bit()); \ kunittest_registerModuleTester(name.local8Bit(), test ); \ } \ diff --git a/kunittest/tester.cpp b/kunittest/tester.cpp index 55f9d541d..11a24e653 100644 --- a/kunittest/tester.cpp +++ b/kunittest/tester.cpp @@ -48,7 +48,7 @@ namespace KUnitTest void SlotTester::allTests() { - TQStrList allSlots = tqmetaObject()->slotNames(); + TQStrList allSlots = metaObject()->slotNames(); if ( allSlots.contains("setUp()") > 0 ) invokeMember("setUp()"); diff --git a/kunittest/tester.h b/kunittest/tester.h index 278f0d18d..061f319b3 100644 --- a/kunittest/tester.h +++ b/kunittest/tester.h @@ -359,7 +359,7 @@ using namespace std; * * @code SKIP("Test skipped because of lack of foo support."); @endcode */ -#define SKIP( x ) skip( __FILE__, __LINE__, TQString::tqfromLatin1(#x)) +#define SKIP( x ) skip( __FILE__, __LINE__, TQString::fromLatin1(#x)) /*! * A macro testing that @p expression throws an exception that is catched diff --git a/kutils/kcmodulecontainer.cpp b/kutils/kcmodulecontainer.cpp index c613e4385..2377d1be1 100644 --- a/kutils/kcmodulecontainer.cpp +++ b/kutils/kcmodulecontainer.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqlayout.h> +#include <layout.h> #include <tqpixmap.h> #include <tqstringlist.h> #include <tqtabwidget.h> diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp index 642e6f1bc..5f3a98cb2 100644 --- a/kutils/kcmoduleloader.cpp +++ b/kutils/kcmoduleloader.cpp @@ -23,7 +23,7 @@ #include <tqfile.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> #include <kdebug.h> diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp index b9f297d6e..182c7514b 100644 --- a/kutils/kcmoduleproxy.cpp +++ b/kutils/kcmoduleproxy.cpp @@ -24,10 +24,10 @@ #include <tqfileinfo.h> #include <tqframe.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpoint.h> #include <tqscrollview.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvbox.h> #include <tqwhatsthis.h> #include <tqwidget.h> @@ -311,7 +311,7 @@ void KCModuleProxy::runAsRoot() TQPalette pal( red ); pal.setColor( TQColorGroup::Background, - tqcolorGroup().background() ); + colorGroup().background() ); d->embedFrame->setPalette( pal ); d->embedFrame->setLineWidth( 2 ); d->embedFrame->setMidLineWidth( 2 ); @@ -416,7 +416,7 @@ void KCModuleProxy::rootExited() /* Such that the "ordinary" module loads again */ d->rootMode = false; - d->topLayout->tqinvalidate(); + d->topLayout->invalidate(); TQShowEvent ev; showEvent( &ev ); diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp index 768f787fe..b5f67684c 100644 --- a/kutils/kcmultidialog.cpp +++ b/kutils/kcmultidialog.cpp @@ -23,7 +23,7 @@ #include <tqcursor.h> #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <kaboutdata.h> diff --git a/kutils/kfind.cpp b/kutils/kfind.cpp index 7b2da6899..f0f55cbc6 100644 --- a/kutils/kfind.cpp +++ b/kutils/kfind.cpp @@ -26,7 +26,7 @@ #include <kmessagebox.h> #include <tqlabel.h> #include <tqregexp.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqguardedptr.h> #include <tqptrvector.h> #include <kdebug.h> diff --git a/kutils/kfinddialog.cpp b/kutils/kfinddialog.cpp index 4bf564b2e..7a8913679 100644 --- a/kutils/kfinddialog.cpp +++ b/kutils/kfinddialog.cpp @@ -23,7 +23,7 @@ #include <tqcursor.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpopupmenu.h> #include <tqpushbutton.h> #include <tqregexp.h> @@ -117,9 +117,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha topLayout->setMargin( 0 ); m_findGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page); - m_findGrp->tqlayout()->setSpacing( KDialog::spacingHint() ); - // m_findGrp->tqlayout()->setMargin( KDialog::marginHint() ); - m_findLayout = new TQGridLayout(m_findGrp->tqlayout()); + m_findGrp->layout()->setSpacing( KDialog::spacingHint() ); + // m_findGrp->layout()->setMargin( KDialog::marginHint() ); + m_findLayout = new TQGridLayout(m_findGrp->layout()); m_findLayout->setSpacing( KDialog::spacingHint() ); // m_findLayout->setMargin( KDialog::marginHint() ); @@ -138,9 +138,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha topLayout->addWidget(m_findGrp); m_replaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page); - m_replaceGrp->tqlayout()->setSpacing( KDialog::spacingHint() ); - // m_replaceGrp->tqlayout()->setMargin( KDialog::marginHint() ); - m_replaceLayout = new TQGridLayout(m_replaceGrp->tqlayout()); + m_replaceGrp->layout()->setSpacing( KDialog::spacingHint() ); + // m_replaceGrp->layout()->setMargin( KDialog::marginHint() ); + m_replaceLayout = new TQGridLayout(m_replaceGrp->layout()); m_replaceLayout->setSpacing( KDialog::spacingHint() ); // m_replaceLayout->setMargin( KDialog::marginHint() ); @@ -159,9 +159,9 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha topLayout->addWidget(m_replaceGrp); m_optionGrp = new TQGroupBox(0, Qt::Vertical, i18n("Options"), page); - m_optionGrp->tqlayout()->setSpacing(KDialog::spacingHint()); - // m_optionGrp->tqlayout()->setMargin(KDialog::marginHint()); - optionsLayout = new TQGridLayout(m_optionGrp->tqlayout()); + m_optionGrp->layout()->setSpacing(KDialog::spacingHint()); + // m_optionGrp->layout()->setMargin(KDialog::marginHint()); + optionsLayout = new TQGridLayout(m_optionGrp->layout()); optionsLayout->setSpacing( KDialog::spacingHint() ); // optionsLayout->setMargin( KDialog::marginHint() ); diff --git a/kutils/kmultitabbar.cpp b/kutils/kmultitabbar.cpp index 9c47e87e8..2d1043fbe 100644 --- a/kutils/kmultitabbar.cpp +++ b/kutils/kmultitabbar.cpp @@ -28,7 +28,7 @@ #include "kmultitabbar_p.moc" #include <tqbutton.h> #include <tqpopupmenu.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqtooltip.h> #include <tqfontmetrics.h> @@ -82,7 +82,7 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) { m_style=style; for (uint i=0;i<m_tabs.count();i++) - m_tabs.tqat(i)->setStyle(m_style); + m_tabs.at(i)->setStyle(m_style); if ( (m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON ) ) { @@ -106,11 +106,11 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) } addChild(box); for (uint i=0;i<m_tabs.count();i++) - mainLayout->add(m_tabs.tqat(i)); + mainLayout->add(m_tabs.at(i)); mainLayout->setAutoAdd(true); } - viewport()->tqrepaint(); + viewport()->repaint(); } void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph ) @@ -120,9 +120,9 @@ void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clip if (m_position==KMultiTabBar::Right) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height()); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(1,0,1,viewport()->height()); @@ -130,28 +130,28 @@ void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clip else if (m_position==KMultiTabBar::Left) { - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(23,0,23,viewport()->height()); paint->drawLine(22,0,22,viewport()->height()); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height()); } else if (m_position==KMultiTabBar::Bottom) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,viewport()->width(),0); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(0,1,viewport()->width(),1); } else { - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(0,23,viewport()->width(),23); paint->drawLine(0,22,viewport()->width(),22); -/* paint->setPen(tqcolorGroup().shadow()); +/* paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height());*/ } @@ -175,7 +175,7 @@ void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev) uint ulen=0;\ diff=0; \ for (uint i2=i;i2<tabCount;i2++) {\ - uint l1=m_tabs.tqat(i2)->neededSize();\ + uint l1=m_tabs.at(i2)->neededSize();\ if ((ulen+l1)>space){\ if (ulen==0) diff=0;\ else diff=((float)(space-ulen))/(i2-i);\ @@ -208,7 +208,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { const uint tabCount=m_tabs.count(); for (uint i=0;i<tabCount;i++) { cnt++; - tmp+=m_tabs.tqat(i)->neededSize(); + tmp+=m_tabs.at(i)->neededSize(); if (tmp>space) { if (cnt>1)i--; else if (i==(tabCount-1)) break; @@ -232,7 +232,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { //kdDebug()<<"m_lines recalculated="<<m_lines<<endl; for (uint i=0;i<tabCount;i++) { - KMultiTabBarTab *tab=m_tabs.tqat(i); + KMultiTabBarTab *tab=m_tabs.at(i); cnt++; tmp+=tab->neededSize()+diff; if (tmp>space) { @@ -258,7 +258,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { //kdDebug()<<"starting new line:"<<lines<<endl; } else { - //kdDebug()<<"Placing line on line:"<<lines<<" pos: (x/y)=("<<tmp-m_tabs.tqat(i)->neededSize()<<"/"<<lines*24<<")"<<endl; + //kdDebug()<<"Placing line on line:"<<lines<<" pos: (x/y)=("<<tmp-m_tabs.at(i)->neededSize()<<"/"<<lines*24<<")"<<endl; //kdDebug()<<"diff="<<diff<<endl; tab->removeEventFilter(this); tab->move(NEARBYINT(tmp-tab->neededSize()),lines*24); @@ -279,7 +279,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { tmp=-diff; for (uint i=0;i<tabCount;i++) { - KMultiTabBarTab *tab=m_tabs.tqat(i); + KMultiTabBarTab *tab=m_tabs.at(i); cnt++; tmp+=tab->neededSize()+diff; if (tmp>space) { @@ -311,7 +311,7 @@ void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { } else { int size=0; /*move the calculation into another function and call it only on add tab and tab click events*/ for (int i=0;i<(int)m_tabs.count();i++) - size+=(m_barMode==KMultiTabBar::Vertical?m_tabs.tqat(i)->height():m_tabs.tqat(i)->width()); + size+=(m_barMode==KMultiTabBar::Vertical?m_tabs.at(i)->height():m_tabs.at(i)->width()); if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top)) box->setGeometry(0,0,size,height()); else box->setGeometry(0,0,width(),size); @@ -351,7 +351,7 @@ int KMultiTabBarInternal::appendTab(const TQPixmap &pic ,int id,const TQString& if (m_expandedTabSize<tab->neededSize()) { m_expandedTabSize=tab->neededSize(); for (uint i=0;i<m_tabs.count();i++) - m_tabs.tqat(i)->setSize(m_expandedTabSize); + m_tabs.at(i)->setSize(m_expandedTabSize); } else tab->setSize(m_expandedTabSize); } else tab->updateState(); @@ -364,7 +364,7 @@ void KMultiTabBarInternal::removeTab(int id) { for (uint pos=0;pos<m_tabs.count();pos++) { - if (m_tabs.tqat(pos)->id()==id) + if (m_tabs.at(pos)->id()==id) { m_tabs.remove(pos); resizeEvent(0); @@ -377,8 +377,8 @@ void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition p { m_position=pos; for (uint i=0;i<m_tabs.count();i++) - m_tabs.tqat(i)->setTabsPosition(m_position); - viewport()->tqrepaint(); + m_tabs.at(i)->setTabsPosition(m_position); + viewport()->repaint(); } KMultiTabBarButton::KMultiTabBarButton(const TQPixmap& pic,const TQString& text, TQPopupMenu *popup, @@ -434,13 +434,13 @@ void KMultiTabBarButton::slotClicked() void KMultiTabBarButton::setPosition(KMultiTabBar::KMultiTabBarPosition pos) { m_position=pos; - tqrepaint(); + repaint(); } void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style) { m_style=style; - tqrepaint(); + repaint(); } void KMultiTabBarButton::hideEvent( TQHideEvent* he) { @@ -472,7 +472,7 @@ TQSize KMultiTabBarButton::sizeHint() const } #endif if ( isMenuButton() ) - w += tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator, this); + w += tqstyle().pixelMetric(TQStyle::PM_MenuButtonIndicator, this); if ( pixmap() ) { TQPixmap *pm = (TQPixmap *)pixmap(); @@ -482,7 +482,7 @@ TQSize KMultiTabBarButton::sizeHint() const TQString s( text() ); bool empty = s.isEmpty(); if ( empty ) - s = TQString::tqfromLatin1("XXXX"); + s = TQString::fromLatin1("XXXX"); TQFontMetrics fm = fontMetrics(); TQSize sz = fm.size( ShowPrefix, s ); if(!empty || !w) @@ -525,7 +525,7 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos) } setPosition(pos); -// tqrepaint(); +// repaint(); } void KMultiTabBarTab::setIcon(const TQString& icon) @@ -650,8 +650,8 @@ void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) { if (isOn()) st|=TQStyle::Style_On; - tqstyle().tqdrawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), tqcolorGroup(),st); - tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), tqcolorGroup(),st); + tqstyle().drawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st); + tqstyle().drawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st); switch (m_position) { case KMultiTabBar::Left: @@ -667,8 +667,8 @@ void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) { paint->drawPixmap(0,0,pixmap); break; } -// tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), -// tqcolorGroup(),TQStyle::Style_Enabled); +// tqstyle().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), +// colorGroup(),TQStyle::Style_Enabled); } @@ -678,58 +678,58 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) TQPixmap pixmap; if ( iconSet()) pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ); - paint->fillRect(0, 0, 24, 24, tqcolorGroup().background()); + paint->fillRect(0, 0, 24, 24, colorGroup().background()); if (!isOn()) { if (m_position==KMultiTabBar::Right) { - paint->fillRect(0,0,21,21,TQBrush(tqcolorGroup().background())); + paint->fillRect(0,0,21,21,TQBrush(colorGroup().background())); - paint->setPen(tqcolorGroup().background().dark(150)); + paint->setPen(colorGroup().background().dark(150)); paint->drawLine(0,22,23,22); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,23); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(1,0,1,23); } else if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top)) { - paint->fillRect(0,1,23,22,TQBrush(tqcolorGroup().background())); + paint->fillRect(0,1,23,22,TQBrush(colorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(23,0,23,23); - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(0,22,23,22); paint->drawLine(0,23,23,23); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,23,0); - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(0,1,23,1); } else { - paint->setPen(tqcolorGroup().background().dark(120)); + paint->setPen(colorGroup().background().dark(120)); paint->drawLine(0,23,23,23); - paint->fillRect(0,0,23,21,TQBrush(tqcolorGroup().background())); + paint->fillRect(0,0,23,21,TQBrush(colorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(tqcolorGroup().light()); + paint->setPen(colorGroup().light()); paint->drawLine(23,0,23,23); paint->drawLine(22,0,22,23); - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,0,0,23); } @@ -740,12 +740,12 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) { if (m_position==KMultiTabBar::Right) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,height()-1,23,height()-1); paint->drawLine(0,height()-2,23,height()-2); paint->drawLine(23,0,23,height()-1); paint->drawLine(22,0,22,height()-1); - paint->fillRect(0,0,21,height()-3,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,21,height()-3,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) @@ -755,9 +755,9 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) TQPixmap tpixmap(height()-25-3, width()-2); TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light())); - painter.setPen(tqcolorGroup().text()); + painter.setPen(colorGroup().text()); painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(90); @@ -769,25 +769,25 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) else if (m_position==KMultiTabBar::Top) { - paint->fillRect(0,0,width()-1,23,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,width()-1,23,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { - paint->setPen(tqcolorGroup().text()); + paint->setPen(colorGroup().text()); paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } } else if (m_position==KMultiTabBar::Bottom) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,23,width()-1,23); paint->drawLine(0,22,width()-1,22); - paint->fillRect(0,0,width()-1,21,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,width()-1,21,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { - paint->setPen(tqcolorGroup().text()); + paint->setPen(colorGroup().text()); paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } @@ -796,10 +796,10 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) { - paint->setPen(tqcolorGroup().shadow()); + paint->setPen(colorGroup().shadow()); paint->drawLine(0,height()-1,23,height()-1); paint->drawLine(0,height()-2,23,height()-2); - paint->fillRect(0,0,23,height()-3,TQBrush(tqcolorGroup().light())); + paint->fillRect(0,0,23,height()-3,TQBrush(colorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { @@ -809,9 +809,9 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) TQPixmap tpixmap(height()-25-3, width()-2); TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light())); - painter.setPen(tqcolorGroup().text()); + painter.setPen(colorGroup().text()); painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(-90); @@ -923,7 +923,7 @@ void KMultiTabBar::removeButton(int id) { for (uint pos=0;pos<m_buttons.count();pos++) { - if (m_buttons.tqat(pos)->id()==id) + if (m_buttons.at(pos)->id()==id) { m_buttons.take(pos)->deleteLater(); break; @@ -978,7 +978,7 @@ void KMultiTabBar::setPosition(KMultiTabBarPosition pos) m_position=pos; m_internal->setPosition(pos); for (uint i=0;i<m_buttons.count();i++) - m_buttons.tqat(i)->setPosition(pos); + m_buttons.at(i)->setPosition(pos); } KMultiTabBar::KMultiTabBarPosition KMultiTabBar::position() const @@ -988,8 +988,8 @@ KMultiTabBar::KMultiTabBarPosition KMultiTabBar::position() const void KMultiTabBar::fontChange(const TQFont& /* oldFont */) { for (uint i=0;i<tabs()->count();i++) - tabs()->tqat(i)->resize(); - tqrepaint(); + tabs()->at(i)->resize(); + repaint(); } TQPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();} diff --git a/kutils/kmultitabbar.h b/kutils/kmultitabbar.h index ffc3fca5f..1e3ed5b59 100644 --- a/kutils/kmultitabbar.h +++ b/kutils/kmultitabbar.h @@ -28,7 +28,7 @@ #include <tqscrollview.h> #include <tqvbox.h> #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstring.h> #include <tqptrlist.h> #include <tqpushbutton.h> diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp index 585a02b6f..1ba9f89c3 100644 --- a/kutils/kpluginselector.cpp +++ b/kutils/kpluginselector.cpp @@ -26,7 +26,7 @@ #include <tqstrlist.h> #include <tqfile.h> #include <tqstring.h> -#include <tqlayout.h> +#include <layout.h> #include <tqptrlist.h> #include <tqwidgetstack.h> #include <tqcursor.h> @@ -115,8 +115,8 @@ void KPluginListViewToolTip::maybeTip( const TQPoint &pos ) "<tr><td><b>License:</b></td><td>%4</td></tr></table></qt>" ).arg( item->pluginInfo()->comment(), item->pluginInfo()->author(), item->pluginInfo()->version(), item->pluginInfo()->license() ); - //kdDebug( 702 ) << k_funcinfo << "Adding tooltip: tqitemRect: " << tqitemRect << ", tooltip: " << toolTip << endl; - tip( m_listView->tqitemRect( item ), toolTip ); + //kdDebug( 702 ) << k_funcinfo << "Adding tooltip: itemRect: " << itemRect << ", tooltip: " << toolTip << endl; + tip( m_listView->itemRect( item ), toolTip ); } struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate diff --git a/kutils/kreplace.cpp b/kutils/kreplace.cpp index 204384ae3..f825e93cc 100644 --- a/kutils/kreplace.cpp +++ b/kutils/kreplace.cpp @@ -50,7 +50,7 @@ KReplaceNextDialog::KReplaceNextDialog(TQWidget *parent) : { m_mainLabel = new TQLabel( this ); setMainWidget( m_mainLabel ); - resize(tqminimumSize()); + resize(minimumSize()); } void KReplaceNextDialog::setLabel( const TQString& pattern, const TQString& replacement ) diff --git a/kutils/kreplace.h b/kutils/kreplace.h index d4e9792e2..ea385189b 100644 --- a/kutils/kreplace.h +++ b/kutils/kreplace.h @@ -238,7 +238,7 @@ signals: * * Extra care must be taken to properly implement the "no prompt-on-replace" case. * For instance highlight isn't emitted in that case (some code might rely on it), - * and for performance reasons one should tqrepaint after replace() ONLY if + * and for performance reasons one should repaint after replace() ONLY if * prompt-on-replace was selected. * * @param text The text, in which the replacement has already been done. diff --git a/kutils/kreplacedialog.cpp b/kutils/kreplacedialog.cpp index 88c006b4d..8f1df2ed1 100644 --- a/kutils/kreplacedialog.cpp +++ b/kutils/kreplacedialog.cpp @@ -23,7 +23,7 @@ #include <tqcheckbox.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <kcombobox.h> #include <klocale.h> diff --git a/kutils/ksettings/componentsdialog.cpp b/kutils/ksettings/componentsdialog.cpp index 097d1f6d7..5328e9704 100644 --- a/kutils/ksettings/componentsdialog.cpp +++ b/kutils/ksettings/componentsdialog.cpp @@ -19,7 +19,7 @@ #include "ksettings/componentsdialog.h" #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <klistview.h> #include <tqlabel.h> #include <tqheader.h> diff --git a/kutils/ksettings/pluginpage.cpp b/kutils/ksettings/pluginpage.cpp index 99ea904f2..f1f220d36 100644 --- a/kutils/ksettings/pluginpage.cpp +++ b/kutils/ksettings/pluginpage.cpp @@ -19,7 +19,7 @@ #include "ksettings/pluginpage.h" #include "kpluginselector.h" -#include <tqlayout.h> +#include <layout.h> #include <kdialog.h> #include "ksettings/dispatcher.h" diff --git a/kwallet/backend/kwalletbackend.cc b/kwallet/backend/kwalletbackend.cc index bf67ba854..59b7dda2e 100644 --- a/kwallet/backend/kwalletbackend.cc +++ b/kwallet/backend/kwalletbackend.cc @@ -422,7 +422,7 @@ int Backend::open(const TQByteArray& password) { // compare hashes int sz = encrypted.size(); for (int i = 0; i < 20; i++) { - if (testhash[i] != static_cast<const char>(encrypted.tqat(sz - 20 + i))) { + if (testhash[i] != static_cast<const char>(encrypted.at(sz - 20 + i))) { encrypted.fill(0); sha.reset(); return -8; // hash error. diff --git a/kwallet/backend/kwalletbackend.h b/kwallet/backend/kwalletbackend.h index 59df303d6..f43f56ec8 100644 --- a/kwallet/backend/kwalletbackend.h +++ b/kwallet/backend/kwalletbackend.h @@ -143,7 +143,7 @@ class MD5Digest : public TQByteArray { char x, y; for (; i < 16; ++i) { x = at(i); - y = const_cast<MD5Digest&>(r).tqat(i); + y = const_cast<MD5Digest&>(r).at(i); if (x != y) { break; } diff --git a/kwallet/tests/kwalletasync.cpp b/kwallet/tests/kwalletasync.cpp index 072fb55f8..162e1f3f9 100644 --- a/kwallet/tests/kwalletasync.cpp +++ b/kwallet/tests/kwalletasync.cpp @@ -1,4 +1,4 @@ -#include <tqtextstream.h> +#include <textstream.h> #include <tqtimer.h> #include <kaboutdata.h> diff --git a/kwallet/tests/kwalletboth.cpp b/kwallet/tests/kwalletboth.cpp index 75d303419..45b02d2d7 100644 --- a/kwallet/tests/kwalletboth.cpp +++ b/kwallet/tests/kwalletboth.cpp @@ -1,4 +1,4 @@ -#include <tqtextstream.h> +#include <textstream.h> #include <tqtimer.h> #include <kaboutdata.h> diff --git a/kwallet/tests/kwalletsync.cpp b/kwallet/tests/kwalletsync.cpp index 3625a5cb6..ef03d708a 100644 --- a/kwallet/tests/kwalletsync.cpp +++ b/kwallet/tests/kwalletsync.cpp @@ -1,4 +1,4 @@ -#include <tqtextstream.h> +#include <textstream.h> #include <tqtimer.h> #include <kaboutdata.h> diff --git a/networkstatus/connectionmanager.cpp b/networkstatus/connectionmanager.cpp index 7b95e8101..29174e773 100644 --- a/networkstatus/connectionmanager.cpp +++ b/networkstatus/connectionmanager.cpp @@ -150,7 +150,7 @@ bool ConnectionManager::askToConnect( TQWidget * mainWidget ) i18n("This application is currently in offline mode. Do you want to connect in order to carry out this operation?"), i18n("Leave Offline Mode?"), i18n("Connect"), i18n("Do Not Connect"), - TQString::tqfromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); + TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); } #include "connectionmanager.moc" diff --git a/tdecore/kaboutdata.cpp b/tdecore/kaboutdata.cpp index e6aa1a68a..a2a067cd6 100644 --- a/tdecore/kaboutdata.cpp +++ b/tdecore/kaboutdata.cpp @@ -23,7 +23,7 @@ #include <kaboutdata.h> #include <kstandarddirs.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> TQString KAboutPerson::name() const @@ -296,7 +296,7 @@ KAboutData::setProgramLogo(const TQImage& image) TQString KAboutData::version() const { - return TQString::tqfromLatin1(mVersion); + return TQString::fromLatin1(mVersion); } TQString @@ -311,13 +311,13 @@ KAboutData::shortDescription() const TQString KAboutData::homepage() const { - return TQString::tqfromLatin1(mHomepageAddress); + return TQString::fromLatin1(mHomepageAddress); } TQString KAboutData::bugAddress() const { - return TQString::tqfromLatin1(mBugEmailAddress); + return TQString::fromLatin1(mBugEmailAddress); } const TQValueList<KAboutPerson> diff --git a/tdecore/kaccel.cpp b/tdecore/kaccel.cpp index 1abc8d381..660cc4c29 100644 --- a/tdecore/kaccel.cpp +++ b/tdecore/kaccel.cpp @@ -120,10 +120,10 @@ bool qt_try_modal( TQWidget *, XEvent * ); bool KAccelEventHandler::x11Event( XEvent* pEvent ) { - if( TQWidget::keyboardGrabber() || !kapp->tqfocusWidget() ) + if( TQWidget::keyboardGrabber() || !kapp->focusWidget() ) return false; - if ( !qt_try_modal(kapp->tqfocusWidget(), pEvent) ) + if ( !qt_try_modal(kapp->focusWidget(), pEvent) ) return false; if( pEvent->type == XKeyPress ) { @@ -144,7 +144,7 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent ) ke.ignore(); g_bAccelActivated = false; - kapp->sendEvent( kapp->tqfocusWidget(), &ke ); + kapp->sendEvent( kapp->focusWidget(), &ke ); // If the Override event was accepted from a non-KAccel widget, // then kill the next AccelOverride in KApplication::notify. diff --git a/tdecore/kaccelmanager.cpp b/tdecore/kaccelmanager.cpp index 6e8f08e0a..534a5a231 100644 --- a/tdecore/kaccelmanager.cpp +++ b/tdecore/kaccelmanager.cpp @@ -36,7 +36,7 @@ #include <tqradiobutton.h> #include <tqspinbox.h> #include <tqtabbar.h> -#include <tqtextview.h> +#include <textview.h> #include <tqwidget.h> #include <tqwidgetstack.h> @@ -240,12 +240,12 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use if ( dynamic_cast<TQLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") ) continue; - int tprop = it->m_widget->tqmetaObject()->findProperty("text", true); + int tprop = it->m_widget->metaObject()->findProperty("text", true); if (tprop != -1) { if (checkChange(contents[cnt])) it->m_widget->setProperty("text", contents[cnt].accelerated()); } else { - tprop = it->m_widget->tqmetaObject()->findProperty("title", true); + tprop = it->m_widget->metaObject()->findProperty("title", true); if (tprop != -1 && checkChange(contents[cnt])) it->m_widget->setProperty("title", contents[cnt].accelerated()); } @@ -341,9 +341,9 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) { TQString content; TQVariant variant; - int tprop = w->tqmetaObject()->findProperty("text", true); + int tprop = w->metaObject()->findProperty("text", true); if (tprop != -1) { - const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true ); + const TQMetaProperty* p = w->metaObject()->property( tprop, true ); if ( p && p->isValid() ) w->qt_property( tprop, 1, &variant ); else @@ -351,9 +351,9 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) } if (tprop == -1) { - tprop = w->tqmetaObject()->findProperty("title", true); + tprop = w->metaObject()->findProperty("title", true); if (tprop != -1) { - const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true ); + const TQMetaProperty* p = w->metaObject()->property( tprop, true ); if ( p && p->isValid() ) w->qt_property( tprop, 1, &variant ); } diff --git a/tdecore/kallocator.cpp b/tdecore/kallocator.cpp index 16c1b3625..c02bbf3ff 100644 --- a/tdecore/kallocator.cpp +++ b/tdecore/kallocator.cpp @@ -183,9 +183,9 @@ void KZoneAllocator::delBlock(MemBlock *b) void * KZoneAllocator::allocate(size_t _size) { - // Use the size of (void *) as tqalignment - const size_t tqalignment = sizeof(void *) - 1; - _size = (_size + tqalignment) & ~tqalignment; + // Use the size of (void *) as alignment + const size_t alignment = sizeof(void *) - 1; + _size = (_size + alignment) & ~alignment; if ((unsigned long) _size + blockOffset > blockSize) { diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index 878b6e12f..bf0b09142 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -44,14 +44,14 @@ #include <tqstrlist.h> #include <tqfile.h> #include <tqmessagebox.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <tqlineedit.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqsessionmanager.h> #include <tqptrlist.h> #include <tqtimer.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqpixmapcache.h> #include <tqtooltip.h> #include <tqstylefactory.h> @@ -1012,7 +1012,7 @@ void KApplication::init(bool GUIenabled) // install appdata resource type KGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data") - + TQString::tqfromLatin1(name()) + '/'); + + TQString::fromLatin1(name()) + '/'); pSessionConfig = 0L; bSessionManagement = true; @@ -1291,7 +1291,7 @@ void KApplication::commitData( TQSessionManager& sm ) if ( sm.allowsInteraction() ) { TQWidgetList done; - TQWidgetList *list = TQApplication::tqtopLevelWidgets(); + TQWidgetList *list = TQApplication::topLevelWidgets(); bool canceled = false; TQWidget* w = list->first(); while ( !canceled && w ) { @@ -1302,7 +1302,7 @@ void KApplication::commitData( TQSessionManager& sm ) if ( !canceled ) done.append( w ); delete list; // one never knows... - list = TQApplication::tqtopLevelWidgets(); + list = TQApplication::topLevelWidgets(); w = list->first(); } else { w = list->next(); @@ -1449,9 +1449,9 @@ void KApplication::startKdeinit() return; // whoever held the lock has already started dcopserver } // Try to launch tdeinit. - TQString srv = KStandardDirs::findExe(TQString::tqfromLatin1("tdeinit")); + TQString srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit")); if (srv.isEmpty()) - srv = KStandardDirs::findExe(TQString::tqfromLatin1("tdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir()); + srv = KStandardDirs::findExe(TQString::fromLatin1("tdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir()); if (srv.isEmpty()) return; if (kapp && (Tty != kapp->type())) @@ -2208,11 +2208,11 @@ void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned void KApplication::invokeEditSlot( const char *slot ) { - TQObject *object = TQT_TQOBJECT(tqfocusWidget()); + TQObject *object = TQT_TQOBJECT(focusWidget()); if( !object ) return; - TQMetaObject *meta = object->tqmetaObject(); + TQMetaObject *meta = object->metaObject(); int idx = meta->findSlot( slot + 1, true ); if( idx < 0 ) @@ -2430,7 +2430,7 @@ void KApplication::kdisplaySetPalette() return; } #endif - TQApplication::tqsetPalette( createApplicationPalette(), true); + TQApplication::setPalette( createApplicationPalette(), true); emit kdisplayPaletteChanged(); emit appearanceChanged(); } @@ -2438,10 +2438,10 @@ void KApplication::kdisplaySetPalette() void KApplication::kdisplaySetFont() { - TQApplication::tqsetFont(KGlobalSettings::generalFont(), true); - TQApplication::tqsetFont(KGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING); - TQApplication::tqsetFont(KGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING); - TQApplication::tqsetFont(KGlobalSettings::menuFont(), true, "KPopupTitle"); + TQApplication::setFont(KGlobalSettings::generalFont(), true); + TQApplication::setFont(KGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING); + TQApplication::setFont(KGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING); + TQApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle"); // "patch" standard TQStyleSheet to follow our fonts TQStyleSheet* sheet = TQStyleSheet::defaultSheet(); @@ -2777,10 +2777,10 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const TQString command = config.readPathEntry("EmailClient"); TQString to, cc, bcc; - if (command.isEmpty() || command == TQString::tqfromLatin1("kmail") + if (command.isEmpty() || command == TQString::fromLatin1("kmail") || command.endsWith("/kmail")) { - command = TQString::tqfromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t"); + command = TQString::fromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t"); if ( !_to.isEmpty() ) { // put the whole address lists into RFC2047 encoded blobs; technically diff --git a/tdecore/kcalendarsystem.cpp b/tdecore/kcalendarsystem.cpp index 782b272e7..57898da84 100644 --- a/tdecore/kcalendarsystem.cpp +++ b/tdecore/kcalendarsystem.cpp @@ -90,10 +90,10 @@ static int stringToInteger(const TQString & sNum, int & iLength) unsigned int iPos = 0; int result = 0; - for (; sNum.length() > iPos && sNum.tqat(iPos).isDigit(); iPos++) + for (; sNum.length() > iPos && sNum.at(iPos).isDigit(); iPos++) { result *= 10; - result += sNum.tqat(iPos).digitValue(); + result += sNum.at(iPos).digitValue(); } iLength = iPos; diff --git a/tdecore/kcalendarsystemfactory.h b/tdecore/kcalendarsystemfactory.h index 75b5782e4..6ebba1573 100644 --- a/tdecore/kcalendarsystemfactory.h +++ b/tdecore/kcalendarsystemfactory.h @@ -49,7 +49,7 @@ public: * 0 is specified. * @return a KCalendarSystem object */ - static KCalendarSystem *create (const TQString & calType = TQString::tqfromLatin1("gregorian"), + static KCalendarSystem *create (const TQString & calType = TQString::fromLatin1("gregorian"), const KLocale * locale = 0); /** diff --git a/tdecore/kcalendarsystemgregorian.cpp b/tdecore/kcalendarsystemgregorian.cpp index 19f9b3dc8..38ee1014a 100644 --- a/tdecore/kcalendarsystemgregorian.cpp +++ b/tdecore/kcalendarsystemgregorian.cpp @@ -295,7 +295,7 @@ int KCalendarSystemGregorian::weekDayOfPray() const TQString KCalendarSystemGregorian::calendarName() const { - return TQString::tqfromLatin1("gregorian"); + return TQString::fromLatin1("gregorian"); } bool KCalendarSystemGregorian::isLunar() const diff --git a/tdecore/kcalendarsystemhebrew.cpp b/tdecore/kcalendarsystemhebrew.cpp index 710e027d1..2824445bb 100644 --- a/tdecore/kcalendarsystemhebrew.cpp +++ b/tdecore/kcalendarsystemhebrew.cpp @@ -614,7 +614,7 @@ TQDate KCalendarSystemHebrew::addYears( const TQDate & date, int nyears ) const // Ok TQString KCalendarSystemHebrew::calendarName() const { - return TQString::tqfromLatin1("hebrew"); + return TQString::fromLatin1("hebrew"); } // Ok @@ -640,7 +640,7 @@ TQString KCalendarSystemHebrew::dayString(const TQDate & pDate, bool bShort) con TQString sResult; // Only use hebrew numbers if the hebrew setting is selected - if (locale()->language() == TQString::tqfromLatin1("he")) + if (locale()->language() == TQString::fromLatin1("he")) sResult = num2heb(day(pDate), false); else sResult = KCalendarSystem::dayString(pDate, bShort); @@ -653,7 +653,7 @@ TQString KCalendarSystemHebrew::yearString(const TQDate & pDate, bool bShort) co TQString sResult; // Only use hebrew numbers if the hebrew setting is selected - if (locale()->language() == TQString::tqfromLatin1("he")) + if (locale()->language() == TQString::fromLatin1("he")) sResult = num2heb(year(pDate), !bShort); else sResult = KCalendarSystem::yearString(pDate, bShort); @@ -684,9 +684,9 @@ static int heb2num(const TQString& str, int & iLength) { { if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) && s[pos + 1] <= TQChar(0x05EA)) - result += (c.tqunicode() - 0x05D0 + 1) * 1000; + result += (c.unicode() - 0x05D0 + 1) * 1000; else - result += c.tqunicode() - 0x05D0 + 1; + result += c.unicode() - 0x05D0 + 1; } 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)) return -1; else - result += decadeValues[c.tqunicode() - 0x05D9]; + result += decadeValues[c.unicode() - 0x05D9]; } else if (c >= TQChar(0x05E7) && c <= TQChar(0x05EA)) { - result += (c.tqunicode() - 0x05E7 + 1) * 100; + result += (c.unicode() - 0x05E7 + 1) * 100; } else { diff --git a/tdecore/kcalendarsystemhijri.cpp b/tdecore/kcalendarsystemhijri.cpp index 90faec48e..a6487060e 100644 --- a/tdecore/kcalendarsystemhijri.cpp +++ b/tdecore/kcalendarsystemhijri.cpp @@ -577,7 +577,7 @@ TQDate KCalendarSystemHijri::addYears( const TQDate & date, int nyears ) const TQString KCalendarSystemHijri::calendarName() const { - return TQString::tqfromLatin1("hijri"); + return TQString::fromLatin1("hijri"); } bool KCalendarSystemHijri::isLunar() const diff --git a/tdecore/kcalendarsystemjalali.cpp b/tdecore/kcalendarsystemjalali.cpp index 6197ca75f..29798a1dd 100644 --- a/tdecore/kcalendarsystemjalali.cpp +++ b/tdecore/kcalendarsystemjalali.cpp @@ -541,7 +541,7 @@ int KCalendarSystemJalali::weekDayOfPray() const } TQString KCalendarSystemJalali::calendarName() const { - return TQString::tqfromLatin1("jalali"); + return TQString::fromLatin1("jalali"); } bool KCalendarSystemJalali::isLunar() const diff --git a/tdecore/kcatalogue.cpp b/tdecore/kcatalogue.cpp index df07fef44..24d0193b2 100644 --- a/tdecore/kcatalogue.cpp +++ b/tdecore/kcatalogue.cpp @@ -62,7 +62,7 @@ KCatalogue::KCatalogue(const TQString & name, const TQString & language ) // has to be set after we have the first catalog objects. d->pluralType = -1; - TQString path = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo") + TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo") .arg( d->language ) .arg( d->name ); diff --git a/tdecore/kcharsets.cpp b/tdecore/kcharsets.cpp index b78345276..c423fa756 100644 --- a/tdecore/kcharsets.cpp +++ b/tdecore/kcharsets.cpp @@ -31,7 +31,7 @@ #include <tqfontdatabase.h> #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqmap.h> #include <tqcstring.h> #include <tqdir.h> @@ -202,7 +202,7 @@ static struct Builtin { "ascii", "iso 8859-1" }, { "x-utf-8", "utf-8" }, { "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" }, { "utf16", "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') { pos++; // '�', hexadeciaml character reference - TQString tmp(str.tqunicode()+pos, str.length()-pos); + TQString tmp(str.unicode()+pos, str.length()-pos); res = tmp.toInt(&ok, 16); } else { // '�', decimal character reference - TQString tmp(str.tqunicode()+pos, str.length()-pos); + TQString tmp(str.unicode()+pos, str.length()-pos); res = tmp.toInt(&ok, 10); } return res; @@ -422,14 +422,14 @@ TQChar KCharsets::fromEntity(const TQString &str, int &len) TQString KCharsets::toEntity(const TQChar &ch) { TQString ent; - ent.sprintf("�x%x;", ch.tqunicode()); + ent.sprintf("�x%x;", ch.unicode()); return ent; } TQString KCharsets::resolveEntities( const TQString &input ) { TQString text = input; - const TQChar *p = text.tqunicode(); + const TQChar *p = text.unicode(); const TQChar *end = p + text.length(); const TQChar *ampersand = 0; bool scanForSemicolon = false; @@ -460,12 +460,12 @@ TQString KCharsets::resolveEntities( const TQString &input ) if ( entityValue.isNull() ) continue; - const uint ampersandPos = ampersand - text.tqunicode(); + const uint ampersandPos = ampersand - text.unicode(); text[ (int)ampersandPos ] = entityValue; text.remove( ampersandPos + 1, entityLength + 1 ); - p = text.tqunicode() + ampersandPos; - end = text.tqunicode() + text.length(); + p = text.unicode() + ampersandPos; + end = text.unicode() + text.length(); ampersand = 0; } @@ -477,7 +477,7 @@ TQStringList KCharsets::availableEncodingNames() TQStringList available; for ( const char* const* pos = charsets_for_encoding; *pos; ++pos ) { //kdDebug(0) << *charsets << " available" << endl; - available.append( TQString::tqfromLatin1( *pos )); + available.append( TQString::fromLatin1( *pos )); } return available; } @@ -511,7 +511,7 @@ TQStringList KCharsets::descriptiveEncodingNames() // As we are sorting, we can directly read the array language_for_encoding TQStringList encodings; for ( const LanguageForEncoding* pos = language_for_encoding; pos->index; ++pos ) { - const TQString name = TQString::tqfromLatin1( pos->index ); + const TQString name = TQString::fromLatin1( pos->index ); const TQString description = i18n( language_names[ pos->data ] ); encodings.append( i18n("Descriptive Encoding Name", "%1 ( %2 )"). arg ( description ). arg( name ) ); } @@ -573,7 +573,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const TQString dir; { KConfigGroupSaver cfgsav( KGlobal::config(), "i18n" ); - dir = KGlobal::config()->readPathEntry("i18ndir", TQString::tqfromLatin1("/usr/share/i18n/charmaps")); + dir = KGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps")); } // these are codecs not included in Qt. They can be build up if the corresponding charmap @@ -584,7 +584,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const cname = name; cname = cname.upper(); - const TQString basicName = TQString::tqfromLatin1(cname); + const TQString basicName = TQString::fromLatin1(cname); kdDebug() << k_funcinfo << endl << " Trying to find " << cname << " in " << dir << endl; TQString charMapFileName; diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp index 06337485c..1da17a524 100644 --- a/tdecore/kcheckaccelerators.cpp +++ b/tdecore/kcheckaccelerators.cpp @@ -30,8 +30,8 @@ #include <tqpopupmenu.h> #include <tqapplication.h> #include <tqdialog.h> -#include <tqlayout.h> -#include <tqtextview.h> +#include <layout.h> +#include <textview.h> #include <tqobjectlist.h> #include <tqmenubar.h> #include <tqtabbar.h> diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp index b6b4fc357..48b76f7ce 100644 --- a/tdecore/kclipboard.cpp +++ b/tdecore/kclipboard.cpp @@ -67,7 +67,7 @@ public: virtual const char *format( int i ) const { if ( i < (int) m_formats.count() ) - return m_formats.tqat( i ); + return m_formats.at( i ); else return 0L; } @@ -78,7 +78,7 @@ public: { int index = m_formats.find( format ); if ( index > -1 ) - return *(m_data.tqat( index )); + return *(m_data.at( index )); return TQByteArray(); } @@ -123,7 +123,7 @@ KClipboardSynchronizer::~KClipboardSynchronizer() void KClipboardSynchronizer::setupSignals() { - TQClipboard *clip = TQApplication::tqclipboard(); + TQClipboard *clip = TQApplication::clipboard(); disconnect( clip, NULL, this, NULL ); if( s_sync ) connect( clip, TQT_SIGNAL( selectionChanged() ), @@ -135,7 +135,7 @@ void KClipboardSynchronizer::setupSignals() void KClipboardSynchronizer::slotSelectionChanged() { - TQClipboard *clip = TQApplication::tqclipboard(); + TQClipboard *clip = TQApplication::clipboard(); // qDebug("*** sel changed: %i", s_blocked); if ( s_blocked || !clip->ownsSelection() ) @@ -147,7 +147,7 @@ void KClipboardSynchronizer::slotSelectionChanged() 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()); if ( s_blocked || !clip->ownsClipboard() ) @@ -161,7 +161,7 @@ void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode { // qDebug("---> setting clipboard: %p", data); - TQClipboard *clip = TQApplication::tqclipboard(); + TQClipboard *clip = TQApplication::clipboard(); s_blocked = true; diff --git a/tdecore/kclipboard.h b/tdecore/kclipboard.h index 7facc86fd..3f0461b08 100644 --- a/tdecore/kclipboard.h +++ b/tdecore/kclipboard.h @@ -19,7 +19,7 @@ #ifndef KCLIPBOARD_H #define KCLIPBOARD_H -#include <tqclipboard.h> +#include <clipboard.h> #include <tqmime.h> #include <tqobject.h> #include <tqstrlist.h> diff --git a/tdecore/kcmdlineargs.cpp b/tdecore/kcmdlineargs.cpp index 3c76feca1..0e1dc7ea9 100644 --- a/tdecore/kcmdlineargs.cpp +++ b/tdecore/kcmdlineargs.cpp @@ -858,7 +858,7 @@ KCmdLineArgs::usage(const char *id) bool hasOptions = false; TQString optionsHeader; if (args->name) - optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::tqfromLatin1(args->name))); + optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::fromLatin1(args->name))); else optionsHeader = i18n("\nOptions:\n"); @@ -1239,7 +1239,7 @@ KCmdLineArgs::arg(int n) const exit(255); } - return parsedArgList->tqat(n); + return parsedArgList->at(n); } KURL diff --git a/tdecore/kcompletion.cpp b/tdecore/kcompletion.cpp index 813b56027..84a4cfca2 100644 --- a/tdecore/kcompletion.cpp +++ b/tdecore/kcompletion.cpp @@ -127,7 +127,7 @@ void KCompletion::addItem( const TQString& item, uint weight ) // nodes. for ( uint i = 0; i < len; i++ ) { - node = node->insert( item.tqat(i), sorted ); + node = node->insert( item.at(i), sorted ); if ( weighted ) node->confirm( weight -1 ); // node->insert() sets weighting to 1 } @@ -419,7 +419,7 @@ TQString KCompletion::findCompletion( const TQString& string ) // start at the tree-root and try to find the search-string for( uint i = 0; i < string.length(); i++ ) { - ch = string.tqat( i ); + ch = string.at( i ); node = node->find( ch ); if ( node ) @@ -463,7 +463,7 @@ TQString KCompletion::findCompletion( const TQString& string ) uint weight = temp_node->weight(); const KCompTreeNode* hit = temp_node; for( int i = 1; i < count; i++ ) { - temp_node = node->tqchildAt(i); + temp_node = node->childAt(i); if( temp_node->weight() > weight ) { hit = temp_node; weight = hit->weight(); @@ -508,7 +508,7 @@ void KCompletion::findAllCompletions(const TQString& string, // start at the tree-root and try to find the search-string for( uint i = 0; i < string.length(); i++ ) { - ch = string.tqat( i ); + ch = string.at( i ); node = node->find( ch ); if ( node ) @@ -595,7 +595,7 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node, return; } - TQChar ch1 = restString.tqat(0); + TQChar ch1 = restString.at(0); TQString newRest = restString.mid(1); KCompTreeNode *child1, *child2; @@ -628,19 +628,19 @@ void KCompletion::doBeep( BeepMode mode ) const switch ( mode ) { case Rotation: - event = TQString::tqfromLatin1("Textcompletion: rotation"); + event = TQString::fromLatin1("Textcompletion: rotation"); text = i18n("You reached the end of the list\nof matching items.\n"); break; case PartialMatch: if ( myCompletionMode == KGlobalSettings::CompletionShell || myCompletionMode == KGlobalSettings::CompletionMan ) { - event = TQString::tqfromLatin1("Textcompletion: partial match"); + event = TQString::fromLatin1("Textcompletion: partial match"); text = i18n("The completion is ambiguous, more than one\nmatch is available.\n"); } break; case NoMatch: if ( myCompletionMode == KGlobalSettings::CompletionShell ) { - event = TQString::tqfromLatin1("Textcompletion: no match"); + event = TQString::fromLatin1("Textcompletion: no match"); text = i18n("There is no matching item available.\n"); } break; @@ -725,7 +725,7 @@ void KCompTreeNode::remove( const TQString& str ) uint i = 0; for ( ; i < string.length(); i++ ) { - child = parent->find( string.tqat( i ) ); + child = parent->find( string.at( i ) ); if ( child ) deletables.insert( i + 1, child ); else @@ -736,8 +736,8 @@ void KCompTreeNode::remove( const TQString& str ) for ( ; i >= 1; i-- ) { - parent = deletables.tqat( i - 1 ); - child = deletables.tqat( i ); + parent = deletables.at( i - 1 ); + child = deletables.at( i ); if ( child->myChildren.count() == 0 ) delete parent->myChildren.remove( child ); } @@ -874,7 +874,7 @@ KCompTreeNode *KCompTreeNodeList::remove(KCompTreeNode *item) return item; } -KCompTreeNode *KCompTreeNodeList::tqat(uint index) const +KCompTreeNode *KCompTreeNodeList::at(uint index) const { KCompTreeNode *cur = first; while (index-- && cur) cur = cur->next; diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h index 703f2c958..aead92f77 100644 --- a/tdecore/kcompletion.h +++ b/tdecore/kcompletion.h @@ -119,7 +119,7 @@ class TQPopupMenu; * tell the user) where a completion comes from. * * 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 * special cases (like reading directories/urls and then supplying the diff --git a/tdecore/kcompletion_private.h b/tdecore/kcompletion_private.h index fcfea7243..3d72586f3 100644 --- a/tdecore/kcompletion_private.h +++ b/tdecore/kcompletion_private.h @@ -38,7 +38,7 @@ public: KCompTreeNode *begin() const { return first; } KCompTreeNode *end() const { return last; } - KCompTreeNode *tqat(uint index) const; + KCompTreeNode *at(uint index) const; void append(KCompTreeNode *item); void prepend(KCompTreeNode *item); void insert(KCompTreeNode *after, KCompTreeNode *item); @@ -118,8 +118,8 @@ public: inline const KCompTreeChildren * children() const { return &myChildren; } - inline const KCompTreeNode * tqchildAt(int index) const { - return myChildren.tqat(index); + inline const KCompTreeNode * childAt(int index) const { + return myChildren.at(index); } inline const KCompTreeNode * firstChild() const { return myChildren.begin(); diff --git a/tdecore/kconfig_compiler/kconfig_compiler.cpp b/tdecore/kconfig_compiler/kconfig_compiler.cpp index 10c91834c..3782ca4b2 100644 --- a/tdecore/kconfig_compiler/kconfig_compiler.cpp +++ b/tdecore/kconfig_compiler/kconfig_compiler.cpp @@ -23,7 +23,7 @@ */ #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqdom.h> #include <tqregexp.h> @@ -262,10 +262,10 @@ static TQString literalString( const TQString &s ) { bool isAscii = true; for(int i = s.length(); i--;) - if (s[i].tqunicode() > 127) isAscii = false; + if (s[i].unicode() > 127) isAscii = false; if (isAscii) - return "TQString::tqfromLatin1( " + quoteString(s) + " )"; + return "TQString::fromLatin1( " + quoteString(s) + " )"; else return "TQString::fromUtf8( " + quoteString(s) + " )"; } @@ -805,9 +805,9 @@ TQString paramString(const TQString &group, const TQValueList<Param> ¶meters } } if (arguments.isEmpty()) - return "TQString::tqfromLatin1( \""+group+"\" )"; + return "TQString::fromLatin1( \""+group+"\" )"; - return "TQString::tqfromLatin1( \""+paramString+"\" )"+arguments; + return "TQString::fromLatin1( \""+paramString+"\" )"+arguments; } /* int i is the value of the parameter */ @@ -883,12 +883,12 @@ TQString memberMutatorBody( CfgEntry *e ) out << "}" << endl << endl; } - out << "if (!" << This << "isImmutable( TQString::tqfromLatin1( \""; + out << "if (!" << This << "isImmutable( TQString::fromLatin1( \""; if (!e->param().isEmpty()) { out << e->paramName().replace("$("+e->param()+")", "%1") << "\" ).arg( "; if ( e->paramType() == "Enum" ) { - out << "TQString::tqfromLatin1( "; + out << "TQString::fromLatin1( "; if (globalEnums) out << enumName(e->param()) << "ToString[i]"; @@ -1518,7 +1518,7 @@ int main( int argc, char **argv ) cpp << " )" << endl; cpp << " : " << inherits << "("; - if ( !cfgFileName.isEmpty() ) cpp << " TQString::tqfromLatin1( \"" << cfgFileName << "\" "; + if ( !cfgFileName.isEmpty() ) cpp << " TQString::fromLatin1( \"" << cfgFileName << "\" "; if ( cfgFileNameArg ) cpp << " config "; if ( !cfgFileName.isEmpty() ) cpp << ") "; cpp << ")" << endl; @@ -1560,7 +1560,7 @@ int main( int argc, char **argv ) for( it = choices.begin(); it != choices.end(); ++it ) { cpp << " {" << endl; cpp << " KConfigSkeleton::ItemEnum::Choice choice;" << endl; - cpp << " choice.name = TQString::tqfromLatin1( \"" << (*it).name << "\" );" << endl; + cpp << " choice.name = TQString::fromLatin1( \"" << (*it).name << "\" );" << endl; if ( setUserTexts ) { if ( !(*it).label.isEmpty() ) cpp << " choice.label = i18n(" << quoteString((*it).label) << ");" << endl; @@ -1592,7 +1592,7 @@ int main( int argc, char **argv ) cpp << " addItem( " << itemPath(e); TQString quotedName = e->name(); addQuotes( quotedName ); - if ( quotedName != key ) cpp << ", TQString::tqfromLatin1( \"" << e->name() << "\" )"; + if ( quotedName != key ) cpp << ", TQString::fromLatin1( \"" << e->name() << "\" )"; cpp << " );" << endl; } else @@ -1621,7 +1621,7 @@ int main( int argc, char **argv ) // param name. The check for isImmutable in the set* functions doesn't have the param // name available, just the corresponding enum value (int), so we need to store the // param names in a separate static list!. - cpp << " addItem( " << itemVarStr << ", TQString::tqfromLatin1( \""; + cpp << " addItem( " << itemVarStr << ", TQString::fromLatin1( \""; if ( e->paramType()=="Enum" ) cpp << e->paramName().replace( "$("+e->param()+")", "%1").arg(e->paramValues()[i] ); else diff --git a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp b/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp index 3dd197b34..2f8e7eee3 100644 --- a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp +++ b/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp @@ -61,7 +61,7 @@ void KConfigCompiler_Test::testExpectedOutput() // Known to pass test cases while (testCases[ i ]) { - performCompare(TQString::tqfromLatin1(testCases[ i ])); + performCompare(TQString::fromLatin1(testCases[ i ])); ++i; } @@ -69,7 +69,7 @@ void KConfigCompiler_Test::testExpectedOutput() i= 0; while (willFailCases[ i ]) { - performCompare(TQString::tqfromLatin1(willFailCases[ i ]), true); + performCompare(TQString::fromLatin1(willFailCases[ i ]), true); ++i; } } @@ -77,7 +77,7 @@ void KConfigCompiler_Test::testExpectedOutput() void KConfigCompiler_Test::performCompare(const TQString &fileName, bool fail) { TQFile file(fileName); - TQFile fileRef(TQString::tqfromLatin1(SRCDIR) + TQString::tqfromLatin1("/") + fileName + TQString::tqfromLatin1(".ref")); + TQFile fileRef(TQString::fromLatin1(SRCDIR) + TQString::fromLatin1("/") + fileName + TQString::fromLatin1(".ref")); if ( file.open(IO_ReadOnly) && fileRef.open(IO_ReadOnly) ) { diff --git a/tdecore/kconfig_compiler/tests/test1.cpp.ref b/tdecore/kconfig_compiler/tests/test1.cpp.ref index f8c4c1189..b3050921e 100644 --- a/tdecore/kconfig_compiler/tests/test1.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test1.cpp.ref @@ -4,66 +4,66 @@ #include "test1.h" Test1::Test1( const TQString & transport, const TQString & folder ) - : KConfigSkeleton( TQString::tqfromLatin1( "examplerc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) ) , mParamtransport(transport) , mParamfolder(folder) { - setCurrentGroup( TQString::tqfromLatin1( "General-%1" ).arg( mParamfolder ) ); + setCurrentGroup( TQString::fromLatin1( "General-%1" ).arg( mParamfolder ) ); KConfigSkeleton::ItemBool *itemOneOption; - itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "OneOption" ), mOneOption, true ); - addItem( itemOneOption, TQString::tqfromLatin1( "OneOption" ) ); + itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true ); + addItem( itemOneOption, TQString::fromLatin1( "OneOption" ) ); KConfigSkeleton::ItemInt *itemAnotherOption; - itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Another Option" ), mAnotherOption, 5 ); - addItem( itemAnotherOption, TQString::tqfromLatin1( "AnotherOption" ) ); + itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 ); + addItem( itemAnotherOption, TQString::fromLatin1( "AnotherOption" ) ); TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption; { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "One" ); + choice.name = TQString::fromLatin1( "One" ); valuesListOption.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "Two" ); + choice.name = TQString::fromLatin1( "Two" ); valuesListOption.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "Three" ); + choice.name = TQString::fromLatin1( "Three" ); valuesListOption.append( choice ); } KConfigSkeleton::ItemEnum *itemListOption; - itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One ); - addItem( itemListOption, TQString::tqfromLatin1( "ListOption" ) ); + itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One ); + addItem( itemListOption, TQString::fromLatin1( "ListOption" ) ); - setCurrentGroup( TQString::tqfromLatin1( "MyOptions" ) ); + setCurrentGroup( TQString::fromLatin1( "MyOptions" ) ); KConfigSkeleton::ItemString *itemMyString; - itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "MyString" ), mMyString, TQString::tqfromLatin1( "Default String" ) ); - addItem( itemMyString, TQString::tqfromLatin1( "MyString" ) ); + itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) ); + addItem( itemMyString, TQString::fromLatin1( "MyString" ) ); KConfigSkeleton::ItemPath *itemMyPath; - itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::tqfromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::tqfromLatin1(".hidden_file") ); - addItem( itemMyPath, TQString::tqfromLatin1( "MyPath" ) ); + itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") ); + addItem( itemMyPath, TQString::fromLatin1( "MyPath" ) ); KConfigSkeleton::ItemInt *itemAnotherOption2; - itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Another Option" ), mAnotherOption2, 10 ); - addItem( itemAnotherOption2, TQString::tqfromLatin1( "AnotherOption2" ) ); + itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 ); + addItem( itemAnotherOption2, TQString::fromLatin1( "AnotherOption2" ) ); TQStringList defaultMyStringList; defaultMyStringList.append( TQString::fromUtf8( "up" ) ); defaultMyStringList.append( TQString::fromUtf8( "down" ) ); KConfigSkeleton::ItemStringList *itemMyStringList; - itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); - addItem( itemMyStringList, TQString::tqfromLatin1( "MyStringList" ) ); + itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); + addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) ); TQStringList defaultMyStringListHidden; defaultMyStringListHidden.append( TQString::fromUtf8( "up" ) ); defaultMyStringListHidden.append( TQString::fromUtf8( "down" ) ); KConfigSkeleton::ItemStringList *itemMyStringListHidden; - itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden ); - addItem( itemMyStringListHidden, TQString::tqfromLatin1( "MyStringListHidden" ) ); + itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden ); + addItem( itemMyStringListHidden, TQString::fromLatin1( "MyStringListHidden" ) ); KConfigSkeleton::ItemInt *itemMyNumber; - itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 ); - addItem( itemMyNumber, TQString::tqfromLatin1( "MyNumber" ) ); + itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 ); + addItem( itemMyNumber, TQString::fromLatin1( "MyNumber" ) ); } Test1::~Test1() diff --git a/tdecore/kconfig_compiler/tests/test1.h.ref b/tdecore/kconfig_compiler/tests/test1.h.ref index b5a66b5cd..cc2d99c69 100644 --- a/tdecore/kconfig_compiler/tests/test1.h.ref +++ b/tdecore/kconfig_compiler/tests/test1.h.ref @@ -24,7 +24,7 @@ class Test1 : public KConfigSkeleton */ void setOneOption( bool v ) { - if (!isImmutable( TQString::tqfromLatin1( "OneOption" ) )) + if (!isImmutable( TQString::fromLatin1( "OneOption" ) )) mOneOption = v; } @@ -41,7 +41,7 @@ class Test1 : public KConfigSkeleton */ void setAnotherOption( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "AnotherOption" ) )) + if (!isImmutable( TQString::fromLatin1( "AnotherOption" ) )) mAnotherOption = v; } @@ -58,7 +58,7 @@ class Test1 : public KConfigSkeleton */ void setListOption( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "ListOption" ) )) + if (!isImmutable( TQString::fromLatin1( "ListOption" ) )) mListOption = v; } @@ -75,7 +75,7 @@ class Test1 : public KConfigSkeleton */ void setMyString( const TQString & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyString" ) )) + if (!isImmutable( TQString::fromLatin1( "MyString" ) )) mMyString = v; } @@ -92,7 +92,7 @@ class Test1 : public KConfigSkeleton */ void setMyPath( const TQString & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyPath" ) )) + if (!isImmutable( TQString::fromLatin1( "MyPath" ) )) mMyPath = v; } @@ -109,7 +109,7 @@ class Test1 : public KConfigSkeleton */ void setAnotherOption2( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "AnotherOption2" ) )) + if (!isImmutable( TQString::fromLatin1( "AnotherOption2" ) )) mAnotherOption2 = v; } @@ -126,7 +126,7 @@ class Test1 : public KConfigSkeleton */ void setMyStringList( const TQStringList & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyStringList" ) )) + if (!isImmutable( TQString::fromLatin1( "MyStringList" ) )) mMyStringList = v; } @@ -143,7 +143,7 @@ class Test1 : public KConfigSkeleton */ void setMyStringListHidden( const TQStringList & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyStringListHidden" ) )) + if (!isImmutable( TQString::fromLatin1( "MyStringListHidden" ) )) mMyStringListHidden = v; } @@ -160,7 +160,7 @@ class Test1 : public KConfigSkeleton */ void setMyNumber( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyNumber" ) )) + if (!isImmutable( TQString::fromLatin1( "MyNumber" ) )) mMyNumber = v; } diff --git a/tdecore/kconfig_compiler/tests/test2.cpp.ref b/tdecore/kconfig_compiler/tests/test2.cpp.ref index af8db588d..2d56f7545 100644 --- a/tdecore/kconfig_compiler/tests/test2.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test2.cpp.ref @@ -6,90 +6,90 @@ #include <klocale.h> Test2::Test2( ) - : MyPrefs( TQString::tqfromLatin1( "korganizerrc" ) ) + : MyPrefs( TQString::fromLatin1( "korganizerrc" ) ) { - setCurrentGroup( TQString::tqfromLatin1( "General" ) ); + setCurrentGroup( TQString::fromLatin1( "General" ) ); - mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Auto Save" ), mAutoSave, false ); + mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false ); mAutoSaveItem->setLabel( i18n("Enable automatic saving of calendar") ); mAutoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") ); - addItem( mAutoSaveItem, TQString::tqfromLatin1( "AutoSave" ) ); - mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 ); + addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) ); + mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 ); mAutoSaveIntervalItem->setLabel( i18n("Auto Save Interval") ); - addItem( mAutoSaveIntervalItem, TQString::tqfromLatin1( "AutoSaveInterval" ) ); - mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Confirm Deletes" ), mConfirm, true ); + addItem( mAutoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) ); + mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true ); mConfirmItem->setLabel( i18n("Confirm deletes") ); - addItem( mConfirmItem, TQString::tqfromLatin1( "Confirm" ) ); - mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "Archive File" ), mArchiveFile ); + addItem( mConfirmItem, TQString::fromLatin1( "Confirm" ) ); + mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile ); mArchiveFileItem->setLabel( i18n("Archive File") ); - addItem( mArchiveFileItem, TQString::tqfromLatin1( "ArchiveFile" ) ); + addItem( mArchiveFileItem, TQString::fromLatin1( "ArchiveFile" ) ); TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination; { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "standardDestination" ); + choice.name = TQString::fromLatin1( "standardDestination" ); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "askDestination" ); + choice.name = TQString::fromLatin1( "askDestination" ); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "argl1" ); + choice.name = TQString::fromLatin1( "argl1" ); choice.label = i18n("Argl1 Label"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "argl2" ); + choice.name = TQString::fromLatin1( "argl2" ); choice.whatsThis = i18n("Argl2 Whatsthis"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "argl3" ); + choice.name = TQString::fromLatin1( "argl3" ); choice.label = i18n("Argl3 Label"); choice.whatsThis = i18n("Argl3 Whatsthis"); valuesDestination.append( choice ); } - mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination ); + mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination ); mDestinationItem->setLabel( i18n("New Events/Todos Should") ); - addItem( mDestinationItem, TQString::tqfromLatin1( "Destination" ) ); + addItem( mDestinationItem, TQString::fromLatin1( "Destination" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Views" ) ); + setCurrentGroup( TQString::fromLatin1( "Views" ) ); - mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Hour Size" ), mHourSize, 10 ); + mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 ); mHourSizeItem->setLabel( i18n("Hour Size") ); - addItem( mHourSizeItem, TQString::tqfromLatin1( "HourSize" ) ); - mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false ); + addItem( mHourSizeItem, TQString::fromLatin1( "HourSize" ) ); + mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false ); mSelectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") ); - addItem( mSelectionStartsEditorItem, TQString::tqfromLatin1( "SelectionStartsEditor" ) ); + addItem( mSelectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) ); - setCurrentGroup( TQString::tqfromLatin1( "KOrganizer Plugins" ) ); + setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) ); TQStringList defaultSelectedPlugins; defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) ); defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) ); - mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins ); + mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins ); mSelectedPluginsItem->setLabel( i18n("SelectedPlugins") ); - addItem( mSelectedPluginsItem, TQString::tqfromLatin1( "SelectedPlugins" ) ); + addItem( mSelectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Colors" ) ); + setCurrentGroup( TQString::fromLatin1( "Colors" ) ); - mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) ); + mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) ); mHighlightColorItem->setLabel( i18n("Highlight color") ); - addItem( mHighlightColorItem, TQString::tqfromLatin1( "HighlightColor" ) ); - mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) ); + addItem( mHighlightColorItem, TQString::fromLatin1( "HighlightColor" ) ); + mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) ); mAgendaBgColorItem->setLabel( i18n("Agenda view background color") ); - addItem( mAgendaBgColorItem, TQString::tqfromLatin1( "AgendaBgColor" ) ); + addItem( mAgendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Fonts" ) ); + setCurrentGroup( TQString::fromLatin1( "Fonts" ) ); - mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "TimeBar Font" ), mTimeBarFont ); + mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont ); mTimeBarFontItem->setLabel( i18n("Time bar") ); - addItem( mTimeBarFontItem, TQString::tqfromLatin1( "TimeBarFont" ) ); + addItem( mTimeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) ); } Test2::~Test2() diff --git a/tdecore/kconfig_compiler/tests/test2.h.ref b/tdecore/kconfig_compiler/tests/test2.h.ref index 075f48bde..6c0a74d66 100644 --- a/tdecore/kconfig_compiler/tests/test2.h.ref +++ b/tdecore/kconfig_compiler/tests/test2.h.ref @@ -21,7 +21,7 @@ class Test2 : public MyPrefs */ void setAutoSave( bool v ) { - if (!isImmutable( TQString::tqfromLatin1( "AutoSave" ) )) + if (!isImmutable( TQString::fromLatin1( "AutoSave" ) )) mAutoSave = v; } @@ -46,7 +46,7 @@ class Test2 : public MyPrefs */ void setAutoSaveInterval( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "AutoSaveInterval" ) )) + if (!isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) )) mAutoSaveInterval = v; } @@ -71,7 +71,7 @@ class Test2 : public MyPrefs */ void setConfirm( bool v ) { - if (!isImmutable( TQString::tqfromLatin1( "Confirm" ) )) + if (!isImmutable( TQString::fromLatin1( "Confirm" ) )) mConfirm = v; } @@ -96,7 +96,7 @@ class Test2 : public MyPrefs */ void setArchiveFile( const TQString & v ) { - if (!isImmutable( TQString::tqfromLatin1( "ArchiveFile" ) )) + if (!isImmutable( TQString::fromLatin1( "ArchiveFile" ) )) mArchiveFile = v; } @@ -121,7 +121,7 @@ class Test2 : public MyPrefs */ void setDestination( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "Destination" ) )) + if (!isImmutable( TQString::fromLatin1( "Destination" ) )) mDestination = v; } @@ -146,7 +146,7 @@ class Test2 : public MyPrefs */ void setHourSize( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "HourSize" ) )) + if (!isImmutable( TQString::fromLatin1( "HourSize" ) )) mHourSize = v; } @@ -171,7 +171,7 @@ class Test2 : public MyPrefs */ void setSelectionStartsEditor( bool v ) { - if (!isImmutable( TQString::tqfromLatin1( "SelectionStartsEditor" ) )) + if (!isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) )) mSelectionStartsEditor = v; } @@ -196,7 +196,7 @@ class Test2 : public MyPrefs */ void setSelectedPlugins( const TQStringList & v ) { - if (!isImmutable( TQString::tqfromLatin1( "SelectedPlugins" ) )) + if (!isImmutable( TQString::fromLatin1( "SelectedPlugins" ) )) mSelectedPlugins = v; } @@ -221,7 +221,7 @@ class Test2 : public MyPrefs */ void setHighlightColor( const TQColor & v ) { - if (!isImmutable( TQString::tqfromLatin1( "HighlightColor" ) )) + if (!isImmutable( TQString::fromLatin1( "HighlightColor" ) )) mHighlightColor = v; } @@ -246,7 +246,7 @@ class Test2 : public MyPrefs */ void setAgendaBgColor( const TQColor & v ) { - if (!isImmutable( TQString::tqfromLatin1( "AgendaBgColor" ) )) + if (!isImmutable( TQString::fromLatin1( "AgendaBgColor" ) )) mAgendaBgColor = v; } @@ -271,7 +271,7 @@ class Test2 : public MyPrefs */ void setTimeBarFont( const TQFont & v ) { - if (!isImmutable( TQString::tqfromLatin1( "TimeBarFont" ) )) + if (!isImmutable( TQString::fromLatin1( "TimeBarFont" ) )) mTimeBarFont = v; } diff --git a/tdecore/kconfig_compiler/tests/test3.cpp.ref b/tdecore/kconfig_compiler/tests/test3.cpp.ref index a47fd5213..11fe6b38f 100644 --- a/tdecore/kconfig_compiler/tests/test3.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test3.cpp.ref @@ -6,21 +6,21 @@ using namespace TestNameSpace; Test3::Test3( ) - : KConfigSkeleton( TQString::tqfromLatin1( "test3rc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "test3rc" ) ) { - setCurrentGroup( TQString::tqfromLatin1( "General" ) ); + setCurrentGroup( TQString::fromLatin1( "General" ) ); - mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Auto Save" ), mAutoSave, false ); - addItem( mAutoSaveItem, TQString::tqfromLatin1( "AutoSave" ) ); + mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false ); + addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Blah" ) ); + setCurrentGroup( TQString::fromLatin1( "Blah" ) ); - mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Blubb" ), mBlubb, 10 ); - addItem( mBlubbItem, TQString::tqfromLatin1( "Blubb" ) ); - mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "BlahBlah" ), mBlahBlah, TQString::tqfromLatin1( "a string" ) ); - addItem( mBlahBlahItem, TQString::tqfromLatin1( "BlahBlah" ) ); - mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), TQString::tqfromLatin1( "MyPassword" ), mMyPassword ); - addItem( mMyPasswordItem, TQString::tqfromLatin1( "MyPassword" ) ); + mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Blubb" ), mBlubb, 10 ); + addItem( mBlubbItem, TQString::fromLatin1( "Blubb" ) ); + mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "BlahBlah" ), mBlahBlah, TQString::fromLatin1( "a string" ) ); + addItem( mBlahBlahItem, TQString::fromLatin1( "BlahBlah" ) ); + mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), TQString::fromLatin1( "MyPassword" ), mMyPassword ); + addItem( mMyPasswordItem, TQString::fromLatin1( "MyPassword" ) ); } Test3::~Test3() diff --git a/tdecore/kconfig_compiler/tests/test3.h.ref b/tdecore/kconfig_compiler/tests/test3.h.ref index 8e86d36b0..75b1b0929 100644 --- a/tdecore/kconfig_compiler/tests/test3.h.ref +++ b/tdecore/kconfig_compiler/tests/test3.h.ref @@ -20,7 +20,7 @@ class Test3 : public KConfigSkeleton */ void setAutoSave( bool v ) { - if (!isImmutable( TQString::tqfromLatin1( "AutoSave" ) )) + if (!isImmutable( TQString::fromLatin1( "AutoSave" ) )) mAutoSave = v; } @@ -45,7 +45,7 @@ class Test3 : public KConfigSkeleton */ void setBlubb( int v ) { - if (!isImmutable( TQString::tqfromLatin1( "Blubb" ) )) + if (!isImmutable( TQString::fromLatin1( "Blubb" ) )) mBlubb = v; } @@ -70,7 +70,7 @@ class Test3 : public KConfigSkeleton */ void setBlahBlah( const TQString & v ) { - if (!isImmutable( TQString::tqfromLatin1( "BlahBlah" ) )) + if (!isImmutable( TQString::fromLatin1( "BlahBlah" ) )) mBlahBlah = v; } @@ -95,7 +95,7 @@ class Test3 : public KConfigSkeleton */ void setMyPassword( const TQString & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyPassword" ) )) + if (!isImmutable( TQString::fromLatin1( "MyPassword" ) )) mMyPassword = v; } diff --git a/tdecore/kconfig_compiler/tests/test4.cpp.ref b/tdecore/kconfig_compiler/tests/test4.cpp.ref index 0eee21488..6918a8c8a 100644 --- a/tdecore/kconfig_compiler/tests/test4.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test4.cpp.ref @@ -21,57 +21,57 @@ Test4 *Test4::self() const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" }; Test4::Test4( ) - : KConfigSkeleton( TQString::tqfromLatin1( "test4rc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) { mSelf = this; - setCurrentGroup( TQString::tqfromLatin1( "Foo" ) ); + setCurrentGroup( TQString::fromLatin1( "Foo" ) ); TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black }; KConfigSkeleton::ItemColor *itemColor[4]; - itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #0" ), mColor[0], defaultColor[0] ); - addItem( itemColor[0], TQString::tqfromLatin1( "Color0" ) ); - itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #1" ), mColor[1], defaultColor[1] ); - addItem( itemColor[1], TQString::tqfromLatin1( "Color1" ) ); - itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #2" ), mColor[2], defaultColor[2] ); - addItem( itemColor[2], TQString::tqfromLatin1( "Color2" ) ); - itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #3" ), mColor[3], defaultColor[3] ); - addItem( itemColor[3], TQString::tqfromLatin1( "Color3" ) ); + itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] ); + addItem( itemColor[0], TQString::fromLatin1( "Color0" ) ); + itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] ); + addItem( itemColor[1], TQString::fromLatin1( "Color1" ) ); + itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] ); + addItem( itemColor[2], TQString::fromLatin1( "Color2" ) ); + itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] ); + addItem( itemColor[3], TQString::fromLatin1( "Color3" ) ); TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction; { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "Encrypt" ); + choice.name = TQString::fromLatin1( "Encrypt" ); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "Decrypt" ); + choice.name = TQString::fromLatin1( "Decrypt" ); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "CrashNBurn" ); + choice.name = TQString::fromLatin1( "CrashNBurn" ); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "PumpNDump" ); + choice.name = TQString::fromLatin1( "PumpNDump" ); valuesMouseAction.append( choice ); } KConfigSkeleton::ItemEnum *itemMouseAction[3]; - itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt ); - addItem( itemMouseAction[0], TQString::tqfromLatin1( "MouseActionright" ) ); - itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt ); - addItem( itemMouseAction[1], TQString::tqfromLatin1( "MouseActionmid" ) ); - itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump ); - addItem( itemMouseAction[2], TQString::tqfromLatin1( "MouseActionleft" ) ); + itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt ); + addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) ); + itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt ); + addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) ); + itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump ); + addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) ); KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar ); - addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) ); + itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 ); + itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); - addItem( itemAge, TQString::tqfromLatin1( "Age" ) ); + addItem( itemAge, TQString::fromLatin1( "Age" ) ); } Test4::~Test4() diff --git a/tdecore/kconfig_compiler/tests/test4.h.ref b/tdecore/kconfig_compiler/tests/test4.h.ref index dc8691b1f..d11dd3aee 100644 --- a/tdecore/kconfig_compiler/tests/test4.h.ref +++ b/tdecore/kconfig_compiler/tests/test4.h.ref @@ -30,7 +30,7 @@ class Test4 : public KConfigSkeleton static void setColor( int i, const TQColor & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "Color%1" ).arg( i ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) )) self()->mColor[i] = v; } @@ -49,7 +49,7 @@ class Test4 : public KConfigSkeleton static void setMouseAction( int i, int v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "MouseAction%1" ).arg( TQString::tqfromLatin1( EnumButton::enumToString[i] ) ) )) + if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButton::enumToString[i] ) ) )) self()->mMouseAction[i] = v; } @@ -68,7 +68,7 @@ class Test4 : public KConfigSkeleton static void setFooBar( const TQString & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "FooBar" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) )) self()->mFooBar = v; } @@ -99,7 +99,7 @@ class Test4 : public KConfigSkeleton v = 88; } - if (!self()->isImmutable( TQString::tqfromLatin1( "Age" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Age" ) )) self()->mAge = v; } diff --git a/tdecore/kconfig_compiler/tests/test5.cpp.ref b/tdecore/kconfig_compiler/tests/test5.cpp.ref index 0fc90b387..8373eb3f6 100644 --- a/tdecore/kconfig_compiler/tests/test5.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test5.cpp.ref @@ -21,57 +21,57 @@ Test5 *Test5::self() const char* const Test5::EnumButtonToString[] = { "right", "mid", "left" }; Test5::Test5( ) - : KConfigSkeleton( TQString::tqfromLatin1( "test4rc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) { mSelf = this; - setCurrentGroup( TQString::tqfromLatin1( "Foo" ) ); + setCurrentGroup( TQString::fromLatin1( "Foo" ) ); TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black }; KConfigSkeleton::ItemColor *itemColor[4]; - itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #0" ), mColor[0], defaultColor[0] ); - addItem( itemColor[0], TQString::tqfromLatin1( "Color0" ) ); - itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #1" ), mColor[1], defaultColor[1] ); - addItem( itemColor[1], TQString::tqfromLatin1( "Color1" ) ); - itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #2" ), mColor[2], defaultColor[2] ); - addItem( itemColor[2], TQString::tqfromLatin1( "Color2" ) ); - itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #3" ), mColor[3], defaultColor[3] ); - addItem( itemColor[3], TQString::tqfromLatin1( "Color3" ) ); + itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] ); + addItem( itemColor[0], TQString::fromLatin1( "Color0" ) ); + itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] ); + addItem( itemColor[1], TQString::fromLatin1( "Color1" ) ); + itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] ); + addItem( itemColor[2], TQString::fromLatin1( "Color2" ) ); + itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] ); + addItem( itemColor[3], TQString::fromLatin1( "Color3" ) ); TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction; { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "Encrypt" ); + choice.name = TQString::fromLatin1( "Encrypt" ); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "Decrypt" ); + choice.name = TQString::fromLatin1( "Decrypt" ); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "CrashNBurn" ); + choice.name = TQString::fromLatin1( "CrashNBurn" ); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "PumpNDump" ); + choice.name = TQString::fromLatin1( "PumpNDump" ); valuesMouseAction.append( choice ); } KConfigSkeleton::ItemEnum *itemMouseAction[3]; - itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt ); - addItem( itemMouseAction[0], TQString::tqfromLatin1( "MouseActionright" ) ); - itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt ); - addItem( itemMouseAction[1], TQString::tqfromLatin1( "MouseActionmid" ) ); - itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump ); - addItem( itemMouseAction[2], TQString::tqfromLatin1( "MouseActionleft" ) ); + itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt ); + addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) ); + itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt ); + addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) ); + itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump ); + addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) ); KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar ); - addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) ); + itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 ); + itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); - addItem( itemAge, TQString::tqfromLatin1( "Age" ) ); + addItem( itemAge, TQString::fromLatin1( "Age" ) ); } Test5::~Test5() diff --git a/tdecore/kconfig_compiler/tests/test5.h.ref b/tdecore/kconfig_compiler/tests/test5.h.ref index 9fadbd0ec..efb9b448a 100644 --- a/tdecore/kconfig_compiler/tests/test5.h.ref +++ b/tdecore/kconfig_compiler/tests/test5.h.ref @@ -22,7 +22,7 @@ class Test5 : public KConfigSkeleton static void setColor( int i, const TQColor & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "Color%1" ).arg( i ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) )) self()->mColor[i] = v; } @@ -41,7 +41,7 @@ class Test5 : public KConfigSkeleton static void setMouseAction( int i, int v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "MouseAction%1" ).arg( TQString::tqfromLatin1( EnumButtonToString[i] ) ) )) + if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButtonToString[i] ) ) )) self()->mMouseAction[i] = v; } @@ -60,7 +60,7 @@ class Test5 : public KConfigSkeleton static void setFooBar( const TQString & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "FooBar" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) )) self()->mFooBar = v; } @@ -91,7 +91,7 @@ class Test5 : public KConfigSkeleton v = 88; } - if (!self()->isImmutable( TQString::tqfromLatin1( "Age" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Age" ) )) self()->mAge = v; } diff --git a/tdecore/kconfig_compiler/tests/test6.cpp.ref b/tdecore/kconfig_compiler/tests/test6.cpp.ref index 2b8a71d50..51b96d4c4 100644 --- a/tdecore/kconfig_compiler/tests/test6.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test6.cpp.ref @@ -4,25 +4,25 @@ #include "test6.h" Test6::Test6( const TQString & Number ) - : KConfigSkeleton( TQString::tqfromLatin1( "test4rc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) , mParamNumber(Number) { - setCurrentGroup( TQString::tqfromLatin1( "Foo" ) ); + setCurrentGroup( TQString::fromLatin1( "Foo" ) ); KConfigSkeleton::ItemColor *itemColor; - itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); - addItem( itemColor, TQString::tqfromLatin1( "Color" ) ); + itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); + addItem( itemColor, TQString::fromLatin1( "Color" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Bar%1" ).arg( mParamNumber ) ); + setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) ); KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar ); - addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) ); + itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 ); + itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); - addItem( itemAge, TQString::tqfromLatin1( "Age" ) ); + addItem( itemAge, TQString::fromLatin1( "Age" ) ); } Test6::~Test6() diff --git a/tdecore/kconfig_compiler/tests/test6.h.ref b/tdecore/kconfig_compiler/tests/test6.h.ref index 18615da38..6743d6064 100644 --- a/tdecore/kconfig_compiler/tests/test6.h.ref +++ b/tdecore/kconfig_compiler/tests/test6.h.ref @@ -18,7 +18,7 @@ class Test6 : public KConfigSkeleton */ void setColor( const TQColor & v ) { - if (!isImmutable( TQString::tqfromLatin1( "Color" ) )) + if (!isImmutable( TQString::fromLatin1( "Color" ) )) mColor = v; } @@ -35,7 +35,7 @@ class Test6 : public KConfigSkeleton */ void setFooBar( const TQString & v ) { - if (!isImmutable( TQString::tqfromLatin1( "FooBar" ) )) + if (!isImmutable( TQString::fromLatin1( "FooBar" ) )) mFooBar = v; } @@ -64,7 +64,7 @@ class Test6 : public KConfigSkeleton v = 88; } - if (!isImmutable( TQString::tqfromLatin1( "Age" ) )) + if (!isImmutable( TQString::fromLatin1( "Age" ) )) mAge = v; } diff --git a/tdecore/kconfig_compiler/tests/test7.cpp.ref b/tdecore/kconfig_compiler/tests/test7.cpp.ref index dab0ae27d..91a22e036 100644 --- a/tdecore/kconfig_compiler/tests/test7.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test7.cpp.ref @@ -4,25 +4,25 @@ #include "test7.h" Test7::Test7( int Number ) - : KConfigSkeleton( TQString::tqfromLatin1( "test7rc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "test7rc" ) ) , mParamNumber(Number) { - setCurrentGroup( TQString::tqfromLatin1( "Foo" ) ); + setCurrentGroup( TQString::fromLatin1( "Foo" ) ); KConfigSkeleton::ItemColor *itemColor; - itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); - addItem( itemColor, TQString::tqfromLatin1( "Color" ) ); + itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); + addItem( itemColor, TQString::fromLatin1( "Color" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Bar%1" ).arg( mParamNumber ) ); + setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) ); KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar ); - addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) ); + itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 ); + itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); - addItem( itemAge, TQString::tqfromLatin1( "Age" ) ); + addItem( itemAge, TQString::fromLatin1( "Age" ) ); } Test7::~Test7() diff --git a/tdecore/kconfig_compiler/tests/test7.h.ref b/tdecore/kconfig_compiler/tests/test7.h.ref index f67bc30cb..8f8808da1 100644 --- a/tdecore/kconfig_compiler/tests/test7.h.ref +++ b/tdecore/kconfig_compiler/tests/test7.h.ref @@ -18,7 +18,7 @@ class Test7 : public KConfigSkeleton */ void setColor( const TQColor & v ) { - if (!isImmutable( TQString::tqfromLatin1( "Color" ) )) + if (!isImmutable( TQString::fromLatin1( "Color" ) )) mColor = v; } @@ -35,7 +35,7 @@ class Test7 : public KConfigSkeleton */ void setFooBar( const TQString & v ) { - if (!isImmutable( TQString::tqfromLatin1( "FooBar" ) )) + if (!isImmutable( TQString::fromLatin1( "FooBar" ) )) mFooBar = v; } @@ -64,7 +64,7 @@ class Test7 : public KConfigSkeleton v = 88; } - if (!isImmutable( TQString::tqfromLatin1( "Age" ) )) + if (!isImmutable( TQString::fromLatin1( "Age" ) )) mAge = v; } diff --git a/tdecore/kconfig_compiler/tests/test8a.cpp.ref b/tdecore/kconfig_compiler/tests/test8a.cpp.ref index 8d8925c57..f89b7c133 100644 --- a/tdecore/kconfig_compiler/tests/test8a.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test8a.cpp.ref @@ -6,14 +6,14 @@ Test8a::Test8a( KSharedConfig::Ptr config ) : KConfigSkeleton( config ) { - setCurrentGroup( TQString::tqfromLatin1( "Group" ) ); + setCurrentGroup( TQString::fromLatin1( "Group" ) ); KConfigSkeleton::ItemFont *itemFont; - itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() ); - addItem( itemFont, TQString::tqfromLatin1( "Font" ) ); + itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() ); + addItem( itemFont, TQString::fromLatin1( "Font" ) ); KConfigSkeleton::ItemFont *itemTitleFont; - itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() ); - addItem( itemTitleFont, TQString::tqfromLatin1( "TitleFont" ) ); + itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() ); + addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) ); } Test8a::~Test8a() diff --git a/tdecore/kconfig_compiler/tests/test8a.h.ref b/tdecore/kconfig_compiler/tests/test8a.h.ref index a1ac4de64..2e947c437 100644 --- a/tdecore/kconfig_compiler/tests/test8a.h.ref +++ b/tdecore/kconfig_compiler/tests/test8a.h.ref @@ -19,7 +19,7 @@ class Test8a : public KConfigSkeleton */ void setFont( const TQFont & v ) { - if (!isImmutable( TQString::tqfromLatin1( "Font" ) )) + if (!isImmutable( TQString::fromLatin1( "Font" ) )) mFont = v; } @@ -36,7 +36,7 @@ class Test8a : public KConfigSkeleton */ void setTitleFont( const TQFont & v ) { - if (!isImmutable( TQString::tqfromLatin1( "TitleFont" ) )) + if (!isImmutable( TQString::fromLatin1( "TitleFont" ) )) mTitleFont = v; } diff --git a/tdecore/kconfig_compiler/tests/test8b.cpp.ref b/tdecore/kconfig_compiler/tests/test8b.cpp.ref index 566902399..e29e3c4e7 100644 --- a/tdecore/kconfig_compiler/tests/test8b.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test8b.cpp.ref @@ -22,20 +22,20 @@ Test8b::Test8b( ) : Test8a() { mSelf = this; - setCurrentGroup( TQString::tqfromLatin1( "Group8b1" ) ); + setCurrentGroup( TQString::fromLatin1( "Group8b1" ) ); KConfigSkeleton::ItemUInt *itemSomething; - itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::tqfromLatin1( "Something" ), mSomething, 60 ); - addItem( itemSomething, TQString::tqfromLatin1( "Something" ) ); + itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 ); + addItem( itemSomething, TQString::fromLatin1( "Something" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Group8b2" ) ); + setCurrentGroup( TQString::fromLatin1( "Group8b2" ) ); KConfigSkeleton::ItemBool *itemFooBoo; - itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "FooBoo" ), mFooBoo, false ); - addItem( itemFooBoo, TQString::tqfromLatin1( "FooBoo" ) ); + itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false ); + addItem( itemFooBoo, TQString::fromLatin1( "FooBoo" ) ); KConfigSkeleton::ItemUInt *itemPort; - itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::tqfromLatin1( "Port" ), mPort, 1000 ); - addItem( itemPort, TQString::tqfromLatin1( "Port" ) ); + itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 ); + addItem( itemPort, TQString::fromLatin1( "Port" ) ); } Test8b::~Test8b() diff --git a/tdecore/kconfig_compiler/tests/test8b.h.ref b/tdecore/kconfig_compiler/tests/test8b.h.ref index dfc9089e3..4ca0d5c7f 100644 --- a/tdecore/kconfig_compiler/tests/test8b.h.ref +++ b/tdecore/kconfig_compiler/tests/test8b.h.ref @@ -21,7 +21,7 @@ class Test8b : public Test8a static void setSomething( uint v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "Something" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Something" ) )) self()->mSomething = v; } @@ -40,7 +40,7 @@ class Test8b : public Test8a static void setFooBoo( bool v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "FooBoo" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "FooBoo" ) )) self()->mFooBoo = v; } @@ -59,7 +59,7 @@ class Test8b : public Test8a static void setPort( uint v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "Port" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Port" ) )) self()->mPort = v; } diff --git a/tdecore/kconfig_compiler/tests/test9.cpp.ref b/tdecore/kconfig_compiler/tests/test9.cpp.ref index 606f21ed1..c5d57e4d1 100644 --- a/tdecore/kconfig_compiler/tests/test9.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test9.cpp.ref @@ -4,29 +4,29 @@ #include "test9.h" Test9::Test9( const TQString & transport, const TQString & folder ) - : KConfigSkeleton( TQString::tqfromLatin1( "examplerc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) ) , mParamtransport(transport) , mParamfolder(folder) { - setCurrentGroup( TQString::tqfromLatin1( "MyOptionsXX" ) ); + setCurrentGroup( TQString::fromLatin1( "MyOptionsXX" ) ); TQStringList defaultMyStringList; defaultMyStringList.append( TQString::fromUtf8( "up" ) ); defaultMyStringList.append( TQString::fromUtf8( "down" ) ); KConfigSkeleton::ItemStringList *itemMyStringList; - itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); - addItem( itemMyStringList, TQString::tqfromLatin1( "MyStringList" ) ); + itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); + addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) ); TQStringList defaultMyPathList; defaultMyPathList.append( TQString::fromUtf8( "/home" ) ); defaultMyPathList.append( TQString::fromUtf8( "~" ) ); KConfigSkeleton::ItemPathList *itemMyPathList; - itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::tqfromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList ); - addItem( itemMyPathList, TQString::tqfromLatin1( "MyPathList" ) ); + itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList ); + addItem( itemMyPathList, TQString::fromLatin1( "MyPathList" ) ); KConfigSkeleton::ItemPathList *itemMyPathsList2; - itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::tqfromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::tqfromLatin1("/usr/bin")) += TQDir::homeDirPath() ); - addItem( itemMyPathsList2, TQString::tqfromLatin1( "MyPathsList2" ) ); + itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() ); + addItem( itemMyPathsList2, TQString::fromLatin1( "MyPathsList2" ) ); } Test9::~Test9() diff --git a/tdecore/kconfig_compiler/tests/test9.h.ref b/tdecore/kconfig_compiler/tests/test9.h.ref index 0476c8a19..66a629b48 100644 --- a/tdecore/kconfig_compiler/tests/test9.h.ref +++ b/tdecore/kconfig_compiler/tests/test9.h.ref @@ -19,7 +19,7 @@ class Test9 : public KConfigSkeleton */ void setMyStringList( const TQStringList & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyStringList" ) )) + if (!isImmutable( TQString::fromLatin1( "MyStringList" ) )) mMyStringList = v; } @@ -36,7 +36,7 @@ class Test9 : public KConfigSkeleton */ void setMyPathList( const TQStringList & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyPathList" ) )) + if (!isImmutable( TQString::fromLatin1( "MyPathList" ) )) mMyPathList = v; } @@ -53,7 +53,7 @@ class Test9 : public KConfigSkeleton */ void setMyPathsList2( const TQStringList & v ) { - if (!isImmutable( TQString::tqfromLatin1( "MyPathsList2" ) )) + if (!isImmutable( TQString::fromLatin1( "MyPathsList2" ) )) mMyPathsList2 = v; } diff --git a/tdecore/kconfig_compiler/tests/test9main.cpp b/tdecore/kconfig_compiler/tests/test9main.cpp index 796ec0001..12e16e0d4 100644 --- a/tdecore/kconfig_compiler/tests/test9main.cpp +++ b/tdecore/kconfig_compiler/tests/test9main.cpp @@ -32,7 +32,7 @@ int main( int, char*[] ) kdWarning() << myPathsList2 << endl; // add another path - TQStringList newlist = TQDir::homeDirPath() + TQString::tqfromLatin1("/.kde"); + TQStringList newlist = TQDir::homeDirPath() + TQString::fromLatin1("/.kde"); myPathsList2 = myPathsList2 + newlist; kdWarning() << myPathsList2 << endl; diff --git a/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref b/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref index 00e933564..7b5f55f03 100644 --- a/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref @@ -60,97 +60,97 @@ TestDPointer *TestDPointer::self() } TestDPointer::TestDPointer( ) - : KConfigSkeleton( TQString::tqfromLatin1( "korganizerrc" ) ) + : KConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) ) { d = new TestDPointerPrivate; mSelf = this; - setCurrentGroup( TQString::tqfromLatin1( "General" ) ); + setCurrentGroup( TQString::fromLatin1( "General" ) ); - d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Auto Save" ), d->autoSave, false ); + d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false ); d->autoSaveItem->setLabel( i18n("Enable automatic saving of calendar") ); d->autoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") ); - addItem( d->autoSaveItem, TQString::tqfromLatin1( "AutoSave" ) ); - d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 ); + addItem( d->autoSaveItem, TQString::fromLatin1( "AutoSave" ) ); + d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 ); d->autoSaveIntervalItem->setLabel( i18n("Auto Save Interval") ); - addItem( d->autoSaveIntervalItem, TQString::tqfromLatin1( "AutoSaveInterval" ) ); - d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Confirm Deletes" ), d->confirm, true ); + addItem( d->autoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) ); + d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true ); d->confirmItem->setLabel( i18n("Confirm deletes") ); - addItem( d->confirmItem, TQString::tqfromLatin1( "Confirm" ) ); - d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "Archive File" ), d->archiveFile ); + addItem( d->confirmItem, TQString::fromLatin1( "Confirm" ) ); + d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile ); d->archiveFileItem->setLabel( i18n("Archive File") ); - addItem( d->archiveFileItem, TQString::tqfromLatin1( "ArchiveFile" ) ); + addItem( d->archiveFileItem, TQString::fromLatin1( "ArchiveFile" ) ); TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination; { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "standardDestination" ); + choice.name = TQString::fromLatin1( "standardDestination" ); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "askDestination" ); + choice.name = TQString::fromLatin1( "askDestination" ); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "argl1" ); + choice.name = TQString::fromLatin1( "argl1" ); choice.label = i18n("Argl1 Label"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "argl2" ); + choice.name = TQString::fromLatin1( "argl2" ); choice.whatsThis = i18n("Argl2 Whatsthis"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; - choice.name = TQString::tqfromLatin1( "argl3" ); + choice.name = TQString::fromLatin1( "argl3" ); choice.label = i18n("Argl3 Label"); choice.whatsThis = i18n("Argl3 Whatsthis"); valuesDestination.append( choice ); } - d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination ); + d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination ); d->destinationItem->setLabel( i18n("New Events/Todos Should") ); - addItem( d->destinationItem, TQString::tqfromLatin1( "Destination" ) ); + addItem( d->destinationItem, TQString::fromLatin1( "Destination" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Views" ) ); + setCurrentGroup( TQString::fromLatin1( "Views" ) ); - d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Hour Size" ), d->hourSize, 10 ); + d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 ); d->hourSizeItem->setLabel( i18n("Hour Size") ); - addItem( d->hourSizeItem, TQString::tqfromLatin1( "HourSize" ) ); - d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false ); + addItem( d->hourSizeItem, TQString::fromLatin1( "HourSize" ) ); + d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false ); d->selectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") ); - addItem( d->selectionStartsEditorItem, TQString::tqfromLatin1( "SelectionStartsEditor" ) ); + addItem( d->selectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) ); - setCurrentGroup( TQString::tqfromLatin1( "KOrganizer Plugins" ) ); + setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) ); TQStringList defaultSelectedPlugins; defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) ); defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) ); - d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins ); + d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins ); d->selectedPluginsItem->setLabel( i18n("SelectedPlugins") ); - addItem( d->selectedPluginsItem, TQString::tqfromLatin1( "SelectedPlugins" ) ); + addItem( d->selectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Colors" ) ); + setCurrentGroup( TQString::fromLatin1( "Colors" ) ); - d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) ); + d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) ); d->highlightColorItem->setLabel( i18n("Highlight color") ); - addItem( d->highlightColorItem, TQString::tqfromLatin1( "HighlightColor" ) ); - d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) ); + addItem( d->highlightColorItem, TQString::fromLatin1( "HighlightColor" ) ); + d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) ); d->agendaBgColorItem->setLabel( i18n("Agenda view background color") ); - addItem( d->agendaBgColorItem, TQString::tqfromLatin1( "AgendaBgColor" ) ); + addItem( d->agendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) ); - setCurrentGroup( TQString::tqfromLatin1( "Fonts" ) ); + setCurrentGroup( TQString::fromLatin1( "Fonts" ) ); - d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "TimeBar Font" ), d->timeBarFont ); + d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont ); d->timeBarFontItem->setLabel( i18n("Time bar") ); - addItem( d->timeBarFontItem, TQString::tqfromLatin1( "TimeBarFont" ) ); + addItem( d->timeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) ); } void TestDPointer::setAutoSave( bool v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "AutoSave" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "AutoSave" ) )) self()->d->autoSave = v; } @@ -167,7 +167,7 @@ KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem() void TestDPointer::setAutoSaveInterval( int v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "AutoSaveInterval" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) )) self()->d->autoSaveInterval = v; } @@ -184,7 +184,7 @@ KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem() void TestDPointer::setConfirm( bool v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "Confirm" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Confirm" ) )) self()->d->confirm = v; } @@ -201,7 +201,7 @@ KConfigSkeleton::ItemBool *TestDPointer::confirmItem() void TestDPointer::setArchiveFile( const TQString & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "ArchiveFile" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "ArchiveFile" ) )) self()->d->archiveFile = v; } @@ -218,7 +218,7 @@ KConfigSkeleton::ItemString *TestDPointer::archiveFileItem() void TestDPointer::setDestination( int v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "Destination" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "Destination" ) )) self()->d->destination = v; } @@ -235,7 +235,7 @@ KConfigSkeleton::ItemEnum *TestDPointer::destinationItem() void TestDPointer::setHourSize( int v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "HourSize" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "HourSize" ) )) self()->d->hourSize = v; } @@ -252,7 +252,7 @@ KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem() void TestDPointer::setSelectionStartsEditor( bool v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "SelectionStartsEditor" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) )) self()->d->selectionStartsEditor = v; } @@ -269,7 +269,7 @@ KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem() void TestDPointer::setSelectedPlugins( const TQStringList & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "SelectedPlugins" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "SelectedPlugins" ) )) self()->d->selectedPlugins = v; } @@ -286,7 +286,7 @@ KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem() void TestDPointer::setHighlightColor( const TQColor & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "HighlightColor" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "HighlightColor" ) )) self()->d->highlightColor = v; } @@ -303,7 +303,7 @@ KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem() void TestDPointer::setAgendaBgColor( const TQColor & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "AgendaBgColor" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "AgendaBgColor" ) )) self()->d->agendaBgColor = v; } @@ -320,7 +320,7 @@ KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem() void TestDPointer::setTimeBarFont( const TQFont & v ) { - if (!self()->isImmutable( TQString::tqfromLatin1( "TimeBarFont" ) )) + if (!self()->isImmutable( TQString::fromLatin1( "TimeBarFont" ) )) self()->d->timeBarFont = v; } diff --git a/tdecore/kconfigbackend.cpp b/tdecore/kconfigbackend.cpp index 633458d41..fde08585e 100644 --- a/tdecore/kconfigbackend.cpp +++ b/tdecore/kconfigbackend.cpp @@ -36,8 +36,8 @@ #include <tqdir.h> #include <tqfileinfo.h> -#include <tqtextcodec.h> -#include <tqtextstream.h> +#include <textcodec.h> +#include <textstream.h> #include "kconfigbackend.h" #include "kconfigbase.h" @@ -256,7 +256,7 @@ void KConfigBackEnd::changeFileName(const TQString &_fileName, if (useKDEGlobals) mGlobalFileName = KGlobal::dirs()->saveLocation("config") + - TQString::tqfromLatin1("kdeglobals"); + TQString::fromLatin1("kdeglobals"); else mGlobalFileName = TQString::null; @@ -347,19 +347,19 @@ bool KConfigINIBackEnd::parseConfigFiles() // Parse the general config files if (useKDEGlobals) { TQStringList kdercs = KGlobal::dirs()-> - findAllResources("config", TQString::tqfromLatin1("kdeglobals")); + findAllResources("config", TQString::fromLatin1("kdeglobals")); #ifdef Q_WS_WIN TQString etc_kderc = TQFile::decodeName( TQCString(getenv("WINDIR")) + "\\kderc" ); #else - TQString etc_kderc = TQString::tqfromLatin1("/etc/kderc"); + TQString etc_kderc = TQString::fromLatin1("/etc/kderc"); #endif if (checkAccess(etc_kderc, R_OK)) kdercs += etc_kderc; kdercs += KGlobal::dirs()-> - findAllResources("config", TQString::tqfromLatin1("system.kdeglobals")); + findAllResources("config", TQString::fromLatin1("system.kdeglobals")); TQStringList::ConstIterator it; @@ -496,7 +496,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1()); else #endif { - rFile.tqat(0); + rFile.at(0); data = rFile.readAll(); s = data.data(); eof = s + data.size(); diff --git a/tdecore/kconfigbase.cpp b/tdecore/kconfigbase.cpp index 20d3f023c..b9a89a70c 100644 --- a/tdecore/kconfigbase.cpp +++ b/tdecore/kconfigbase.cpp @@ -25,7 +25,7 @@ #include <tqfile.h> #include <tqdir.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kapplication.h> #include <kglobal.h> @@ -969,7 +969,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey, TQString aValue = readEntry( pKey ); if( !aValue.isEmpty() ) { - if ( aValue.tqat(0) == (QChar)'#' ) + if ( aValue.at(0) == (QChar)'#' ) { aRetColor.setNamedColor(aValue); } @@ -1025,7 +1025,7 @@ TQDateTime KConfigBase::readDateTimeEntry( const TQString& pKey, return readDateTimeEntry(pKey.utf8().data(), pDefault); } -// ### tqcurrentDateTime() as fallback ? (Harri) +// ### currentDateTime() as fallback ? (Harri) TQDateTime KConfigBase::readDateTimeEntry( const char *pKey, const TQDateTime* pDefault ) const { @@ -1034,21 +1034,21 @@ TQDateTime KConfigBase::readDateTimeEntry( const char *pKey, if( pDefault ) return *pDefault; else - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); } TQStrList list; int count = readListEntry( pKey, list, ',' ); if( count == 6 ) { - TQDate date( atoi( list.tqat( 0 ) ), atoi( list.tqat( 1 ) ), - atoi( list.tqat( 2 ) ) ); - TQTime time( atoi( list.tqat( 3 ) ), atoi( list.tqat( 4 ) ), - atoi( list.tqat( 5 ) ) ); + TQDate date( atoi( list.at( 0 ) ), atoi( list.at( 1 ) ), + atoi( list.at( 2 ) ) ); + TQTime time( atoi( list.at( 3 ) ), atoi( list.at( 4 ) ), + atoi( list.at( 5 ) ) ); return TQDateTime( date, time ); } - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); } void KConfigBase::writeEntry( const TQString& pKey, const TQString& value, @@ -1121,7 +1121,7 @@ static bool cleanHomeDirPath( TQString &path, const TQString &homeDir ) unsigned int len = homeDir.length(); // replace by "$HOME" if possible if (len && (path.length() == len || path[len] == '/')) { - path.replace(0, len, TQString::tqfromLatin1("$HOME")); + path.replace(0, len, TQString::fromLatin1("$HOME")); return true; } else return false; @@ -1135,7 +1135,7 @@ static TQString translatePath( TQString path ) // only "our" $HOME should be interpreted path.replace('$', "$$"); - bool startsWithFile = path.tqstartsWith("file:", false); + bool startsWithFile = path.startsWith("file:", false); // return original path, if it refers to another type of URL (e.g. http:/), or // if the path is already relative to another directory @@ -1189,7 +1189,7 @@ void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list, { if( list.isEmpty() ) { - writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent ); + writeEntry( pKey, TQString::fromLatin1(""), bPersistent ); return; } TQStringList new_list; @@ -1402,7 +1402,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list, { if( list.isEmpty() ) { - writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent ); + writeEntry( pKey, TQString::fromLatin1(""), bPersistent ); return; } TQString str_list; @@ -1424,7 +1424,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list, } str_list += sep; } - if( str_list.tqat(str_list.length() - 1) == (QChar)sep ) + if( str_list.at(str_list.length() - 1) == (QChar)sep ) str_list.truncate( str_list.length() -1 ); writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS ); } @@ -1449,7 +1449,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list, { if( list.isEmpty() ) { - writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent ); + writeEntry( pKey, TQString::fromLatin1(""), bPersistent ); return; } TQString str_list; @@ -1468,7 +1468,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list, } str_list += sep; } - if( str_list.tqat(str_list.length() - 1) == (QChar)sep ) + if( str_list.at(str_list.length() - 1) == (QChar)sep ) str_list.truncate( str_list.length() -1 ); writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand ); } diff --git a/tdecore/kconfigbase.h b/tdecore/kconfigbase.h index 01c758da5..2f41195aa 100644 --- a/tdecore/kconfigbase.h +++ b/tdecore/kconfigbase.h @@ -693,7 +693,7 @@ public: * and interpret it as a date and time. * * @param pKey The key to search for. - * @param pDefault A default value ( tqcurrentDateTime() by default) + * @param pDefault A default value ( currentDateTime() by default) * returned if the key was not found or if the read value cannot be * interpreted. * @return The value for this key. @@ -707,7 +707,7 @@ public: * and interpret it as a date and time. * * @param pKey The key to search for. - * @param pDefault A default value ( tqcurrentDateTime() by default) + * @param pDefault A default value ( currentDateTime() by default) * returned if the key was not found or if the read value cannot be * interpreted. * @return The value for this key. @@ -979,7 +979,7 @@ public: void writeEntry( const TQString& pKey, const char *pValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ) - { writeEntry(pKey, TQString::tqfromLatin1(pValue), bPersistent, bGlobal, bNLS); } + { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); } /** * Write a (key/value) pair. * @@ -1000,7 +1000,7 @@ public: void writeEntry( const char *pKey, const char *pValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ) - { writeEntry(pKey, TQString::tqfromLatin1(pValue), bPersistent, bGlobal, bNLS); } + { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); } /** * Write a (key/value) pair. diff --git a/tdecore/kconfigdialogmanager.cpp b/tdecore/kconfigdialogmanager.cpp index adebca525..82567ca0b 100644 --- a/tdecore/kconfigdialogmanager.cpp +++ b/tdecore/kconfigdialogmanager.cpp @@ -131,13 +131,13 @@ void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *it TQVariant minValue = item->minValue(); if (minValue.isValid()) { - if (widget->tqmetaObject()->findProperty("minValue", true) != -1) + if (widget->metaObject()->findProperty("minValue", true) != -1) widget->setProperty("minValue", minValue); } TQVariant maxValue = item->maxValue(); if (maxValue.isValid()) { - if (widget->tqmetaObject()->findProperty("maxValue", true) != -1) + if (widget->metaObject()->findProperty("maxValue", true) != -1) widget->setProperty("maxValue", maxValue); } if (TQWhatsThis::textFor( widget ).isEmpty()) @@ -189,7 +189,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang // it again using the super class name. This fixes a problem with using QtRuby/Korundum // widgets with KConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even // though it was a 'QWidget'. - changedIt = changedMap.find(childWidget->tqmetaObject()->tqsuperClassName()); + changedIt = changedMap.find(childWidget->metaObject()->superClassName()); } if (changedIt == changedMap.end()) diff --git a/tdecore/kconfigskeleton.h b/tdecore/kconfigskeleton.h index a43327da1..dde0779cf 100644 --- a/tdecore/kconfigskeleton.h +++ b/tdecore/kconfigskeleton.h @@ -376,7 +376,7 @@ public: ItemString(const TQString & group, const TQString & key, TQString & reference, - const TQString & defaultValue = TQString::tqfromLatin1(""), // NOT TQString::null !! + const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !! Type type = Normal); void writeConfig(KConfig * config); @@ -396,7 +396,7 @@ public: public: ItemPassword(const TQString & group, const TQString & key, TQString & reference, - const TQString & defaultValue = TQString::tqfromLatin1("")); // NOT TQString::null !! + const TQString & defaultValue = TQString::fromLatin1("")); // NOT TQString::null !! }; /** @@ -859,7 +859,7 @@ public: * @return The created item */ ItemString *addItemString(const TQString & name, TQString & reference, - const TQString & defaultValue = TQString::tqfromLatin1(""), // NOT TQString::null !! + const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !! const TQString & key = TQString::null); /** @@ -876,7 +876,7 @@ public: * @return The created item */ ItemPassword *addItemPassword(const TQString & name, TQString & reference, - const TQString & defaultValue = TQString::tqfromLatin1(""), + const TQString & defaultValue = TQString::fromLatin1(""), const TQString & key = TQString::null); /** @@ -893,7 +893,7 @@ public: * @return The created item */ ItemPath *addItemPath(const TQString & name, TQString & reference, - const TQString & defaultValue = TQString::tqfromLatin1(""), + const TQString & defaultValue = TQString::fromLatin1(""), const TQString & key = TQString::null); /** diff --git a/tdecore/kdcoppropertyproxy.cpp b/tdecore/kdcoppropertyproxy.cpp index 3742c509c..5908d8485 100644 --- a/tdecore/kdcoppropertyproxy.cpp +++ b/tdecore/kdcoppropertyproxy.cpp @@ -29,8 +29,8 @@ #include <tqiconset.h> #include <tqfont.h> #include <tqimage.h> -#include <tqbrush.h> -#include <tqpalette.h> +#include <brush.h> +#include <palette.h> #include <ctype.h> #include <assert.h> @@ -94,7 +94,7 @@ TQValueList<TQCString> KDCOPPropertyProxy::functions( TQObject *object ) res << "bool setProperty(TQCString name,TQVariant property)"; res << "TQValueList<TQCString> propertyNames(bool super)"; - TQMetaObject *metaObj = object->tqmetaObject(); + TQMetaObject *metaObj = object->metaObject(); TQStrList properties = metaObj->propertyNames( true ); TQStrListIterator it( properties ); for (; it.current(); ++it ) @@ -157,7 +157,7 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB stream >> b; TQValueList<TQCString> res; - TQStrList props = object->tqmetaObject()->propertyNames( static_cast<bool>( b ) ); + TQStrList props = object->metaObject()->propertyNames( static_cast<bool>( b ) ); TQStrListIterator it( props ); for (; it.current(); ++it ) res.append( it.current() ); @@ -328,7 +328,7 @@ bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQ else propName.truncate( propName.length() - 2 ); - if ( !object->tqmetaObject()->propertyNames( true ).contains( propName ) ) + if ( !object->metaObject()->propertyNames( true ).contains( propName ) ) return false; return true; diff --git a/tdecore/kde-config.cpp.cmake b/tdecore/kde-config.cpp.cmake index 3a042705d..8b3dd7afd 100644 --- a/tdecore/kde-config.cpp.cmake +++ b/tdecore/kde-config.cpp.cmake @@ -201,7 +201,7 @@ int main(int argc, char **argv) if (helptexts[index]) { printf("%s - %s\n", helptexts[index], i18n(helptexts[index+1]).local8Bit().data()); } else { - printf("%s", i18n("%1 - unknown type\n").tqarg(*it).local8Bit().data()); + printf("%s", i18n("%1 - unknown type\n").arg(*it).local8Bit().data()); } } return 0; @@ -226,7 +226,7 @@ int main(int argc, char **argv) else if ( type == "document" ) printResult(KGlobalSettings::documentPath()); else - fprintf(stderr, "%s", i18n("%1 - unknown type of userpath\n").tqarg(type).local8Bit().data() ); + fprintf(stderr, "%s", i18n("%1 - unknown type of userpath\n").arg(type).local8Bit().data() ); return 0; } diff --git a/tdecore/kde-config.cpp.in b/tdecore/kde-config.cpp.in index 4accfbc85..0fdf56e3d 100644 --- a/tdecore/kde-config.cpp.in +++ b/tdecore/kde-config.cpp.in @@ -32,7 +32,7 @@ bool _expandvars = false; TQString expandvars(const char *_input) { - TQString result = TQString::tqfromLatin1(_input); + TQString result = TQString::fromLatin1(_input); if (!_expandvars) return result; diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index ed1a3d60d..299ee8a80 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -43,7 +43,7 @@ #include <tqregion.h> #include <tqstringlist.h> #include <tqpen.h> -#include <tqbrush.h> +#include <brush.h> #include <tqsize.h> #include <kurl.h> @@ -373,7 +373,7 @@ kdbgstream& kdbgstream::operator << (TQChar ch) { if (!print) return *this; if (!ch.isPrint()) - output += "\\x" + TQString::number( ch.tqunicode(), 16 ).rightJustify(2, '0'); + output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0'); else { output += ch; if (ch == (QChar)'\n') flush(); @@ -415,7 +415,7 @@ kdbgstream& kdbgstream::operator << (const TQWidget* widget) return *this; } output += string; - if (output.tqat(output.length() -1 ) == (QChar)'\n') + if (output.at(output.length() -1 ) == (QChar)'\n') { flush(); } @@ -454,7 +454,7 @@ kdbgstream& kdbgstream::operator<<( const TQRect& r ) { kdbgstream& kdbgstream::operator<<( const TQRegion& reg ) { *this<< "[ "; - TQMemArray<TQRect>rs=reg.tqrects(); + TQMemArray<TQRect>rs=reg.rects(); for (uint i=0;i<rs.size();++i) *this << TQString(TQString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() )) ; @@ -567,8 +567,8 @@ TQString kdBacktrace(int levels) for (int i = 0; i < n; ++i) s += TQString::number(i) + - TQString::tqfromLatin1(": ") + - TQString::tqfromLatin1(strings[i]) + TQString::tqfromLatin1("\n"); + TQString::fromLatin1(": ") + + TQString::fromLatin1(strings[i]) + TQString::fromLatin1("\n"); s += "]\n"; if (strings) free (strings); diff --git a/tdecore/kdebug.h b/tdecore/kdebug.h index fc9bb1294..477e8e43f 100644 --- a/tdecore/kdebug.h +++ b/tdecore/kdebug.h @@ -85,7 +85,7 @@ class TDECORE_EXPORT kdbgstream { kdbgstream(unsigned int _area, unsigned int _level, bool _print = true) : area(_area), level(_level), print(_print) { } kdbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = true) : - output(TQString::tqfromLatin1(initialString)), area(_area), level(_level), print(_print) { } + output(TQString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { } /// Copy constructor kdbgstream(kdbgstream &str); kdbgstream(const kdbgstream &str) : @@ -98,7 +98,7 @@ class TDECORE_EXPORT kdbgstream { */ kdbgstream &operator<<(bool i) { if (!print) return *this; - output += TQString::tqfromLatin1(i ? "true" : "false"); + output += TQString::fromLatin1(i ? "true" : "false"); return *this; } /** @@ -216,7 +216,7 @@ class TDECORE_EXPORT kdbgstream { kdbgstream &operator<<(const TQString& string) { if (!print) return *this; output += string; - if (output.tqat(output.length() -1 ) == (TQChar)'\n') + if (output.at(output.length() -1 ) == (TQChar)'\n') flush(); return *this; } @@ -228,7 +228,7 @@ class TDECORE_EXPORT kdbgstream { kdbgstream &operator<<(const char *string) { if (!print) return *this; output += TQString::fromUtf8(string); - if (output.tqat(output.length() - 1) == (TQChar)'\n') + if (output.at(output.length() - 1) == (TQChar)'\n') flush(); return *this; } diff --git a/tdecore/kdesktopfile.cpp b/tdecore/kdesktopfile.cpp index 431a65578..31654134c 100644 --- a/tdecore/kdesktopfile.cpp +++ b/tdecore/kdesktopfile.cpp @@ -26,7 +26,7 @@ #include <tqfile.h> #include <tqdir.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kdebug.h> #include "kurl.h" @@ -42,7 +42,7 @@ KDesktopFile::KDesktopFile(const TQString &fileName, bool bReadOnly, const char * resType) - : KConfig(TQString::tqfromLatin1(""), bReadOnly, false) + : KConfig(TQString::fromLatin1(""), bReadOnly, false) { // KConfigBackEnd will try to locate the filename that is provided // based on the resource type specified, _only_ if the filename @@ -114,9 +114,9 @@ bool KDesktopFile::isDesktopFile(const TQString& path) { int len = path.length(); - if(len > 8 && path.right(8) == TQString::tqfromLatin1(".desktop")) + if(len > 8 && path.right(8) == TQString::fromLatin1(".desktop")) return true; - else if(len > 7 && path.right(7) == TQString::tqfromLatin1(".kdelnk")) + else if(len > 7 && path.right(7) == TQString::fromLatin1(".kdelnk")) return true; else return false; @@ -156,7 +156,7 @@ TQString KDesktopFile::translatedEntry(const char* key) const TQString value = readEntryUntranslated(key); TQString fName = fileName(); fName = fName.mid(fName.findRev('/')+1); - TQString po_lookup_key = TQString::tqfromLatin1(key) + "(" + fName + "): " + value; + TQString po_lookup_key = TQString::fromLatin1(key) + "(" + fName + "): " + value; TQString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data()); if (po_value == po_lookup_key) @@ -241,33 +241,33 @@ TQStringList KDesktopFile::readActions() const void KDesktopFile::setActionGroup(const TQString &group) { - setGroup(TQString::tqfromLatin1("Desktop Action ") + group); + setGroup(TQString::fromLatin1("Desktop Action ") + group); } bool KDesktopFile::hasActionGroup(const TQString &group) const { - return hasGroup(TQString::tqfromLatin1("Desktop Action ") + group); + return hasGroup(TQString::fromLatin1("Desktop Action ") + group); } bool KDesktopFile::hasLinkType() const { - return readEntry("Type") == TQString::tqfromLatin1("Link"); + return readEntry("Type") == TQString::fromLatin1("Link"); } bool KDesktopFile::hasApplicationType() const { - return readEntry("Type") == TQString::tqfromLatin1("Application"); + return readEntry("Type") == TQString::fromLatin1("Application"); } bool KDesktopFile::hasMimeTypeType() const { - return readEntry("Type") == TQString::tqfromLatin1("MimeType"); + return readEntry("Type") == TQString::fromLatin1("MimeType"); } bool KDesktopFile::hasDeviceType() const { - return readEntry("Type") == TQString::tqfromLatin1("FSDev") || - readEntry("Type") == TQString::tqfromLatin1("FSDevice"); + return readEntry("Type") == TQString::fromLatin1("FSDev") || + readEntry("Type") == TQString::fromLatin1("FSDevice"); } bool KDesktopFile::tryExec() const diff --git a/tdecore/kextsock.cpp b/tdecore/kextsock.cpp index 5aad239bd..fcda490b8 100644 --- a/tdecore/kextsock.cpp +++ b/tdecore/kextsock.cpp @@ -248,7 +248,7 @@ void KExtendedSocket::setSocketStatus(int newstatus) void KExtendedSocket::setError(int errorcode, int syserror) { - setqStatus(errorcode); + seStatus(errorcode); d->syserror = syserror; } diff --git a/tdecore/kgenericfactory.tcc b/tdecore/kgenericfactory.tcc index c3afb1b5a..330af8aa2 100644 --- a/tdecore/kgenericfactory.tcc +++ b/tdecore/kgenericfactory.tcc @@ -125,13 +125,13 @@ namespace KDEPrivate TQObject *parent, const char *name, const char *className, const TQStringList &args ) { - TQMetaObject *tqmetaObject = Product::tqstaticMetaObject(); - while ( tqmetaObject ) + TQMetaObject *metaObject = Product::staticMetaObject(); + while ( metaObject ) { - if ( !qstrcmp( className, tqmetaObject->className() ) ) + if ( !qstrcmp( className, metaObject->className() ) ) return create( parentWidget, widgetName, parent, name, args, Type2Type<BaseType>() ); - tqmetaObject = tqmetaObject->tqsuperClass(); + metaObject = metaObject->superClass(); } return 0; } diff --git a/tdecore/kglobal.cpp b/tdecore/kglobal.cpp index d64974be4..b886d8d7f 100644 --- a/tdecore/kglobal.cpp +++ b/tdecore/kglobal.cpp @@ -127,7 +127,7 @@ void KGlobal::setActiveInstance(KInstance *i) const TQString & KGlobal::staticQString(const char *str) { - return staticQString(TQString::tqfromLatin1(str)); + return staticQString(TQString::fromLatin1(str)); } class KStringDict : public TQDict<TQString> diff --git a/tdecore/kglobalaccel_win.cpp b/tdecore/kglobalaccel_win.cpp index 674f09671..8b0c81f1a 100644 --- a/tdecore/kglobalaccel_win.cpp +++ b/tdecore/kglobalaccel_win.cpp @@ -311,14 +311,14 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) { int n = rexIndex.cap(1).toInt(); kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl; - int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { QUObject o[2]; static_QUType_int.set(o+1,n); const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { QUObject o[4]; static_QUType_QString.set(o+1,pAction->name()); @@ -327,7 +327,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 ); } diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp index c2f7a3829..ce248ae02 100644 --- a/tdecore/kglobalaccel_x11.cpp +++ b/tdecore/kglobalaccel_x11.cpp @@ -287,7 +287,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) - << (pAction ? TQString(" name: \"%1\" shortcut: %2").tqarg(pAction->name()).tqarg(pAction->shortcut().toStringInternal()) : TQString()) + << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; } #endif @@ -365,7 +365,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) - << (pAction ? TQString(" name: \"%1\" shortcut: %2").tqarg(pAction->name()).tqarg(pAction->shortcut().toStringInternal()) : TQString()) + << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; } #endif @@ -407,14 +407,14 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) { int n = rexIndex.cap(1).toInt(); kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl; - int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { TQUObject o[2]; static_TQUType_int.set(o+1,n); const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { TQUObject o[4]; static_TQUType_TQString.set(o+1,pAction->name()); @@ -423,7 +423,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 ); } diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index d539f56c9..ab5292684 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -50,8 +50,8 @@ static QRgb qt_colorref2qrgb(COLORREF col) #include <stdlib.h> #include <kprotocolinfo.h> -#include <tqtextcodec.h> -#include <tqtextstream.h> +#include <textcodec.h> +#include <textstream.h> #include <tqfile.h> #ifdef Q_WS_X11 @@ -451,7 +451,7 @@ TQFont KGlobalSettings::taskbarFont() TQFont KGlobalSettings::largeFont(const TQString &text) { TQFontDatabase db; - TQStringList fam = db.tqfamilies(); + TQStringList fam = db.families(); // Move a bunch of preferred fonts to the front. if (fam.remove("Arial")) diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index 9c76c7e4d..c8d088918 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -153,8 +153,8 @@ TQString KIconEffect::fingerprint(int group, int state) const cached += ':'; cached += tmp.setNum(mValue[group][state]); cached += ':'; - cached += mTrans[group][state] ? TQString::tqfromLatin1("trans") - : TQString::tqfromLatin1("notrans"); + cached += mTrans[group][state] ? TQString::fromLatin1("trans") + : TQString::fromLatin1("notrans"); if (mEffect[group][state] == Colorize || mEffect[group][state] == ToMonochrome) { cached += ':'; @@ -742,7 +742,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect) TQPainter p(widget); - // Use NotROP to avoid having to tqrepaint the pixmap each time. + // Use NotROP to avoid having to repaint the pixmap each time. p.setPen(TQPen(Qt::black, 2, Qt::DotLine)); p.setRasterOp(TQt::NotROP); diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp index 317a56add..3c5cf7135 100644 --- a/tdecore/kiconloader.cpp +++ b/tdecore/kiconloader.cpp @@ -223,7 +223,7 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs ) { if (groups[i] == 0L) break; - config->setGroup(TQString::tqfromLatin1(groups[i]) + "Icons"); + config->setGroup(TQString::fromLatin1(groups[i]) + "Icons"); d->mpGroups[i].size = config->readNumEntry("Size", 0); d->mpGroups[i].dblPixels = config->readBoolEntry("DoublePixels", false); if (TQPixmap::defaultDepth()>8) @@ -686,9 +686,9 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si { key += d->mpEffect.fingerprint(group, state); if (d->mpGroups[group].dblPixels) - key += TQString::tqfromLatin1(":dblsize"); + key += TQString::fromLatin1(":dblsize"); } else - key += TQString::tqfromLatin1("noeffect"); + key += TQString::fromLatin1("noeffect"); key += '_'; key += overlayStr; diff --git a/tdecore/kicontheme.cpp b/tdecore/kicontheme.cpp index 0f7d3b605..d30e254d0 100644 --- a/tdecore/kicontheme.cpp +++ b/tdecore/kicontheme.cpp @@ -451,13 +451,13 @@ TQString KIconTheme::current() KConfig *config = KGlobal::config(); KConfigGroupSaver saver(config, "Icons"); *_theme = config->readEntry("Theme",defaultThemeName()); - if ( *_theme == TQString::tqfromLatin1("hicolor") ) *_theme = defaultThemeName(); + if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName(); /* if (_theme->isEmpty()) { if (TQPixmap::defaultDepth() > 8) *_theme = defaultThemeName(); else - *_theme = TQString::tqfromLatin1("locolor"); + *_theme = TQString::fromLatin1("locolor"); }*/ return *_theme; } @@ -511,7 +511,7 @@ void KIconTheme::reconfigure() // static TQString KIconTheme::defaultThemeName() { - return TQString::tqfromLatin1("crystalsvg"); + return TQString::fromLatin1("crystalsvg"); } /*** KIconThemeDir ***/ diff --git a/tdecore/kidna.cpp b/tdecore/kidna.cpp index 1ce2c1348..ca41fecdf 100644 --- a/tdecore/kidna.cpp +++ b/tdecore/kidna.cpp @@ -43,12 +43,12 @@ TQString KIDNA::toAscii(const TQString &idna) { if (idna.length() && (idna[0] == (QChar)'.')) { - TQString host = TQString::tqfromLatin1(toAsciiCString(idna.mid(1))); + TQString host = TQString::fromLatin1(toAsciiCString(idna.mid(1))); if (host.isEmpty()) return TQString::null; // Error return idna[0] + host; } - return TQString::tqfromLatin1(toAsciiCString(idna)); + return TQString::fromLatin1(toAsciiCString(idna)); } TQString KIDNA::toUnicode(const TQString &idna) diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp index 440fbb5e3..8fa37ebcf 100644 --- a/tdecore/kkeyserver_x11.cpp +++ b/tdecore/kkeyserver_x11.cpp @@ -406,7 +406,7 @@ bool Sym::initQt( int keyQt ) int symQt = keyQt & 0xffff; if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) { - m_sym = TQChar(symQt).lower().tqunicode(); + m_sym = TQChar(symQt).lower().unicode(); return true; } @@ -434,9 +434,9 @@ bool Sym::initQt( int keyQt ) 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 ) { - m_sym = s[0].lower().tqunicode(); + m_sym = s[0].lower().unicode(); return true; } @@ -498,7 +498,7 @@ TQString Sym::toString( bool bUserSpace ) const if( m_sym == 0 ) return TQString::null; - // If it's a tqunicode character, + // If it's a unicode character, #ifdef Q_WS_WIN else if( m_sym < 0x1000 ) { #else @@ -542,7 +542,7 @@ uint Sym::getModsRequired() const if( m_sym < 0x3000 ) { 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; } @@ -823,7 +823,7 @@ uint stringUserToMod( const TQString& mod ) // Get code of just the primary key 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 ) { // For reasons unbeknownst to me, Qt converts 'a-z' to 'A-Z'. // 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( 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. // Ex. Shift+Plus => Plus (en) diff --git a/tdecore/klibloader.cpp b/tdecore/klibloader.cpp index 290e23154..ae7bda67f 100644 --- a/tdecore/klibloader.cpp +++ b/tdecore/klibloader.cpp @@ -19,7 +19,7 @@ #include "config.h" #include <config.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqfile.h> #include <tqdir.h> #include <tqtimer.h> @@ -549,17 +549,17 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) We need to make sure to clear the clipboard before unloading a DSO because the DSO could have defined an object derived from QMimeSource and placed that on the clipboard. */ - /*kapp->tqclipboard()->clear();*/ + /*kapp->clipboard()->clear();*/ /* 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. */ - if( kapp->tqclipboard()->ownsSelection()) { - kapp->tqclipboard()->setText( - kapp->tqclipboard()->text( TQClipboard::Selection ), TQClipboard::Selection ); + if( kapp->clipboard()->ownsSelection()) { + kapp->clipboard()->setText( + kapp->clipboard()->text( TQClipboard::Selection ), TQClipboard::Selection ); } - if( kapp->tqclipboard()->ownsClipboard()) { - kapp->tqclipboard()->setText( - kapp->tqclipboard()->text( TQClipboard::Clipboard ), TQClipboard::Clipboard ); + if( kapp->clipboard()->ownsClipboard()) { + kapp->clipboard()->setText( + kapp->clipboard()->text( TQClipboard::Clipboard ), TQClipboard::Clipboard ); } } diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp index 114746d0f..bd130fb68 100644 --- a/tdecore/klocale.cpp +++ b/tdecore/klocale.cpp @@ -25,7 +25,7 @@ #include <stdlib.h> // getenv -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqfile.h> #include <tqprinter.h> #include <tqdatetime.h> @@ -123,7 +123,7 @@ void KLocale::initMainCatalogues(const TQString & catalog) // don't use main catalogue if we're looking up .desktop translations if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { if (maincatalogue) { - mainCatalogue = TQString::tqfromLatin1(maincatalogue); + mainCatalogue = TQString::fromLatin1(maincatalogue); } } @@ -312,13 +312,13 @@ void KLocale::initFormat() KConfigGroupSaver saver(config, "Locale"); KSimpleConfig entry(locate("locale", - TQString::tqfromLatin1("l10n/%1/entry.desktop") + TQString::fromLatin1("l10n/%1/entry.desktop") .arg(m_country)), true); entry.setGroup("KCM Locale"); // Numeric #define readConfigEntry(key, default, save) \ - save = entry.readEntry(key, TQString::tqfromLatin1(default)); \ + save = entry.readEntry(key, TQString::fromLatin1(default)); \ save = config->readEntry(key, save); #define readConfigNumEntry(key, default, save, type) \ @@ -331,7 +331,7 @@ void KLocale::initFormat() readConfigEntry("DecimalSymbol", ".", m_decimalSymbol); readConfigEntry("ThousandsSeparator", ",", m_thousandsSeparator); - m_thousandsSeparator.replace( TQString::tqfromLatin1("$0"), TQString() ); + m_thousandsSeparator.replace( TQString::fromLatin1("$0"), TQString() ); //kdDebug(173) << "m_thousandsSeparator=" << m_thousandsSeparator << endl; readConfigEntry("PositiveSign", "", m_positiveSign); @@ -342,7 +342,7 @@ void KLocale::initFormat() readConfigEntry("MonetaryDecimalSymbol", ".", m_monetaryDecimalSymbol); readConfigEntry("MonetaryThousandsSeparator", ",", m_monetaryThousandsSeparator); - m_monetaryThousandsSeparator.replace(TQString::tqfromLatin1("$0"), TQString()); + m_monetaryThousandsSeparator.replace(TQString::fromLatin1("$0"), TQString()); readConfigNumEntry("FracDigits", 2, m_fracDigits, int); readConfigBoolEntry("PositivePrefixCurrencySymbol", true, @@ -372,7 +372,7 @@ void KLocale::initFormat() //Grammatical //Precedence here is l10n / i18n / config file KSimpleConfig language(locate("locale", - TQString::tqfromLatin1("%1/entry.desktop") + TQString::fromLatin1("%1/entry.desktop") .arg(m_language)), true); language.setGroup("KCM Locale"); #define read3ConfigBoolEntry(key, default, save) \ @@ -404,7 +404,7 @@ bool KLocale::setCountry(const TQString & country) TQString KLocale::catalogueFileName(const TQString & language, const KCatalogue & catalog) { - TQString path = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo") + TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo") .arg( language ) .arg( catalog.name() ); @@ -497,7 +497,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language) TQString appName = d->appName; if (maincatalogue) { - appName = TQString::tqfromLatin1(maincatalogue); + appName = TQString::fromLatin1(maincatalogue); } // sorry, catalogueFileName requires catalog object,k which we do not have here // path finding was supposed to be moved completely to KCatalogue. The interface cannot @@ -505,7 +505,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language) // duplicated code for file path evaluation. Cleanup will follow later. We could have e.g. // a static method in KCataloge that can translate between these file names. // a stat - TQString sFileName = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo") + TQString sFileName = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo") .arg( language ) .arg( appName ); // kdDebug() << "isApplicationTranslatedInto: filename " << sFileName << endl; @@ -1103,7 +1103,7 @@ KLocale::SignPosition KLocale::negativeMonetarySignPosition() const static inline void put_it_in( TQChar *buffer, uint& index, const TQString &s ) { for ( uint l = 0; l < s.length(); l++ ) - buffer[index++] = s.tqat( l ); + buffer[index++] = s.at( l ); } static inline void put_it_in( TQChar *buffer, uint& index, int number ) @@ -1352,14 +1352,14 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const { if ( !escape ) { - if ( (TQChar(rst.tqat( format_index )).tqunicode()) == '%' ) + if ( (TQChar(rst.at( format_index )).unicode()) == '%' ) escape = true; else - buffer.append(rst.tqat(format_index)); + buffer.append(rst.at(format_index)); } else { - switch ( TQChar(rst.tqat( format_index )).tqunicode() ) + switch ( TQChar(rst.at( format_index )).unicode() ) { case '%': buffer.append('%'); @@ -1401,7 +1401,7 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const buffer.append(calendar()->weekDayName(pDate, false)); break; default: - buffer.append(rst.tqat(format_index)); + buffer.append(rst.at(format_index)); break; } escape = false; @@ -1583,12 +1583,12 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const */ static int readInt(const TQString &str, uint &pos) { - if (!str.tqat(pos).isDigit()) return -1; + if (!str.at(pos).isDigit()) return -1; int result = 0; - for (; str.length() > pos && str.tqat(pos).isDigit(); pos++) + for (; str.length() > pos && str.at(pos).isDigit(); pos++) { result *= 10; - result += str.tqat(pos).digitValue(); + result += str.at(pos).digitValue(); } return result; @@ -1625,22 +1625,22 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) while (fmt.length() > fmtpos && str.length() > strpos && !error) { - TQChar c = fmt.tqat(fmtpos++); + TQChar c = fmt.at(fmtpos++); if (c != (QChar)'%') { - if (c.isSpace() && str.tqat(strpos).isSpace()) + if (c.isSpace() && str.at(strpos).isSpace()) strpos++; - else if (c != str.tqat(strpos++)) + else if (c != str.at(strpos++)) error = true; } else { int j; // remove space at the beginning - if (str.length() > strpos && str.tqat(strpos).isSpace()) + if (str.length() > strpos && str.at(strpos).isSpace()) strpos++; - c = fmt.tqat(fmtpos++); + c = fmt.at(fmtpos++); switch (c) { case 'a': @@ -1765,22 +1765,22 @@ TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) { if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error; - TQChar c = Format.tqat(Formatpos++); + TQChar c = Format.at(Formatpos++); if (c != (QChar)'%') { if (c.isSpace()) strpos++; - else if (c != str.tqat(strpos++)) + else if (c != str.at(strpos++)) goto error; continue; } // remove space at the beginning - if (str.length() > strpos && str.tqat(strpos).isSpace()) + if (str.length() > strpos && str.at(strpos).isSpace()) strpos++; - c = Format.tqat(Formatpos++); + c = Format.at(Formatpos++); switch (c) { case 'p': @@ -1876,14 +1876,14 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat { if ( !escape ) { - if ( (TQChar(rst.tqat( format_index )).tqunicode()) == '%' ) + if ( (TQChar(rst.at( format_index )).unicode()) == '%' ) escape = true; else - buffer[index++] = rst.tqat( format_index ); + buffer[index++] = rst.at( format_index ); } else { - switch ( TQChar(rst.tqat( format_index )).tqunicode() ) + switch ( TQChar(rst.at( format_index )).unicode() ) { case '%': buffer[index++] = (QChar)'%'; @@ -1915,7 +1915,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat number = pTime.hour(); case 'l': // to share the code - if ( (TQChar(rst.tqat( format_index )).tqunicode()) == 'l' ) + if ( (TQChar(rst.at( format_index )).unicode()) == 'l' ) number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1; if ( number / 10 ) buffer[index++] = number / 10 + '0'; @@ -1932,7 +1932,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat } break; default: - buffer[index++] = rst.tqat( format_index ); + buffer[index++] = rst.at( format_index ); break; } escape = false; @@ -1948,8 +1948,8 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat bool KLocale::use12Clock() const { - if ((timeFormat().contains(TQString::tqfromLatin1("%I")) > 0) || - (timeFormat().contains(TQString::tqfromLatin1("%l")) > 0)) + if ((timeFormat().contains(TQString::fromLatin1("%I")) > 0) || + (timeFormat().contains(TQString::fromLatin1("%l")) > 0)) return true; else return false; @@ -1957,7 +1957,7 @@ bool KLocale::use12Clock() const TQString KLocale::languages() const { - return d->languageList.join( TQString::tqfromLatin1(":") ); + return d->languageList.join( TQString::fromLatin1(":") ); } TQStringList KLocale::languageList() const @@ -2008,7 +2008,7 @@ void KLocale::initInstance() KInstance *app = KGlobal::instance(); if (app) { - KGlobal::_locale = new KLocale(TQString::tqfromLatin1(app->instanceName())); + KGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName())); // only do this for the global instance TQTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding()); @@ -2265,12 +2265,12 @@ void KLocale::setMeasureSystem(MeasureSystem value) TQString KLocale::defaultLanguage() { - return TQString::tqfromLatin1("en_US"); + return TQString::fromLatin1("en_US"); } TQString KLocale::defaultCountry() { - return TQString::tqfromLatin1("C"); + return TQString::fromLatin1("C"); } const char * KLocale::encoding() const @@ -2325,7 +2325,7 @@ TQStringList KLocale::languagesTwoAlpha() const TQStringList result; - KConfig config(TQString::tqfromLatin1("language.codes"), true, false); + KConfig config(TQString::fromLatin1("language.codes"), true, false); config.setGroup("TwoLetterCodes"); for ( TQStringList::ConstIterator it = origList.begin(); @@ -2466,7 +2466,7 @@ KLocale & KLocale::operator=(const KLocale & rhs) } bool KLocale::setCharset(const TQString & ) { return true; } -TQString KLocale::charset() const { return TQString::tqfromLatin1("UTF-8"); } +TQString KLocale::charset() const { return TQString::fromLatin1("UTF-8"); } // KDE4: remove #if 0 diff --git a/tdecore/klockfile.cpp b/tdecore/klockfile.cpp index 3bd6edb30..f1b7f9964 100644 --- a/tdecore/klockfile.cpp +++ b/tdecore/klockfile.cpp @@ -34,7 +34,7 @@ #include <unistd.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kde_file.h> #include <kapplication.h> diff --git a/tdecore/kmacroexpander.cpp b/tdecore/kmacroexpander.cpp index c7717029c..2a997deaa 100644 --- a/tdecore/kmacroexpander.cpp +++ b/tdecore/kmacroexpander.cpp @@ -56,7 +56,7 @@ void KMacroExpanderBase::expandMacros( TQString &str ) for (pos = 0; pos < str.length(); ) { if (ec != (QChar)0) { - if (str.tqunicode()[pos] != ec) + if (str.unicode()[pos] != ec) goto nohit; if (!(len = expandEscapedMacro( str, pos, rst ))) goto nohit; @@ -109,7 +109,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos ) TQString rsts; while (pos < str.length()) { - TQChar cc( str.tqunicode()[pos] ); + TQChar cc( str.unicode()[pos] ); if (ec != (QChar)0) { if (cc != ec) goto nohit; @@ -205,7 +205,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos ) pos = pos2; return false; } - cc = str.tqunicode()[pos2]; + cc = str.unicode()[pos2]; if (cc == (QChar)'`') break; if (cc == (QChar)'\\') { @@ -383,14 +383,14 @@ template<class VT> int 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; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.find( TQConstString( str.tqunicode() + pos, sl ).string() ); + macromap.find( TQConstString( str.unicode() + pos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return sl; @@ -415,13 +415,13 @@ KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint po rsl = sl + 3; } else { rpos = pos + 1; - for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.find( TQConstString( str.tqunicode() + rpos, sl ).string() ); + macromap.find( TQConstString( str.unicode() + rpos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return rsl; @@ -454,13 +454,13 @@ KCharMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL int KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - if (isIdentifier( str[pos - 1].tqunicode() )) + if (isIdentifier( str[pos - 1].unicode() )) return 0; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); if (!sl) return 0; - if (expandMacro( TQConstString( str.tqunicode() + pos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.unicode() + pos, sl ).string(), ret )) return sl; return 0; } @@ -481,12 +481,12 @@ KWordMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL rsl = sl + 3; } else { rpos = pos + 1; - for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; - if (expandMacro( TQConstString( str.tqunicode() + rpos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret )) return rsl; return 0; } diff --git a/tdecore/knotifyclient.cpp b/tdecore/knotifyclient.cpp index c219cef28..e07522fca 100644 --- a/tdecore/knotifyclient.cpp +++ b/tdecore/knotifyclient.cpp @@ -86,7 +86,7 @@ static int sendNotifyEvent(const TQString &message, const TQString &text, // knotify daemon needs toplevel window TQWidget* widget = TQT_TQWIDGET(TQWidget::find( (WId)winId )); if( widget ) - winId = (int)widget->tqtopLevelWidget()->winId(); + winId = (int)widget->topLevelWidget()->winId(); TQByteArray data; TQDataStream ds(data, IO_WriteOnly); @@ -126,20 +126,20 @@ int KNotifyClient::event( int winId, StandardEvent type, const TQString& text ) TQString message; switch ( type ) { case cannotOpenFile: - message = TQString::tqfromLatin1("cannotopenfile"); + message = TQString::fromLatin1("cannotopenfile"); break; case warning: - message = TQString::tqfromLatin1("warning"); + message = TQString::fromLatin1("warning"); break; case fatalError: - message = TQString::tqfromLatin1("fatalerror"); + message = TQString::fromLatin1("fatalerror"); break; case catastrophe: - message = TQString::tqfromLatin1("catastrophe"); + message = TQString::fromLatin1("catastrophe"); break; case notification: // fall through default: - message = TQString::tqfromLatin1("notification"); + message = TQString::fromLatin1("notification"); break; } diff --git a/tdecore/kpalette.cpp b/tdecore/kpalette.cpp index 9cc7b5635..8cd25569b 100644 --- a/tdecore/kpalette.cpp +++ b/tdecore/kpalette.cpp @@ -22,7 +22,7 @@ #include "kpalette.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kstandarddirs.h> #include <kglobal.h> #include <ksavefile.h> @@ -176,7 +176,7 @@ KPalette::color(int index) if ((index < 0) || (index >= nrColors())) return TQColor(); - kolor *node = mKolorList.tqat(index); + kolor *node = mKolorList.at(index); if (!node) return TQColor(); @@ -202,7 +202,7 @@ KPalette::colorName(int index) if ((index < 0) || (index >= nrColors())) return TQString::null; - kolor *node = mKolorList.tqat(index); + kolor *node = mKolorList.at(index); if (!node) return TQString::null; @@ -227,7 +227,7 @@ KPalette::changeColor(int index, if ((index < 0) || (index >= nrColors())) return -1; - kolor *node = mKolorList.tqat(index); + kolor *node = mKolorList.at(index); if (!node) return -1; diff --git a/tdecore/kprocctrl.cpp b/tdecore/kprocctrl.cpp index 6774eee5f..d8170c0a8 100644 --- a/tdecore/kprocctrl.cpp +++ b/tdecore/kprocctrl.cpp @@ -214,7 +214,7 @@ void KProcessController::slotDoHousekeeping() if( waitpid( *uit, 0, WNOHANG ) > 0 ) { uit = unixProcessList.remove( uit ); - deref(); // counterpart to addProcess, can tqinvalidate 'this' + deref(); // counterpart to addProcess, can invalidate 'this' } else ++uit; } diff --git a/tdecore/kprocess.h b/tdecore/kprocess.h index 65496bf10..7e9941717 100644 --- a/tdecore/kprocess.h +++ b/tdecore/kprocess.h @@ -606,7 +606,7 @@ signals: * data structures before returning from the slot. * Example: * \code - * TQString myBuf = TQString::tqfromLatin1(buffer, buflen); + * TQString myBuf = TQString::fromLatin1(buffer, buflen); * \endcode **/ void receivedStdout(KProcess *proc, char *buffer, int buflen); diff --git a/tdecore/kprocio.cpp b/tdecore/kprocio.cpp index 9159edab5..6b6d4b366 100644 --- a/tdecore/kprocio.cpp +++ b/tdecore/kprocio.cpp @@ -27,7 +27,7 @@ #include "kprocio.h" #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> class KProcIOPrivate { public: diff --git a/tdecore/kprocio.h b/tdecore/kprocio.h index 6c3d482bb..3dceb9c1b 100644 --- a/tdecore/kprocio.h +++ b/tdecore/kprocio.h @@ -35,7 +35,7 @@ class TQTextCodec; * buffer and maintained/freed appropriately. There is no need * to be concerned with wroteStdin() signals _at_all_. * @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(). * diff --git a/tdecore/kprotocolinfo_tdecore.cpp b/tdecore/kprotocolinfo_tdecore.cpp index 93692c735..943ad1b9a 100644 --- a/tdecore/kprotocolinfo_tdecore.cpp +++ b/tdecore/kprotocolinfo_tdecore.cpp @@ -392,7 +392,7 @@ TQString KProtocolInfo::icon( const TQString& _protocol ) { KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol); if ( !prot ) - return TQString::tqfromLatin1("unknown"); + return TQString::fromLatin1("unknown"); return prot->m_icon; } diff --git a/tdecore/kregexp.h b/tdecore/kregexp.h index 8e6baac98..cc5ff0ea6 100644 --- a/tdecore/kregexp.h +++ b/tdecore/kregexp.h @@ -30,7 +30,7 @@ class KRegExpPrivate; * * This was implemented * 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. * * Back-references are parts of a regexp grouped with parentheses. If a @@ -53,7 +53,7 @@ class KRegExpPrivate; * Weis * \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> */ diff --git a/tdecore/krfcdate.cpp b/tdecore/krfcdate.cpp index dabdc7afa..d9a374d0c 100644 --- a/tdecore/krfcdate.cpp +++ b/tdecore/krfcdate.cpp @@ -394,7 +394,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) mday = l[2].toUInt(); // Z suffix means UTC. - if ((QChar)'Z' == timeString.tqat(timeString.length() - 1)) { + if ((QChar)'Z' == timeString.at(timeString.length() - 1)) { timeString.remove(timeString.length() - 1, 1); } diff --git a/tdecore/krootprop.cpp b/tdecore/krootprop.cpp index 031e27abf..9661875b7 100644 --- a/tdecore/krootprop.cpp +++ b/tdecore/krootprop.cpp @@ -27,7 +27,7 @@ #include "klocale.h" #include "kcharsets.h" #include "kapplication.h" -#include <tqtextstream.h> +#include <textstream.h> #include <X11/Xlib.h> #include <X11/Xatom.h> diff --git a/tdecore/ksavefile.cpp b/tdecore/ksavefile.cpp index 72625a9ca..cddf44bc5 100644 --- a/tdecore/ksavefile.cpp +++ b/tdecore/ksavefile.cpp @@ -55,7 +55,7 @@ KSaveFile::KSaveFile(const TQString &filename, int mode) return; } - if (mTempFile.create(real_filename, TQString::tqfromLatin1(".new"), mode)) + if (mTempFile.create(real_filename, TQString::fromLatin1(".new"), mode)) { mFileName = real_filename; // Set filename upon success diff --git a/tdecore/ksavefile.h b/tdecore/ksavefile.h index 7cf4bc7e9..e035115a9 100644 --- a/tdecore/ksavefile.h +++ b/tdecore/ksavefile.h @@ -140,7 +140,7 @@ public: */ static bool backupFile( const TQString& filename, const TQString& backupDir = TQString::null, - const TQString& backupExtension = TQString::tqfromLatin1( "~" ) ); + const TQString& backupExtension = TQString::fromLatin1( "~" ) ); private: TQString mFileName; diff --git a/tdecore/kshell.cpp b/tdecore/kshell.cpp index 9a9aacfbe..7e4eda947 100644 --- a/tdecore/kshell.cpp +++ b/tdecore/kshell.cpp @@ -72,7 +72,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) do { if (pos >= args.length()) goto okret; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; } while (c.isSpace()); TQString cret; if ((flags & TildeExpand) && c == (QChar)'~') { @@ -80,7 +80,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) for (; ; pos++) { if (pos >= args.length()) break; - c = args.tqunicode()[pos]; + c = args.unicode()[pos]; if (c == (QChar)'/' || c.isSpace()) break; if (isQuoteMeta( c )) { @@ -91,7 +91,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) if ((flags & AbortOnMeta) && isMeta( c )) 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()) { pos = opos; c = (QChar)'~'; @@ -129,20 +129,20 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) do { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; } 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)'"') { for (;;) { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; if (c == (QChar)'"') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; if (c != (QChar)'"' && c != (QChar)'\\' && !((flags & AbortOnMeta) && (c == (QChar)'$' || c == (QChar)'`'))) cret += (QChar)'\\'; @@ -155,13 +155,13 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) for (;;) { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; if (c == (QChar)'\'') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; switch (c) { case 'a': cret += (QChar)'\a'; 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 (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; if (!c.isSpace() && !((flags & AbortOnMeta) ? isMeta( c ) : isQuoteMeta( c ))) cret += '\\'; @@ -222,7 +222,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) } if (pos >= args.length()) break; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; } while (!c.isSpace()); ret += cret; firstword = false; @@ -265,7 +265,7 @@ TQString KShell::joinArgs( const TQStringList &args ) ret.append( q ).append( q ); else { for (uint i = 0; i < (*it).length(); i++) - if (isSpecial((*it).tqunicode()[i])) { + if (isSpecial((*it).unicode()[i])) { TQString tmp(*it); tmp.replace( q, "'\\''" ); ret += q; @@ -294,7 +294,7 @@ TQString KShell::joinArgs( const char * const *args, int nargs ) else { TQString tmp( TQFile::decodeName( *argp ) ); for (uint i = 0; i < tmp.length(); i++) - if (isSpecial(tmp.tqunicode()[i])) { + if (isSpecial(tmp.unicode()[i])) { tmp.replace( q, "'\\''" ); ret += q; tmp += q; @@ -319,10 +319,10 @@ TQString KShell::joinArgsDQ( const TQStringList &args ) ret.append( q ).append( q ); else { for (uint i = 0; i < (*it).length(); i++) - if (isSpecial((*it).tqunicode()[i])) { + if (isSpecial((*it).unicode()[i])) { ret.append( '$' ).append( q ); for (uint pos = 0; pos < (*it).length(); pos++) { - int c = (*it).tqunicode()[pos]; + int c = (*it).unicode()[pos]; if (c < 32) { ret += bs; switch (c) { @@ -357,10 +357,10 @@ TQString KShell::tildeExpand( const TQString &fname ) if (fname[0] == (QChar)'~') { int pos = fname.find( '/' ); if (pos < 0) - return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() ); - TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() ); + return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() ); + TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() ); if (!ret.isNull()) - ret += TQConstString( fname.tqunicode() + pos, fname.length() - pos ).string(); + ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string(); return ret; } return fname; diff --git a/tdecore/ksimpleconfig.cpp b/tdecore/ksimpleconfig.cpp index 15597826d..6b4e13a14 100644 --- a/tdecore/ksimpleconfig.cpp +++ b/tdecore/ksimpleconfig.cpp @@ -38,7 +38,7 @@ #include "ksimpleconfig.h" KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly) - : KConfig(TQString::tqfromLatin1(""), bReadOnly, false) + : KConfig(TQString::fromLatin1(""), bReadOnly, false) { // the difference between KConfig and KSimpleConfig is just that // for KSimpleConfig an absolute filename is guaranteed diff --git a/tdecore/ksockaddr.cpp b/tdecore/ksockaddr.cpp index 6ce802716..899f32dba 100644 --- a/tdecore/ksockaddr.cpp +++ b/tdecore/ksockaddr.cpp @@ -587,7 +587,7 @@ TQString KInetSocketAddress::nodeName() const return i18n("<empty>"); } - return TQString::tqfromLatin1(buf); // FIXME! What's the encoding? + return TQString::fromLatin1(buf); // FIXME! What's the encoding? } TQString KInetSocketAddress::serviceName() const @@ -717,7 +717,7 @@ TQString KInetSocketAddress::addrToString(int family, const void* addr) { char buf[INET6_ADDRSTRLEN+1]; - return TQString::tqfromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN)); + return TQString::fromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN)); } bool KInetSocketAddress::stringToAddr(int family, const char *text, void *dest) diff --git a/tdecore/kstandarddirs.cpp b/tdecore/kstandarddirs.cpp index 038b5ce06..55a3b5e8c 100644 --- a/tdecore/kstandarddirs.cpp +++ b/tdecore/kstandarddirs.cpp @@ -159,7 +159,7 @@ TQStringList KStandardDirs::allTypes() const { TQStringList list; for (int i = 0; types[i] != 0; ++i) - list.append(TQString::tqfromLatin1(types[i])); + list.append(TQString::fromLatin1(types[i])); return list; } @@ -189,7 +189,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.tqat(dir.length() - 1) != QChar('/')) + if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); if (!prefixes.contains(dir)) { @@ -209,7 +209,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.tqat(dir.length() - 1) != QChar('/')) + if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); if (!d->xdgconf_prefixes.contains(dir)) { @@ -229,7 +229,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.tqat(dir.length() - 1) != QChar('/')) + if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); if (!d->xdgdata_prefixes.contains(dir)) { @@ -271,7 +271,7 @@ bool KStandardDirs::addResourceType( const char *type, relatives.insert(type, rels); } TQString copy = relativename; - if (copy.tqat(copy.length() - 1) != QChar('/')) + if (copy.at(copy.length() - 1) != QChar('/')) copy += QChar('/'); if (!rels->contains(copy)) { if (priority) @@ -301,7 +301,7 @@ bool KStandardDirs::addResourceDir( const char *type, absolutes.insert(type, paths); } TQString copy = absdir; - if (copy.tqat(copy.length() - 1) != QChar('/')) + if (copy.at(copy.length() - 1) != QChar('/')) copy += QChar('/'); if (!paths->contains(copy)) { @@ -452,7 +452,7 @@ bool KStandardDirs::exists(const TQString &fullPath) { KDE_struct_stat buff; if (access(TQFile::encodeName(fullPath), R_OK) == 0 && KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0) - if (fullPath.tqat(fullPath.length() - 1) != QChar('/')) { + if (fullPath.at(fullPath.length() - 1) != QChar('/')) { if (S_ISREG( buff.st_mode )) return true; } else @@ -478,9 +478,9 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, return; #ifdef Q_WS_WIN - assert(path.tqat(path.length() - 1) == QChar('/') || path.tqat(path.length() - 1) == QChar('\\')); + assert(path.at(path.length() - 1) == QChar('/') || path.at(path.length() - 1) == QChar('\\')); #else - assert(path.tqat(path.length() - 1) == QChar('/')); + assert(path.at(path.length() - 1) == QChar('/')); #endif struct dirent *ep; @@ -492,7 +492,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || TQChar(fn.tqat(fn.length() - 1)).latin1() == TQChar('~').latin1()) + if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == TQChar('~').latin1()) continue; if (!recursive && !regexp.exactMatch(fn)) @@ -569,9 +569,9 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, if (prefix.isEmpty()) //for sanity return; #ifdef Q_WS_WIN - assert(prefix.tqat(prefix.length() - 1) == QChar('/') || prefix.tqat(prefix.length() - 1) == QChar('\\')); + assert(prefix.at(prefix.length() - 1) == QChar('/') || prefix.at(prefix.length() - 1) == QChar('\\')); #else - assert(prefix.tqat(prefix.length() - 1) == QChar('/')); + assert(prefix.at(prefix.length() - 1) == QChar('/')); #endif KDE_struct_stat buff; @@ -591,7 +591,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || fn.tqat(fn.length() - 1) == QChar('~')) + if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == QChar('~')) continue; if ( !pathExp.exactMatch(fn) ) @@ -762,9 +762,9 @@ void KStandardDirs::createSpecialResource(const char *type) #else //UNIX if (relink) { - TQString srv = findExe(TQString::tqfromLatin1("lnusertemp"), kfsstnd_defaultbindir()); + TQString srv = findExe(TQString::fromLatin1("lnusertemp"), kfsstnd_defaultbindir()); if (srv.isEmpty()) - srv = findExe(TQString::tqfromLatin1("lnusertemp")); + srv = findExe(TQString::fromLatin1("lnusertemp")); if (!srv.isEmpty()) { system(TQFile::encodeName(srv)+" "+type); @@ -1130,7 +1130,7 @@ TQString KStandardDirs::saveLocation(const char *type, if (KDE_stat(TQFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode))) { if(!create) { #ifndef NDEBUG - kdDebug() << TQString("save location %1 doesn't exist").tqarg(fullPath) << endl; + kdDebug() << TQString("save location %1 doesn't exist").arg(fullPath) << endl; #endif return fullPath; } @@ -1176,7 +1176,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode) uint len = target.length(); // append trailing slash if missing - if (dir.tqat(len - 1) != QChar('/')) + if (dir.at(len - 1) != QChar('/')) target += QChar('/'); TQString base(""); @@ -1272,11 +1272,11 @@ TQString KStandardDirs::kfsstnd_defaultbindir() if (!s->defaultbindir.isEmpty()) return s->defaultbindir; #ifdef Q_WS_WIN - s->defaultbindir = kfsstnd_defaultprefix() + TQString::tqfromLatin1("/bin"); + s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin"); #else //UNIX s->defaultbindir = __KDE_BINDIR; if (s->defaultbindir.isEmpty()) - s->defaultbindir = kfsstnd_defaultprefix() + TQString::tqfromLatin1("/bin"); + s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin"); #endif if (s->defaultbindir.isEmpty()) kdWarning() << "KStandardDirs::kfsstnd_defaultbindir(): default binary KDE dir not found!" << endl; @@ -1543,7 +1543,7 @@ bool KStandardDirs::addCustomized(KConfig *config) addedCustoms = true; // reading the prefixes in - TQString group = TQString::tqfromLatin1("Directories"); + TQString group = TQString::fromLatin1("Directories"); config->setGroup(group); TQString kioskAdmin = config->readEntry("kioskAdmin"); @@ -1623,7 +1623,7 @@ bool KStandardDirs::addCustomized(KConfig *config) if (profiles.isEmpty()) break; profile = profiles.back(); - group = TQString::tqfromLatin1("Directories-%1").arg(profile); + group = TQString::fromLatin1("Directories-%1").arg(profile); profiles.pop_back(); priority = true; } diff --git a/tdecore/kstartupinfo.cpp b/tdecore/kstartupinfo.cpp index 00a9f5b81..f201b70c0 100644 --- a/tdecore/kstartupinfo.cpp +++ b/tdecore/kstartupinfo.cpp @@ -381,7 +381,7 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa if( id_P.none()) return false; KXMessages msgs; - TQString msg = TQString::tqfromLatin1( "new: %1 %2" ) + TQString msg = TQString::fromLatin1( "new: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); msg = check_required_startup_fields( msg, data_P, qt_xscreen()); kdDebug( 172 ) << "sending " << msg << endl; @@ -394,7 +394,7 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P, { if( id_P.none()) return false; - TQString msg = TQString::tqfromLatin1( "new: %1 %2" ) + TQString msg = TQString::fromLatin1( "new: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); msg = check_required_startup_fields( msg, data_P, DefaultScreen( disp_P )); #ifdef KSTARTUPINFO_ALL_DEBUG @@ -425,7 +425,7 @@ bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoDat if( id_P.none()) return false; KXMessages msgs; - TQString msg = TQString::tqfromLatin1( "change: %1 %2" ) + TQString msg = TQString::fromLatin1( "change: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); kdDebug( 172 ) << "sending " << msg << endl; msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false ); @@ -437,7 +437,7 @@ bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P, { if( id_P.none()) return false; - TQString msg = TQString::tqfromLatin1( "change: %1 %2" ) + TQString msg = TQString::fromLatin1( "change: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); #ifdef KSTARTUPINFO_ALL_DEBUG kdDebug( 172 ) << "sending " << msg << endl; @@ -450,7 +450,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P ) if( id_P.none()) return false; KXMessages msgs; - TQString msg = TQString::tqfromLatin1( "remove: %1" ).arg( id_P.to_text()); + TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text()); kdDebug( 172 ) << "sending " << msg << endl; msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false ); return true; @@ -460,7 +460,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P ) { if( id_P.none()) return false; - TQString msg = TQString::tqfromLatin1( "remove: %1" ).arg( id_P.to_text()); + TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text()); #ifdef KSTARTUPINFO_ALL_DEBUG kdDebug( 172 ) << "sending " << msg << endl; #endif @@ -472,7 +472,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoDat // if( id_P.none()) // id may be none, the pids and hostname matter then // return false; KXMessages msgs; - TQString msg = TQString::tqfromLatin1( "remove: %1 %2" ) + TQString msg = TQString::fromLatin1( "remove: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); kdDebug( 172 ) << "sending " << msg << endl; msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false ); @@ -484,7 +484,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P, { // if( id_P.none()) // id may be none, the pids and hostname matter then // return false; - TQString msg = TQString::tqfromLatin1( "remove: %1 %2" ) + TQString msg = TQString::fromLatin1( "remove: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); #ifdef KSTARTUPINFO_ALL_DEBUG kdDebug( 172 ) << "sending " << msg << endl; @@ -955,14 +955,14 @@ const TQCString& KStartupInfoId::id() const TQString KStartupInfoId::to_text() const { - return TQString::tqfromLatin1( " ID=\"%1\" " ).arg( escape_str( id())); + return TQString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id())); } KStartupInfoId::KStartupInfoId( const TQString& txt_P ) { d = new KStartupInfoIdPrivate; TQStringList items = get_fields( txt_P ); - const TQString id_str = TQString::tqfromLatin1( "ID=" ); + const TQString id_str = TQString::fromLatin1( "ID=" ); for( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) @@ -1124,34 +1124,34 @@ TQString KStartupInfoData::to_text() const { TQString ret = ""; if( !d->bin.isEmpty()) - ret += TQString::tqfromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin )); + ret += TQString::fromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin )); if( !d->name.isEmpty()) - ret += TQString::tqfromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name )); + ret += TQString::fromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name )); if( !d->description.isEmpty()) - ret += TQString::tqfromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description )); + ret += TQString::fromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description )); if( !d->icon.isEmpty()) - ret += TQString::tqfromLatin1( " ICON=%1" ).arg( d->icon ); + ret += TQString::fromLatin1( " ICON=%1" ).arg( d->icon ); if( d->desktop != 0 ) - ret += TQString::tqfromLatin1( " DESKTOP=%1" ) + ret += TQString::fromLatin1( " DESKTOP=%1" ) .arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0 if( !d->wmclass.isEmpty()) - ret += TQString::tqfromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) ); + ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) ); if( !d->hostname.isEmpty()) - ret += TQString::tqfromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) ); + ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) ); for( TQValueList< pid_t >::ConstIterator it = d->pids.begin(); it != d->pids.end(); ++it ) - ret += TQString::tqfromLatin1( " PID=%1" ).arg( *it ); + ret += TQString::fromLatin1( " PID=%1" ).arg( *it ); if( d->silent != Unknown ) - ret += TQString::tqfromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 ); + ret += TQString::fromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 ); if( d->timestamp != -1U ) - ret += TQString::tqfromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp ); + ret += TQString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp ); if( d->screen != -1 ) - ret += TQString::tqfromLatin1( " SCREEN=%1" ).arg( d->screen ); + ret += TQString::fromLatin1( " SCREEN=%1" ).arg( d->screen ); if( d->xinerama != -1 ) - ret += TQString::tqfromLatin1( " XINERAMA=%1" ).arg( d->xinerama ); + ret += TQString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama ); if( d->launched_by != 0 ) - ret += TQString::tqfromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by ); + ret += TQString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by ); return ret; } @@ -1159,19 +1159,19 @@ KStartupInfoData::KStartupInfoData( const TQString& txt_P ) { d = new KStartupInfoDataPrivate; TQStringList items = get_fields( txt_P ); - const TQString bin_str = TQString::tqfromLatin1( "BIN=" ); - const TQString name_str = TQString::tqfromLatin1( "NAME=" ); - const TQString description_str = TQString::tqfromLatin1( "DESCRIPTION=" ); - const TQString icon_str = TQString::tqfromLatin1( "ICON=" ); - const TQString desktop_str = TQString::tqfromLatin1( "DESKTOP=" ); - const TQString wmclass_str = TQString::tqfromLatin1( "WMCLASS=" ); - const TQString hostname_str = TQString::tqfromLatin1( "HOSTNAME=" ); // SELI nonstd - const TQString pid_str = TQString::tqfromLatin1( "PID=" ); // SELI nonstd - const TQString silent_str = TQString::tqfromLatin1( "SILENT=" ); - const TQString timestamp_str = TQString::tqfromLatin1( "TIMESTAMP=" ); - const TQString screen_str = TQString::tqfromLatin1( "SCREEN=" ); - const TQString xinerama_str = TQString::tqfromLatin1( "XINERAMA=" ); - const TQString launched_by_str = TQString::tqfromLatin1( "LAUNCHED_BY=" ); + const TQString bin_str = TQString::fromLatin1( "BIN=" ); + const TQString name_str = TQString::fromLatin1( "NAME=" ); + const TQString description_str = TQString::fromLatin1( "DESCRIPTION=" ); + const TQString icon_str = TQString::fromLatin1( "ICON=" ); + const TQString desktop_str = TQString::fromLatin1( "DESKTOP=" ); + const TQString wmclass_str = TQString::fromLatin1( "WMCLASS=" ); + const TQString hostname_str = TQString::fromLatin1( "HOSTNAME=" ); // SELI nonstd + const TQString pid_str = TQString::fromLatin1( "PID=" ); // SELI nonstd + const TQString silent_str = TQString::fromLatin1( "SILENT=" ); + const TQString timestamp_str = TQString::fromLatin1( "TIMESTAMP=" ); + const TQString screen_str = TQString::fromLatin1( "SCREEN=" ); + const TQString xinerama_str = TQString::fromLatin1( "XINERAMA=" ); + const TQString launched_by_str = TQString::fromLatin1( "LAUNCHED_BY=" ); for( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) diff --git a/tdecore/kstringhandler.cpp b/tdecore/kstringhandler.cpp index dfabb49ea..d33c3c924 100644 --- a/tdecore/kstringhandler.cpp +++ b/tdecore/kstringhandler.cpp @@ -62,7 +62,7 @@ TQString KStringHandler::word( const TQString &text , const char *range ) // Extract words // int wordsToExtract = cnt-pos+1; - TQStringList::Iterator it = list.tqat( pos); + TQStringList::Iterator it = list.at( pos); while ( (it != list.end()) && (wordsToExtract-- > 0)) { @@ -91,7 +91,7 @@ TQString KStringHandler::insword( const TQString &text , const TQString &word , if ( pos >= list.count() ) list.append( word ); else - list.insert( list.tqat(pos) , word ); + list.insert( list.at(pos) , word ); // Rejoin return list.join( " " ); @@ -112,7 +112,7 @@ TQString KStringHandler::setword( const TQString &text , const TQString &word , list.append( word ); else { - list.insert( list.remove( list.tqat(pos) ) , word ); + list.insert( list.remove( list.at(pos) ) , word ); } // Rejoin @@ -140,7 +140,7 @@ TQString KStringHandler::remrange( const TQString &text , const char *range ) // Remove that range of words // int wordsToDelete = cnt-pos+1; - TQStringList::Iterator it = list.tqat( pos); + TQStringList::Iterator it = list.at( pos); while ( (it != list.end()) && (wordsToDelete-- > 0)) it = list.remove( it ); @@ -159,7 +159,7 @@ TQString KStringHandler::remword( const TQString &text , uint pos ) TQStringList list = TQStringList::split( " ", text, true ); if ( pos < list.count() ) - list.remove( list.tqat( pos ) ); + list.remove( list.at( pos ) ); // Rejoin return list.join( " " ); @@ -425,8 +425,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa return filename.find(pattern.mid(1, pattern_len - 2)) != -1; } - const TQChar *c1 = pattern.tqunicode(); - const TQChar *c2 = filename.tqunicode(); + const TQChar *c1 = pattern.unicode(); + const TQChar *c2 = filename.unicode(); int cnt = 1; while ( cnt < pattern_len && *c1++ == *c2++ ) ++cnt; @@ -436,8 +436,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa // Patterns like "*~", "*.extension" if ( pattern[ 0 ] == (QChar)'*' && len + 1 >= pattern_len ) { - const TQChar *c1 = pattern.tqunicode() + pattern_len - 1; - const TQChar *c2 = filename.tqunicode() + len - 1; + const TQChar *c1 = pattern.unicode() + pattern_len - 1; + const TQChar *c2 = filename.unicode() + len - 1; int cnt = 1; while ( cnt < pattern_len && *c1-- == *c2-- ) ++cnt; @@ -556,10 +556,10 @@ KStringHandler::tagURLs( const TQString& text ) TQString KStringHandler::obscure( const TQString &str ) { TQString result; - const TQChar *tqunicode = str.tqunicode(); + const TQChar *unicode = str.unicode(); for ( uint i = 0; i < str.length(); ++i ) - result += ( tqunicode[ i ].tqunicode() < 0x21 ) ? tqunicode[ i ] : - TQChar( 0x1001F - tqunicode[ i ].tqunicode() ); + result += ( unicode[ i ].unicode() < 0x21 ) ? unicode[ i ] : + TQChar( 0x1001F - unicode[ i ].unicode() ); return result; } diff --git a/tdecore/ksycoca.cpp b/tdecore/ksycoca.cpp index 3a655d617..441f6d530 100644 --- a/tdecore/ksycoca.cpp +++ b/tdecore/ksycoca.cpp @@ -178,7 +178,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound ) // We open a dummy database instead. //kdDebug(7011) << "No database, opening a dummy one." << endl; TQBuffer *buffer = new TQBuffer(); - buffer->tqsetBufferFromCopy(TQByteArray()); + buffer->setBuffer(TQByteArray()); buffer->open(IO_ReadWrite); m_str = new TQDataStream( buffer); (*m_str) << (TQ_INT32) KSYCOCA_VERSION; @@ -230,7 +230,7 @@ void KSycoca::closeDatabase() { QIODevice *device = 0; if (m_str) - device = m_str->tqdevice(); + device = m_str->device(); #ifdef HAVE_MMAP if (device && m_sycoca_mmap) { @@ -288,7 +288,7 @@ TQDataStream * KSycoca::findEntry(int offset, KSycocaType &type) if ( !m_str ) openDatabase(); //kdDebug(7011) << TQString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl; - m_str->tqdevice()->tqat(offset); + m_str->device()->at(offset); TQ_INT32 aType; (*m_str) >> aType; type = (KSycocaType) aType; @@ -306,7 +306,7 @@ bool KSycoca::checkVersion(bool abortOnError) // We should never get here... if a database was found then m_str shouldn't be 0L. assert(m_str); } - m_str->tqdevice()->tqat(0); + m_str->device()->at(0); TQ_INT32 aVersion; (*m_str) >> aVersion; if ( aVersion < KSYCOCA_VERSION ) @@ -361,7 +361,7 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id) if (aId == id) { //kdDebug(7011) << TQString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl; - m_str->tqdevice()->tqat(aOffset); + m_str->device()->at(aOffset); return m_str; } } @@ -483,7 +483,7 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str ) else if ( bytes > 0 ) { // not empty int bt = bytes/2; str.setLength( bt ); - TQChar* ch = (TQChar *) str.tqunicode(); + TQChar* ch = (TQChar *) str.unicode(); char t[8192]; char *b = t; s.readRawBytes( b, bytes ); diff --git a/tdecore/ksycocadict.cpp b/tdecore/ksycocadict.cpp index 11b16b08b..d1deb609b 100644 --- a/tdecore/ksycocadict.cpp +++ b/tdecore/ksycocadict.cpp @@ -29,7 +29,7 @@ namespace { struct string_entry { 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; int length; const TQChar *key; @@ -60,7 +60,7 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset) : d(0), mStr(str), mOffset(offset) { TQ_UINT32 test1, test2; - str->tqdevice()->tqat(offset); + str->device()->at(offset); (*str) >> test1 >> test2; if ((test1 > 0x000fffff) || (test2 > 1024)) { @@ -70,10 +70,10 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset) return; } - str->tqdevice()->tqat(offset); + str->device()->at(offset); (*str) >> mHashTableSize; (*str) >> mHashList; - mOffset = str->tqdevice()->tqat(); // Start of hashtable + mOffset = str->device()->at(); // Start of hashtable } KSycocaDict::~KSycocaDict() @@ -131,7 +131,7 @@ KSycocaDict::find_string(const TQString &key ) uint off = mOffset+sizeof(TQ_INT32)*hash; //kdDebug(7011) << TQString("off is %1").arg(off,8,16) << endl; - mStr->tqdevice()->tqat( off ); + mStr->device()->at( off ); TQ_INT32 offset; (*mStr) >> offset; @@ -146,7 +146,7 @@ KSycocaDict::find_string(const TQString &key ) // Lookup duplicate list. offset = -offset; - mStr->tqdevice()->tqat(offset); + mStr->device()->at(offset); //kdDebug(7011) << TQString("Looking up duplicate list at %1").arg(offset,8,16) << endl; while(true) @@ -286,7 +286,7 @@ KSycocaDict::save(TQDataStream &str) return; } - mOffset = str.tqdevice()->tqat(); + mOffset = str.device()->at(); //kdDebug(7011) << TQString("KSycocaDict: %1 entries.").arg(count()) << endl; @@ -402,12 +402,12 @@ KSycocaDict::save(TQDataStream &str) str << mHashTableSize; str << mHashList; - mOffset = str.tqdevice()->tqat(); // mOffset points to start of hashTable + mOffset = str.device()->at(); // mOffset points to start of hashTable //kdDebug(7011) << TQString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl; for(int pass = 1; pass <= 2; pass++) { - str.tqdevice()->tqat(mOffset); + str.device()->at(mOffset); //kdDebug(7011) << TQString("Writing hash table (pass #%1)").arg(pass) << endl; for(uint i=0; i < mHashTableSize; i++) { @@ -421,7 +421,7 @@ KSycocaDict::save(TQDataStream &str) str << tmpid; //kdDebug(7011) << TQString("Hash table : %1").arg(tmpid,8,16) << endl; } - //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.tqdevice()->tqat(),8,16) << endl; + //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl; //kdDebug(7011) << TQString("Writing duplicate lists (pass #%1)").arg(pass) << endl; for(uint i=0; i < mHashTableSize; i++) @@ -429,7 +429,7 @@ KSycocaDict::save(TQDataStream &str) if (hashTable[i].duplicates) { TQPtrList<string_entry> *dups = hashTable[i].duplicates; - hashTable[i].duplicate_offset = str.tqdevice()->tqat(); + hashTable[i].duplicate_offset = str.device()->at(); /*kdDebug(7011) << TQString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl; */ @@ -441,7 +441,7 @@ KSycocaDict::save(TQDataStream &str) str << (TQ_INT32) 0; // End of list marker (0) } } - //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.tqdevice()->tqat(),8,16) << endl; + //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl; } //kdDebug(7011) << "Cleaning up hash table." << endl; diff --git a/tdecore/ksycocaentry.h b/tdecore/ksycocaentry.h index a3cb9595f..a3071ec5a 100644 --- a/tdecore/ksycocaentry.h +++ b/tdecore/ksycocaentry.h @@ -101,7 +101,7 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them */ virtual void save(TQDataStream &s) { - mOffset = s.tqdevice()->tqat(); // store position in member variable + mOffset = s.device()->at(); // store position in member variable s << (TQ_INT32) sycocaType() << mPath; } diff --git a/tdecore/ksycocafactory.cpp b/tdecore/ksycocafactory.cpp index da65619e6..c224ebe79 100644 --- a/tdecore/ksycocafactory.cpp +++ b/tdecore/ksycocafactory.cpp @@ -46,10 +46,10 @@ KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id) (*m_str) >> i; m_endEntryOffset = i; - int saveOffset = m_str->tqdevice()->tqat(); + int saveOffset = m_str->device()->at(); // Init index tables m_sycocaDict = new KSycocaDict(m_str, m_sycocaDictOffset); - saveOffset = m_str->tqdevice()->tqat(saveOffset); + saveOffset = m_str->device()->at(saveOffset); } } else @@ -78,7 +78,7 @@ void KSycocaFactory::saveHeader(TQDataStream &str) { // Write header - str.tqdevice()->tqat(mOffset); + str.device()->at(mOffset); str << (TQ_INT32) m_sycocaDictOffset; str << (TQ_INT32) m_beginEntryOffset; str << (TQ_INT32) m_endEntryOffset; @@ -91,13 +91,13 @@ KSycocaFactory::save(TQDataStream &str) // building database if (!m_sycocaDict) return; // Error! - mOffset = str.tqdevice()->tqat(); // store position in member variable + mOffset = str.device()->at(); // store position in member variable m_sycocaDictOffset = 0; // Write header (pass #1) saveHeader(str); - m_beginEntryOffset = str.tqdevice()->tqat(); + m_beginEntryOffset = str.device()->at(); // Write all entries. int entryCount = 0; @@ -110,7 +110,7 @@ KSycocaFactory::save(TQDataStream &str) entryCount++; } - m_endEntryOffset = str.tqdevice()->tqat(); + m_endEntryOffset = str.device()->at(); // Write indices... // Linear index @@ -124,16 +124,16 @@ KSycocaFactory::save(TQDataStream &str) } // Dictionary index - m_sycocaDictOffset = str.tqdevice()->tqat(); + m_sycocaDictOffset = str.device()->at(); m_sycocaDict->save(str); - int endOfFactoryData = str.tqdevice()->tqat(); + int endOfFactoryData = str.device()->at(); // Update header (pass #2) saveHeader(str); // Seek to end. - str.tqdevice()->tqat(endOfFactoryData); + str.device()->at(endOfFactoryData); } void @@ -169,7 +169,7 @@ KSycocaEntry::List KSycocaFactory::allEntries() // Assume we're NOT building a database - m_str->tqdevice()->tqat(m_endEntryOffset); + m_str->device()->at(m_endEntryOffset); TQ_INT32 entryCount; (*m_str) >> entryCount; diff --git a/tdecore/ktempfile.cpp b/tdecore/ktempfile.cpp index f439b55ef..3152ce9b9 100644 --- a/tdecore/ktempfile.cpp +++ b/tdecore/ktempfile.cpp @@ -46,7 +46,7 @@ #include <tqdatetime.h> #include <tqfile.h> #include <tqdatastream.h> -#include <tqtextstream.h> +#include <textstream.h> #include "kglobal.h" #include "kapplication.h" diff --git a/tdecore/ktimezones.cpp b/tdecore/ktimezones.cpp index dbd589d85..bc9b4b348 100644 --- a/tdecore/ktimezones.cpp +++ b/tdecore/ktimezones.cpp @@ -30,7 +30,7 @@ #include <tqfile.h> #include <tqregexp.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> #include <cerrno> #include <climits> @@ -285,12 +285,12 @@ int KTimezone::offset(Qt::TimeSpec basisSpec) const char *originalZone = ::getenv("TZ"); // Get the time in the current timezone. - TQDateTime basisTime = TQDateTime::tqcurrentDateTime(basisSpec); + TQDateTime basisTime = TQDateTime::currentDateTime(basisSpec); // Set the timezone and find out what time it is there compared to the basis. ::setenv("TZ", m_name.utf8(), 1); tzset(); - TQDateTime remoteTime = TQDateTime::tqcurrentDateTime(Qt::LocalTime); + TQDateTime remoteTime = TQDateTime::currentDateTime(Qt::LocalTime); int offset = remoteTime.secsTo(basisTime); // Now restore things diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp index f6c3fd19b..ecaa58397 100644 --- a/tdecore/kurl.cpp +++ b/tdecore/kurl.cpp @@ -42,9 +42,9 @@ #include <tqdir.h> #include <tqstringlist.h> #include <tqregexp.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqmap.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqmutex.h> #ifdef Q_WS_WIN @@ -172,14 +172,14 @@ static TQString lazy_encode( const TQString& segment, bool encodeAt=true ) 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 // Small set of really ambiguous chars if ((character < 32) || // Low ASCII ((character == '%') && // The escape character itself (i+2 < old_length) && // But only if part of a valid escape sequence! - (hex2int(segment[i+1].tqunicode())!= -1) && - (hex2int(segment[i+2].tqunicode())!= -1)) || + (hex2int(segment[i+1].unicode())!= -1) && + (hex2int(segment[i+2].unicode())!= -1)) || (character == '?') || // Start of query delimiter ((character == '@') && encodeAt) || // Username delimiter (character == '#') || // Start of reference delimiter @@ -404,7 +404,7 @@ bool KURL::isRelativeURL(const TQString &_url) { int len = _url.length(); 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 if (!isalpha(str[0].latin1())) @@ -471,13 +471,13 @@ KURL::KURL( const TQString &url, int encoding_hint ) KURL::KURL( const char * url, int encoding_hint ) { reset(); - parse( TQString::tqfromLatin1(url), encoding_hint ); + parse( TQString::fromLatin1(url), encoding_hint ); } KURL::KURL( const TQCString& url, int encoding_hint ) { reset(); - parse( TQString::tqfromLatin1(url), encoding_hint ); + parse( TQString::fromLatin1(url), encoding_hint ); } KURL::KURL( const KURL& _u ) @@ -643,7 +643,7 @@ void KURL::parse( const TQString& _url, int encoding_hint ) return; } - const TQChar* buf = _url.tqunicode(); + const TQChar* buf = _url.unicode(); const TQChar* orig = buf; uint len = _url.length(); uint pos = 0; @@ -707,7 +707,7 @@ NodeErr: void KURL::parseRawURI( const TQString& _url, int encoding_hint ) { uint len = _url.length(); - const TQChar* buf = _url.tqunicode(); + const TQChar* buf = _url.unicode(); uint pos = 0; @@ -762,7 +762,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) bool badHostName = false; int start = 0; uint len = _url.length(); - const TQChar* buf = _url.tqunicode(); + const TQChar* buf = _url.unicode(); TQChar delim; TQString tmp; @@ -1040,7 +1040,7 @@ KURL& KURL::operator=( const TQString& _url ) KURL& KURL::operator=( const char * _url ) { reset(); - parse( TQString::tqfromLatin1(_url) ); + parse( TQString::fromLatin1(_url) ); return *this; } @@ -2150,7 +2150,7 @@ TQMap< TQString, TQString > KURL::queryItems( int options, int encoding_hint ) c name = name.lower(); TQString value = (*it).mid( equal_pos + 1 ); if ( value.isEmpty() ) - result.insert( name, TQString::tqfromLatin1("") ); + result.insert( name, TQString::fromLatin1("") ); else { // ### why is decoding name not necessary? value.replace( '+', ' ' ); // + in queries means space @@ -2191,7 +2191,7 @@ TQString KURL::queryItem( const TQString& _item, int encoding_hint ) const return decode_string( str, encoding_hint ); } else // empty value - return TQString::tqfromLatin1(""); + return TQString::fromLatin1(""); } } diff --git a/tdecore/kurl.h b/tdecore/kurl.h index 9cfac2885..ef454f60f 100644 --- a/tdecore/kurl.h +++ b/tdecore/kurl.h @@ -281,7 +281,7 @@ public: * See TQTextCodec::mibEnum() * * @see fromPathOrURL() - * @see TQString::tqfromLatin1() + * @see TQString::fromLatin1() */ KURL( const char * url, int encoding_hint = 0 ); /** @@ -307,7 +307,7 @@ public: * See TQTextCodec::mibEnum() * * @see fromPathOrURL() - * @see TQString::tqfromLatin1() + * @see TQString::fromLatin1() */ KURL( const TQCString& url, int encoding_hint = 0 ); @@ -1586,7 +1586,7 @@ public: * * 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. * * @param str the string to encode (can be @c TQString::null) @@ -1605,7 +1605,7 @@ public: * * 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 * as well as the slash @c '/'. * @@ -1623,7 +1623,7 @@ public: * * 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() * diff --git a/tdecore/kurldrag.h b/tdecore/kurldrag.h index aee9d83b9..45a0e5945 100644 --- a/tdecore/kurldrag.h +++ b/tdecore/kurldrag.h @@ -30,7 +30,7 @@ class KURLDragPrivate; /** * This class is to be used instead of TQUriDrag when using KURL. * 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. * The other reasons for using this class are: * @li it exports text/plain (for dropping/pasting into lineedits, mails etc.) diff --git a/tdecore/malloc/malloc.c b/tdecore/malloc/malloc.c index c25800f5d..dba0fdef0 100644 --- a/tdecore/malloc/malloc.c +++ b/tdecore/malloc/malloc.c @@ -85,7 +85,7 @@ int kde_malloc_is_used = 0; calloc(size_t n_elements, size_t element_size); free(Void_t* p); realloc(Void_t* p, size_t n); - memalign(size_t tqalignment, size_t n); + memalign(size_t alignment, size_t n); valloc(size_t n); mallinfo() mallopt(int parameter_number, int parameter_value) @@ -107,7 +107,7 @@ int kde_malloc_is_used = 0; You can adjust this by defining INTERNAL_SIZE_T Alignment: 2 * sizeof(size_t) (default) - (i.e., 8 byte tqalignment with 4byte size_t). This suffices for + (i.e., 8 byte alignment with 4byte size_t). This suffices for nearly all current machines and C compilers. However, you can define MALLOC_ALIGNMENT to be wider than this if necessary. @@ -146,7 +146,7 @@ int kde_malloc_is_used = 0; default used to obtain memory from system) accepts signed arguments, and may not be able to handle size_t-wide arguments with negative sign bit. Generally, values that would - appear as negative after accounting for overhead and tqalignment + appear as negative after accounting for overhead and alignment are supported only via mmap(), which does not have this limitation. @@ -394,7 +394,7 @@ extern "C" { expense of not being able to handle more than 2^32 of malloced space. If this limitation is acceptable, you are encouraged to set this unless you are on a platform requiring 16byte alignments. In - this case the tqalignment requirements turn out to negate any + this case the alignment requirements turn out to negate any potential advantages of decreasing size_t word size. Implementors: Beware of the possible combinations of: @@ -419,11 +419,11 @@ extern "C" { /* - MALLOC_ALIGNMENT is the minimum tqalignment for malloc'ed chunks. + MALLOC_ALIGNMENT is the minimum alignment for malloc'ed chunks. It must be a power of two at least 2 * SIZE_SZ, even on machines for which smaller alignments would suffice. It may be defined as larger than this though. Note however that code and data structures - are optimized for the case of 8-byte tqalignment. + are optimized for the case of 8-byte alignment. */ @@ -957,13 +957,13 @@ Void_t* public_rEALLOc(); #endif /* - memalign(size_t tqalignment, size_t n); + memalign(size_t alignment, size_t n); Returns a pointer to a newly allocated chunk of n bytes, aligned - in accord with the tqalignment argument. + in accord with the alignment argument. - The tqalignment argument should be a power of two. If the argument is + The alignment argument should be a power of two. If the argument is not a power of two, the nearest greater power is used. - 8-byte tqalignment is guaranteed by normal malloc calls, so don't + 8-byte alignment is guaranteed by normal malloc calls, so don't bother calling memalign with an argument of 8 or less. Overreliance on memalign is a sure way to fragment space. @@ -1228,7 +1228,7 @@ int public_mTRIm(); Returns the number of bytes you can actually use in an allocated chunk, which may be more than you requested (although - often not) due to tqalignment and minimum size constraints. + often not) due to alignment and minimum size constraints. You can use this many bytes without worrying about overwriting other allocated objects. This is not a particularly great programming practice. malloc_usable_size can be more useful in @@ -1252,8 +1252,8 @@ size_t public_mUSABLe(); number of bytes allocated via malloc (or realloc, etc) but not yet freed. Note that this is the number of bytes allocated, not the number requested. It will be larger than the number requested - because of tqalignment and bookkeeping overhead. Because it includes - tqalignment wastage as being in use, this figure may be greater than + because of alignment and bookkeeping overhead. Because it includes + alignment wastage as being in use, this figure may be greater than zero even when no user-level chunks are allocated. The reported current and maximum system memory can be inaccurate if @@ -1290,7 +1290,7 @@ void public_mSTATs(); fragmentation without improving speed. M_MXFAST is set in REQUEST size units. It is internally used in - chunksize units, which adds padding and tqalignment. You can reduce + chunksize units, which adds padding and alignment. You can reduce M_MXFAST to 0 to disable all use of fastbins. This causes the malloc algorithm to be a closer approximation of fifo-best-fit in all cases, not just for larger requests, but will generally cause it to be @@ -1434,7 +1434,7 @@ void public_mSTATs(); 1. The space cannot be reclaimed, consolidated, and then used to service later requests, as happens with normal chunks. - 2. It can lead to more wastage because of mmap page tqalignment + 2. It can lead to more wastage because of mmap page alignment requirements 3. It causes malloc performance to be more dependent on host system memory management support routines which may vary in @@ -1614,12 +1614,12 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) { return m; } -Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { +Void_t* public_mEMALIGn(size_t alignment, size_t bytes) { Void_t* m; if (MALLOC_PREACTION != 0) { return 0; } - m = mEMALIGn(tqalignment, bytes); + m = mEMALIGn(alignment, bytes); if (MALLOC_POSTACTION != 0) { } return m; @@ -1956,7 +1956,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ /* - ---------- Size and tqalignment checks and conversions ---------- + ---------- Size and alignment checks and conversions ---------- */ /* conversion from malloc headers to user pointers, and back */ @@ -1972,7 +1972,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define MINSIZE \ (unsigned long)(((MIN_CHUNK_SIZE+MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK)) -/* Check if m has acceptable tqalignment */ +/* Check if m has acceptable alignment */ #define aligned_OK(m) (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0) @@ -2641,7 +2641,7 @@ static void do_check_remalloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s; /* Legal size ... */ assert((sz & MALLOC_ALIGN_MASK) == 0); assert((unsigned long)(sz) >= MINSIZE); - /* ... and tqalignment */ + /* ... and alignment */ assert(aligned_OK(chunk2mem(p))); /* chunk is less than MINSIZE more than request */ assert((long)(sz) - (long)(s) >= 0); @@ -2704,7 +2704,7 @@ static void do_check_malloc_state() /* internal size_t must be no wider than pointer type */ assert(sizeof(INTERNAL_SIZE_T) <= sizeof(char*)); - /* tqalignment is a power of 2 */ + /* alignment is a power of 2 */ assert((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-1)) == 0); /* cannot run remaining checks until fully initialized */ @@ -3209,7 +3209,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; /* The offset to the start of the mmapped region is stored in the prev_size field of the chunk. This allows us to adjust - returned start address to meet tqalignment requirements here + returned start address to meet alignment requirements here and in memalign(), and still be able to compute proper address argument for later munmap in free() and realloc(). */ @@ -3288,7 +3288,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; Round to a multiple of page size. If MORECORE is not contiguous, this ensures that we only call it with whole-page arguments. And if MORECORE is contiguous and - this is not first time through, this preserves page-tqalignment of + this is not first time through, this preserves page-alignment of previous calls. Otherwise, we correct to page-align below. */ @@ -3384,7 +3384,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; /* handle contiguous cases */ if (contiguous(av)) { - /* Guarantee tqalignment of first new chunk made from this space */ + /* Guarantee alignment of first new chunk made from this space */ front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK; if (front_misalign > 0) { @@ -3554,7 +3554,7 @@ Void_t* mALLOc(size_t bytes) /* Convert request size to internal form by adding SIZE_SZ bytes - overhead plus possibly more to obtain necessary tqalignment and/or + overhead plus possibly more to obtain necessary alignment and/or to obtain a size of at least MINSIZE, the smallest allocatable size. Also, checked_request2size traps (returning 0) request sizes that are so large that they wrap around zero when padded and @@ -4127,54 +4127,54 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes; INLINE #if __STD_C -Void_t* mEMALIGn(size_t tqalignment, size_t bytes) +Void_t* mEMALIGn(size_t alignment, size_t bytes) #else -Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes; +Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; #endif { INTERNAL_SIZE_T nb; /* padded request size */ char* m; /* memory returned by malloc call */ mchunkptr p; /* corresponding chunk */ - char* brk; /* tqalignment point within p */ + char* brk; /* alignment point within p */ mchunkptr newp; /* chunk to return */ INTERNAL_SIZE_T newsize; /* its size */ - INTERNAL_SIZE_T leadsize; /* leading space before tqalignment point */ + INTERNAL_SIZE_T leadsize; /* leading space before alignment point */ mchunkptr remainder; /* spare room at end to split off */ unsigned long remainder_size; /* its size */ INTERNAL_SIZE_T size; - /* If need less tqalignment than we give anyway, just relay to malloc */ + /* If need less alignment than we give anyway, just relay to malloc */ - if (tqalignment <= MALLOC_ALIGNMENT) return mALLOc(bytes); + if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes); /* Otherwise, ensure that it is at least a minimum chunk size */ - if (tqalignment < MINSIZE) tqalignment = MINSIZE; + if (alignment < MINSIZE) alignment = MINSIZE; - /* Make sure tqalignment is power of 2 (in case MINSIZE is not). */ - if ((tqalignment & (tqalignment - 1)) != 0) { + /* Make sure alignment is power of 2 (in case MINSIZE is not). */ + if ((alignment & (alignment - 1)) != 0) { size_t a = MALLOC_ALIGNMENT * 2; - while ((unsigned long)a < (unsigned long)tqalignment) a <<= 1; - tqalignment = a; + while ((unsigned long)a < (unsigned long)alignment) a <<= 1; + alignment = a; } checked_request2size(bytes, nb); /* - Strategy: find a spot within that chunk that meets the tqalignment + Strategy: find a spot within that chunk that meets the alignment request, and then possibly free the leading and trailing space. */ - /* Call malloc with worst case padding to hit tqalignment. */ + /* Call malloc with worst case padding to hit alignment. */ - m = (char*)(mALLOc(nb + tqalignment + MINSIZE)); + m = (char*)(mALLOc(nb + alignment + MINSIZE)); if (m == 0) return 0; /* propagate failure */ p = mem2chunk(m); - if ((((unsigned long)(m)) % tqalignment) != 0) { /* misaligned */ + if ((((unsigned long)(m)) % alignment) != 0) { /* misaligned */ /* Find an aligned spot inside chunk. Since we need to give back @@ -4184,10 +4184,10 @@ Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes; total room so that this is always possible. */ - brk = (char*)mem2chunk(((unsigned long)(m + tqalignment - 1)) & - -((signed long) tqalignment)); + brk = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) & + -((signed long) alignment)); if ((unsigned long)(brk - (char*)(p)) < MINSIZE) - brk += tqalignment; + brk += alignment; newp = (mchunkptr)brk; leadsize = brk - (char*)(p); @@ -4208,7 +4208,7 @@ Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes; p = newp; assert (newsize >= nb && - (((unsigned long)(chunk2mem(p))) % tqalignment) == 0); + (((unsigned long)(chunk2mem(p))) % alignment) == 0); } /* Also give back spare room at the end */ @@ -4375,7 +4375,7 @@ static Void_t** iALLOc(n_elements, sizes, opts, chunks) size_t n_elements; size_ contents_size += request2size(sizes[i]); } - /* subtract out tqalignment bytes from total to minimize overallocation */ + /* subtract out alignment bytes from total to minimize overallocation */ size = contents_size + array_size - MALLOC_ALIGN_MASK; /* @@ -5356,7 +5356,7 @@ History: and Anonymous. * Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for helping test this.) - * memalign: check tqalignment arg + * memalign: check alignment arg * realloc: don't try to shift chunks backwards, since this leads to more fragmentation in some programs and doesn't seem to help in any others. @@ -5409,7 +5409,7 @@ History: * Support another case of realloc via move into top * Fix error occurring when initial sbrk_base not word-aligned. * Rely on page size for units instead of SBRK_UNIT to - avoid surprises about sbrk tqalignment conventions. + avoid surprises about sbrk alignment conventions. * Add mallinfo, mallopt. Thanks to Raymond Nijssen (raymond@es.ele.tue.nl) for the suggestion. * Add `pad' argument to malloc_trim and top_pad mallopt parameter. @@ -5569,7 +5569,7 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) { #endif } -Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { +Void_t* public_mEMALIGn(size_t alignment, size_t bytes) { #ifndef KDE_MALLOC_FULL if( malloc_type == 1 ) { @@ -5578,16 +5578,16 @@ Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { if (MALLOC_PREACTION != 0) { return 0; } - m = mEMALIGn(tqalignment, bytes); + m = mEMALIGn(alignment, bytes); if (MALLOC_POSTACTION != 0) { } return m; #ifndef KDE_MALLOC_FULL } if( malloc_type == 2 ) - return libc_memalign( tqalignment, bytes ); + return libc_memalign( alignment, bytes ); init_malloc_type(); - return public_mEMALIGn( tqalignment, bytes ); + return public_mEMALIGn( alignment, bytes ); #endif } @@ -5728,7 +5728,7 @@ int public_mALLOPt(int p, int v) { #endif int -posix_memalign (void **memptr, size_t tqalignment, size_t size) +posix_memalign (void **memptr, size_t alignment, size_t size) { void *mem; @@ -5737,7 +5737,7 @@ posix_memalign (void **memptr, size_t tqalignment, size_t size) if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0) return EINVAL; - mem = memalign (tqalignment, size); + mem = memalign (alignment, size); if (mem != NULL) { *memptr = mem; diff --git a/tdecore/network/kclientsocketbase.cpp b/tdecore/network/kclientsocketbase.cpp index 9785ce36c..f8f993a08 100644 --- a/tdecore/network/kclientsocketbase.cpp +++ b/tdecore/network/kclientsocketbase.cpp @@ -148,7 +148,7 @@ bool KClientSocketBase::lookup() { if (d->localResolver.serviceName().isNull() && !d->localResolver.nodeName().isNull()) - d->localResolver.setServiceName(TQString::tqfromLatin1("")); + d->localResolver.setServiceName(TQString::fromLatin1("")); // don't restart the lookups if they had succeeded and // the input values weren't changed diff --git a/tdecore/network/khttpproxysocketdevice.cpp b/tdecore/network/khttpproxysocketdevice.cpp index 648f4e571..f61559bfb 100644 --- a/tdecore/network/khttpproxysocketdevice.cpp +++ b/tdecore/network/khttpproxysocketdevice.cpp @@ -153,7 +153,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi setState(0); // unset open flag // prepare the request - TQString request = TQString::tqfromLatin1("CONNECT %1:%2 HTTP/1.1\r\n" + TQString request = TQString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n" "Cache-Control: no-cache\r\n" "Host: \r\n" "\r\n"); diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index 93c029b8e..672edb5af 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -915,7 +915,7 @@ TQString KResolver::localHostName() } if (name.isEmpty()) - return TQString::tqfromLatin1("localhost"); + return TQString::fromLatin1("localhost"); if (name.find('.') == -1) { @@ -924,7 +924,7 @@ TQString KResolver::localHostName() KResolverResults results = resolve(name, "0", CanonName); if (results.isEmpty()) // cannot find a valid hostname! - return TQString::tqfromLatin1("localhost"); + return TQString::fromLatin1("localhost"); else return results.first().canonicalName(); } @@ -934,7 +934,7 @@ TQString KResolver::localHostName() // forward declaration -static TQStringList splitLabels(const TQString& tqunicodeDomain); +static TQStringList splitLabels(const TQString& unicodeDomain); static TQCString ToASCII(const TQString& label); static TQString ToUnicode(const TQString& label); @@ -943,11 +943,11 @@ static TQStringList *KResolver_initIdnDomains() const char *kde_use_idn = getenv("KDE_USE_IDN"); if (!kde_use_idn) kde_use_idn = "ac:at:br:cat:ch:cl:cn:de:dk:fi:gr:hu:info:io:is:jp:kr:li:lt:museum:org:no:se:sh:th:tm:tw:vn"; - return new TQStringList(TQStringList::split(':', TQString::tqfromLatin1(kde_use_idn).lower())); + return new TQStringList(TQStringList::split(':', TQString::fromLatin1(kde_use_idn).lower())); } // implement the ToAscii function, as described by IDN documents -TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) +TQCString KResolver::domainToAscii(const TQString& unicodeDomain) { if (!idnDomains) idnDomains = KResolver_initIdnDomains(); @@ -958,7 +958,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) // 2) split the domain into individual labels, without // separators. - TQStringList input = splitLabels(tqunicodeDomain); + TQStringList input = splitLabels(unicodeDomain); // Do we allow IDN names for this TLD? if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) @@ -987,7 +987,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) TQString KResolver::domainToUnicode(const TQCString& asciiDomain) { - return domainToUnicode(TQString::tqfromLatin1(asciiDomain)); + return domainToUnicode(TQString::fromLatin1(asciiDomain)); } // implement the ToUnicode function, as described by IDN documents @@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* ) // RFC 3492 - Punycode: A Bootstring encoding of Unicode // 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: // "Whenever dots are used as label separators, the following characters @@ -1060,9 +1060,9 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain) TQStringList lst; int start = 0; 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] || c == separators[1] || @@ -1070,13 +1070,13 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain) c == separators[3]) { // found a separator! - lst << tqunicodeDomain.mid(start, i - start); + lst << unicodeDomain.mid(start, i - start); start = i + 1; } } if ((long)i >= start) // there is still one left - lst << tqunicodeDomain.mid(start, i - start); + lst << unicodeDomain.mid(start, i - start); return lst; } @@ -1101,7 +1101,7 @@ static TQCString ToASCII(const TQString& label) uint 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 if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS) @@ -1118,7 +1118,7 @@ static TQCString ToASCII(const TQString& label) static TQString ToUnicode(const TQString& label) { #ifdef HAVE_IDNA_H - // We have idna.h, so we can use the idna_to_tqunicode + // We have idna.h, so we can use the idna_to_unicode // function :) TQ_UINT32 *ucs4_input, *ucs4_output; @@ -1126,7 +1126,7 @@ static TQString ToUnicode(const TQString& label) ucs4_input = new TQ_UINT32[label.length() + 1]; 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 ucs4_output = new TQ_UINT32[outlen = label.length()]; diff --git a/tdecore/network/kresolver.h b/tdecore/network/kresolver.h index 1b13d676b..e2e08623b 100644 --- a/tdecore/network/kresolver.h +++ b/tdecore/network/kresolver.h @@ -796,11 +796,11 @@ public: * Note that the encoding is illegible and, thus, should not be presented * 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 * 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 diff --git a/tdecore/network/kresolverstandardworkers.cpp b/tdecore/network/kresolverstandardworkers.cpp index 6236cc15d..a6f4e4ec0 100644 --- a/tdecore/network/kresolverstandardworkers.cpp +++ b/tdecore/network/kresolverstandardworkers.cpp @@ -140,7 +140,7 @@ bool KBlacklistWorker::isBlacklisted(const TQString& host) return false; // KDE4: QLatin1String - TQString ascii = TQString::tqfromLatin1(KResolver::domainToAscii(host)); + TQString ascii = TQString::fromLatin1(KResolver::domainToAscii(host)); TQMutexLocker locker(&blacklistMutex); @@ -251,7 +251,7 @@ namespace // check blacklist if (m_af != AF_INET && - KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_hostname))) + KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_hostname))) break; # ifdef USE_GETHOSTBYNAME2_R @@ -358,7 +358,7 @@ namespace if (socktype == 0) socktype = SOCK_STREAM; // default - TQString canon = KResolver::domainToUnicode(TQString::tqfromLatin1(he->h_name)); + TQString canon = KResolver::domainToUnicode(TQString::fromLatin1(he->h_name)); KInetSocketAddress sa; sa.setPort(m_port); if (he->h_addrtype != AF_INET) @@ -404,7 +404,7 @@ namespace { // check blacklist if ((m_af != AF_INET && m_af != AF_UNSPEC) && - KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_node))) + KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_node))) { results.setError(KResolver::NoName); finished(); @@ -550,8 +550,8 @@ bool KStandardWorker::sanityCheck() if (node.find('%') != -1) node.truncate(node.find('%')); - if (node.isEmpty() || node == TQString::tqfromLatin1("*") || - node == TQString::tqfromLatin1("localhost")) + if (node.isEmpty() || node == TQString::fromLatin1("*") || + node == TQString::fromLatin1("localhost")) m_encodedName.truncate(0); else { @@ -616,7 +616,7 @@ bool KStandardWorker::resolveService() // service name does not contain a port number // must be a name - if (serviceName().isEmpty() || serviceName().compare(TQString::tqfromLatin1("*")) == 0) + if (serviceName().isEmpty() || serviceName().compare(TQString::fromLatin1("*")) == 0) port = 0; else { @@ -712,7 +712,7 @@ bool KStandardWorker::resolveNumerically() // now try to resolve the hostname numerically KInetSocketAddress sa; setError(KResolver::NoError); - sa.setHost(KIpAddress(TQString::tqfromLatin1(m_encodedName))); + sa.setHost(KIpAddress(TQString::fromLatin1(m_encodedName))); // if it failed, the length was reset to 0 bool ok = sa.length() != 0; diff --git a/tdecore/network/kreverseresolver.cpp b/tdecore/network/kreverseresolver.cpp index 00ef7f81d..5c602458c 100644 --- a/tdecore/network/kreverseresolver.cpp +++ b/tdecore/network/kreverseresolver.cpp @@ -238,8 +238,8 @@ bool ReverseThread::run() if (err == 0) { - node = KResolver::domainToUnicode(TQString::tqfromLatin1(h)); - service = TQString::tqfromLatin1(s); + node = KResolver::domainToUnicode(TQString::fromLatin1(h)); + service = TQString::fromLatin1(s); success = true; } else diff --git a/tdecore/network/kserversocket.cpp b/tdecore/network/kserversocket.cpp index bd63d6306..49facb12c 100644 --- a/tdecore/network/kserversocket.cpp +++ b/tdecore/network/kserversocket.cpp @@ -155,7 +155,7 @@ bool KServerSocket::lookup() // make sure we have at least one parameter for lookup if (d->resolver.serviceName().isNull() && !d->resolver.nodeName().isNull()) - d->resolver.setServiceName(TQString::tqfromLatin1("")); + d->resolver.setServiceName(TQString::fromLatin1("")); // don't restart the lookups if they had succeeded and // the input values weren't changed diff --git a/tdecore/network/ksocketaddress.cpp b/tdecore/network/ksocketaddress.cpp index feaabfab5..7ceeba99d 100644 --- a/tdecore/network/ksocketaddress.cpp +++ b/tdecore/network/ksocketaddress.cpp @@ -165,7 +165,7 @@ bool KIpAddress::setAddress(const TQString& address) bool KIpAddress::setAddress(const char* address) { - return setAddress(TQString::tqfromLatin1(address)); + return setAddress(TQString::fromLatin1(address)); } // set from binary data @@ -194,13 +194,13 @@ TQString KIpAddress::toString() const { case 4: inet_ntop(AF_INET, m_data, buf, sizeof(buf) - 1); - return TQString::tqfromLatin1(buf); + return TQString::fromLatin1(buf); case 6: #ifdef AF_INET6 inet_ntop(AF_INET6, m_data, buf, sizeof(buf) - 1); #endif - return TQString::tqfromLatin1(buf); + return TQString::fromLatin1(buf); } return TQString::null; @@ -270,7 +270,7 @@ public: { addr.generic = 0L; curlen = 0; - tqinvalidate(); + invalidate(); } ~KSocketAddressData() @@ -282,7 +282,7 @@ public: inline bool invalid() const { return reallen == 0; } - inline void tqinvalidate() + inline void invalidate() { reallen = 0; } void dup(const sockaddr* sa, TQ_UINT16 len, bool clear = true); @@ -348,7 +348,7 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) if (len < MIN_SOCKADDR_LEN) { // certainly invalid - tqinvalidate(); + invalidate(); return; } @@ -359,7 +359,7 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) (sa->sa_family == AF_UNIX && len < MIN_SOCKADDR_UN_LEN))) { // also invalid - tqinvalidate(); + invalidate(); return; } @@ -444,7 +444,7 @@ KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other) if (other.d && !other.d->invalid()) d->dup(other.d->addr.generic, other.d->reallen); else - d->tqinvalidate(); + d->invalidate(); return *this; } @@ -467,7 +467,7 @@ KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len) if (sa != 0L && len >= MIN_SOCKADDR_LEN) d->dup(sa, len); else - d->tqinvalidate(); + d->invalidate(); return *this; } @@ -619,7 +619,7 @@ TQString KSocketAddress::toString() const fmt = "[%1]:%2"; #endif else if (d->addr.generic->sa_family == AF_UNIX) - return TQString::tqfromLatin1("unix:%1").arg(serviceName()); + return TQString::fromLatin1("unix:%1").arg(serviceName()); else return i18n("1: the unknown socket address family number", "Unknown family %1").arg(d->addr.generic->sa_family); @@ -788,7 +788,7 @@ KInetSocketAddress& KInetSocketAddress::setHost(const KIpAddress& ip) default: // empty - d->tqinvalidate(); + d->invalidate(); } return *this; @@ -832,7 +832,7 @@ KInetSocketAddress& KInetSocketAddress::setPort(TQ_UINT16 port) #endif default: - d->tqinvalidate(); // setting the port on something else + d->invalidate(); // setting the port on something else } return *this; @@ -897,7 +897,7 @@ void KInetSocketAddress::update() return; #endif else - d->tqinvalidate(); + d->invalidate(); } KUnixSocketAddress::KUnixSocketAddress() @@ -908,7 +908,7 @@ KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len) : KSocketAddress(sa, len) { if (!d->invalid() && d->addr.un->sun_family != AF_UNIX) - d->tqinvalidate(); + d->invalidate(); } KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other) diff --git a/tdecore/network/ksocketaddress.h b/tdecore/network/ksocketaddress.h index d02a6984c..a57d11e82 100644 --- a/tdecore/network/ksocketaddress.h +++ b/tdecore/network/ksocketaddress.h @@ -511,7 +511,7 @@ public: * buffer to fit needs. This function should not be used except for handling * unknown socket address structures. * - * Also note that this function may tqinvalidate the socket if a known + * Also note that this function may invalidate the socket if a known * family is set (Internet or Unix socket) and the new length would be * too small to hold the system's sockaddr_* structure. If unsure, reset * the family: @@ -535,7 +535,7 @@ public: /** * Sets the family of this object. * - * Note: setting the family will probably tqinvalidate any address data + * Note: setting the family will probably invalidate any address data * contained in this object. Use this function with care. * * @param family the new family to set diff --git a/tdecore/network/ksocketbase.cpp b/tdecore/network/ksocketbase.cpp index f5410f3e8..8449dbdc8 100644 --- a/tdecore/network/ksocketbase.cpp +++ b/tdecore/network/ksocketbase.cpp @@ -309,7 +309,7 @@ int KActiveSocketBase::putch(int ch) void KActiveSocketBase::setError(int status, SocketError error) { KSocketBase::setError(error); - setqStatus(status); + seStatus(status); } void KActiveSocketBase::resetError() diff --git a/tdecore/network/ksrvresolverworker.cpp b/tdecore/network/ksrvresolverworker.cpp index 2ec5bb4bf..f3166b982 100644 --- a/tdecore/network/ksrvresolverworker.cpp +++ b/tdecore/network/ksrvresolverworker.cpp @@ -54,8 +54,8 @@ bool KSrvResolverWorker::preprocess() if (node.find('%') != -1) node.truncate(node.find('%')); - if (node.isEmpty() || node == TQString::tqfromLatin1("*") || - node == TQString::tqfromLatin1("localhost")) + if (node.isEmpty() || node == TQString::fromLatin1("*") || + node == TQString::fromLatin1("localhost")) return false; // empty == localhost encodedName = KResolver::domainToAscii(node); @@ -85,7 +85,7 @@ bool KSrvResolverWorker::preprocess() return false; protoname = "_"; - protoname += names.tqat(0); + protoname += names.at(0); } else if (sockettype == SOCK_STREAM || sockettype == 0) protoname = "_tcp"; @@ -225,7 +225,7 @@ bool KSrvResolverWorker::postprocess() void KSrvResolverWorker::customEvent(TQCustomEvent*) { - dns = new TQDns(TQString::tqfromLatin1(encodedName), TQDns::Srv); + dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv); TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady())); } diff --git a/tdecore/svgicons/ksvgiconengine.cpp b/tdecore/svgicons/ksvgiconengine.cpp index 85830126b..42ca8557c 100644 --- a/tdecore/svgicons/ksvgiconengine.cpp +++ b/tdecore/svgicons/ksvgiconengine.cpp @@ -201,7 +201,7 @@ public: // Combine new and old matrix TQWMatrix matrix = m_engine->painter()->parseTransform(transform); - TQWMatrix *current = m_engine->painter()->tqworldMatrix(); + TQWMatrix *current = m_engine->painter()->worldMatrix(); #ifdef USE_QT4 printf("[FIXME] *current = matrix * *current locks up under Qt4; bypassing for now\n\r"); #else // USE_QT4 @@ -225,9 +225,9 @@ printf("[FIXME] *current = matrix * *current locks up under Qt4; bypassing for n TQPtrList<TQDomNamedNodeMap> applyList; applyList.setAutoDelete(true); - TQDomNode tqshape = node.parentNode(); - for(; !tqshape.isNull() ; tqshape = tqshape.parentNode()) - applyList.prepend(new TQDomNamedNodeMap(tqshape.attributes())); + TQDomNode shape = node.parentNode(); + for(; !shape.isNull() ; shape = shape.parentNode()) + applyList.prepend(new TQDomNamedNodeMap(shape.attributes())); // Apply parent attributes for(TQDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next()) @@ -628,7 +628,7 @@ bool KSVGIconEngine::load(int width, int height, const TQString &path) d->width = w; d->height = h; - d->painter->tqworldMatrix()->scale(vratiow, vratioh); + d->painter->worldMatrix()->scale(vratiow, vratioh); } else { @@ -637,10 +637,10 @@ bool KSVGIconEngine::load(int width, int height, const TQString &path) double ratiow = width / d->width; double ratioh = height / d->height; - d->painter->tqworldMatrix()->scale(ratiow, ratioh); + d->painter->worldMatrix()->scale(ratiow, ratioh); } - TQWMatrix initialMatrix = *d->painter->tqworldMatrix(); + TQWMatrix initialMatrix = *d->painter->worldMatrix(); d->helper->m_initialMatrix = initialMatrix; // Apply transform diff --git a/tdecore/svgicons/ksvgiconpainter.cpp b/tdecore/svgicons/ksvgiconpainter.cpp index 6c4c52c6a..dbd867f13 100644 --- a/tdecore/svgicons/ksvgiconpainter.cpp +++ b/tdecore/svgicons/ksvgiconpainter.cpp @@ -65,7 +65,7 @@ public: m_useFillGradient = false; m_useStrokeGradient = false; - m_tqworldMatrix = new TQWMatrix(); + m_worldMatrix = new TQWMatrix(); // Create new image with alpha support m_image = new TQImage(width, height, 32); @@ -102,7 +102,7 @@ public: art_free(m_buffer); delete m_image; - delete m_tqworldMatrix; + delete m_worldMatrix; for(TQMap<TQString, ArtGradientLinear *>::Iterator it = m_linearGradientMap.begin(); it != m_linearGradientMap.end(); ++it) { @@ -233,12 +233,12 @@ public: void drawBPath(ArtBpath *bpath) { double affine[6]; - affine[0] = m_tqworldMatrix->m11(); - affine[1] = m_tqworldMatrix->m12(); - affine[2] = m_tqworldMatrix->m21(); - affine[3] = m_tqworldMatrix->m22(); - affine[4] = m_tqworldMatrix->dx(); - affine[5] = m_tqworldMatrix->dy(); + affine[0] = m_worldMatrix->m11(); + affine[1] = m_worldMatrix->m12(); + affine[2] = m_worldMatrix->m21(); + affine[3] = m_worldMatrix->m22(); + affine[4] = m_worldMatrix->dx(); + affine[5] = m_worldMatrix->dy(); ArtBpath *temp = art_bpath_affine_transform(bpath, affine); ArtVpath *vec = art_bez_path_to_vec(temp, 0.25); @@ -249,12 +249,12 @@ public: void drawVPath(ArtVpath *vec) { double affine[6]; - affine[0] = m_tqworldMatrix->m11(); - affine[1] = m_tqworldMatrix->m12(); - affine[2] = m_tqworldMatrix->m21(); - affine[3] = m_tqworldMatrix->m22(); - affine[4] = m_tqworldMatrix->dx(); - affine[5] = m_tqworldMatrix->dy(); + affine[0] = m_worldMatrix->m11(); + affine[1] = m_worldMatrix->m12(); + affine[2] = m_worldMatrix->m21(); + affine[3] = m_worldMatrix->m22(); + affine[4] = m_worldMatrix->dx(); + affine[5] = m_worldMatrix->dy(); ArtVpath *temp = art_vpath_affine_transform(vec, affine); art_free(vec); @@ -461,10 +461,10 @@ public: m.map(x1, y1, &x1, &y1); m.map(x2, y2, &x2, &y2); - double x1n = x1 * m_tqworldMatrix->m11() + y1 * m_tqworldMatrix->m21() + m_tqworldMatrix->dx(); - double y1n = x1 * m_tqworldMatrix->m12() + y1 * m_tqworldMatrix->m22() + m_tqworldMatrix->dy(); - double x2n = x2 * m_tqworldMatrix->m11() + y2 * m_tqworldMatrix->m21() + m_tqworldMatrix->dx(); - double y2n = x2 * m_tqworldMatrix->m12() + y2 * m_tqworldMatrix->m22() + m_tqworldMatrix->dy(); + double x1n = x1 * m_worldMatrix->m11() + y1 * m_worldMatrix->m21() + m_worldMatrix->dx(); + double y1n = x1 * m_worldMatrix->m12() + y1 * m_worldMatrix->m22() + m_worldMatrix->dy(); + double x2n = x2 * m_worldMatrix->m11() + y2 * m_worldMatrix->m21() + m_worldMatrix->dx(); + double y2n = x2 * m_worldMatrix->m12() + y2 * m_worldMatrix->m22() + m_worldMatrix->dy(); double dx = x2n - x1n; double dy = y2n - y1n; @@ -515,12 +515,12 @@ public: else fy = cy; - radial->affine[0] = m_tqworldMatrix->m11(); - radial->affine[1] = m_tqworldMatrix->m12(); - radial->affine[2] = m_tqworldMatrix->m21(); - radial->affine[3] = m_tqworldMatrix->m22(); - radial->affine[4] = m_tqworldMatrix->dx(); - radial->affine[5] = m_tqworldMatrix->dy(); + radial->affine[0] = m_worldMatrix->m11(); + radial->affine[1] = m_worldMatrix->m12(); + radial->affine[2] = m_worldMatrix->m21(); + radial->affine[3] = m_worldMatrix->m22(); + radial->affine[4] = m_worldMatrix->dx(); + radial->affine[5] = m_worldMatrix->dy(); radial->fx = (fx - cx) / r; radial->fy = (fy - cy) / r; @@ -1123,7 +1123,7 @@ private: ArtSVP *m_clipSVP; TQImage *m_image; - TQWMatrix *m_tqworldMatrix; + TQWMatrix *m_worldMatrix; TQString m_fillRule; TQString m_joinStyle; @@ -1211,17 +1211,17 @@ TQImage *KSVGIconPainter::image() return new TQImage(*d->helper->m_image); } -TQWMatrix *KSVGIconPainter::tqworldMatrix() +TQWMatrix *KSVGIconPainter::worldMatrix() { - return d->helper->m_tqworldMatrix; + return d->helper->m_worldMatrix; } void KSVGIconPainter::setWorldMatrix(TQWMatrix *matrix) { - if(d->helper->m_tqworldMatrix) - delete d->helper->m_tqworldMatrix; + if(d->helper->m_worldMatrix) + delete d->helper->m_worldMatrix; - d->helper->m_tqworldMatrix = matrix; + d->helper->m_worldMatrix = matrix; } void KSVGIconPainter::setStrokeWidth(double width) @@ -2310,12 +2310,12 @@ void KSVGIconPainter::drawImage(double x, double y, TQImage &image) image = image.convertDepth(32); double affine[6]; - affine[0] = d->helper->m_tqworldMatrix->m11(); - affine[1] = d->helper->m_tqworldMatrix->m12(); - affine[2] = d->helper->m_tqworldMatrix->m21(); - affine[3] = d->helper->m_tqworldMatrix->m22(); + affine[0] = d->helper->m_worldMatrix->m11(); + affine[1] = d->helper->m_worldMatrix->m12(); + affine[2] = d->helper->m_worldMatrix->m21(); + affine[3] = d->helper->m_worldMatrix->m22(); // use the world matrix to convert the coordinates - d->helper->m_tqworldMatrix->map(x, y, &affine[4], &affine[5]); + d->helper->m_worldMatrix->map(x, y, &affine[4], &affine[5]); d->helper->art_rgba_rgba_affine(d->helper->m_buffer, 0, 0, d->helper->m_width, d->helper->m_height, d->helper->m_rowstride, image.bits(), image.width(), image.height(), diff --git a/tdecore/svgicons/ksvgiconpainter.h b/tdecore/svgicons/ksvgiconpainter.h index b80eccea8..de5644187 100644 --- a/tdecore/svgicons/ksvgiconpainter.h +++ b/tdecore/svgicons/ksvgiconpainter.h @@ -41,7 +41,7 @@ public: TQImage *image(); - TQWMatrix *tqworldMatrix(); + TQWMatrix *worldMatrix(); void finish(); @@ -61,7 +61,7 @@ public: void setStrokeDashOffset(const TQString &dashOffset); void setStrokeDashArray(const TQString &dashes); - void setWorldMatrix(TQWMatrix *tqworldMatrix); + void setWorldMatrix(TQWMatrix *worldMatrix); void setClippingRect(int x, int y, int w, int h); void drawRectangle(double x, double y, double w, double h, double rx, double ry); diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp index 8b6e8eea4..51a40b892 100644 --- a/tdecore/tests/kcalendartest.cpp +++ b/tdecore/tests/kcalendartest.cpp @@ -67,7 +67,7 @@ int main(int argc, char **argv) { option = args->getOption("date"); date = KGlobal::locale()->readDate(option); } else - date = TQDate::tqcurrentDate(); + date = TQDate::currentDate(); args->clear(); // Free up some memory. diff --git a/tdecore/tests/kconfigtestgui.h b/tdecore/tests/kconfigtestgui.h index 7655c8142..ec9be5a46 100644 --- a/tdecore/tests/kconfigtestgui.h +++ b/tdecore/tests/kconfigtestgui.h @@ -25,7 +25,7 @@ #include <tqfileinfo.h> #include <kdebug.h> #include <ksimpleconfig.h> -#include <tqtextstream.h> +#include <textstream.h> // Standard Qt widgets diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp index 29f6cd3e3..7323df34c 100644 --- a/tdecore/tests/klocaletest.cpp +++ b/tdecore/tests/klocaletest.cpp @@ -77,19 +77,19 @@ void Test::createFields() string+="Used language: "; string+=KGlobal::locale()->language()+"\n"; string+="Locale encoding: "; - string+=TQString::tqfromLatin1(KGlobal::locale()->encoding())+"\n"; + string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n"; string+="Localized date and time: "; - string+=KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()); + string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); string+="\nLocalized monetary numbers: "; string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89); // This will not work // but you can copy other *.mo file string+="\nSome localized strings:\n"; - string+=TQString::tqfromLatin1("Yes = ")+i18n("Yes")+"\n"; - string+=TQString::tqfromLatin1("No = ")+i18n("No")+"\n"; - string+=TQString::tqfromLatin1("Help = ")+i18n("Help")+"\n"; - string+=TQString::tqfromLatin1("Cancel = ")+i18n("Cancel")+"\n"; + string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n"; + string+=TQString::fromLatin1("No = ")+i18n("No")+"\n"; + string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n"; + string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n"; label=new TQLabel(string,this,"Label"); label->setGeometry(10,10,400,400); @@ -102,9 +102,9 @@ int main( int argc, char ** argv ) KLocale::setMainCatalogue("tdelibs"); KApplication a( argc, argv, "klocaletest" ); - KGlobal::locale()->setLanguage(TQString::tqfromLatin1("en_US")); - KGlobal::locale()->setCountry(TQString::tqfromLatin1("C")); - KGlobal::locale()->setThousandsSeparator(TQString::tqfromLatin1(",")); + KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US")); + KGlobal::locale()->setCountry(TQString::fromLatin1("C")); + KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(",")); TQString formatted; formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00"); @@ -152,8 +152,8 @@ int main( int argc, char ** argv ) TQDate date; date.setYMD( 2002, 5, 3 ); checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); - date = TQDate::tqcurrentDate(); - checkDate("readDate( TQDate::tqcurrentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); + date = TQDate::currentDate(); + checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); TQTime time; time = KGlobal::locale()->readTime( "11:22:33", &ok ); @@ -181,11 +181,11 @@ int main( int argc, char ** argv ) check("formatTime(\"0:22\", as duration)", timeStr, "00:22" ); kdDebug() << "setLanguage C\n"; - KGlobal::locale()->setLanguage(TQString::tqfromLatin1("C")); + KGlobal::locale()->setLanguage(TQString::fromLatin1("C")); kdDebug() << "C: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl; kdDebug() << "setLanguage de\n"; - KGlobal::locale()->setLanguage(TQString::tqfromLatin1("de")); + KGlobal::locale()->setLanguage(TQString::fromLatin1("de")); kdDebug() << "de: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl; diff --git a/tdecore/tests/kresolvertest.cpp b/tdecore/tests/kresolvertest.cpp index 1b2f5148d..f1d3c11f9 100644 --- a/tdecore/tests/kresolvertest.cpp +++ b/tdecore/tests/kresolvertest.cpp @@ -75,8 +75,8 @@ public: bool tryLookup(const char* node, const char *serv) { int error; - TQString _node = TQString::tqfromLatin1(node); - TQString _serv = TQString::tqfromLatin1(serv); + TQString _node = TQString::fromLatin1(node); + TQString _serv = TQString::fromLatin1(serv); printf("\tTrying to lookup %s|%s... ", node, serv); TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error); @@ -138,8 +138,8 @@ bool try_pton() bool tryLookup6(const char *node, const char *serv) { int error; - TQString _node = TQString::tqfromLatin1(node); - TQString _serv = TQString::tqfromLatin1(serv); + TQString _node = TQString::fromLatin1(node); + TQString _serv = TQString::fromLatin1(serv); printf("\tTrying to lookup IPv6 of %s|%s... ", node, serv); TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error); diff --git a/tdecore/tests/krfcdatetest.cpp b/tdecore/tests/krfcdatetest.cpp index 368a1106f..e335b17d9 100644 --- a/tdecore/tests/krfcdatetest.cpp +++ b/tdecore/tests/krfcdatetest.cpp @@ -4,7 +4,7 @@ #include <kdebug.h> #include <kglobal.h> #include <kcharsets.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <krfcdate.h> bool check(TQString txt, time_t a, time_t b) diff --git a/tdecore/tests/ktimezonestest.cpp b/tdecore/tests/ktimezonestest.cpp index 69ea7c8a1..650cc0512 100644 --- a/tdecore/tests/ktimezonestest.cpp +++ b/tdecore/tests/ktimezonestest.cpp @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) // Find the current offset of the UTC timezone. timezone = timezones.zone("UTC"); - printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::tqcurrentDateTime()) ); + printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) ); // Find some offsets for Europe/London. char *london = "Europe/London"; diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp index bcee63ac3..e9fb33254 100644 --- a/tdecore/tests/kurltest.cpp +++ b/tdecore/tests/kurltest.cpp @@ -7,7 +7,7 @@ #include <kdebug.h> #include <kglobal.h> #include <kcharsets.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqdatastream.h> #include <assert.h> #include <kcmdlineargs.h> @@ -384,7 +384,7 @@ int main(int argc, char *argv[]) check("KURL::setFileName()", u2.url(), "file:///home/dfaure/myotherfile.txt"); // more tricky, renaming a directory (kpropsdlg.cc, line ~ 238) TQString tmpurl = "file:/home/dfaure/myolddir/"; - if ( tmpurl.tqat(tmpurl.length() - 1) == '/') + if ( tmpurl.at(tmpurl.length() - 1) == '/') // It's a directory, so strip the trailing slash first tmpurl.truncate( tmpurl.length() - 1); KURL newUrl = tmpurl; diff --git a/tdefx/kdrawutil.h b/tdefx/kdrawutil.h index 44041968c..f1ec99ecb 100644 --- a/tdefx/kdrawutil.h +++ b/tdefx/kdrawutil.h @@ -21,7 +21,7 @@ #include <tqnamespace.h> #include <tqpainter.h> #include <tqbitmap.h> -#include <tqpalette.h> +#include <palette.h> #include <tdelibs_export.h> @@ -125,7 +125,7 @@ TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h); * @c \#include @c <kdrawutil.h> * * Paints the pixels covered by a round button of the given size with - * Qt::color1. This function is useful in TQStyle::tqdrawControlMask(). + * Qt::color1. This function is useful in TQStyle::drawControlMask(). * * @param p The painter to use for drawing the button. * @param x The X coordinate of the button. diff --git a/tdefx/kimageeffect.cpp b/tdefx/kimageeffect.cpp index 3f6aa5ccb..c0086d884 100644 --- a/tdefx/kimageeffect.cpp +++ b/tdefx/kimageeffect.cpp @@ -1110,7 +1110,7 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity) TQ_UINT32 *data = reinterpret_cast<TQ_UINT32*>( dst.bits() ); - // Check how many pixels we need to process to achieve 16 byte tqalignment + // Check how many pixels we need to process to achieve 16 byte alignment int offset = (16 - (TQ_UINT32( data ) & 0x0f)) / 4; // The main loop processes 8 pixels / iteration @@ -1358,7 +1358,7 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity) TQ_UINT32 *data1 = reinterpret_cast<TQ_UINT32*>( src.bits() ); TQ_UINT32 *data2 = reinterpret_cast<TQ_UINT32*>( dst.bits() ); - // Check how many pixels we need to process to achieve 16 byte tqalignment + // Check how many pixels we need to process to achieve 16 byte alignment int offset = (16 - (TQ_UINT32( data2 ) & 0x0f)) / 4; // The main loop processes 4 pixels / iteration @@ -3697,7 +3697,7 @@ TQImage KImageEffect::charcoal(TQImage &src, double radius, double sigma) TQImage img(edge(src, radius)); img = blur(img, radius, sigma); normalize(img); - img.tqinvertPixels(false); + img.invertPixels(false); KImageEffect::toGray(img); return(img); } diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp index 85503632b..419ae90ae 100644 --- a/tdefx/kstyle.cpp +++ b/tdefx/kstyle.cpp @@ -123,8 +123,8 @@ namespace static bool useDropShadow(TQWidget* w) { - return w && w->tqmetaObject() && - w->tqmetaObject()->findProperty("KStyleMenuDropShadow") != -1; + return w && w->metaObject() && + w->metaObject()->findProperty("KStyleMenuDropShadow") != -1; } } @@ -264,8 +264,8 @@ void KStyle::polish( TQWidget* widget ) if ( d->useFilledFrameWorkaround ) { if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape tqshape = frame->frameShape(); - if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) + TQFrame::Shape shape = frame->frameShape(); + if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) widget->installEventFilter(this); } } @@ -285,8 +285,8 @@ void KStyle::unPolish( TQWidget* widget ) if ( d->useFilledFrameWorkaround ) { if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape tqshape = frame->frameShape(); - if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) + TQFrame::Shape shape = frame->frameShape(); + if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) widget->removeEventFilter(this); } } @@ -554,7 +554,7 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) c // // What should "widget" be in actuality? How should I get it? From where? // // Almost certainly it should not be null! // TQWidget *widget = 0; -// tqdrawControl(pe, p, widget, r, cg, flags, opt); +// drawControl(pe, p, widget, r, cg, flags, opt); //} // #endif // USE_QT4 @@ -627,9 +627,9 @@ void KStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, } XRenderFillRectangle( - p->tqdevice()->x11Display(), + p->device()->x11Display(), PictOpOver, - p->tqdevice()->x11RenderHandle(), + p->device()->x11RenderHandle(), &clr, rect.x() + point.x(), rect.y() + point.y(), @@ -654,7 +654,7 @@ void KStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, -void KStyle::tqdrawControl( TQ_ControlElement element, +void KStyle::drawControl( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -668,7 +668,7 @@ void KStyle::tqdrawControl( TQ_ControlElement element, // ------------------------------------------------------------------------ case CE_TabBarTab: { const TQTabBar* tb = (const TQTabBar*) widget; - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); bool selected = flags & Style_Selected; int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right(); @@ -952,7 +952,7 @@ void KStyle::tqdrawControl( TQ_ControlElement element, } default: - TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt); } } @@ -979,7 +979,7 @@ TQRect KStyle::subRect(SubRect r, const TQWidget* widget) const } -int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const +int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const { switch(m) { @@ -1000,7 +1000,7 @@ int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) return widget->fontMetrics().lineSpacing(); else - return TQCommonStyle::tqpixelMetric(m, widget); + return TQCommonStyle::pixelMetric(m, widget); } // TABS @@ -1010,8 +1010,8 @@ int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabVSpace: { const TQTabBar * tb = (const TQTabBar *) widget; - if ( tb->tqshape() == TQTabBar::RoundedAbove || - tb->tqshape() == TQTabBar::RoundedBelow ) + if ( tb->shape() == TQTabBar::RoundedAbove || + tb->shape() == TQTabBar::RoundedBelow ) return 10; else return 4; @@ -1019,7 +1019,7 @@ int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabOverlap: { const TQTabBar* tb = (const TQTabBar*)widget; - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); if ( (tbs == TQTabBar::RoundedAbove) || (tbs == TQTabBar::RoundedBelow) ) @@ -1084,10 +1084,10 @@ int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const return 0; case PM_PopupMenuScrollerHeight: - return tqpixelMetric( PM_ScrollBarExtent, 0); + return pixelMetric( PM_ScrollBarExtent, 0); default: - return TQCommonStyle::tqpixelMetric( m, widget ); + return TQCommonStyle::pixelMetric( m, widget ); } } @@ -1104,7 +1104,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void KStyle::tqdrawComplexControl( TQ_ComplexControl control, +void KStyle::drawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -1227,7 +1227,7 @@ void KStyle::tqdrawComplexControl( TQ_ComplexControl control, // Draw the tickmarks if (controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, &p2, widget, + TQCommonStyle::drawComplexControl(control, &p2, widget, r, cg, flags, SC_SliderTickmarks, active, opt); // Draw the slider handle @@ -1253,7 +1253,7 @@ void KStyle::tqdrawComplexControl( TQ_ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); // If we're have a branch or are expanded... if ( controls & (SC_ListViewBranch | SC_ListViewExpand) ) @@ -1393,7 +1393,7 @@ void KStyle::tqdrawComplexControl( TQ_ComplexControl control, } default: - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } @@ -1432,7 +1432,7 @@ TQRect KStyle::querySubControlMetrics( TQ_ComplexControl control, const TQScrollBar *sb = (const TQScrollBar*)widget; bool horizontal = sb->orientation() == Qt::Horizontal; int sliderstart = sb->sliderStart(); - int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); + int sbextent = pixelMetric(PM_ScrollBarExtent, widget); int maxlen = (horizontal ? sb->width() : sb->height()) - (sbextent * (threeButtonScrollBar ? 3 : 2)); int sliderlen; @@ -1443,7 +1443,7 @@ TQRect KStyle::querySubControlMetrics( TQ_ComplexControl control, uint range = sb->maxValue() - sb->minValue(); sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep()); - int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1833,7 +1833,7 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap, } -int KStyle::tqstyleHint( TQ_StyleHint sh, const TQWidget* w, +int KStyle::styleHint( TQ_StyleHint sh, const TQWidget* w, const TQStyleOption &opt, TQStyleHintReturn* shr) const { switch (sh) @@ -1848,7 +1848,7 @@ int KStyle::tqstyleHint( TQ_StyleHint sh, const TQWidget* w, return d->menuAltKeyNavigation ? 1 : 0; case SH_PopupMenu_SubMenuPopupDelay: - if ( tqstyleHint( SH_PopupMenu_SloppySubMenus, w ) ) + if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) ) return QMIN( 100, d->popupMenuDelay ); else return d->popupMenuDelay; @@ -1884,7 +1884,7 @@ int KStyle::tqstyleHint( TQ_StyleHint sh, const TQWidget* w, } default: - return TQCommonStyle::tqstyleHint(sh, w, opt, shr); + return TQCommonStyle::styleHint(sh, w, opt, shr); } } @@ -1897,7 +1897,7 @@ bool KStyle::eventFilter( TQObject* object, TQEvent* event ) // ensure that the filled frame contents are properly painted. // We essentially modify the paintEvent's rect to include the // panel border, which also paints the widget's interior. - // This is nasty, but I see no other way to properly tqrepaint + // This is nasty, but I see no other way to properly repaint // filled frames in all QMenuBars and QToolBars. // -- Karol. TQFrame *frame = 0; @@ -2222,12 +2222,12 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event ) case XRender: #endif case SoftwareBlend: - blendToPixmap(p->tqcolorGroup(), p); + blendToPixmap(p->colorGroup(), p); break; case SoftwareTint: default: - blendToColor(p->tqcolorGroup().button()); + blendToColor(p->colorGroup().button()); }; p->setErasePixmap(pix); @@ -2315,10 +2315,10 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p) // Allow styles to define the blend pixmap - allows for some interesting effects. if (::tqqt_cast<TQPopupMenu*>(p)) - kstyle->renderMenuBlendPixmap( renderPix, p->tqcolorGroup(), + kstyle->renderMenuBlendPixmap( renderPix, p->colorGroup(), ::tqqt_cast<TQPopupMenu*>(p) ); else - renderPix.fill(p->tqcolorGroup().button()); // Just tint as the default behavior + renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior Display* dpy = qt_xdisplay(); Pixmap alphaPixmap; diff --git a/tdefx/kstyle.h b/tdefx/kstyle.h index da71d83b7..ed641d5c6 100644 --- a/tdefx/kstyle.h +++ b/tdefx/kstyle.h @@ -172,7 +172,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * This virtual function defines the pixmap used to blend between the popup * menu and the background to create different menu transparency effects. * For example, you can fill the pixmap "pix" with a gradient based on the - * popup's tqcolorGroup, a texture, or some other fancy painting routine. + * popup's colorGroup, a texture, or some other fancy painting routine. * KStyle will then internally blend this pixmap with a snapshot of the * background behind the popupMenu to create the illusion of transparency. * @@ -244,7 +244,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * * @see KStyle::KStylePrimitive * @see TQStyle::tqdrawPrimitive - * @see TQStyle::tqdrawComplexControl + * @see TQStyle::drawComplexControl */ virtual void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, @@ -293,7 +293,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle // #endif // USE_QT4 - void tqdrawControl( TQ_ControlElement element, + void drawControl( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -301,7 +301,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::SO_Default ) const; - void tqdrawComplexControl( TQ_ComplexControl control, + void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -321,7 +321,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle SubControl sc, const TQStyleOption& = TQStyleOption::SO_Default ) const; - int tqpixelMetric( PixelMetric m, + int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQRect subRect( SubRect r, @@ -331,7 +331,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle const TQWidget* widget = 0, const TQStyleOption& = TQStyleOption::SO_Default ) const; - int tqstyleHint( TQ_StyleHint sh, + int styleHint( TQ_StyleHint sh, const TQWidget* w = 0, const TQStyleOption &opt = TQStyleOption::SO_Default, TQStyleHintReturn* shr = 0 ) const; diff --git a/tdeprint/cups/cupsaddsmb2.cpp b/tdeprint/cups/cupsaddsmb2.cpp index ca40a10a7..ca7573300 100644 --- a/tdeprint/cups/cupsaddsmb2.cpp +++ b/tdeprint/cups/cupsaddsmb2.cpp @@ -24,7 +24,7 @@ #include <tqtimer.h> #include <tqprogressbar.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <klocale.h> #include <kmessagebox.h> @@ -156,7 +156,7 @@ void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen) while (1) { // read a line - line = TQString::tqfromLatin1(""); + line = TQString::fromLatin1(""); partial = true; while (index < buflen) { @@ -433,7 +433,7 @@ bool CupsAddSmb::doExport() m_actions << "quit"; m_proc.clearArguments(); - m_proc << "smbclient" << TQString::tqfromLatin1("//")+m_servered->text()+"/print$"; + m_proc << "smbclient" << TQString::fromLatin1("//")+m_servered->text()+"/print$"; return startProcess(); } diff --git a/tdeprint/cups/cupsdconf2/addressdialog.cpp b/tdeprint/cups/cupsdconf2/addressdialog.cpp index fab6a6fba..32217b2af 100644 --- a/tdeprint/cups/cupsdconf2/addressdialog.cpp +++ b/tdeprint/cups/cupsdconf2/addressdialog.cpp @@ -22,7 +22,7 @@ #include <tqcombobox.h> #include <tqlineedit.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsdconf2/browsedialog.cpp b/tdeprint/cups/cupsdconf2/browsedialog.cpp index b337eb883..6460a8aa3 100644 --- a/tdeprint/cups/cupsdconf2/browsedialog.cpp +++ b/tdeprint/cups/cupsdconf2/browsedialog.cpp @@ -24,7 +24,7 @@ #include <tqpushbutton.h> #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <tqregexp.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp index 4b056cdb0..acfe393c4 100644 --- a/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp @@ -23,7 +23,7 @@ #include "browsedialog.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcheckbox.h> #include <tqcombobox.h> #include <tqwhatsthis.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdconf.h b/tdeprint/cups/cupsdconf2/cupsdconf.h index 70b4f591b..5dff96f91 100644 --- a/tdeprint/cups/cupsdconf2/cupsdconf.h +++ b/tdeprint/cups/cupsdconf2/cupsdconf.h @@ -23,7 +23,7 @@ #include <tqstring.h> #include <tqstringlist.h> #include <tqptrlist.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqpair.h> #include "cupsdcomment.h" diff --git a/tdeprint/cups/cupsdconf2/cupsddirpage.cpp b/tdeprint/cups/cupsdconf2/cupsddirpage.cpp index 268465a76..6af5a8a54 100644 --- a/tdeprint/cups/cupsdconf2/cupsddirpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsddirpage.cpp @@ -23,7 +23,7 @@ #include "qdirmultilineedit.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp b/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp index 79c8a9401..32c6bdaab 100644 --- a/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdfilterpage.cpp @@ -23,7 +23,7 @@ #include <tqlabel.h> #include <tqlineedit.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <tqcombobox.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp b/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp index f12f82f1e..31f3afe57 100644 --- a/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdjobspage.cpp @@ -22,7 +22,7 @@ #include <tqlabel.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp b/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp index 61a89f933..cf52f25e3 100644 --- a/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdlogpage.cpp @@ -24,7 +24,7 @@ #include <tqlabel.h> #include <tqcombobox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp b/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp index 9edca5868..29ef71c81 100644 --- a/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp @@ -26,7 +26,7 @@ #include <tqlabel.h> #include <tqcheckbox.h> #include <tqcombobox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp b/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp index 092e1a7e5..2249050ab 100644 --- a/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp @@ -25,7 +25,7 @@ #include <tqlabel.h> #include <tqlineedit.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> @@ -127,7 +127,7 @@ void CupsdSecurityPage::slotAdd() { if (KMessageBox::warningContinueCancel(this, i18n("This location is already defined. Do you want to replace the existing one?"),TQString::null,i18n("Replace")) == KMessageBox::Continue) { - index = locs_.tqat(); + index = locs_.at(); locs_.remove(); break; } @@ -149,7 +149,7 @@ void CupsdSecurityPage::slotAdd() void CupsdSecurityPage::slotEdit(int index) { - CupsLocation *loc = locs_.tqat(index); + CupsLocation *loc = locs_.at(index); LocationDialog::editLocation(loc, this, conf_); } diff --git a/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp b/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp index cfd731430..ecfebfa92 100644 --- a/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdserverpage.cpp @@ -24,7 +24,7 @@ #include <tqlabel.h> #include <tqcheckbox.h> #include <tqcombobox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsdconf2/cupsdsplash.cpp b/tdeprint/cups/cupsdconf2/cupsdsplash.cpp index a058299f0..c514bd429 100644 --- a/tdeprint/cups/cupsdconf2/cupsdsplash.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdsplash.cpp @@ -21,7 +21,7 @@ #include <tqlabel.h> #include <tqpixmap.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kstandarddirs.h> diff --git a/tdeprint/cups/cupsdconf2/editlist.cpp b/tdeprint/cups/cupsdconf2/editlist.cpp index 754c9659e..0b325311b 100644 --- a/tdeprint/cups/cupsdconf2/editlist.cpp +++ b/tdeprint/cups/cupsdconf2/editlist.cpp @@ -21,7 +21,7 @@ #include <klistbox.h> #include <kpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kiconloader.h> #include <kguiitem.h> diff --git a/tdeprint/cups/cupsdconf2/locationdialog.cpp b/tdeprint/cups/cupsdconf2/locationdialog.cpp index 7e1858cc7..d1e9ac96a 100644 --- a/tdeprint/cups/cupsdconf2/locationdialog.cpp +++ b/tdeprint/cups/cupsdconf2/locationdialog.cpp @@ -24,7 +24,7 @@ #include <tqlineedit.h> #include <tqcombobox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqpushbutton.h> #include <tqwhatsthis.h> @@ -128,7 +128,7 @@ void LocationDialog::setInfos(CupsdConf *conf) void LocationDialog::fillLocation(CupsLocation *loc) { - loc->resource_ = conf_->resources_.tqat(resource_->currentItem()); + loc->resource_ = conf_->resources_.at(resource_->currentItem()); loc->resourcename_ = loc->resource_->path_; loc->authtype_ = authtype_->currentItem(); loc->authclass_ = (loc->authtype_ == AUTHTYPE_NONE ? AUTHCLASS_ANONYMOUS : authclass_->currentItem()); diff --git a/tdeprint/cups/cupsdconf2/portdialog.cpp b/tdeprint/cups/cupsdconf2/portdialog.cpp index 18cade9fc..b89a4adb2 100644 --- a/tdeprint/cups/cupsdconf2/portdialog.cpp +++ b/tdeprint/cups/cupsdconf2/portdialog.cpp @@ -25,7 +25,7 @@ #include <tqcheckbox.h> #include <tqpushbutton.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsdconf2/qdirlineedit.cpp b/tdeprint/cups/cupsdconf2/qdirlineedit.cpp index 7cf0ea74e..9ee1e0f2e 100644 --- a/tdeprint/cups/cupsdconf2/qdirlineedit.cpp +++ b/tdeprint/cups/cupsdconf2/qdirlineedit.cpp @@ -20,7 +20,7 @@ #include "qdirlineedit.h" #include <tqlineedit.h> -#include <tqlayout.h> +#include <layout.h> #include <kpushbutton.h> #include <kfiledialog.h> #include <kiconloader.h> diff --git a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index b1bd96ee6..026c39aad 100644 --- a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -19,7 +19,7 @@ #include "qdirmultilineedit.h" -#include <tqlayout.h> +#include <layout.h> #include <tqheader.h> #include <tqpushbutton.h> #include <klistview.h> diff --git a/tdeprint/cups/cupsdconf2/sizewidget.cpp b/tdeprint/cups/cupsdconf2/sizewidget.cpp index 742702e48..d59735349 100644 --- a/tdeprint/cups/cupsdconf2/sizewidget.cpp +++ b/tdeprint/cups/cupsdconf2/sizewidget.cpp @@ -21,7 +21,7 @@ #include <tqcombobox.h> #include <tqspinbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <klocale.h> diff --git a/tdeprint/cups/cupsinfos.cpp b/tdeprint/cups/cupsinfos.cpp index 1fae8e0db..2f7031503 100644 --- a/tdeprint/cups/cupsinfos.cpp +++ b/tdeprint/cups/cupsinfos.cpp @@ -119,9 +119,9 @@ void CupsInfos::load() { KConfig *conf_ = KMFactory::self()->printConfig(); conf_->setGroup("CUPS"); - host_ = conf_->readEntry("Host",TQString::tqfromLatin1(cupsServer())); + host_ = conf_->readEntry("Host",TQString::fromLatin1(cupsServer())); port_ = conf_->readNumEntry("Port",ippPort()); - login_ = conf_->readEntry("Login",TQString::tqfromLatin1(cupsUser())); + login_ = conf_->readEntry("Login",TQString::fromLatin1(cupsUser())); savepwd_ = conf_->readBoolEntry( "SavePassword", false ); if ( savepwd_ ) { diff --git a/tdeprint/cups/imagepreview.cpp b/tdeprint/cups/imagepreview.cpp index 9912c1886..e2401d6d3 100644 --- a/tdeprint/cups/imagepreview.cpp +++ b/tdeprint/cups/imagepreview.cpp @@ -51,7 +51,7 @@ void ImagePreview::setParameters(int brightness, int hue, int saturation, int ga hue_ = hue; saturation_ = saturation; gamma_ = gamma; - tqrepaint(); + repaint(); } void ImagePreview::paintEvent(TQPaintEvent*){ diff --git a/tdeprint/cups/ippreportdlg.cpp b/tdeprint/cups/ippreportdlg.cpp index 5fa54e11e..1e07789ac 100644 --- a/tdeprint/cups/ippreportdlg.cpp +++ b/tdeprint/cups/ippreportdlg.cpp @@ -59,7 +59,7 @@ void IppReportDlg::slotUser1() int hh = rich.height(), page(1); while (1) { - rich.draw(&painter, margin, margin, r, tqcolorGroup()); + rich.draw(&painter, margin, margin, r, colorGroup()); TQString s = caption() + ": " + TQString::number(page); TQRect br = painter.fontMetrics().boundingRect(s); painter.drawText(r.right()-br.width()-5, r.top()-br.height()-4, br.width()+5, br.height()+4, Qt::AlignRight|Qt::AlignTop, s); diff --git a/tdeprint/cups/ipprequest.cpp b/tdeprint/cups/ipprequest.cpp index 16cbe3308..c7472a9ae 100644 --- a/tdeprint/cups/ipprequest.cpp +++ b/tdeprint/cups/ipprequest.cpp @@ -66,7 +66,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString:: ipp_attribute_t *attr = req->attrs; while (attr) { - TQString s = TQString::tqfromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); + TQString s = TQString::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); for (int i=0;i<attr->num_values;i++) { switch (attr->value_tag) diff --git a/tdeprint/cups/ipprequest.h b/tdeprint/cups/ipprequest.h index ba8b2f081..258b44803 100644 --- a/tdeprint/cups/ipprequest.h +++ b/tdeprint/cups/ipprequest.h @@ -22,7 +22,7 @@ #include <tqstring.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqmap.h> #include <cups/ipp.h> diff --git a/tdeprint/cups/kcupsprinterimpl.cpp b/tdeprint/cups/kcupsprinterimpl.cpp index e016e9954..5c2de105b 100644 --- a/tdeprint/cups/kcupsprinterimpl.cpp +++ b/tdeprint/cups/kcupsprinterimpl.cpp @@ -67,8 +67,8 @@ bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) // check printer object if (!printer) return false; - TQString hoststr = TQString::tqfromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); - cmd = TQString::tqfromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName())); + TQString hoststr = TQString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); + cmd = TQString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName())); if (!CupsInfos::self()->login().isEmpty()) { TQString userstr(CupsInfos::self()->login()); @@ -127,7 +127,7 @@ void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& valu KPrinterImpl::broadcastOption("orientation-requested",(value == "Landscape" ? "4" : "3")); else if (key == "kde-pagesize") { - TQString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); + TQString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); KPrinterImpl::broadcastOption("PageSize",pagename); // simple hack for classes KPrinterImpl::broadcastOption("media",pagename); diff --git a/tdeprint/cups/kmconfigcups.cpp b/tdeprint/cups/kmconfigcups.cpp index 7e03dae01..d130f217f 100644 --- a/tdeprint/cups/kmconfigcups.cpp +++ b/tdeprint/cups/kmconfigcups.cpp @@ -24,7 +24,7 @@ #include <kconfig.h> #include <kdialog.h> -#include <tqlayout.h> +#include <layout.h> KMConfigCups::KMConfigCups(TQWidget *parent) : KMConfigPage(parent,"ConfigCups") diff --git a/tdeprint/cups/kmconfigcupsdir.cpp b/tdeprint/cups/kmconfigcupsdir.cpp index fbec34f2a..d63e87de7 100644 --- a/tdeprint/cups/kmconfigcupsdir.cpp +++ b/tdeprint/cups/kmconfigcupsdir.cpp @@ -25,7 +25,7 @@ #include <kdialog.h> #include <kconfig.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <kcursor.h> KMConfigCupsDir::KMConfigCupsDir(TQWidget *parent) diff --git a/tdeprint/cups/kmcupsconfigwidget.cpp b/tdeprint/cups/kmcupsconfigwidget.cpp index 482680bd6..117247ec5 100644 --- a/tdeprint/cups/kmcupsconfigwidget.cpp +++ b/tdeprint/cups/kmcupsconfigwidget.cpp @@ -24,7 +24,7 @@ #include <tqgroupbox.h> #include <tqlineedit.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqvalidator.h> @@ -87,13 +87,13 @@ KMCupsConfigWidget::KMCupsConfigWidget(TQWidget *parent, const char *name) TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); lay0->addWidget(m_hostbox,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->addWidget(m_hostlabel,0,0); lay2->addWidget(m_portlabel,1,0); lay2->addWidget(m_host,0,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->addWidget(m_loginlabel,0,0); lay3->addWidget(m_passwordlabel,1,0); diff --git a/tdeprint/cups/kmcupsjobmanager.cpp b/tdeprint/cups/kmcupsjobmanager.cpp index 58de0818a..be088d360 100644 --- a/tdeprint/cups/kmcupsjobmanager.cpp +++ b/tdeprint/cups/kmcupsjobmanager.cpp @@ -93,7 +93,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int ac if (argstr.isEmpty()) return false; req.setOperation(CUPS_MOVE_JOB); uri = - TQString::tqfromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(), + TQString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(), argstr); req.addURI(IPP_TAG_OPERATION, "job-printer-uri", uri); break; @@ -150,7 +150,7 @@ bool KMCupsJobManager::listJobs(const TQString& prname, KMJobManager::JobType ty // other attributes req.addKeyword(IPP_TAG_OPERATION, "requested-attributes", keys); if (type == KMJobManager::CompletedJobs) - req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::tqfromLatin1("completed")); + req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::fromLatin1("completed")); if (limit > 0) req.addInteger(IPP_TAG_OPERATION,"limit",limit); @@ -218,7 +218,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr) } else if (name == "job-priority") { - job->setAttribute(0, TQString::tqfromLatin1("%1").arg(attr->values[0].integer, 3)); + job->setAttribute(0, TQString::fromLatin1("%1").arg(attr->values[0].integer, 3)); } else if (name == "job-billing") { diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index 8db6bdc6d..ed205316f 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -34,7 +34,7 @@ #include "ppdloader.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <tqtimer.h> #include <tqsocket.h> @@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager() TQString KMCupsManager::driverDbCreationProgram() { - return TQString::tqfromLatin1("/opt/trinity/bin/make_driver_db_cups"); + return TQString::fromLatin1("/opt/trinity/bin/make_driver_db_cups"); } TQString KMCupsManager::driverDirectory() @@ -173,7 +173,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p) else if (!p->option("requesting-user-name-allowed").isEmpty()) req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQStringList::split(",",p->option("requesting-user-name-allowed"),false)); else - req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::tqfromLatin1("all")); + req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::fromLatin1("all")); } req.addText(IPP_TAG_PRINTER,"printer-info",p->description()); req.addText(IPP_TAG_PRINTER,"printer-location",p->location()); @@ -287,8 +287,8 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) delete kes; m_hostSuccess = false; } else { - TQDateTime tm = TQDateTime::tqcurrentDateTime().addSecs(2); - while (!m_lookupDone && (TQDateTime::tqcurrentDateTime() < tm)) + TQDateTime tm = TQDateTime::currentDateTime().addSecs(2); + while (!m_lookupDone && (TQDateTime::currentDateTime() < tm)) tqApp->processEvents(); kes->cancelAsyncConnect(); @@ -358,8 +358,8 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) // banners req.name("job-sheets-default",values); while (values.count() < 2) values.append("none"); - p->setOption("kde-banners",values.join(TQString::tqfromLatin1(","))); - if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::tqfromLatin1(","))); + p->setOption("kde-banners",values.join(TQString::fromLatin1(","))); + if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(","))); // quotas int ival; @@ -405,7 +405,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p) req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); req.addMime(IPP_TAG_OPERATION,"document-format","application/postscript"); if (!CupsInfos::self()->login().isEmpty()) req.addName(IPP_TAG_OPERATION,"requesting-user-name",CupsInfos::self()->login()); - req.addName(IPP_TAG_OPERATION,"job-name",TQString::tqfromLatin1("KDE Print Test")); + req.addName(IPP_TAG_OPERATION,"job-name",TQString::fromLatin1("KDE Print Test")); if (req.doFileRequest("/printers/",testpage)) return true; reportIppError(&req); @@ -453,7 +453,7 @@ void KMCupsManager::loadServerPrinters() // load default req.init(); req.setOperation(CUPS_GET_DEFAULT); - req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name")); if (req.doRequest("/printers/")) { TQString s = TQString::null; @@ -576,7 +576,7 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) { TQStringList comps = TQStringList::split('/', drname, false); TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - TQString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -691,7 +691,7 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) keyword = line.mid(8,p-8); DrBase *bopt = 0; if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" ) - bopt = driver->findOption( TQString::tqfromLatin1( "PageSize" ) ); + bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) ); else bopt = driver->findOption( keyword ); if (bopt) @@ -938,7 +938,7 @@ void KMCupsManager::slotConnectionSuccess() IppRequest req; req.setOperation( CUPS_GET_PRINTERS ); - req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::tqfromLatin1( "printer-name" ) ); + req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::fromLatin1( "printer-name" ) ); if ( req.doRequest( "/printers/" ) ) setUpdatePossible( true ); else diff --git a/tdeprint/cups/kmpropbanners.cpp b/tdeprint/cups/kmpropbanners.cpp index 22098cdff..479a7e106 100644 --- a/tdeprint/cups/kmpropbanners.cpp +++ b/tdeprint/cups/kmpropbanners.cpp @@ -23,7 +23,7 @@ #include "kmwbanners.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KMPropBanners::KMPropBanners(TQWidget *parent, const char *name) diff --git a/tdeprint/cups/kmpropquota.cpp b/tdeprint/cups/kmpropquota.cpp index 9df6cbcb2..1f80e16d6 100644 --- a/tdeprint/cups/kmpropquota.cpp +++ b/tdeprint/cups/kmpropquota.cpp @@ -22,7 +22,7 @@ #include "kmwizard.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> // some forward declarations (see kmwquota.cpp) diff --git a/tdeprint/cups/kmpropusers.cpp b/tdeprint/cups/kmpropusers.cpp index 65a9e4dbd..d5b2290d7 100644 --- a/tdeprint/cups/kmpropusers.cpp +++ b/tdeprint/cups/kmpropusers.cpp @@ -21,15 +21,15 @@ #include "kmprinter.h" #include "kmwizard.h" -#include <tqtextview.h> -#include <tqlayout.h> +#include <textview.h> +#include <layout.h> #include <klocale.h> KMPropUsers::KMPropUsers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) { m_text = new TQTextView(this); - m_text->setPaper(tqcolorGroup().background()); + m_text->setPaper(colorGroup().background()); m_text->setFrameStyle(TQFrame::NoFrame); TQVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0); diff --git a/tdeprint/cups/kmwbanners.cpp b/tdeprint/cups/kmwbanners.cpp index c221f69d7..59b3d10ff 100644 --- a/tdeprint/cups/kmwbanners.cpp +++ b/tdeprint/cups/kmwbanners.cpp @@ -25,7 +25,7 @@ #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmap.h> #include <klocale.h> diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp index 352081f6c..132e8c1e0 100644 --- a/tdeprint/cups/kmwfax.cpp +++ b/tdeprint/cups/kmwfax.cpp @@ -24,7 +24,7 @@ #include "cupsinfos.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klistbox.h> #include <klocale.h> #include <kiconloader.h> @@ -48,7 +48,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) // initialize IppRequest req; req.setOperation(CUPS_GET_DEVICES); - TQString uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + TQString uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); if (req.doRequest("/")) { @@ -57,7 +57,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) { if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0) { - m_list->insertItem(SmallIcon("blockdevice"),TQString::tqfromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(attr->values[0].string.text)); } attr = attr->next; } diff --git a/tdeprint/cups/kmwipp.cpp b/tdeprint/cups/kmwipp.cpp index 119da629a..cb9dedd6c 100644 --- a/tdeprint/cups/kmwipp.cpp +++ b/tdeprint/cups/kmwipp.cpp @@ -41,7 +41,7 @@ KMWIpp::KMWIpp(TQWidget *parent, const char *name) "before continuing.</p>")); setLabel(0,i18n("Host:")); setLabel(1,i18n("Port:")); - setText( 1, TQString::tqfromLatin1( "631" ) ); + setText( 1, TQString::fromLatin1( "631" ) ); } bool KMWIpp::isValid(TQString& msg) diff --git a/tdeprint/cups/kmwippprinter.cpp b/tdeprint/cups/kmwippprinter.cpp index 0a0c7b672..5559bc8bb 100644 --- a/tdeprint/cups/kmwippprinter.cpp +++ b/tdeprint/cups/kmwippprinter.cpp @@ -30,8 +30,8 @@ #include <tqlineedit.h> #include <tqlabel.h> #include <kmessagebox.h> -#include <tqtextview.h> -#include <tqlayout.h> +#include <textview.h> +#include <layout.h> #include <tqregexp.h> #include <kseparator.h> #include <klocale.h> @@ -59,7 +59,7 @@ KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name) l1->setBuddy(m_uri); m_info = new TQTextView(this); - m_info->setPaper(tqcolorGroup().background()); + m_info->setPaper(colorGroup().background()); m_info->setMinimumHeight(100); m_info->setText(i18n("<p>Either enter the printer URI directly, or use the network scanning facility.</p>")); m_ippreport = new KPushButton(KGuiItem(i18n("&IPP Report"), "tdeprint_report"), this); @@ -157,7 +157,7 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) req.setOperation(IPP_GET_PRINTER_ATTRIBUTES); req.setHost(item->text(1)); req.setPort(item->text(2).toInt()); - uri = TQString::tqfromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2)); + uri = TQString::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2)); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); keys.append("printer-name"); keys.append("printer-state"); @@ -176,7 +176,7 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) if (req.uri("printer-uri-supported",value)) { if (value[0] == '/') - value.prepend(TQString::tqfromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2))); + value.prepend(TQString::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2))); m_uri->setText(value); } if (req.text("printer-make-and-model",value) && !value.isEmpty()) txt.append(i18n("<b>Model</b>: %1<br>").arg(value)); diff --git a/tdeprint/cups/kmwippselect.cpp b/tdeprint/cups/kmwippselect.cpp index 5c9cad356..b13fb05fa 100644 --- a/tdeprint/cups/kmwippselect.cpp +++ b/tdeprint/cups/kmwippselect.cpp @@ -24,7 +24,7 @@ #include "ipprequest.h" #include <klistbox.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kdebug.h> #include <kiconloader.h> @@ -75,16 +75,16 @@ void KMWIppSelect::initPrinter(KMPrinter *p) IppRequest req; TQString uri; req.setOperation(CUPS_GET_PRINTERS); - uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); - req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name")); if (req.doRequest("/printers/")) { ipp_attribute_t *attr = req.first(); while (attr) { if (attr->name && strcmp(attr->name,"printer-name") == 0) - m_list->insertItem(SmallIcon("tdeprint_printer"),TQString::tqfromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("tdeprint_printer"),TQString::fromLatin1(attr->values[0].string.text)); attr = attr->next; } m_list->sort(); diff --git a/tdeprint/cups/kmwother.cpp b/tdeprint/cups/kmwother.cpp index 596f61990..529aba14a 100644 --- a/tdeprint/cups/kmwother.cpp +++ b/tdeprint/cups/kmwother.cpp @@ -24,7 +24,7 @@ #include "cupsinfos.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqheader.h> #include <tqdict.h> diff --git a/tdeprint/cups/kmwquota.cpp b/tdeprint/cups/kmwquota.cpp index 67245fb20..a9b0eb89d 100644 --- a/tdeprint/cups/kmwquota.cpp +++ b/tdeprint/cups/kmwquota.cpp @@ -26,7 +26,7 @@ #include <tqspinbox.h> #include <tqlabel.h> #include <tqcombobox.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #ifdef HAVE_LIMITS_H diff --git a/tdeprint/cups/kmwusers.cpp b/tdeprint/cups/kmwusers.cpp index 714f6f4d4..520a2568c 100644 --- a/tdeprint/cups/kmwusers.cpp +++ b/tdeprint/cups/kmwusers.cpp @@ -24,7 +24,7 @@ #include "kmprinter.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcombobox.h> #include <klocale.h> #include <keditlistbox.h> diff --git a/tdeprint/cups/kphpgl2page.cpp b/tdeprint/cups/kphpgl2page.cpp index 080cdf453..deaad08f5 100644 --- a/tdeprint/cups/kphpgl2page.cpp +++ b/tdeprint/cups/kphpgl2page.cpp @@ -21,7 +21,7 @@ #include <tqcheckbox.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> #include <knuminput.h> diff --git a/tdeprint/cups/kpimagepage.cpp b/tdeprint/cups/kpimagepage.cpp index 13332dee3..3715a341b 100644 --- a/tdeprint/cups/kpimagepage.cpp +++ b/tdeprint/cups/kpimagepage.cpp @@ -30,7 +30,7 @@ #include <tqapplication.h> #include <tqimage.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> #include <knuminput.h> @@ -192,7 +192,7 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) TQString whatsThisPreviewPositionImagePage = i18n( " <qt> " " <p><b>Position Preview Thumbnail</b></p> " " <p>This position preview thumbnail indicates the position of the image on the paper sheet. " - " <p>Click on horizontal and vertical radio buttons to move image tqalignment on paper around. Options are: " + " <p>Click on horizontal and vertical radio buttons to move image alignment on paper around. Options are: " " <ul> " " <li> center </li>" " <li> top </li>" @@ -353,7 +353,7 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) l0->addWidget(sizebox, 1, 0); l0->addWidget(positionbox, 1, 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_hue, 1, 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->addMultiCellWidget(m_preview, 0, 3, 1, 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->addWidget(lab); l2->addWidget(m_sizetype); l2->addSpacing(10); l2->addWidget(m_size); 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); TQVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10); l3->addLayout(l4, 0, 1); diff --git a/tdeprint/cups/kpschedulepage.cpp b/tdeprint/cups/kpschedulepage.cpp index 4d8bab4d1..6b085cc92 100644 --- a/tdeprint/cups/kpschedulepage.cpp +++ b/tdeprint/cups/kpschedulepage.cpp @@ -20,7 +20,7 @@ #include "kpschedulepage.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcombobox.h> #include <tqregexp.h> #include <tqdatetimeedit.h> diff --git a/tdeprint/cups/kptagspage.cpp b/tdeprint/cups/kptagspage.cpp index f47b0930c..40c20db70 100644 --- a/tdeprint/cups/kptagspage.cpp +++ b/tdeprint/cups/kptagspage.cpp @@ -21,7 +21,7 @@ #include <tqtable.h> #include <tqheader.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqregexp.h> #include <tqwhatsthis.h> diff --git a/tdeprint/cups/kptextpage.cpp b/tdeprint/cups/kptextpage.cpp index 3fe711104..a8cc88098 100644 --- a/tdeprint/cups/kptextpage.cpp +++ b/tdeprint/cups/kptextpage.cpp @@ -24,7 +24,7 @@ #include <tqbuttongroup.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqradiobutton.h> #include <tqwhatsthis.h> diff --git a/tdeprint/driver.cpp b/tdeprint/driver.cpp index 072f125c6..abc468f7a 100644 --- a/tdeprint/driver.cpp +++ b/tdeprint/driver.cpp @@ -334,7 +334,7 @@ void DrGroup::flattenGroup(TQMap<TQString, DrBase*>& optmap, int& index) optmap[oit.current()->name()] = oit.current(); if (name().isEmpty()) - optmap[TQString::tqfromLatin1("group%1").arg(index++)] = this; + optmap[TQString::fromLatin1("group%1").arg(index++)] = this; else optmap[name()] = this; @@ -627,7 +627,7 @@ void DrListOption::setChoice(int choicenum) { if (choicenum >= 0 && choicenum < (int)m_choices.count()) { - setValueText(m_choices.tqat(choicenum)->name()); + setValueText(m_choices.at(choicenum)->name()); } } diff --git a/tdeprint/driveritem.cpp b/tdeprint/driveritem.cpp index b6531fef2..1ce2f5625 100644 --- a/tdeprint/driveritem.cpp +++ b/tdeprint/driveritem.cpp @@ -46,7 +46,7 @@ void DriverItem::updateText() { QString s(m_item->get("text")); if (m_item->isOption()) - s.append(TQString::tqfromLatin1(": <%1>").arg(m_item->prettyText())); + s.append(TQString::fromLatin1(": <%1>").arg(m_item->prettyText())); if (m_item->type() == DrBase::List) { // remove all children: something has changed (otherwise this @@ -107,7 +107,7 @@ void DriverItem::paintCell(TQPainter *p, const TQColorGroup& cg, int, int width, p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s); w += w1; p->setPen(cg.text()); - s = TQString::tqfromLatin1(">"); + s = TQString::fromLatin1(">"); w1 = p->fontMetrics().width(s); p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s); } @@ -133,7 +133,7 @@ bool DriverItem::updateConflict() m_conflict = (m_item->conflict()); } } - tqrepaint(); + repaint(); return m_conflict; } diff --git a/tdeprint/driverview.cpp b/tdeprint/driverview.cpp index f7feabb06..bb78f1a3d 100644 --- a/tdeprint/driverview.cpp +++ b/tdeprint/driverview.cpp @@ -25,7 +25,7 @@ #include <tqlistview.h> #include <tqsplitter.h> #include <tqheader.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/droptionview.cpp b/tdeprint/droptionview.cpp index 2ba4d1799..504003173 100644 --- a/tdeprint/droptionview.cpp +++ b/tdeprint/droptionview.cpp @@ -29,7 +29,7 @@ #include <tqvbuttongroup.h> #include <tqradiobutton.h> #include <tqwidgetstack.h> -#include <tqlayout.h> +#include <layout.h> #include <tqapplication.h> #include <kcursor.h> diff --git a/tdeprint/foomatic/kfoomaticprinterimpl.cpp b/tdeprint/foomatic/kfoomaticprinterimpl.cpp index d47a5e134..b628ac6d9 100644 --- a/tdeprint/foomatic/kfoomaticprinterimpl.cpp +++ b/tdeprint/foomatic/kfoomaticprinterimpl.cpp @@ -44,7 +44,7 @@ bool KFoomaticPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) QString exe = executable(); if (!exe.isEmpty()) { - cmd = exe + TQString::tqfromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd = exe + TQString::fromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies()); return true; } else diff --git a/tdeprint/foomatic/kmfoomaticmanager.cpp b/tdeprint/foomatic/kmfoomaticmanager.cpp index 53049852b..6a4de31eb 100644 --- a/tdeprint/foomatic/kmfoomaticmanager.cpp +++ b/tdeprint/foomatic/kmfoomaticmanager.cpp @@ -136,7 +136,7 @@ DrMain* KMFoomaticManager::createDriverFromXML(TQDomElement *elem) { driver->set("manufacturer", pelem.namedItem("make").toElement().text()); driver->set("model", pelem.namedItem("model").toElement().text()); - QString s = TQString::tqfromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text()); + QString s = TQString::fromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text()); driver->set("description", s); driver->set("text", s); diff --git a/tdeprint/kfilelist.cpp b/tdeprint/kfilelist.cpp index 4f3cabe5b..d93cd01b9 100644 --- a/tdeprint/kfilelist.cpp +++ b/tdeprint/kfilelist.cpp @@ -21,7 +21,7 @@ #include <tqtoolbutton.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqheader.h> #include <tqwhatsthis.h> diff --git a/tdeprint/kmfactory.cpp b/tdeprint/kmfactory.cpp index 3206d3cee..b79c76240 100644 --- a/tdeprint/kmfactory.cpp +++ b/tdeprint/kmfactory.cpp @@ -213,7 +213,7 @@ void KMFactory::loadFactory(const TQString& syst) if (sys.isEmpty()) // load default configured print plugin sys = printSystem(); - TQString libname = TQString::tqfromLatin1("tdeprint_%1").arg(sys); + TQString libname = TQString::fromLatin1("tdeprint_%1").arg(sys); m_factory = KLibLoader::self()->factory(TQFile::encodeName(libname)); if (!m_factory) { @@ -311,7 +311,7 @@ KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name) { TQString path(name); if (path[0] != '/') - path = locate("data", TQString::tqfromLatin1("tdeprint/plugins/%1.print").arg(name)); + path = locate("data", TQString::fromLatin1("tdeprint/plugins/%1.print").arg(name)); KSimpleConfig conf(path); PluginInfo info; @@ -363,7 +363,7 @@ TQString KMFactory::autoDetect() currentPrecedence = plugins[i].detectPrecedence; } } - return (pluginIndex == -1 ? TQString::tqfromLatin1("lpdunix") : plugins[pluginIndex].name); + return (pluginIndex == -1 ? TQString::fromLatin1("lpdunix") : plugins[pluginIndex].name); } void KMFactory::slot_pluginChanged(pid_t pid) diff --git a/tdeprint/kmjob.cpp b/tdeprint/kmjob.cpp index ce7e95993..7ff1efb95 100644 --- a/tdeprint/kmjob.cpp +++ b/tdeprint/kmjob.cpp @@ -75,7 +75,7 @@ TQString KMJob::pixmap() { // special case if (m_type == KMJob::Threaded) - return TQString::tqfromLatin1("exec"); + return TQString::fromLatin1("exec"); // normal case QString str("tdeprint_job"); diff --git a/tdeprint/kmjobmanager.cpp b/tdeprint/kmjobmanager.cpp index 918c14ff2..30a1fb993 100644 --- a/tdeprint/kmjobmanager.cpp +++ b/tdeprint/kmjobmanager.cpp @@ -53,7 +53,7 @@ void KMJobManager::discardAllJobs() void KMJobManager::removeDiscardedJobs() { for (uint i=0;i<m_jobs.count();i++) - if (m_jobs.tqat(i)->isDiscarded()) + if (m_jobs.at(i)->isDiscarded()) { m_jobs.remove(i); i--; diff --git a/tdeprint/kmmanager.cpp b/tdeprint/kmmanager.cpp index 01ca0dc77..3316244de 100644 --- a/tdeprint/kmmanager.cpp +++ b/tdeprint/kmmanager.cpp @@ -253,7 +253,7 @@ TQPtrList<KMPrinter>* KMManager::printerList(bool reload) // remove discarded printers for (uint i=0; i<m_printers.count(); i++) { - KMPrinter *prt = m_printers.tqat(i); + KMPrinter *prt = m_printers.at(i); if (prt->isDiscarded()) { m_printers.remove(i); @@ -268,7 +268,7 @@ TQPtrList<KMPrinter>* KMManager::printerList(bool reload) // - use the PRINTER variable if (!softDefault()) { - KMPrinter *defprinter = findPrinter(TQString::tqfromLatin1(getenv("PRINTER"))); + KMPrinter *defprinter = findPrinter(TQString::fromLatin1(getenv("PRINTER"))); if (defprinter) setSoftDefault(defprinter); } @@ -475,7 +475,7 @@ TQStringList KMManager::detectLocalPrinters() { TQStringList list; for (int i=0; i<3; i++) - list << TQString() << TQString::tqfromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString(); + list << TQString() << TQString::fromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString(); return list; } diff --git a/tdeprint/kmspecialmanager.cpp b/tdeprint/kmspecialmanager.cpp index 6dc967757..d26515a16 100644 --- a/tdeprint/kmspecialmanager.cpp +++ b/tdeprint/kmspecialmanager.cpp @@ -66,7 +66,7 @@ bool KMSpecialManager::savePrinters() conf.setGroup("General"); int n = conf.readNumEntry("Number",0); for (int i=0;i<n;i++) - conf.deleteGroup(TQString::tqfromLatin1("Printer %1").arg(i),true); + conf.deleteGroup(TQString::fromLatin1("Printer %1").arg(i),true); // then add printers n = 0; @@ -74,7 +74,7 @@ bool KMSpecialManager::savePrinters() for (;it.current();++it) { if (!it.current()->isSpecial() || it.current()->isVirtual()) continue; - conf.setGroup(TQString::tqfromLatin1("Printer %1").arg(n)); + conf.setGroup(TQString::fromLatin1("Printer %1").arg(n)); conf.writeEntry("Name",it.current()->name()); conf.writeEntry("Description",it.current()->description()); conf.writeEntry("Comment",it.current()->location()); @@ -139,7 +139,7 @@ bool KMSpecialManager::loadDesktopFile(const TQString& filename) int n = conf.readNumEntry("Number",0); for (int i=0;i<n;i++) { - QString grpname = TQString::tqfromLatin1("Printer %1").arg(i); + QString grpname = TQString::fromLatin1("Printer %1").arg(i); if (!conf.hasGroup(grpname)) continue; conf.setGroup(grpname); KMPrinter *printer = new KMPrinter; diff --git a/tdeprint/kmthreadjob.cpp b/tdeprint/kmthreadjob.cpp index 309da96a9..146c55055 100644 --- a/tdeprint/kmthreadjob.cpp +++ b/tdeprint/kmthreadjob.cpp @@ -22,7 +22,7 @@ #include "kmjobmanager.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstringlist.h> #include <kstandarddirs.h> diff --git a/tdeprint/kmvirtualmanager.cpp b/tdeprint/kmvirtualmanager.cpp index 78757decd..0bfb8e0c7 100644 --- a/tdeprint/kmvirtualmanager.cpp +++ b/tdeprint/kmvirtualmanager.cpp @@ -25,7 +25,7 @@ #include <stdlib.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqdir.h> #include <tqfileinfo.h> #include <klocale.h> diff --git a/tdeprint/kpcopiespage.cpp b/tdeprint/kpcopiespage.cpp index c8757e174..975a1d088 100644 --- a/tdeprint/kpcopiespage.cpp +++ b/tdeprint/kpcopiespage.cpp @@ -32,7 +32,7 @@ #include <tqcheckbox.h> #include <tqtooltip.h> #include <tqwhatsthis.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> #include <klocale.h> @@ -220,7 +220,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) l1->setColStretch(1,1); l1->addWidget(m_pagebox,0,0); 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_current); TQHBoxLayout *l4 = new TQHBoxLayout(0, 0, 5); @@ -233,7 +233,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) l3->addLayout(l2); l2->addWidget(m_pagesetlabel,0); 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->addWidget(m_copieslabel,0,0); l5->addWidget(m_copies,0,1); @@ -336,7 +336,7 @@ void KPCopiesPage::getOptions(TQMap<TQString,TQString>& options, bool incldef) options["kde-collate"] = (m_collate->isChecked() ? "Collate" : "Uncollate"); // ranges options["kde-current"] = (m_current->isChecked() ? "1" : "0"); - options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? TQString::tqfromLatin1("1-") : TQString::tqfromLatin1(""))); + options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? TQString::fromLatin1("1-") : TQString::fromLatin1(""))); // page set options["kde-pageset"] = TQString::number(m_pageset->currentItem()); } diff --git a/tdeprint/kpdriverpage.cpp b/tdeprint/kpdriverpage.cpp index 18cfeb207..f2fa9f4ed 100644 --- a/tdeprint/kpdriverpage.cpp +++ b/tdeprint/kpdriverpage.cpp @@ -21,7 +21,7 @@ #include "driverview.h" #include "driver.h" -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, TQWidget *parent, const char *name) diff --git a/tdeprint/kpfileselectpage.cpp b/tdeprint/kpfileselectpage.cpp index f3131717a..eaa7c0605 100644 --- a/tdeprint/kpfileselectpage.cpp +++ b/tdeprint/kpfileselectpage.cpp @@ -20,7 +20,7 @@ #include "kpfileselectpage.h" #include "kfilelist.h" -#include <tqlayout.h> +#include <layout.h> #include <tqstringlist.h> #include <tqregexp.h> #include <tqheader.h> diff --git a/tdeprint/kpfilterpage.cpp b/tdeprint/kpfilterpage.cpp index b321b3141..690ce4643 100644 --- a/tdeprint/kpfilterpage.cpp +++ b/tdeprint/kpfilterpage.cpp @@ -24,7 +24,7 @@ #include <tqtoolbutton.h> #include <tqheader.h> #include <tqtooltip.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klistview.h> #include <klocale.h> diff --git a/tdeprint/kpgeneralpage.cpp b/tdeprint/kpgeneralpage.cpp index 3b93e59af..d97afe542 100644 --- a/tdeprint/kpgeneralpage.cpp +++ b/tdeprint/kpgeneralpage.cpp @@ -26,7 +26,7 @@ #include <tqlabel.h> #include <tqbutton.h> #include <tqbuttongroup.h> -#include <tqlayout.h> +#include <layout.h> #include <tqradiobutton.h> #include <tqwhatsthis.h> @@ -347,27 +347,27 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const lay2->addWidget(m_nupbox, 1, 1); lay2->setColStretch(0, 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()); lay3->addWidget(m_portrait, 0, 0); lay3->addWidget(m_landscape, 1, 0); lay3->addWidget(m_revland, 2, 0); lay3->addWidget(m_revport, 3, 0); 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()); lay4->addWidget(m_dupnone, 0, 0); lay4->addWidget(m_duplong, 1, 0); lay4->addWidget(m_dupshort, 2, 0); lay4->addMultiCellWidget(m_duplexpix, 0, 2, 1, 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()); lay5->addWidget(m_nup1, 0, 0); lay5->addWidget(m_nup2, 1, 0); lay5->addWidget(m_nup4, 2, 0); 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()); lay6->addWidget(m_startbannerlabel, 0, 0); lay6->addWidget(m_endbannerlabel, 1, 0); @@ -622,17 +622,17 @@ void KPGeneralPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) DrListOption *opt; if ((opt=(DrListOption*)driver()->findOption("PageSize")) != NULL) { - DrBase *ch = opt->choices()->tqat(m_pagesize->currentItem()); + DrBase *ch = opt->choices()->at(m_pagesize->currentItem()); if (incldef || ch->name() != opt->get("default")) opts["PageSize"] = ch->name(); } if ((opt=(DrListOption*)driver()->findOption("MediaType")) != NULL) { - DrBase *ch = opt->choices()->tqat(m_papertype->currentItem()); + DrBase *ch = opt->choices()->at(m_papertype->currentItem()); if (incldef || ch->name() != opt->get("default")) opts["MediaType"] = ch->name(); } if ((opt=(DrListOption*)driver()->findOption("InputSlot")) != NULL) { - DrBase *ch = opt->choices()->tqat(m_inputslot->currentItem()); + DrBase *ch = opt->choices()->at(m_inputslot->currentItem()); if (incldef || ch->name() != opt->get("default")) opts["InputSlot"] = ch->name(); } diff --git a/tdeprint/kpmarginpage.cpp b/tdeprint/kpmarginpage.cpp index 554679ee7..80c02e60a 100644 --- a/tdeprint/kpmarginpage.cpp +++ b/tdeprint/kpmarginpage.cpp @@ -26,7 +26,7 @@ #include "marginwidget.h" #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqprinter.h> #include <tqpaintdevicemetrics.h> diff --git a/tdeprint/kpposterpage.cpp b/tdeprint/kpposterpage.cpp index 2e0e78894..8b9fa447d 100644 --- a/tdeprint/kpposterpage.cpp +++ b/tdeprint/kpposterpage.cpp @@ -26,7 +26,7 @@ #include <tqcheckbox.h> #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqlineedit.h> #include <tqwhatsthis.h> diff --git a/tdeprint/kpqtpage.cpp b/tdeprint/kpqtpage.cpp index 4049ab4f8..5fa189344 100644 --- a/tdeprint/kpqtpage.cpp +++ b/tdeprint/kpqtpage.cpp @@ -28,7 +28,7 @@ #include <tqbuttongroup.h> #include <tqradiobutton.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <kiconloader.h> @@ -164,15 +164,15 @@ void KPQtPage::init() lay0->addWidget(m_orientbox,1,0); lay0->addWidget(m_colorbox,1,1); 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_landscape,1,0); 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_grayscale,1,0); 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_nup2,1,0); lay3->addWidget(m_nup4,2,0); @@ -305,7 +305,7 @@ void KPQtPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) DrListOption *opt = static_cast<DrListOption*>(driver()->findOption("PageSize")); if (opt) { - DrBase *ch = opt->choices()->tqat(m_pagesize->currentItem()); + DrBase *ch = opt->choices()->at(m_pagesize->currentItem()); if (ch && (incldef || ch->name() != opt->get("default"))) { opts["PageSize"] = ch->name(); diff --git a/tdeprint/kprintdialog.cpp b/tdeprint/kprintdialog.cpp index 092884bde..b9aa0c0cb 100644 --- a/tdeprint/kprintdialog.cpp +++ b/tdeprint/kprintdialog.cpp @@ -44,7 +44,7 @@ #include <tqcombobox.h> #include <tqtabwidget.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <kmessagebox.h> #include <tqdir.h> @@ -361,7 +361,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) l2->addStretch(1); l2->addWidget(d->m_ok,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->setRowStretch(0,1); TQGridLayout *l4 = new TQGridLayout(0, 5, 2, 0, 5); @@ -568,7 +568,7 @@ void KPrintDialog::initialize(KPrinter *printer) if (!sep && it.current()->isSpecial()) { sep = true; - d->m_printers->insertItem(TQPixmap(), TQString::tqfromLatin1("--------")); + d->m_printers->insertItem(TQPixmap(), TQString::fromLatin1("--------")); } d->m_printers->insertItem(SmallIcon(it.current()->pixmap(),0,(it.current()->isValid() ? (int)KIcon::DefaultState : (int)KIcon::LockOverlay)),it.current()->name(),false/*sep*/); if (it.current()->isSoftDefault()) @@ -824,7 +824,7 @@ void KPrintDialog::reload() // remove printer dependent pages (usually from plugin) TQTabWidget *tabs = static_cast<TQTabWidget*>(TQT_TQWIDGET(d->m_dummy->child("TabWidget", TQTABWIDGET_OBJECT_NAME_STRING))); for (uint i=0; i<d->m_pages.count(); i++) - if (d->m_pages.tqat(i)->onlyRealPrinters()) + if (d->m_pages.at(i)->onlyRealPrinters()) { KPrintDialogPage *page = d->m_pages.take(i--); if (tabs) @@ -863,7 +863,7 @@ void KPrintDialog::expandDialog(bool on) if (on) { - sz.setHeight(sz.height()+d->m_dummy->tqminimumSize().height()+d->m_plugin->tqminimumSize().height()+2*layout()->spacing()); + sz.setHeight(sz.height()+d->m_dummy->minimumSize().height()+d->m_plugin->minimumSize().height()+2*layout()->spacing()); if (isVisible() || !d->m_dummy->isVisible() || !d->m_plugin->isVisible()) { d->m_dummy->show(); @@ -952,10 +952,10 @@ void KPrintDialog::enableDialogPage( int index, bool flag ) if ( d->m_pages.count() > 1 ) { TQTabWidget *tabs = static_cast<TQTabWidget*>(TQT_TQWIDGET(d->m_dummy->child("TabWidget", TQTABWIDGET_OBJECT_NAME_STRING))); - tabs->setTabEnabled( d->m_pages.tqat( index ), flag ); + tabs->setTabEnabled( d->m_pages.at( index ), flag ); } else - d->m_pages.tqat( 0 )->setEnabled( flag ); + d->m_pages.at( 0 )->setEnabled( flag ); } void KPrintDialog::slotOpenFileDialog() diff --git a/tdeprint/kprinter.cpp b/tdeprint/kprinter.cpp index 67d276990..86ef04f66 100644 --- a/tdeprint/kprinter.cpp +++ b/tdeprint/kprinter.cpp @@ -846,7 +846,7 @@ int KPrinter::toPage() const { return (option("kde-topage").isEmpty() ? 0 : option("kde-topage").toInt()); } void KPrinter::setFromTo(int m, int M) -{ setOption("kde-frompage",TQString::number(m)); setOption("kde-topage",TQString::number(M)); setOption("kde-range",(m>0 && M>0 ? TQString("%1-%2").arg(m).arg(M) : TQString::tqfromLatin1(""))); } +{ setOption("kde-frompage",TQString::number(m)); setOption("kde-topage",TQString::number(M)); setOption("kde-range",(m>0 && M>0 ? TQString("%1-%2").arg(m).arg(M) : TQString::fromLatin1(""))); } // if no page size defined, use the localized one KPrinter::PageSize KPrinter::pageSize() const @@ -889,7 +889,7 @@ void KPrinter::setPrintProgram(const TQString& prg) } TQString KPrinter::printerSelectionOption() const -{ return TQString::tqfromLatin1(""); } +{ return TQString::fromLatin1(""); } void KPrinter::setPrinterSelectionOption(const TQString&) {} diff --git a/tdeprint/kprinterimpl.cpp b/tdeprint/kprinterimpl.cpp index 166ae7207..5b35f6eff 100644 --- a/tdeprint/kprinterimpl.cpp +++ b/tdeprint/kprinterimpl.cpp @@ -508,7 +508,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool TQString::null, i18n("Convert"), i18n("Keep"), - TQString::tqfromLatin1("tdeprintAutoConvert"))) == KMessageBox::Yes) + TQString::fromLatin1("tdeprintAutoConvert"))) == KMessageBox::Yes) { // find the filter chain TQStringList flist = KXmlCommandManager::self()->autoConvert(mime, primaryMimeType); diff --git a/tdeprint/kprintpreview.cpp b/tdeprint/kprintpreview.cpp index 235472d1f..cf2e712e2 100644 --- a/tdeprint/kprintpreview.cpp +++ b/tdeprint/kprintpreview.cpp @@ -22,7 +22,7 @@ #include "kmfactory.h" #include <tqfile.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvbox.h> #include <kparts/part.h> @@ -111,7 +111,7 @@ static KLibFactory* componentFactory() factory = KLibLoader::self()->factory("libkghostviewpart"); if( factory ) return factory; - KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("application/postscript"), TQString::tqfromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null); + KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null); for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { KService::Ptr service = *it; diff --git a/tdeprint/lpd/gschecker.cpp b/tdeprint/lpd/gschecker.cpp index 9fe6e290b..c86deaf4c 100644 --- a/tdeprint/lpd/gschecker.cpp +++ b/tdeprint/lpd/gschecker.cpp @@ -21,7 +21,7 @@ #include "kpipeprocess.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> GsChecker::GsChecker(TQObject *parent, const char *name) : TQObject(parent,name) @@ -53,7 +53,7 @@ void GsChecker::loadDriverList() else buffer.append(line).append(" "); } - else if (line.startsWith(TQString::tqfromLatin1("Available devices:"))) + else if (line.startsWith(TQString::fromLatin1("Available devices:"))) ok = true; } m_driverlist = TQStringList::split(' ',buffer,false); diff --git a/tdeprint/lpd/klpdprinterimpl.cpp b/tdeprint/lpd/klpdprinterimpl.cpp index 59f04e74c..2704cc46a 100644 --- a/tdeprint/lpd/klpdprinterimpl.cpp +++ b/tdeprint/lpd/klpdprinterimpl.cpp @@ -46,6 +46,6 @@ bool KLpdPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) printer->setErrorMessage(i18n("The <b>%1</b> executable could not be found in your path. Check your installation.").arg("lpr")); return false; } - cmd = TQString::tqfromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd = TQString::fromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies()); return true; } diff --git a/tdeprint/lpd/kmlpdmanager.cpp b/tdeprint/lpd/kmlpdmanager.cpp index a5612ad58..a3c2ad475 100644 --- a/tdeprint/lpd/kmlpdmanager.cpp +++ b/tdeprint/lpd/kmlpdmanager.cpp @@ -28,7 +28,7 @@ #include <tqfile.h> #include <tqfileinfo.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqmap.h> #include <tqregexp.h> @@ -65,12 +65,12 @@ KMLpdManager::~KMLpdManager() TQString KMLpdManager::driverDbCreationProgram() { - return TQString::tqfromLatin1("make_driver_db_lpd"); + return TQString::fromLatin1("make_driver_db_lpd"); } TQString KMLpdManager::driverDirectory() { - return TQString::tqfromLatin1("/usr/lib/rhs/rhs-printfilters"); + return TQString::fromLatin1("/usr/lib/rhs/rhs-printfilters"); } bool KMLpdManager::completePrinter(KMPrinter *printer) @@ -91,11 +91,11 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer) KURL url; if (!entry->arg("rm").isEmpty()) { - url = TQString::tqfromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp")); + url = TQString::fromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp")); printer->setDescription(i18n("Remote LPD queue %1@%2").arg(entry->arg("rp")).arg(entry->arg("rm"))); } else if (!lp.isEmpty() && lp != "/dev/null") - url = TQString::tqfromLatin1("parallel:%1").arg(lp); + url = TQString::fromLatin1("parallel:%1").arg(lp); else if (TQFile::exists(entry->arg("sd")+"/.config")) { TQMap<TQString,TQString> map = loadPrinttoolCfgFile(entry->arg("sd")+"/.config"); @@ -103,17 +103,17 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer) { QStringList l = TQStringList::split('\\',map["share"],false); if (map["workgroup"].isEmpty()) - url = TQString::tqfromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]); + url = TQString::fromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]); else - url = TQString::tqfromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]); + url = TQString::fromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]); url.setUser(map["user"]); url.setPass(map["password"]); } else if (type == "DIRECT") - url = TQString::tqfromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]); + url = TQString::fromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]); else if (type == "NCP") { - url = TQString::tqfromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]); + url = TQString::fromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]); url.setUser(map["user"]); url.setPass(map["password"]); } @@ -146,9 +146,9 @@ bool KMLpdManager::createPrinter(KMPrinter *printer) { // remote lpd queue ent->m_args["rm"] = printer->device().host(); - ent->m_args["rp"] = printer->device().path().replace("/",TQString::tqfromLatin1("")); + ent->m_args["rp"] = printer->device().path().replace("/",TQString::fromLatin1("")); ent->m_args["lpd_bounce"] = "true"; - ent->m_comment = TQString::tqfromLatin1("##PRINTTOOL3## REMOTE"); + ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## REMOTE"); } ent->m_args["mx"] = (printer->option("mx").isEmpty() ? "#0" : printer->option("mx")); ent->m_args["sh"] = TQString::null; @@ -259,7 +259,7 @@ bool KMLpdManager::disablePrinter(KMPrinter *printer) void KMLpdManager::listPrinters() { m_entries.clear(); - loadPrintcapFile(TQString::tqfromLatin1("%1/etc/printcap").arg(lpdprefix)); + loadPrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix)); TQDictIterator<PrintcapEntry> it(m_entries); for (;it.current();++it) @@ -312,7 +312,7 @@ void KMLpdManager::checkStatus() bool KMLpdManager::writePrinters() { - if (!writePrintcapFile(TQString::tqfromLatin1("%1/etc/printcap").arg(lpdprefix))) + if (!writePrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix))) { setErrorMsg(i18n("Unable to write printcap file.")); return false; @@ -489,7 +489,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQSt { // defines input and output file QString fname = TQFileInfo(templatefile).fileName(); - fname.replace(TQRegExp("\\.in$"),TQString::tqfromLatin1("")); + fname.replace(TQRegExp("\\.in$"),TQString::fromLatin1("")); QFile fin(templatefile); QFile fout(dirname + "/" + fname); if (fin.exists() && fin.open(IO_ReadOnly) && fout.open(IO_WriteOnly)) @@ -508,7 +508,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQSt if (line.startsWith("export ")) { tout << "export "; - line.replace(0,7,TQString::tqfromLatin1("")); + line.replace(0,7,TQString::fromLatin1("")); } if ((p=line.find('=')) != -1) { @@ -543,8 +543,8 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver) return false; QString resol(options["RESOLUTION"]), color(options["COLOR"]); // update entry comment to make printtool happy and save printcap file - ent->m_comment = TQString::tqfromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? TQString::tqfromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? TQString::tqfromLatin1("Default") : color.right(color.length()-15))); - ent->m_args["if"] = spooldir+TQString::tqfromLatin1("/filter"); + ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? TQString::fromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? TQString::fromLatin1("Default") : color.right(color.length()-15))); + ent->m_args["if"] = spooldir+TQString::fromLatin1("/filter"); if (!writePrinters()) return false; // write various driver files using templates @@ -566,11 +566,11 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry { KURL dev(printer->device()); QString prot = dev.protocol(), sd(entry->arg("sd")); - entry->m_comment = TQString::tqfromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer)); + entry->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer)); if (prot == "smb" || prot == "ncp" || prot == "socket") { - entry->m_args["af"] = sd+TQString::tqfromLatin1("/acct"); - QFile f(sd+TQString::tqfromLatin1("/.config")); + entry->m_args["af"] = sd+TQString::fromLatin1("/acct"); + QFile f(sd+TQString::fromLatin1("/.config")); if (f.open(IO_WriteOnly)) { QTextStream t(&f); @@ -578,7 +578,7 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry { t << "printer_ip=" << dev.host() << endl; t << "port=" << dev.port() << endl; - entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/directprint"); + entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/directprint"); } else if (prot == "smb") { @@ -594,20 +594,20 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry t << "hostip=" << endl; t << "user='" << dev.user() << '\'' << endl; t << "password='" << dev.pass() << '\'' << endl; - t << "workgroup='" << (l.count() == 2 ? dev.host() : TQString::tqfromLatin1("")) << '\'' << endl; - entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/smbprint"); + t << "workgroup='" << (l.count() == 2 ? dev.host() : TQString::fromLatin1("")) << '\'' << endl; + entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/smbprint"); } else if (prot == "ncp") { t << "server=" << dev.host() << endl; - t << "queue=" << dev.path().replace("/",TQString::tqfromLatin1("")) << endl; + t << "queue=" << dev.path().replace("/",TQString::fromLatin1("")) << endl; t << "user=" << dev.user() << endl; t << "password=" << dev.pass() << endl; - entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/ncpprint"); + entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/ncpprint"); } } else return false; - entry->m_args["lp"] = TQString::tqfromLatin1("/dev/null"); + entry->m_args["lp"] = TQString::fromLatin1("/dev/null"); } else if (prot != "lpd") entry->m_args["lp"] = dev.path(); @@ -618,7 +618,7 @@ bool KMLpdManager::createSpooldir(PrintcapEntry *entry) { // first check if it has a "sd" defined if (entry->arg("sd").isEmpty()) - entry->m_args["sd"] = TQString::tqfromLatin1("/var/spool/lpd/")+entry->m_name; + entry->m_args["sd"] = TQString::fromLatin1("/var/spool/lpd/")+entry->m_name; QString sd = entry->arg("sd"); if (!KStandardDirs::exists(sd)) { diff --git a/tdeprint/lpd/lpdtools.cpp b/tdeprint/lpd/lpdtools.cpp index 610e8ead5..5131b33f3 100644 --- a/tdeprint/lpd/lpdtools.cpp +++ b/tdeprint/lpd/lpdtools.cpp @@ -257,11 +257,11 @@ DrMain* PrinttoolEntry::createDriver() for (int i=0;it.current();++it,i++) { ch = new DrBase; - ch->setName(TQString::tqfromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->setName(TQString::fromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi)); if (it.current()->comment.isEmpty()) - ch->set("text",TQString::tqfromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->set("text",TQString::fromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi)); else - ch->set("text",TQString::tqfromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->set("text",TQString::fromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi)); lopt->addChoice(ch); } QString defval = lopt->choices()->first()->name(); @@ -281,13 +281,13 @@ DrMain* PrinttoolEntry::createDriver() { ch = new DrBase; if (m_gsdriver != "uniprint") - ch->setName(TQString::tqfromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp)); + ch->setName(TQString::fromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp)); else ch->setName(it.current()->bpp); if (it.current()->comment.isEmpty()) ch->set("text",it.current()->bpp); else - ch->set("text",TQString::tqfromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment)); + ch->set("text",TQString::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment)); lopt->addChoice(ch); } QString defval = lopt->choices()->first()->name(); diff --git a/tdeprint/lpd/lpdtools.h b/tdeprint/lpd/lpdtools.h index 692dd0fa2..11b5909d4 100644 --- a/tdeprint/lpd/lpdtools.h +++ b/tdeprint/lpd/lpdtools.h @@ -22,7 +22,7 @@ #include <tqstring.h> #include <tqmap.h> #include <tqptrlist.h> -#include <tqtextstream.h> +#include <textstream.h> class KMLpdManager; class DrMain; diff --git a/tdeprint/lpdunix/klpdunixprinterimpl.cpp b/tdeprint/lpdunix/klpdunixprinterimpl.cpp index 9ba97efae..e8ee34fd5 100644 --- a/tdeprint/lpdunix/klpdunixprinterimpl.cpp +++ b/tdeprint/lpdunix/klpdunixprinterimpl.cpp @@ -36,12 +36,12 @@ KLpdUnixPrinterImpl::~KLpdUnixPrinterImpl() void KLpdUnixPrinterImpl::initLpPrint(TQString& cmd, KPrinter *printer) { - cmd += TQString::tqfromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd += TQString::fromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies()); } void KLpdUnixPrinterImpl::initLprPrint(TQString& cmd, KPrinter *printer) { - cmd += TQString::tqfromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd += TQString::fromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies()); } // look for executable, starting with "lpr" diff --git a/tdeprint/lpdunix/kmlpdunixmanager.cpp b/tdeprint/lpdunix/kmlpdunixmanager.cpp index afcd83b2a..0ea7d2077 100644 --- a/tdeprint/lpdunix/kmlpdunixmanager.cpp +++ b/tdeprint/lpdunix/kmlpdunixmanager.cpp @@ -24,7 +24,7 @@ #include <tqfile.h> #include <tqdir.h> #include <tqfileinfo.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <klocale.h> #include <kstandarddirs.h> @@ -168,7 +168,7 @@ TQString getPrintcapFileName() if (pcentry[0] == '|') { // printcap through pipe printcap = locateLocal("tmp","printcap"); - TQString cmd = TQString::tqfromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap); + TQString cmd = TQString::fromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap); kdDebug() << "printcap obtained through pipe" << endl << "executing: " << cmd << endl; ::system(cmd.local8Bit()); } @@ -234,7 +234,7 @@ TQString getEtcPrintersConfName() { // standard file not found, try NIS printersconf = locateLocal("tmp","printers.conf"); - TQString cmd = TQString::tqfromLatin1("ypcat printers.conf.byname > %1").arg(printersconf); + TQString cmd = TQString::fromLatin1("ypcat printers.conf.byname > %1").arg(printersconf); kdDebug() << "printers.conf obtained from NIS server: " << cmd << endl; ::system(TQFile::encodeName(cmd)); } diff --git a/tdeprint/lpr/apshandler.cpp b/tdeprint/lpr/apshandler.cpp index d4107d7c7..ff7f9d799 100644 --- a/tdeprint/lpr/apshandler.cpp +++ b/tdeprint/lpr/apshandler.cpp @@ -28,7 +28,7 @@ #include <tqfile.h> #include <tqdir.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvaluestack.h> #include <kstandarddirs.h> #include <klocale.h> @@ -50,8 +50,8 @@ bool ApsHandler::validate(PrintcapEntry *entry) KMPrinter* ApsHandler::createPrinter(PrintcapEntry *entry) { - entry->comment = TQString::tqfromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); - entry->postcomment = TQString::tqfromLatin1("# APS%1_END - don't delete this").arg(m_counter); + entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); + entry->postcomment = TQString::fromLatin1("# APS%1_END - don't delete this").arg(m_counter); m_counter++; return LprHandler::createPrinter(entry); } @@ -309,8 +309,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) entry->addField("af", Field::String, sd + "/acct"); entry->addField("lf", Field::String, sd + "/log"); entry->addField("if", Field::String, sysconfDir() + "/basedir/bin/apsfilter"); - entry->comment = TQString::tqfromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); - entry->postcomment = TQString::tqfromLatin1("# APS%1_END").arg(m_counter); + entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); + entry->postcomment = TQString::fromLatin1("# APS%1_END").arg(m_counter); m_counter++; return entry; } diff --git a/tdeprint/lpr/editentrydialog.cpp b/tdeprint/lpr/editentrydialog.cpp index 6c4ecc30c..77616f6f1 100644 --- a/tdeprint/lpr/editentrydialog.cpp +++ b/tdeprint/lpr/editentrydialog.cpp @@ -26,7 +26,7 @@ #include <tqlabel.h> #include <tqheader.h> #include <klistview.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwidgetstack.h> #include <klocale.h> #include <kiconloader.h> diff --git a/tdeprint/lpr/klprprinterimpl.cpp b/tdeprint/lpr/klprprinterimpl.cpp index 70356f23c..92928a0cc 100644 --- a/tdeprint/lpr/klprprinterimpl.cpp +++ b/tdeprint/lpr/klprprinterimpl.cpp @@ -41,7 +41,7 @@ bool KLprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) if (!printer || m_exepath.isEmpty()) return false; - cmd = TQString::tqfromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() ); + cmd = TQString::fromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() ); QString opts = static_cast<KMLprManager*>(KMManager::self())->printOptions(printer); if (!opts.isEmpty()) cmd += (" " + opts); @@ -53,7 +53,7 @@ void KLprPrinterImpl::broadcastOption(const TQString& key, const TQString& value KPrinterImpl::broadcastOption(key,value); if (key == "kde-pagesize") { - QString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); + QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); KPrinterImpl::broadcastOption("PageSize",pagename); } } diff --git a/tdeprint/lpr/kmconfiglpr.cpp b/tdeprint/lpr/kmconfiglpr.cpp index f43a8da2d..207035b63 100644 --- a/tdeprint/lpr/kmconfiglpr.cpp +++ b/tdeprint/lpr/kmconfiglpr.cpp @@ -22,7 +22,7 @@ #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <klocale.h> #include <kconfig.h> diff --git a/tdeprint/lpr/kmlprmanager.cpp b/tdeprint/lpr/kmlprmanager.cpp index cf4dbbb94..54f987c58 100644 --- a/tdeprint/lpr/kmlprmanager.cpp +++ b/tdeprint/lpr/kmlprmanager.cpp @@ -231,7 +231,7 @@ DrMain* KMLprManager::loadPrinterDriver(KMPrinter *prt, bool config) DrMain* KMLprManager::loadFileDriver(const TQString& filename) { int p = filename.find('/'); - TQString handler_str = (p != -1 ? filename.left(p) : TQString::tqfromLatin1("default")); + TQString handler_str = (p != -1 ? filename.left(p) : TQString::fromLatin1("default")); LprHandler *handler = m_handlers.find(handler_str); if (handler) { @@ -422,7 +422,7 @@ bool KMLprManager::removePrinter(KMPrinter *prt) TQString KMLprManager::driverDbCreationProgram() { - return TQString::tqfromLatin1("make_driver_db_lpr"); + return TQString::fromLatin1("make_driver_db_lpr"); } TQString KMLprManager::driverDirectory() diff --git a/tdeprint/lpr/lpchelper.cpp b/tdeprint/lpr/lpchelper.cpp index c921a803c..614febc9b 100644 --- a/tdeprint/lpr/lpchelper.cpp +++ b/tdeprint/lpr/lpchelper.cpp @@ -23,7 +23,7 @@ #include "lprsettings.h" #include <kstandarddirs.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <kdebug.h> #include <klocale.h> diff --git a/tdeprint/lpr/lpchelper.h b/tdeprint/lpr/lpchelper.h index b1e20f089..9a597dc87 100644 --- a/tdeprint/lpr/lpchelper.h +++ b/tdeprint/lpr/lpchelper.h @@ -22,7 +22,7 @@ #include <tqobject.h> #include <tqmap.h> -#include <tqtextstream.h> +#include <textstream.h> #include "kmprinter.h" class KMJob; diff --git a/tdeprint/lpr/lprhandler.cpp b/tdeprint/lpr/lprhandler.cpp index fcb838bb9..d6a14e3f7 100644 --- a/tdeprint/lpr/lprhandler.cpp +++ b/tdeprint/lpr/lprhandler.cpp @@ -25,7 +25,7 @@ #include "driver.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvaluestack.h> #include <klocale.h> diff --git a/tdeprint/lpr/lprngtoolhandler.cpp b/tdeprint/lpr/lprngtoolhandler.cpp index 1d76cf2f5..8c0bb5492 100644 --- a/tdeprint/lpr/lprngtoolhandler.cpp +++ b/tdeprint/lpr/lprngtoolhandler.cpp @@ -27,7 +27,7 @@ #include "kprinter.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <klocale.h> #include <kdebug.h> #include <kstandarddirs.h> @@ -308,7 +308,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) TQString work, server, printer, user, passwd; if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) ) { - entry->addField("xfer_options", Field::String, TQString::tqfromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work)); + entry->addField("xfer_options", Field::String, TQString::fromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work)); TQFile authfile(LprSettings::self()->baseSpoolDir() + "/" + prt->printerName() + "/auth"); if (authfile.open(IO_WriteOnly)) { @@ -331,8 +331,8 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) DrMain *driver = prt->driver(); comment.append("filtertype=IFHP ifhp_options=status@,sync@,pagecount@,waitend@ printerdb_entry="); comment.append(driver->get("driverID")); - entry->addField("ifhp", Field::String, TQString::tqfromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID"))); - entry->addField("lprngtooloptions", Field::String, TQString::tqfromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID"))); + entry->addField("ifhp", Field::String, TQString::fromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID"))); + entry->addField("lprngtooloptions", Field::String, TQString::fromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID"))); TQMap<TQString,TQString> opts; TQString optstr; driver->getOptions(opts, false); diff --git a/tdeprint/lpr/lprsettings.cpp b/tdeprint/lpr/lprsettings.cpp index 0c1cec2a9..d570d32e9 100644 --- a/tdeprint/lpr/lprsettings.cpp +++ b/tdeprint/lpr/lprsettings.cpp @@ -23,7 +23,7 @@ #include <kconfig.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #define LPDCONF "/etc/lpd.conf" #define PRINTCAP "/etc/printcap" diff --git a/tdeprint/lpr/matichandler.cpp b/tdeprint/lpr/matichandler.cpp index ef2f1584b..d472274c6 100644 --- a/tdeprint/lpr/matichandler.cpp +++ b/tdeprint/lpr/matichandler.cpp @@ -35,7 +35,7 @@ #include <kdebug.h> #include <kprocess.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <stdlib.h> @@ -104,7 +104,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh KURL url ( parsePostpipe(postpipe) ); if (!url.isEmpty()) { - TQString ds = TQString::tqfromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol()); + TQString ds = TQString::fromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol()); prt->setDevice(url.url()); prt->setLocation(ds); } @@ -115,7 +115,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh { prt->setManufacturer(m["make"].toString()); prt->setModel(m["model"].toString()); - prt->setDriverInfo(TQString::tqfromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString())); + prt->setDriverInfo(TQString::fromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString())); } } } @@ -247,7 +247,7 @@ DrMain* MaticHandler::loadDbDriver(const TQString& path) } TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - TQString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -351,7 +351,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) if (mdriver.isEmpty() || mprinter.isEmpty()) return true; - TQString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { diff --git a/tdeprint/lpr/printcapentry.h b/tdeprint/lpr/printcapentry.h index b2d3931a8..2b6037c31 100644 --- a/tdeprint/lpr/printcapentry.h +++ b/tdeprint/lpr/printcapentry.h @@ -27,7 +27,7 @@ #include <tqstring.h> #include <tqmap.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> /** * @internal diff --git a/tdeprint/lpr/printcapreader.cpp b/tdeprint/lpr/printcapreader.cpp index 00016c14f..718ffca21 100644 --- a/tdeprint/lpr/printcapreader.cpp +++ b/tdeprint/lpr/printcapreader.cpp @@ -56,7 +56,7 @@ void PrintcapReader::unputLine(const TQString& s) PrintcapEntry* PrintcapReader::nextEntry() { - if (!m_stream.tqdevice()) + if (!m_stream.device()) return NULL; TQString line, comment, name, fields, buf; diff --git a/tdeprint/lpr/printcapreader.h b/tdeprint/lpr/printcapreader.h index 2236e5068..8d72f370d 100644 --- a/tdeprint/lpr/printcapreader.h +++ b/tdeprint/lpr/printcapreader.h @@ -21,7 +21,7 @@ #define PRINTCAPREADER_H #include <tqstring.h> -#include <tqtextstream.h> +#include <textstream.h> class TQFile; class PrintcapEntry; diff --git a/tdeprint/management/cjanuswidget.cpp b/tdeprint/management/cjanuswidget.cpp index 92ea782e5..9798a2228 100644 --- a/tdeprint/management/cjanuswidget.cpp +++ b/tdeprint/management/cjanuswidget.cpp @@ -23,7 +23,7 @@ #include <tqlabel.h> #include <tqpainter.h> #include <klistbox.h> -#include <tqlayout.h> +#include <layout.h> #include <kseparator.h> class CJanusWidget::CPage diff --git a/tdeprint/management/kmconfigcommand.cpp b/tdeprint/management/kmconfigcommand.cpp index 32fb7db11..1f27483cf 100644 --- a/tdeprint/management/kmconfigcommand.cpp +++ b/tdeprint/management/kmconfigcommand.cpp @@ -22,7 +22,7 @@ #include <tqlabel.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kdialog.h> diff --git a/tdeprint/management/kmconfigdialog.cpp b/tdeprint/management/kmconfigdialog.cpp index 3bd89a751..c269f1e35 100644 --- a/tdeprint/management/kmconfigdialog.cpp +++ b/tdeprint/management/kmconfigdialog.cpp @@ -29,7 +29,7 @@ #include "kmconfigfonts.h" #include "kmconfigjobs.h" -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kiconloader.h> #include <kconfig.h> diff --git a/tdeprint/management/kmconfigfilter.cpp b/tdeprint/management/kmconfigfilter.cpp index 29d5107e0..09413b6fc 100644 --- a/tdeprint/management/kmconfigfilter.cpp +++ b/tdeprint/management/kmconfigfilter.cpp @@ -24,7 +24,7 @@ #include <tqgroupbox.h> #include <tqlineedit.h> #include <tqtoolbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqapplication.h> diff --git a/tdeprint/management/kmconfigfonts.cpp b/tdeprint/management/kmconfigfonts.cpp index 183d0b621..a11e137d2 100644 --- a/tdeprint/management/kmconfigfonts.cpp +++ b/tdeprint/management/kmconfigfonts.cpp @@ -21,7 +21,7 @@ #include <tqgroupbox.h> #include <kpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqheader.h> #include <tqlabel.h> #include <tqcheckbox.h> diff --git a/tdeprint/management/kmconfiggeneral.cpp b/tdeprint/management/kmconfiggeneral.cpp index 40d187c3c..1ab5456d8 100644 --- a/tdeprint/management/kmconfiggeneral.cpp +++ b/tdeprint/management/kmconfiggeneral.cpp @@ -19,7 +19,7 @@ #include "kmconfiggeneral.h" -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <tqcheckbox.h> #include <tqlabel.h> diff --git a/tdeprint/management/kmconfigjobs.cpp b/tdeprint/management/kmconfigjobs.cpp index 1088e1b3a..638839e74 100644 --- a/tdeprint/management/kmconfigjobs.cpp +++ b/tdeprint/management/kmconfigjobs.cpp @@ -20,7 +20,7 @@ #include "kmconfigjobs.h" #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <knuminput.h> #include <klocale.h> diff --git a/tdeprint/management/kmconfigpreview.cpp b/tdeprint/management/kmconfigpreview.cpp index cd777ec7a..c7f1c565a 100644 --- a/tdeprint/management/kmconfigpreview.cpp +++ b/tdeprint/management/kmconfigpreview.cpp @@ -20,7 +20,7 @@ #include "kmconfigpreview.h" #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <tqlabel.h> diff --git a/tdeprint/management/kmdbcreator.cpp b/tdeprint/management/kmdbcreator.cpp index 1a89d0a8e..3fab5929e 100644 --- a/tdeprint/management/kmdbcreator.cpp +++ b/tdeprint/management/kmdbcreator.cpp @@ -109,7 +109,7 @@ bool KMDBCreator::createDriverDB(const TQString& dirname, const TQString& filena { if (!m_dlg) { - m_dlg = new TQProgressDialog(parent->tqtopLevelWidget(),"progress-dialog",true); + m_dlg = new TQProgressDialog(parent->topLevelWidget(),"progress-dialog",true); m_dlg->setLabelText(i18n("Please wait while KDE rebuilds a driver database.")); m_dlg->setCaption(i18n("Driver Database")); connect(m_dlg,TQT_SIGNAL(canceled()),TQT_SLOT(slotCancelled())); diff --git a/tdeprint/management/kmdriverdb.cpp b/tdeprint/management/kmdriverdb.cpp index 6fbab45ec..906338b52 100644 --- a/tdeprint/management/kmdriverdb.cpp +++ b/tdeprint/management/kmdriverdb.cpp @@ -25,7 +25,7 @@ #include <kdebug.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqfileinfo.h> #include <kstandarddirs.h> #include <kapplication.h> @@ -60,7 +60,7 @@ KMDriverDB::~KMDriverDB() TQString KMDriverDB::dbFile() { // this calls insure missing directories creation - TQString filename = locateLocal("data",TQString::tqfromLatin1("tdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem())); + TQString filename = locateLocal("data",TQString::fromLatin1("tdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem())); return filename; } diff --git a/tdeprint/management/kmdriverdbwidget.cpp b/tdeprint/management/kmdriverdbwidget.cpp index e9c490206..8fadc8146 100644 --- a/tdeprint/management/kmdriverdbwidget.cpp +++ b/tdeprint/management/kmdriverdbwidget.cpp @@ -29,7 +29,7 @@ #include <kcursor.h> #include <tqapplication.h> #include <kmessagebox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqstrlist.h> @@ -105,7 +105,7 @@ void KMDriverDbWidget::setDriver(const TQString& manu, const TQString& model) // try by stripping the manufacturer name from // the beginning of the model string. This is // often the case with PPD files - item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1(""))); + item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::fromLatin1(""))); if (item) m_model->setCurrentItem(item); } diff --git a/tdeprint/management/kmiconview.cpp b/tdeprint/management/kmiconview.cpp index 905f4d248..0978c0782 100644 --- a/tdeprint/management/kmiconview.cpp +++ b/tdeprint/management/kmiconview.cpp @@ -99,7 +99,7 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode) setText(TQString::null); setText(p->name()); } - setKey(TQString::tqfromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name())); + setKey(TQString::fromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name())); m_isclass = p->isClass(false); } if (mode != m_mode || ((oldstate&0x4) != (m_state&0x4)) || (p && p->pixmap() != m_pixmap)) @@ -114,7 +114,7 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode) setPixmap(SmallIcon(m_pixmap, 0, iconstate)); } //if (update) - // tqrepaint(); + // repaint(); setDiscarded(false); } @@ -180,7 +180,7 @@ void KMIconView::setPrinterList(TQPtrList<KMPrinter> *list) } for (uint i=0; i<m_items.count(); i++) - if (m_items.tqat(i)->isDiscarded()) + if (m_items.at(i)->isDiscarded()) { delete m_items.take(i); i--; diff --git a/tdeprint/management/kminfopage.cpp b/tdeprint/management/kminfopage.cpp index 2c3e7a2fa..449f71d47 100644 --- a/tdeprint/management/kminfopage.cpp +++ b/tdeprint/management/kminfopage.cpp @@ -22,7 +22,7 @@ #include <tqpixmap.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kiconloader.h> #include <kseparator.h> @@ -107,7 +107,7 @@ void KMInfoPage::setPrinter(KMPrinter *p) } else { - m_title->setText(TQString::tqfromLatin1("<b>%1</b>").arg(p->name())); + m_title->setText(TQString::fromLatin1("<b>%1</b>").arg(p->name())); m_titlepixmap->setPixmap(SmallIcon(p->pixmap())); if (p->isImplicit()) m_type->setText(i18n("Implicit class")); else if (p->isClass(false)) diff --git a/tdeprint/management/kminstancepage.cpp b/tdeprint/management/kminstancepage.cpp index 25c037516..b571881c0 100644 --- a/tdeprint/management/kminstancepage.cpp +++ b/tdeprint/management/kminstancepage.cpp @@ -26,7 +26,7 @@ #include "kprinter.h" #include "kmtimer.h" -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <tqwhatsthis.h> #include <tqpushbutton.h> diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp index 9fca665a7..465e31dd3 100644 --- a/tdeprint/management/kmjobviewer.cpp +++ b/tdeprint/management/kmjobviewer.cpp @@ -46,7 +46,7 @@ #include <twin.h> #include <kio/netaccess.h> #include <tqtimer.h> -#include <tqlayout.h> +#include <layout.h> #include <stdlib.h> #include <tqlineedit.h> #include <kdialogbase.h> @@ -398,7 +398,7 @@ void KMJobViewer::updateJobs() } for (uint i=0; i<m_items.count(); i++) - if (m_items.tqat(i)->isDiscarded()) + if (m_items.at(i)->isDiscarded()) { delete m_items.take(i); i--; @@ -510,7 +510,7 @@ void KMJobViewer::slotMove(int prID) { if (prID >= 0 && prID < (int)(m_printers.count())) { - KMPrinter *p = m_printers.tqat(prID); + KMPrinter *p = m_printers.at(prID); send(KMJob::Move,i18n("Move to %1").arg(p->printerName()),p->printerName()); } } @@ -540,7 +540,7 @@ void KMJobViewer::slotPrinterSelected(int prID) { if (prID >= 0 && prID < (int)(m_printers.count()+1)) { - TQString prname = (prID == 0 ? i18n("All Printers") : m_printers.tqat(prID-1)->printerName()); + TQString prname = (prID == 0 ? i18n("All Printers") : m_printers.at(prID-1)->printerName()); emit printerChanged(this, prname); } } diff --git a/tdeprint/management/kmlistview.cpp b/tdeprint/management/kmlistview.cpp index 4332a8678..4bddf9203 100644 --- a/tdeprint/management/kmlistview.cpp +++ b/tdeprint/management/kmlistview.cpp @@ -89,7 +89,7 @@ void KMListViewItem::updatePrinter(KMPrinter *p) } setDiscarded(false); if (update) - tqrepaint(); + repaint(); } void KMListViewItem::paintCell(TQPainter *p, const TQColorGroup& cg, int c, int w, int a) @@ -216,7 +216,7 @@ void KMListView::setPrinterList(TQPtrList<KMPrinter> *list) TQPtrList<KMListViewItem> deleteList; deleteList.setAutoDelete(true); for (uint i=0; i<m_items.count(); i++) - if (m_items.tqat(i)->isDiscarded()) + if (m_items.at(i)->isDiscarded()) { // instance items are put in front of the list // so that they are destroyed first diff --git a/tdeprint/management/kmmainview.cpp b/tdeprint/management/kmmainview.cpp index f5f905af3..cd58ff3ce 100644 --- a/tdeprint/management/kmmainview.cpp +++ b/tdeprint/management/kmmainview.cpp @@ -40,7 +40,7 @@ #include <tqtimer.h> #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpopupmenu.h> #include <kmessagebox.h> #include <kaction.h> diff --git a/tdeprint/management/kmprinterview.cpp b/tdeprint/management/kmprinterview.cpp index 59911ff34..290309c70 100644 --- a/tdeprint/management/kmprinterview.cpp +++ b/tdeprint/management/kmprinterview.cpp @@ -24,7 +24,7 @@ #include "kmtimer.h" #include "kmmanager.h" -#include <tqlayout.h> +#include <layout.h> #include <tqpopupmenu.h> #include <kaction.h> #include <klocale.h> diff --git a/tdeprint/management/kmpropbackend.cpp b/tdeprint/management/kmpropbackend.cpp index 98004d2ed..4ebfc9e80 100644 --- a/tdeprint/management/kmpropbackend.cpp +++ b/tdeprint/management/kmpropbackend.cpp @@ -22,7 +22,7 @@ #include "kmwizard.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KMPropBackend::KMPropBackend(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmpropcontainer.cpp b/tdeprint/management/kmpropcontainer.cpp index 9c7808199..123ab0a3e 100644 --- a/tdeprint/management/kmpropcontainer.cpp +++ b/tdeprint/management/kmpropcontainer.cpp @@ -21,7 +21,7 @@ #include "kmpropwidget.h" #include <kpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kseparator.h> #include <kguiitem.h> diff --git a/tdeprint/management/kmpropdriver.cpp b/tdeprint/management/kmpropdriver.cpp index 55daf0ed5..bddbd7271 100644 --- a/tdeprint/management/kmpropdriver.cpp +++ b/tdeprint/management/kmpropdriver.cpp @@ -22,7 +22,7 @@ #include "kmwizard.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KMPropDriver::KMPropDriver(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmpropgeneral.cpp b/tdeprint/management/kmpropgeneral.cpp index c55603da9..0a7bab776 100644 --- a/tdeprint/management/kmpropgeneral.cpp +++ b/tdeprint/management/kmpropgeneral.cpp @@ -24,7 +24,7 @@ #include "kmmanager.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KMPropGeneral::KMPropGeneral(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmpropmembers.cpp b/tdeprint/management/kmpropmembers.cpp index 4efbcf547..3d8999436 100644 --- a/tdeprint/management/kmpropmembers.cpp +++ b/tdeprint/management/kmpropmembers.cpp @@ -21,15 +21,15 @@ #include "kmprinter.h" #include "kmwizard.h" -#include <tqtextview.h> -#include <tqlayout.h> +#include <textview.h> +#include <layout.h> #include <klocale.h> KMPropMembers::KMPropMembers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) { m_members = new TQTextView(this); - m_members->setPaper(tqcolorGroup().background()); + m_members->setPaper(colorGroup().background()); m_members->setFrameStyle(TQFrame::NoFrame); TQVBoxLayout *main_ = new TQVBoxLayout(this, 10, 0); diff --git a/tdeprint/management/kmspecialprinterdlg.cpp b/tdeprint/management/kmspecialprinterdlg.cpp index 6569f3f83..d4dbc97e6 100644 --- a/tdeprint/management/kmspecialprinterdlg.cpp +++ b/tdeprint/management/kmspecialprinterdlg.cpp @@ -31,7 +31,7 @@ #include <tqcheckbox.h> #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <tqgroupbox.h> #include <klocale.h> @@ -138,7 +138,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name) l0->addWidget(sep); l0->addWidget(m_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->addWidget(m_mimetypelabel, 1, 0); l6->addWidget(m_mimetype, 1, 1); diff --git a/tdeprint/management/kmwbackend.cpp b/tdeprint/management/kmwbackend.cpp index e39b52f8d..17c519435 100644 --- a/tdeprint/management/kmwbackend.cpp +++ b/tdeprint/management/kmwbackend.cpp @@ -21,7 +21,7 @@ #include "kmwizard.h" #include "kmprinter.h" -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <tqbuttongroup.h> #include <tqradiobutton.h> @@ -102,7 +102,7 @@ void KMWBackend::updatePrinter(KMPrinter *p) else p->setType(KMPrinter::Printer); p->setOption("kde-backend",TQString::number(ID)); TQString s = m_buttons->selected()->text(); - s.replace(TQRegExp("&(?=\\w)"), TQString::tqfromLatin1("")); + s.replace(TQRegExp("&(?=\\w)"), TQString::fromLatin1("")); p->setOption("kde-backend-description",s); setNextPage((m_map.contains(ID) ? m_map[ID] : KMWizard::Error)); } diff --git a/tdeprint/management/kmwclass.cpp b/tdeprint/management/kmwclass.cpp index a87388a6f..0232c42dd 100644 --- a/tdeprint/management/kmwclass.cpp +++ b/tdeprint/management/kmwclass.cpp @@ -23,7 +23,7 @@ #include "kmmanager.h" #include "kmprinter.h" -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqtoolbutton.h> #include <klistbox.h> diff --git a/tdeprint/management/kmwdriver.cpp b/tdeprint/management/kmwdriver.cpp index 58793c192..1a6720224 100644 --- a/tdeprint/management/kmwdriver.cpp +++ b/tdeprint/management/kmwdriver.cpp @@ -23,7 +23,7 @@ #include "kmdriverdbwidget.h" #include "kmdriverdb.h" -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KMWDriver::KMWDriver(TQWidget *parent, const char *name) diff --git a/tdeprint/management/kmwdriverselect.cpp b/tdeprint/management/kmwdriverselect.cpp index e3d253660..fbfe2c4a0 100644 --- a/tdeprint/management/kmwdriverselect.cpp +++ b/tdeprint/management/kmwdriverselect.cpp @@ -24,7 +24,7 @@ #include "kmdriverdb.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kpushbutton.h> #include <klistbox.h> #include <klocale.h> @@ -93,7 +93,7 @@ void KMWDriverSelect::updatePrinter(KMPrinter *p) int index = m_list->currentItem(); if (m_entries && index >= 0 && index < (int)(m_entries->count())) { - KMDBEntry *entry = m_entries->tqat(index); + KMDBEntry *entry = m_entries->at(index); p->setDbEntry(entry); p->setDriverInfo(entry->description); } @@ -107,8 +107,8 @@ void KMWDriverSelect::updatePrinter(KMPrinter *p) void KMWDriverSelect::slotDriverComment() { int index = m_list->currentItem(); - if (m_entries && index >=0 && index < (int)(m_entries->count()) && !m_entries->tqat(index)->drivercomment.isEmpty()) - KMessageBox::information(this, m_entries->tqat(index)->drivercomment, TQString::null, TQString::null, KMessageBox::AllowLink); + if (m_entries && index >=0 && index < (int)(m_entries->count()) && !m_entries->at(index)->drivercomment.isEmpty()) + KMessageBox::information(this, m_entries->at(index)->drivercomment, TQString::null, TQString::null, KMessageBox::AllowLink); else KMessageBox::error(this, i18n("No information about the selected driver.")); } diff --git a/tdeprint/management/kmwdrivertest.cpp b/tdeprint/management/kmwdrivertest.cpp index 545d3b94d..baa30a23a 100644 --- a/tdeprint/management/kmwdrivertest.cpp +++ b/tdeprint/management/kmwdrivertest.cpp @@ -27,7 +27,7 @@ #include <tqlabel.h> #include <kpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kapplication.h> #include <kmessagebox.h> diff --git a/tdeprint/management/kmwend.cpp b/tdeprint/management/kmwend.cpp index 54294fb13..7daa793c0 100644 --- a/tdeprint/management/kmwend.cpp +++ b/tdeprint/management/kmwend.cpp @@ -22,9 +22,9 @@ #include "kmwizard.h" #include "util.h" -#include <tqtextview.h> +#include <textview.h> #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> KMWEnd::KMWEnd(TQWidget *parent, const char *name) : KMWizardPage(parent,name) @@ -42,11 +42,11 @@ KMWEnd::KMWEnd(TQWidget *parent, const char *name) void KMWEnd::initPrinter(KMPrinter *p) { TQString txt; - TQString s(TQString::tqfromLatin1("<li><u>%1</u>: %2</li>")); + TQString s(TQString::fromLatin1("<li><u>%1</u>: %2</li>")); int ID = p->option("kde-backend").toInt(); // general information - txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General"))); + txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General"))); txt.append(s.arg(i18n("Type")).arg(p->option("kde-backend-description"))); txt.append(s.arg(i18n("Name")).arg(p->name())); txt.append(s.arg(i18n("Location")).arg(p->location())); @@ -56,9 +56,9 @@ void KMWEnd::initPrinter(KMPrinter *p) if (ID == KMWizard::Class) { // class members - txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members"))); + txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members"))); TQStringList m(p->members()); - TQString s1(TQString::tqfromLatin1("<li>%1</li>")); + TQString s1(TQString::fromLatin1("<li>%1</li>")); for (TQStringList::ConstIterator it=m.begin(); it!=m.end(); ++it) txt.append(s1.arg(*it)); txt.append("</ul><br>"); @@ -66,7 +66,7 @@ void KMWEnd::initPrinter(KMPrinter *p) else { // backend information - txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend"))); + txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend"))); KURL url ( p->device() ); switch (ID) { @@ -101,7 +101,7 @@ void KMWEnd::initPrinter(KMPrinter *p) if (p->option("kde-driver") == "raw" || p->driver()) { // driver information - txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver"))); + txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver"))); if (p->option("kde-driver") == "raw") txt.append(s.arg(i18n("Type")).arg(i18n("Raw printer"))); else diff --git a/tdeprint/management/kmwfile.cpp b/tdeprint/management/kmwfile.cpp index 32da27c03..98969df67 100644 --- a/tdeprint/management/kmwfile.cpp +++ b/tdeprint/management/kmwfile.cpp @@ -22,7 +22,7 @@ #include "kmprinter.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kurlrequester.h> #include <klocale.h> @@ -72,6 +72,6 @@ bool KMWFile::isValid(TQString& msg) void KMWFile::updatePrinter(KMPrinter *p) { - TQString dev = TQString::tqfromLatin1("file:%1").arg(m_url->url()); + TQString dev = TQString::fromLatin1("file:%1").arg(m_url->url()); p->setDevice(dev); } diff --git a/tdeprint/management/kmwinfobase.cpp b/tdeprint/management/kmwinfobase.cpp index 993576334..fbe1d2b02 100644 --- a/tdeprint/management/kmwinfobase.cpp +++ b/tdeprint/management/kmwinfobase.cpp @@ -21,7 +21,7 @@ #include <tqlabel.h> #include <tqlineedit.h> -#include <tqlayout.h> +#include <layout.h> KMWInfoBase::KMWInfoBase(int n, TQWidget *parent, const char *name) : KMWizardPage(parent,name) @@ -56,19 +56,19 @@ void KMWInfoBase::setInfo(const TQString& s) void KMWInfoBase::setLabel(int i, const TQString& s) { if (i >= 0 && i < m_nlines) - m_labels.tqat(i)->setText(s); + m_labels.at(i)->setText(s); } void KMWInfoBase::setText(int i, const TQString& s) { if (i >= 0 && i < m_nlines) - m_edits.tqat(i)->setText(s); + m_edits.at(i)->setText(s); } TQString KMWInfoBase::text(int i) { if (i >= 0 && i < m_nlines) - return m_edits.tqat(i)->text(); + return m_edits.at(i)->text(); return TQString::null; } @@ -76,15 +76,15 @@ void KMWInfoBase::setCurrent(int i) { if (i >= 0 && i < m_nlines) { - m_edits.tqat(i)->selectAll(); - m_edits.tqat(i)->setFocus(); + m_edits.at(i)->selectAll(); + m_edits.at(i)->setFocus(); } } TQLineEdit* KMWInfoBase::lineEdit( int i ) { if ( i >= 0 && i < m_nlines ) - return m_edits.tqat( i ); + return m_edits.at( i ); else return NULL; } diff --git a/tdeprint/management/kmwinfopage.cpp b/tdeprint/management/kmwinfopage.cpp index 1e9652e93..7a23dd6f9 100644 --- a/tdeprint/management/kmwinfopage.cpp +++ b/tdeprint/management/kmwinfopage.cpp @@ -21,7 +21,7 @@ #include "kmwizard.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kactivelabel.h> diff --git a/tdeprint/management/kmwizard.cpp b/tdeprint/management/kmwizard.cpp index 5dc915572..38aac1cee 100644 --- a/tdeprint/management/kmwizard.cpp +++ b/tdeprint/management/kmwizard.cpp @@ -27,7 +27,7 @@ #include <tqlabel.h> #include <tqwidgetstack.h> #include <kmessagebox.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kdebug.h> #include <kseparator.h> diff --git a/tdeprint/management/kmwlocal.cpp b/tdeprint/management/kmwlocal.cpp index 7b56b2deb..49ab109c5 100644 --- a/tdeprint/management/kmwlocal.cpp +++ b/tdeprint/management/kmwlocal.cpp @@ -24,7 +24,7 @@ #include "kmmanager.h" #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlabel.h> #include <tqheader.h> diff --git a/tdeprint/management/kmwlpd.cpp b/tdeprint/management/kmwlpd.cpp index cce4c7b5a..352a075c5 100644 --- a/tdeprint/management/kmwlpd.cpp +++ b/tdeprint/management/kmwlpd.cpp @@ -66,7 +66,7 @@ bool KMWLpd::isValid(TQString& msg) void KMWLpd::updatePrinter(KMPrinter *p) { - QString dev = TQString::tqfromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1)); + QString dev = TQString::fromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1)); p->setDevice(dev); } diff --git a/tdeprint/management/kmwpassword.cpp b/tdeprint/management/kmwpassword.cpp index 40dc105d5..8021aecf6 100644 --- a/tdeprint/management/kmwpassword.cpp +++ b/tdeprint/management/kmwpassword.cpp @@ -25,7 +25,7 @@ #include <tqlineedit.h> #include <tqvbuttongroup.h> #include <tqradiobutton.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kcursor.h> @@ -121,7 +121,7 @@ void KMWPassword::updatePrinter(KMPrinter *p) p->setOption( "kde-password", TQString::null ); break; case 1: - p->setOption( "kde-login", TQString::tqfromLatin1( "guest" ) ); + p->setOption( "kde-login", TQString::fromLatin1( "guest" ) ); p->setOption( "kde-password", TQString::null ); break; case 2: diff --git a/tdeprint/management/kmwsmb.cpp b/tdeprint/management/kmwsmb.cpp index e76240cf8..3056ae962 100644 --- a/tdeprint/management/kmwsmb.cpp +++ b/tdeprint/management/kmwsmb.cpp @@ -25,7 +25,7 @@ #include <klocale.h> #include <kpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlabel.h> diff --git a/tdeprint/management/kmwsocket.cpp b/tdeprint/management/kmwsocket.cpp index 98aad76a5..4d7468e70 100644 --- a/tdeprint/management/kmwsocket.cpp +++ b/tdeprint/management/kmwsocket.cpp @@ -27,7 +27,7 @@ #include <tqlineedit.h> #include <tqlabel.h> #include <kmessagebox.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <kiconloader.h> #include <kseparator.h> @@ -88,7 +88,7 @@ KMWSocket::~KMWSocket() void KMWSocket::updatePrinter(KMPrinter *p) { - TQString dev = TQString::tqfromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text()); + TQString dev = TQString::fromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text()); p->setDevice(dev); } diff --git a/tdeprint/management/kmwsocketutil.cpp b/tdeprint/management/kmwsocketutil.cpp index 7b77d1d82..11c9a9fdd 100644 --- a/tdeprint/management/kmwsocketutil.cpp +++ b/tdeprint/management/kmwsocketutil.cpp @@ -28,7 +28,7 @@ #include <tqcombobox.h> #include <tqpushbutton.h> #include <kmessagebox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <knumvalidator.h> @@ -53,7 +53,7 @@ SocketConfig::SocketConfig(KMWSocketUtil *util, TQWidget *parent, const char *na TQLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); TQLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); TQLineEdit *mm = new TQLineEdit(dummy); - mm->setText(TQString::tqfromLatin1(".[0-255]")); + mm->setText(TQString::fromLatin1(".[0-255]")); mm->setReadOnly(true); mm->setFixedWidth(fontMetrics().width(mm->text())+10); diff --git a/tdeprint/management/kxmlcommanddlg.cpp b/tdeprint/management/kxmlcommanddlg.cpp index 3b42b71d7..38cbfe44b 100644 --- a/tdeprint/management/kxmlcommanddlg.cpp +++ b/tdeprint/management/kxmlcommanddlg.cpp @@ -21,7 +21,7 @@ #include "driver.h" #include "kxmlcommand.h" -#include <tqlayout.h> +#include <layout.h> #include <tqheader.h> #include <tqlabel.h> #include <tqlineedit.h> @@ -52,8 +52,8 @@ TQString generateId(const TQMap<TQString, DrBase*>& map) { int index(-1); - while (map.contains(TQString::tqfromLatin1("item%1").arg(++index))) ; - return TQString::tqfromLatin1("item%1").arg(index); + while (map.contains(TQString::fromLatin1("item%1").arg(++index))) ; + return TQString::fromLatin1("item%1").arg(index); } TQListViewItem* findPrev(TQListViewItem *item) @@ -230,9 +230,9 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam l5->addWidget(m_edit1, 0, 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()); - TQGridLayout *l9 = new TQGridLayout(gb_output->tqlayout(), 2, 2, + TQGridLayout *l9 = new TQGridLayout(gb_output->layout(), 2, 2, KDialog::spacingHint()); l8->addWidget(m_inputfilelab, 0, 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_outputpipe, 1, 1); - TQVBoxLayout *l11 = new TQVBoxLayout(TQT_TQLAYOUT(gb->tqlayout())); + TQVBoxLayout *l11 = new TQVBoxLayout(TQT_TQLAYOUT(gb->layout())); l11->addWidget(m_stack); 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_mimetype, 1); 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_selectedmime, 0, 3, 0, 0); l2->addWidget(m_addmime, 1, 1); l2->addWidget(m_removemime, 2, 1); l2->setRowStretch(0, 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); TQVBoxLayout *l8 = new TQVBoxLayout(0, 0, 0); l4->addLayout(l8); diff --git a/tdeprint/management/kxmlcommandselector.cpp b/tdeprint/management/kxmlcommandselector.cpp index 6f2b4485e..cb1bcb3d7 100644 --- a/tdeprint/management/kxmlcommandselector.cpp +++ b/tdeprint/management/kxmlcommandselector.cpp @@ -26,7 +26,7 @@ #include <kpushbutton.h> #include <tqlabel.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqlineedit.h> #include <kinputdialog.h> diff --git a/tdeprint/management/networkscanner.cpp b/tdeprint/management/networkscanner.cpp index a5ca72071..1424d607b 100644 --- a/tdeprint/management/networkscanner.cpp +++ b/tdeprint/management/networkscanner.cpp @@ -23,7 +23,7 @@ #include <tqprogressbar.h> #include <kpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <tqlabel.h> #include <tqcombobox.h> @@ -339,7 +339,7 @@ NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char * TQLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); TQLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); TQLineEdit *mm = new TQLineEdit(dummy); - mm->setText(TQString::tqfromLatin1(".[0-255]")); + mm->setText(TQString::fromLatin1(".[0-255]")); mm->setReadOnly(true); mm->setFixedWidth(fontMetrics().width(mm->text())+10); diff --git a/tdeprint/management/smbview.cpp b/tdeprint/management/smbview.cpp index fde3a3451..5c1fa279c 100644 --- a/tdeprint/management/smbview.cpp +++ b/tdeprint/management/smbview.cpp @@ -31,7 +31,7 @@ #include <kcursor.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <cstdlib> diff --git a/tdeprint/marginwidget.cpp b/tdeprint/marginwidget.cpp index 53790a112..afeb1a229 100644 --- a/tdeprint/marginwidget.cpp +++ b/tdeprint/marginwidget.cpp @@ -24,7 +24,7 @@ #include <tqcombobox.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/tdeprint/messagewindow.cpp b/tdeprint/messagewindow.cpp index a1b6ddf29..82f694707 100644 --- a/tdeprint/messagewindow.cpp +++ b/tdeprint/messagewindow.cpp @@ -20,7 +20,7 @@ #include "messagewindow.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <tqpixmap.h> #include <tqhbox.h> diff --git a/tdeprint/plugincombobox.cpp b/tdeprint/plugincombobox.cpp index 8fa09ab95..104eb28df 100644 --- a/tdeprint/plugincombobox.cpp +++ b/tdeprint/plugincombobox.cpp @@ -23,7 +23,7 @@ #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> #include <tqwhatsthis.h> diff --git a/tdeprint/posterpreview.cpp b/tdeprint/posterpreview.cpp index 7e8542c22..241c53dbf 100644 --- a/tdeprint/posterpreview.cpp +++ b/tdeprint/posterpreview.cpp @@ -106,7 +106,7 @@ void PosterPreview::drawContents( TQPainter *painter ) TQPixmap pix( width(), height() ); TQPainter *p = new TQPainter( &pix ); - p->fillRect( 0, 0, width(), height(), tqcolorGroup().background() ); + p->fillRect( 0, 0, width(), height(), colorGroup().background() ); if ( isEnabled() ) { @@ -120,7 +120,7 @@ void PosterPreview::drawContents( TQPainter *painter ) int x = ( width()-richtext.widthUsed() )/2, y = ( height()-richtext.height() )/2; x = QMAX( x, 0 ); y = QMAX( y, 0 ); - richtext.draw( p, x, y, TQRect( x, y, richtext.widthUsed(), richtext.height() ), tqcolorGroup() ); + richtext.draw( p, x, y, TQRect( x, y, richtext.widthUsed(), richtext.height() ), colorGroup() ); m_boundingrect = TQRect(); } else diff --git a/tdeprint/rlpr/kmconfigproxy.cpp b/tdeprint/rlpr/kmconfigproxy.cpp index 0f8ca3743..38ccf62e6 100644 --- a/tdeprint/rlpr/kmconfigproxy.cpp +++ b/tdeprint/rlpr/kmconfigproxy.cpp @@ -20,7 +20,7 @@ #include "kmconfigproxy.h" #include "kmproxywidget.h" -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KMConfigProxy::KMConfigProxy(TQWidget *parent) diff --git a/tdeprint/rlpr/kmproprlpr.cpp b/tdeprint/rlpr/kmproprlpr.cpp index 62fe97827..022ab80f7 100644 --- a/tdeprint/rlpr/kmproprlpr.cpp +++ b/tdeprint/rlpr/kmproprlpr.cpp @@ -22,7 +22,7 @@ #include "kmwizard.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <klocale.h> KMPropRlpr::KMPropRlpr(TQWidget *parent, const char *name) diff --git a/tdeprint/rlpr/kmproxywidget.cpp b/tdeprint/rlpr/kmproxywidget.cpp index 94ad60340..9c2920795 100644 --- a/tdeprint/rlpr/kmproxywidget.cpp +++ b/tdeprint/rlpr/kmproxywidget.cpp @@ -22,7 +22,7 @@ #include <tqlineedit.h> #include <tqlabel.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvalidator.h> #include <klocale.h> #include <kconfig.h> @@ -46,7 +46,7 @@ KMProxyWidget::KMProxyWidget(TQWidget *parent, const char *name) m_proxyhost->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->addMultiCellWidget(m_useproxy,0,0,0,1); lay0->addWidget(m_hostlabel,1,0); diff --git a/tdeprint/rlpr/kmrlprmanager.cpp b/tdeprint/rlpr/kmrlprmanager.cpp index 64f6acde1..553d9be13 100644 --- a/tdeprint/rlpr/kmrlprmanager.cpp +++ b/tdeprint/rlpr/kmrlprmanager.cpp @@ -22,7 +22,7 @@ #include <tqfile.h> #include <tqfileinfo.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqmap.h> #include <kstandarddirs.h> @@ -116,7 +116,7 @@ void KMRlprManager::loadPrintersConf(const TQString& filename) if (w.count() > 4) printer->setLocation(w[4]); } printer->setState(KMPrinter::Idle); - printer->setDevice(TQString::tqfromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2])); + printer->setDevice(TQString::fromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2])); addPrinter(printer); } diff --git a/tdeprint/rlpr/kmwrlpr.cpp b/tdeprint/rlpr/kmwrlpr.cpp index 70defc27b..e211dbd44 100644 --- a/tdeprint/rlpr/kmwrlpr.cpp +++ b/tdeprint/rlpr/kmwrlpr.cpp @@ -23,8 +23,8 @@ #include <tqdir.h> #include <tqfile.h> -#include <tqtextstream.h> -#include <tqlayout.h> +#include <textstream.h> +#include <layout.h> #include <tqlabel.h> #include <tqlineedit.h> #include <tqheader.h> @@ -53,7 +53,7 @@ KMWRlpr::KMWRlpr(TQWidget *parent, const char *name) m_view = new KListView(this); m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_view->setLineWidth(1); - m_view->addColumn(TQString::tqfromLatin1("")); + m_view->addColumn(TQString::fromLatin1("")); m_view->header()->hide(); m_view->setRootIsDecorated(true); m_view->setSorting(0); @@ -109,7 +109,7 @@ void KMWRlpr::initPrinter(KMPrinter *p) void KMWRlpr::updatePrinter(KMPrinter *p) { - TQString uri = TQString::tqfromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text()); + TQString uri = TQString::fromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text()); p->setDevice(uri); p->setOption("host",m_host->text()); p->setOption("queue",m_queue->text()); diff --git a/tdeprint/rlpr/krlprprinterimpl.cpp b/tdeprint/rlpr/krlprprinterimpl.cpp index a6b0e5986..2833c9598 100644 --- a/tdeprint/rlpr/krlprprinterimpl.cpp +++ b/tdeprint/rlpr/krlprprinterimpl.cpp @@ -54,7 +54,7 @@ bool KRlprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) return false; } - cmd = TQString::tqfromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies()); + cmd = TQString::fromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies()); // proxy settings KConfig *conf = KMFactory::self()->printConfig(); diff --git a/tdeprint/tdeprintcheck.cpp b/tdeprint/tdeprintcheck.cpp index 1ace082a4..1b5cc691a 100644 --- a/tdeprint/tdeprintcheck.cpp +++ b/tdeprint/tdeprintcheck.cpp @@ -101,8 +101,8 @@ bool KdeprintChecker::checkConfig(const KURL& url) const char* const *p = config_stddirs; while (*p) { - // kdDebug( 500 ) << "checkConfig() with " << TQString::tqfromLatin1( *p ) + f << endl; - if ( TQFile::exists( TQString::tqfromLatin1( *p ) + f ) ) + // kdDebug( 500 ) << "checkConfig() with " << TQString::fromLatin1( *p ) + f << endl; + if ( TQFile::exists( TQString::fromLatin1( *p ) + f ) ) { state = true; break; diff --git a/tdeprint/tdeprintd.cpp b/tdeprint/tdeprintd.cpp index 2711ffdbf..1c9a2969a 100644 --- a/tdeprint/tdeprintd.cpp +++ b/tdeprint/tdeprintd.cpp @@ -34,7 +34,7 @@ #include <kstandarddirs.h> #include <twin.h> #include <kapplication.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <tqregexp.h> diff --git a/tdeprint/tests/drawdemo.cpp b/tdeprint/tests/drawdemo.cpp index 20fc3d12e..443cc89e8 100644 --- a/tdeprint/tests/drawdemo.cpp +++ b/tdeprint/tests/drawdemo.cpp @@ -78,7 +78,7 @@ void drawFonts( TQPainter *p ) // -// This function draws some tqshapes +// This function draws some shapes // void drawShapes( TQPainter *p ) @@ -115,7 +115,7 @@ struct DrawThing { DrawThing ourDrawFunctions[] = { { drawColorWheel, "Draw color wheel" }, { drawFonts, "Draw fonts" }, - { drawShapes, "Draw tqshapes" }, + { drawShapes, "Draw shapes" }, { 0, 0 } }; diff --git a/tdeprint/tests/helpwindow.cpp b/tdeprint/tests/helpwindow.cpp index bee755d20..87603ceb5 100644 --- a/tdeprint/tests/helpwindow.cpp +++ b/tdeprint/tests/helpwindow.cpp @@ -19,8 +19,8 @@ #include <tqtoolbutton.h> #include <tqiconset.h> #include <tqfile.h> -#include <tqtextstream.h> -#include <tqstylesheet.h> +#include <textstream.h> +#include <stylesheet.h> #include <tqmessagebox.h> #include <tqfiledialog.h> #include <tqapplication.h> @@ -278,7 +278,7 @@ void HelpWindow::print() TQRect view( body ); int page = 1; do { - richText.draw( &p, body.left(), body.top(), view, tqcolorGroup() ); + richText.draw( &p, body.left(), body.top(), view, colorGroup() ); view.moveBy( 0, body.height() ); p.translate( 0 , -body.height() ); p.setFont( font ); diff --git a/tdeprint/tests/helpwindow.h b/tdeprint/tests/helpwindow.h index c444b8144..5c4a16c62 100644 --- a/tdeprint/tests/helpwindow.h +++ b/tdeprint/tests/helpwindow.h @@ -12,7 +12,7 @@ #define HELPWINDOW_H #include <kmainwindow.h> -#include <tqtextbrowser.h> +#include <textbrowser.h> #include <tqstringlist.h> #include <tqmap.h> #include <tqdir.h> diff --git a/tdeprint/tests/main.cpp b/tdeprint/tests/main.cpp index a1dc6b5e0..a89bcd13a 100644 --- a/tdeprint/tests/main.cpp +++ b/tdeprint/tests/main.cpp @@ -11,7 +11,7 @@ #include "helpwindow.h" #include <kapplication.h> #include <tqwindowsstyle.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <stdlib.h> diff --git a/tdeprint/tests/richpage.cpp b/tdeprint/tests/richpage.cpp index 30da712de..d611e4ecd 100644 --- a/tdeprint/tests/richpage.cpp +++ b/tdeprint/tests/richpage.cpp @@ -4,7 +4,7 @@ #include <tqspinbox.h> #include <tqcombobox.h> #include <tqfontdatabase.h> -#include <tqlayout.h> +#include <layout.h> RichPage::RichPage(TQWidget *parent, const char *name) : KPrintDialogPage(parent,name) @@ -23,7 +23,7 @@ RichPage::RichPage(TQWidget *parent, const char *name) QFontDatabase db; QStringList fonts = db.families(); fontname_->insertStringList(fonts); - fontname_->setCurrentItem(fonts.findIndex(TQString::tqfromLatin1("times"))); + fontname_->setCurrentItem(fonts.findIndex(TQString::fromLatin1("times"))); if (fontname_->currentItem() < 0) fontname_->setCurrentItem(0); QLabel *l1 = new TQLabel("Margin:",this); diff --git a/tdeprint/tools/escputil/escpwidget.cpp b/tdeprint/tools/escputil/escpwidget.cpp index e4bc1e6f2..929a9085b 100644 --- a/tdeprint/tools/escputil/escpwidget.cpp +++ b/tdeprint/tools/escputil/escpwidget.cpp @@ -20,7 +20,7 @@ #include "escpwidget.h" #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqcheckbox.h> #include <tqaccel.h> diff --git a/tdeprint/treecombobox.cpp b/tdeprint/treecombobox.cpp index 45213f41c..a27b68289 100644 --- a/tdeprint/treecombobox.cpp +++ b/tdeprint/treecombobox.cpp @@ -102,7 +102,7 @@ void TreeListBoxItem::paint(TQPainter *p) if (m_depth > 0) { TQPen oldPen = p->pen(); - p->setPen(listBox()->tqcolorGroup().mid()); + p->setPen(listBox()->colorGroup().mid()); TreeListBoxItem *item = this; int s = xo-stepSize()/2; diff --git a/tdesu/process.cpp b/tdesu/process.cpp index 09deda5bf..692c01553 100644 --- a/tdesu/process.cpp +++ b/tdesu/process.cpp @@ -524,7 +524,7 @@ int PtyProcess::waitForChild() fputs(output, stdout); fflush(stdout); } - lineStart = output.tqat( output.length() - 1 ) == '\n'; + lineStart = output.at( output.length() - 1 ) == '\n'; output = readAll(false); } } diff --git a/tdeui/kaboutdialog.cpp b/tdeui/kaboutdialog.cpp index e59d808c9..da4961ea3 100644 --- a/tdeui/kaboutdialog.cpp +++ b/tdeui/kaboutdialog.cpp @@ -20,10 +20,10 @@ * */ -#include <tqclipboard.h> +#include <clipboard.h> #include <tqimage.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <ktextedit.h> #include <tqobjectlist.h> #include <tqpainter.h> @@ -429,7 +429,7 @@ void KAboutContainerBase::show( void ) TQSize KAboutContainerBase::sizeHint( void ) const { - return tqminimumSize().expandedTo( TQSize( TQWidget::sizeHint().width(), 0 ) ); + return minimumSize().expandedTo( TQSize( TQWidget::sizeHint().width(), 0 ) ); } void KAboutContainerBase::fontChange( const TQFont &/*oldFont*/ ) @@ -828,7 +828,7 @@ TQSize KAboutContainer::sizeHint( void ) const ++numChild; TQWidget* const w= TQT_TQWIDGET(o); - TQSize s = w->tqminimumSize(); + TQSize s = w->minimumSize(); if( s.isEmpty() ) { s = w->minimumSizeHint(); @@ -890,7 +890,7 @@ void KAboutContainer::addPerson( const TQString &_name, const TQString &_email, } -void KAboutContainer::addTitle( const TQString &title, int tqalignment, +void KAboutContainer::addTitle( const TQString &title, int alignment, bool showFrame, bool showBold ) { @@ -905,11 +905,11 @@ void KAboutContainer::addTitle( const TQString &title, int tqalignment, { label->setFrameStyle(TQFrame::Panel | TQFrame::Raised); } - label->setAlignment( tqalignment ); + label->setAlignment( alignment ); } -void KAboutContainer::addImage( const TQString &fileName, int tqalignment ) +void KAboutContainer::addImage( const TQString &fileName, int alignment ) { if( fileName.isNull() ) { @@ -924,7 +924,7 @@ void KAboutContainer::addImage( const TQString &fileName, int tqalignment ) pix = logo; label->setPixmap( pix ); } - label->setAlignment( tqalignment ); + label->setAlignment( alignment ); } #if 0 diff --git a/tdeui/kaboutdialog.h b/tdeui/kaboutdialog.h index 01a515959..6f0d80149 100644 --- a/tdeui/kaboutdialog.h +++ b/tdeui/kaboutdialog.h @@ -62,9 +62,9 @@ class TDEUI_EXPORT KAboutContainer : public TQFrame const TQString &url, const TQString &task, bool showHeader = false, bool showframe = false, bool showBold = false ); - void addTitle( const TQString &title, int tqalignment=AlignLeft, + void addTitle( const TQString &title, int alignment=AlignLeft, bool showframe = false, bool showBold = false ); - void addImage( const TQString &fileName, int tqalignment=AlignLeft ); + void addImage( const TQString &fileName, int alignment=AlignLeft ); virtual TQSize sizeHint( void ) const; virtual TQSize minimumSizeHint( void ) const; diff --git a/tdeui/kaboutkde.cpp b/tdeui/kaboutkde.cpp index 7ac9b7193..1973c316b 100644 --- a/tdeui/kaboutkde.cpp +++ b/tdeui/kaboutkde.cpp @@ -27,7 +27,7 @@ KAboutKDE::KAboutKDE( TQWidget *parent, const char *name, bool modal ) - :KAboutDialog( KAboutDialog::AbtKDEStandard, TQString::tqfromLatin1("TDE"), + :KAboutDialog( KAboutDialog::AbtKDEStandard, TQString::fromLatin1("TDE"), KDialogBase::Help|KDialogBase::Close, KDialogBase::Close, parent, name, modal ) { @@ -75,13 +75,13 @@ KAboutKDE::KAboutKDE( TQWidget *parent, const char *name, bool modal ) "donation, using one of the ways described at " "<a href=\"http://www.trinitydesktop.org/donate.php\">http://www.trinitydesktop.org/donate.php</a>." "<br><br>Thank you very much in advance for your support!"); - setHelp( TQString::tqfromLatin1("khelpcenter/main.html"), TQString::null ); + setHelp( TQString::fromLatin1("khelpcenter/main.html"), TQString::null ); setTitle(i18n("Trinity Desktop Environment. Release %1"). - arg(TQString::tqfromLatin1(TDE_VERSION_STRING)) ); + arg(TQString::fromLatin1(TDE_VERSION_STRING)) ); addTextPage( i18n("About Trinity","&About"), text1, true ); addTextPage( i18n("&Report Bugs or Wishes"), text2, true ); addTextPage( i18n("&Join the Trinity Team"), text3, true ); addTextPage( i18n("&Support Trinity"), text4, true ); - setImage( locate( "data", TQString::tqfromLatin1("tdeui/pics/aboutkde.png")) ); + setImage( locate( "data", TQString::fromLatin1("tdeui/pics/aboutkde.png")) ); setImageBackgroundColor( white ); } diff --git a/tdeui/kaction.cpp b/tdeui/kaction.cpp index 6a0ad7812..270c00ec4 100644 --- a/tdeui/kaction.cpp +++ b/tdeui/kaction.cpp @@ -810,7 +810,7 @@ void KAction::unplugAccel() void KAction::plugMainWindowAccel( TQWidget *w ) { - // Note: tqtopLevelWidget() stops too early, we can't use it. + // Note: topLevelWidget() stops too early, we can't use it. TQWidget * tl = w; TQWidget * n; while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store @@ -1039,7 +1039,7 @@ TQString KAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!d->iconName().isEmpty()) - return TQString::tqfromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text); + return TQString::fromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text); return text; } diff --git a/tdeui/kactionclasses.cpp b/tdeui/kactionclasses.cpp index f9acb0ea9..5aec6bcdb 100644 --- a/tdeui/kactionclasses.cpp +++ b/tdeui/kactionclasses.cpp @@ -31,7 +31,7 @@ #include <fontconfig/fontconfig.h> #include <tqcursor.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqfontdatabase.h> #include <tqobjectlist.h> #include <tqwhatsthis.h> @@ -628,7 +628,7 @@ void KSelectAction::updateItems( int id ) for( ; it != lst.end(); ++it ) cb->insertItem( *it ); // qt caches and never recalculates the sizeHint() - // qcombobox.cpp recommends calling setFont to tqinvalidate the sizeHint + // qcombobox.cpp recommends calling setFont to invalidate the sizeHint // setFont sets own_font = True, so we're a bit mean and calll // unsetFont which calls setFont and then overwrites the own_font cb->unsetFont(); @@ -1626,7 +1626,7 @@ void KFontSizeAction::init() setEditable( true ); TQFontDatabase fontDB; - TQValueList<int> sizes = fontDB.tqstandardSizes(); + TQValueList<int> sizes = fontDB.standardSizes(); TQStringList lst; for ( TQValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it ) lst.append( TQString::number( *it ) ); @@ -2021,7 +2021,7 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) return -1; if ( !m_toolBar ) { - // Note: tqtopLevelWidget() stops too early, we can't use it. + // Note: topLevelWidget() stops too early, we can't use it. TQWidget * tl = w; TQWidget * n; while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store @@ -2326,7 +2326,7 @@ void KPasteTextAction::menuAboutToShow() if (reply.isValid()) list = reply; } - TQString clipboardText = tqApp->tqclipboard()->text(TQClipboard::Clipboard); + TQString clipboardText = tqApp->clipboard()->text(TQClipboard::Clipboard); if (list.isEmpty()) list << clipboardText; bool found = false; @@ -2354,7 +2354,7 @@ void KPasteTextAction::menuItemActivated( int id) TQString clipboardText = reply; reply = klipper.call("setClipboardContents(TQString)", clipboardText); 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())); } @@ -2363,7 +2363,7 @@ void KPasteTextAction::slotActivated() { if (!m_mixedMode) { TQWidget *w = tqApp->widgetAt(TQCursor::pos(), true); - TQMimeSource *data = TQApplication::tqclipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); if (!data->provides("text/plain") && w) { m_popup->popup(w->mapToGlobal(TQPoint(0, w->height()))); } else diff --git a/tdeui/kactioncollection.cpp b/tdeui/kactioncollection.cpp index 69a87eaee..ba809087c 100644 --- a/tdeui/kactioncollection.cpp +++ b/tdeui/kactioncollection.cpp @@ -250,8 +250,8 @@ void KActionCollection::removeWidget( TQWidget* w ) } delete pKAccel; - d->m_widgetList.remove( d->m_widgetList.tqat( i ) ); - d->m_kaccelList.remove( d->m_kaccelList.tqat( i ) ); + d->m_widgetList.remove( d->m_widgetList.at( i ) ); + d->m_kaccelList.remove( d->m_kaccelList.at( i ) ); if( d->m_iWidgetCurrent == (int)i ) d->m_iWidgetCurrent = -1; @@ -402,7 +402,7 @@ KAction* KActionCollection::action( int index ) const TQAsciiDictIterator<KAction> it( d->m_actionDict ); it += index; return it.current(); -// return d->m_actions.tqat( index ); +// return d->m_actions.at( index ); } bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) @@ -713,8 +713,8 @@ bool KActionShortcutList::save() const if( m_actions.xmlFile().isEmpty() ) return writeSettings(); - TQString attrShortcut = TQString::tqfromLatin1("shortcut"); - TQString attrAccel = TQString::tqfromLatin1("accel"); // Depricated attribute + TQString attrShortcut = TQString::fromLatin1("shortcut"); + TQString attrAccel = TQString::fromLatin1("accel"); // Depricated attribute // Read XML file TQString sXml( KXMLGUIFactory::readConfigFile( xmlFile, false, instance() ) ); diff --git a/tdeui/kactionselector.cpp b/tdeui/kactionselector.cpp index 8923cbd4f..73f573ead 100644 --- a/tdeui/kactionselector.cpp +++ b/tdeui/kactionselector.cpp @@ -27,7 +27,7 @@ #include <tqlistbox.h> #include <tqtoolbutton.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqevent.h> #include <tqwhatsthis.h> diff --git a/tdeui/kactivelabel.cpp b/tdeui/kactivelabel.cpp index f0398c1b7..72e72b677 100644 --- a/tdeui/kactivelabel.cpp +++ b/tdeui/kactivelabel.cpp @@ -113,7 +113,7 @@ void KActiveLabel::keyPressEvent( TQKeyEvent *e ) TQSize KActiveLabel::minimumSizeHint() const { - TQSize ms = tqminimumSize(); + TQSize ms = minimumSize(); if ((ms.width() > 0) && (ms.height() > 0)) return ms; diff --git a/tdeui/kactivelabel.h b/tdeui/kactivelabel.h index 5832a4fa1..d398ac37f 100644 --- a/tdeui/kactivelabel.h +++ b/tdeui/kactivelabel.h @@ -19,7 +19,7 @@ #ifndef _KACTIVELABEL_H_ #define _KACTIVELABEL_H_ -#include <tqtextbrowser.h> +#include <textbrowser.h> #include <tdelibs_export.h> diff --git a/tdeui/kanimwidget.cpp b/tdeui/kanimwidget.cpp index d538bea20..899ba7bd3 100644 --- a/tdeui/kanimwidget.cpp +++ b/tdeui/kanimwidget.cpp @@ -74,7 +74,7 @@ void KAnimWidget::stop() { d->current_frame = 0; d->timer.stop(); - tqrepaint(); + repaint(); } void KAnimWidget::setSize( int size ) @@ -162,7 +162,7 @@ void KAnimWidget::slotTimerUpdate() // We have to clear the widget when repainting a transparent image // By doing it like this we get a bit of flicker though. A better // way might be to merge it with the background in drawContents. - tqrepaint(d->transparent); + repaint(d->transparent); } void KAnimWidget::drawContents( TQPainter *p ) diff --git a/tdeui/karrowbutton.cpp b/tdeui/karrowbutton.cpp index 4d166b7b3..4808bcd54 100644 --- a/tdeui/karrowbutton.cpp +++ b/tdeui/karrowbutton.cpp @@ -49,7 +49,7 @@ void KArrowButton::setArrowType(Qt::ArrowType a) { if (d->arrow != a) { d->arrow = a; - tqrepaint(); + repaint(); } } Qt::ArrowType KArrowButton::arrowType() const @@ -62,9 +62,9 @@ void KArrowButton::drawButton(TQPainter *p) const unsigned int arrowSize = 8; const unsigned int margin = 2; - p->fillRect( rect(), tqcolorGroup().brush( TQColorGroup::Background ) ); + p->fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) ); tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ), - tqcolorGroup(), + colorGroup(), isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Default, TQStyleOption( 2, 0 ) ); @@ -104,7 +104,7 @@ void KArrowButton::drawButton(TQPainter *p) if ( isDown() ) flags |= TQStyle::Style_Down; tqstyle().tqdrawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ), - tqcolorGroup(), flags ); + colorGroup(), flags ); } void KArrowButton::virtual_hook( int, void* ) diff --git a/tdeui/karrowbutton.h b/tdeui/karrowbutton.h index 90f56d9bb..0719f8bc1 100644 --- a/tdeui/karrowbutton.h +++ b/tdeui/karrowbutton.h @@ -28,7 +28,7 @@ class KArrowButtonPrivate; * @short Draws a button with an arrow. * * Draws a button which shows an arrow pointing into a certain direction. The - * arrow's tqalignment on the button depends on the direction it's pointing to, + * arrow's alignment on the button depends on the direction it's pointing to, * e.g. a left arrow is aligned at the left border, a upwards arrow at the top * border. This class honors the currently configured KStyle when drawing * the arrow. @@ -72,7 +72,7 @@ class TDEUI_EXPORT KArrowButton : public TQPushButton void setArrowTp( int tp ) { setArrowType( (Qt::ArrowType) tp ); } public slots: /** - * Defines in what direction the arrow is pointing to. Will tqrepaint the + * Defines in what direction the arrow is pointing to. Will repaint the * button if necessary. * * @param a The direction this arrow should be pointing in diff --git a/tdeui/kauthicon.cpp b/tdeui/kauthicon.cpp index 647009f25..e266dca77 100644 --- a/tdeui/kauthicon.cpp +++ b/tdeui/kauthicon.cpp @@ -21,7 +21,7 @@ #include <unistd.h> // For getuid -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqtimer.h> @@ -134,7 +134,7 @@ KAuthIcon::~KAuthIcon() TQSize KAuthIcon::sizeHint() const { - return layout->tqminimumSize(); + return layout->minimumSize(); } diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index d122d2e02..93cdf0456 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -20,7 +20,7 @@ #include <tqhbuttongroup.h> #include <tqpushbutton.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmultilineedit.h> #include <tqradiobutton.h> #include <tqwhatsthis.h> @@ -51,7 +51,7 @@ #include <kcombobox.h> #include <config.h> #include <ktempfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqfile.h> class KBugReportPrivate { @@ -88,7 +88,7 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD TQWidget * parent = plainPage(); d->submitBugButton = 0; - //if ( m_aboutData->bugAddress() == TQString::tqfromLatin1("submit@bugs.pearsoncomputing.net") ) + //if ( m_aboutData->bugAddress() == TQString::fromLatin1("submit@bugs.pearsoncomputing.net") ) //{ // // This is a core KDE application -> redirect to the web form // Always redirect to the Web form for Trinity @@ -153,7 +153,7 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD TQWhatsThis::add( d->appcombo, qwtstr ); d->appcombo->insertStrList((const char**)packages); connect(d->appcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(appChanged(int))); - d->appname = TQString::tqfromLatin1( m_aboutData + d->appname = TQString::fromLatin1( m_aboutData ? m_aboutData->productName() : tqApp->name() ); glay->addWidget( d->appcombo, row, 1 ); @@ -179,8 +179,8 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD m_strVersion = m_aboutData->version(); else m_strVersion = i18n("no version set (programmer error!)"); - d->kde_version = TQString::tqfromLatin1( TDE_VERSION_STRING ); - d->kde_version += ", " + TQString::tqfromLatin1( KDE_DISTRIBUTION_TEXT ); + d->kde_version = TQString::fromLatin1( TDE_VERSION_STRING ); + d->kde_version += ", " + TQString::fromLatin1( KDE_DISTRIBUTION_TEXT ); if ( !d->submitBugButton ) m_strVersion += " " + d->kde_version; m_version = new TQLabel( m_strVersion, parent ); @@ -193,16 +193,16 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD struct utsname unameBuf; uname( &unameBuf ); - d->os = TQString::tqfromLatin1( unameBuf.sysname ) + - " (" + TQString::tqfromLatin1( unameBuf.machine ) + ") " - "release " + TQString::tqfromLatin1( unameBuf.release ); + d->os = TQString::fromLatin1( unameBuf.sysname ) + + " (" + TQString::fromLatin1( unameBuf.machine ) + ") " + "release " + TQString::fromLatin1( unameBuf.release ); tmpLabel = new TQLabel(d->os, parent); glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 ); tmpLabel = new TQLabel(i18n("Compiler:"), parent); glay->addWidget( tmpLabel, ++row, 0 ); - tmpLabel = new TQLabel(TQString::tqfromLatin1(KDE_COMPILER_VERSION), parent); + tmpLabel = new TQLabel(TQString::fromLatin1(KDE_COMPILER_VERSION), parent); glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 ); if ( !d->submitBugButton ) @@ -311,7 +311,7 @@ void KBugReport::slotConfigureEmail() { if (m_process) return; m_process = new KProcess; - *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount"); + *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(slotSetFrom())); if (!m_process->start()) { @@ -330,24 +330,24 @@ void KBugReport::slotSetFrom() m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::tqfromLatin1("emaildefaults") ); + KConfig emailConf( TQString::fromLatin1("emaildefaults") ); // find out the default profile - emailConf.setGroup( TQString::tqfromLatin1("Defaults") ); - TQString profile = TQString::tqfromLatin1("PROFILE_"); - profile += emailConf.readEntry( TQString::tqfromLatin1("Profile"), - TQString::tqfromLatin1("Default") ); + emailConf.setGroup( TQString::fromLatin1("Defaults") ); + TQString profile = TQString::fromLatin1("PROFILE_"); + profile += emailConf.readEntry( TQString::fromLatin1("Profile"), + TQString::fromLatin1("Default") ); emailConf.setGroup( profile ); - TQString fromaddr = emailConf.readEntry( TQString::tqfromLatin1("EmailAddress") ); + TQString fromaddr = emailConf.readEntry( TQString::fromLatin1("EmailAddress") ); if (fromaddr.isEmpty()) { struct passwd *p; p = getpwuid(getuid()); - fromaddr = TQString::tqfromLatin1(p->pw_name); + fromaddr = TQString::fromLatin1(p->pw_name); } else { - TQString name = emailConf.readEntry( TQString::tqfromLatin1("FullName")); + TQString name = emailConf.readEntry( TQString::fromLatin1("FullName")); if (!name.isEmpty()) - fromaddr = name + TQString::tqfromLatin1(" <") + fromaddr + TQString::tqfromLatin1(">"); + fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">"); } m_from->setText( fromaddr ); } @@ -438,9 +438,9 @@ TQString KBugReport::text() const { kdDebug() << m_bgSeverity->selected()->name() << endl; // Prepend the pseudo-headers to the contents of the mail - TQString severity = TQString::tqfromLatin1(m_bgSeverity->selected()->name()); + TQString severity = TQString::fromLatin1(m_bgSeverity->selected()->name()); TQString appname = d->appcombo->currentText(); - TQString os = TQString::tqfromLatin1("OS: %1 (%2)\n"). + TQString os = TQString::fromLatin1("OS: %1 (%2)\n"). arg(KDE_COMPILING_OS). arg(KDE_DISTRIBUTION_TEXT); TQString bodyText; @@ -452,25 +452,25 @@ TQString KBugReport::text() const bodyText += line; } - if (severity == TQString::tqfromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) { + if (severity == TQString::fromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) { // Case 1 : i18n bug - TQString package = TQString::tqfromLatin1("i18n_%1").arg(KGlobal::locale()->language()); - package = package.replace(TQString::tqfromLatin1("_"), TQString::tqfromLatin1("-")); - return TQString::tqfromLatin1("Package: %1").arg(package) + - TQString::tqfromLatin1("\n" + TQString package = TQString::fromLatin1("i18n_%1").arg(KGlobal::locale()->language()); + package = package.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-")); + return TQString::fromLatin1("Package: %1").arg(package) + + TQString::fromLatin1("\n" "Application: %1\n" // not really i18n's version, so better here IMHO "Version: %2\n").arg(appname).arg(m_strVersion)+ - os+TQString::tqfromLatin1("\n")+bodyText; + os+TQString::fromLatin1("\n")+bodyText; } else { - appname = appname.replace(TQString::tqfromLatin1("_"), TQString::tqfromLatin1("-")); + appname = appname.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-")); // Case 2 : normal bug - return TQString::tqfromLatin1("Package: %1\n" + return TQString::fromLatin1("Package: %1\n" "Version: %2\n" "Severity: %3\n") .arg(appname).arg(m_strVersion).arg(severity)+ - TQString::tqfromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+ - os+TQString::tqfromLatin1("\n")+bodyText; + TQString::fromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+ + os+TQString::fromLatin1("\n")+bodyText; } } @@ -478,12 +478,12 @@ bool KBugReport::sendBugReport() { TQString recipient ( m_aboutData ? m_aboutData->bugAddress() : - TQString::tqfromLatin1("submit@bugs.pearsoncomputing.net") ); + TQString::fromLatin1("submit@bugs.pearsoncomputing.net") ); TQString command; command = locate("exe", "ksendbugmail"); if (command.isEmpty()) - command = KStandardDirs::findExe( TQString::tqfromLatin1("ksendbugmail") ); + command = KStandardDirs::findExe( TQString::fromLatin1("ksendbugmail") ); KTempFile outputfile; outputfile.close(); diff --git a/tdeui/kbuttonbox.cpp b/tdeui/kbuttonbox.cpp index 11a8e2818..6351c512d 100644 --- a/tdeui/kbuttonbox.cpp +++ b/tdeui/kbuttonbox.cpp @@ -356,7 +356,7 @@ TQSizePolicy KButtonBox::sizePolicy() const */ TQSize KButtonBox::buttonSizeHint(TQPushButton *b) const { TQSize s = b->sizeHint(); - const TQSize ms = b->tqminimumSize(); + const TQSize ms = b->minimumSize(); if(s.width() < minButtonWidth) s.setWidth(minButtonWidth); diff --git a/tdeui/kcharselect.cpp b/tdeui/kcharselect.cpp index 3a5ababce..8ac6801a8 100644 --- a/tdeui/kcharselect.cpp +++ b/tdeui/kcharselect.cpp @@ -21,7 +21,7 @@ #include "kcharselect.h" #include "kcharselect.moc" -#include <tqbrush.h> +#include <brush.h> #include <tqcolor.h> #include <tqevent.h> #include <tqfont.h> @@ -45,7 +45,7 @@ class KCharSelect::KCharSelectPrivate { public: - TQLineEdit *tqunicodeLine; + TQLineEdit *unicodeLine; }; TQFontDatabase * KCharSelect::fontDataBase = 0; @@ -66,7 +66,7 @@ KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQ : TQGridView( parent, name ), vFont( _font ), vChr( _chr ), vTableNum( _tableNum ), vPos( 0, 0 ), focusItem( _chr ), focusPos( 0, 0 ), d(0) { - setBackgroundColor( tqcolorGroup().base() ); + setBackgroundColor( colorGroup().base() ); setCellWidth( 20 ); setCellHeight( 25 ); @@ -155,26 +155,26 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col ) c += row * numCols(); c += col; - if ( c == vChr.tqunicode() ) { - p->setBrush( TQBrush( tqcolorGroup().highlight() ) ); + if ( c == vChr.unicode() ) { + p->setBrush( TQBrush( colorGroup().highlight() ) ); p->setPen( NoPen ); p->drawRect( 0, 0, w, h ); - p->setPen( tqcolorGroup().highlightedText() ); + p->setPen( colorGroup().highlightedText() ); vPos = TQPoint( col, row ); } else { TQFontMetrics fm = TQFontMetrics( font ); if( fm.inFont( c ) ) - p->setBrush( TQBrush( tqcolorGroup().base() ) ); + p->setBrush( TQBrush( colorGroup().base() ) ); else - p->setBrush( TQBrush( tqcolorGroup().button() ) ); + p->setBrush( TQBrush( colorGroup().button() ) ); p->setPen( NoPen ); p->drawRect( 0, 0, w, h ); - p->setPen( tqcolorGroup().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 ), - tqcolorGroup() ); + colorGroup() ); focusPos = TQPoint( col, row ); } @@ -182,7 +182,7 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col ) p->drawText( 0, 0, x2, y2, AlignHCenter | AlignVCenter, TQString( TQChar( c ) ) ); - p->setPen( tqcolorGroup().text() ); + p->setPen( colorGroup().text() ); p->drawLine( x2, 0, x2, y2 ); p->drawLine( 0, y2, x2, y2 ); @@ -409,13 +409,13 @@ KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_f const TQRegExp rx( "[a-fA-F0-9]{1,4}" ); TQValidator* const validator = new TQRegExpValidator( rx, TQT_TQOBJECT(this) ); - d->tqunicodeLine = new KLineEdit( bar ); - d->tqunicodeLine->setValidator(validator); - lUnicode->setBuddy(d->tqunicodeLine); - d->tqunicodeLine->resize( d->tqunicodeLine->sizeHint() ); + d->unicodeLine = new KLineEdit( bar ); + d->unicodeLine->setValidator(validator); + lUnicode->setBuddy(d->unicodeLine); + d->unicodeLine->resize( d->unicodeLine->sizeHint() ); 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 ); const TQSize sz( charTable->contentsWidth() + 4 , @@ -493,7 +493,7 @@ void KCharSelect::fillFontCombo() fontDataBase = new TQFontDatabase(); qAddPostRoutine( cleanupFontDatabase ); } - fontList=fontDataBase->tqfamilies(); + fontList=fontDataBase->families(); fontCombo->insertStringList( fontList ); } @@ -513,7 +513,7 @@ void KCharSelect::tableChanged( int _value ) //================================================================== void KCharSelect::slotUnicodeEntered( ) { - const TQString s = d->tqunicodeLine->text(); + const TQString s = d->unicodeLine->text(); if (s.isEmpty()) return; @@ -532,10 +532,10 @@ void KCharSelect::slotUnicodeEntered( ) void KCharSelect::slotUpdateUnicode( const TQChar &c ) { - const int uc = c.tqunicode(); + const int uc = c.unicode(); TQString s; s.sprintf("%04X", uc); - d->tqunicodeLine->setText(s); + d->unicodeLine->setText(s); } void KCharSelectTable::virtual_hook( int, void*) diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index d985c8e91..640b9c7ac 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -35,10 +35,10 @@ KContextMenuManager* KContextMenuManager::manager = 0; KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name ) : TQObject( parent, name) { - KConfigGroupSaver saver ( KGlobal::config(), TQString::tqfromLatin1("Shortcuts") ) ; - menuKey = KShortcut( saver.config()->readEntry(TQString::tqfromLatin1("PopupContextMenu"), TQString::tqfromLatin1("Menu") ) ).keyCodeQt(); - saver.config()->setGroup( TQString::tqfromLatin1("ContextMenus") ) ; - showOnPress = saver.config()->readBoolEntry(TQString::tqfromLatin1("ShowOnPress"), true ); + KConfigGroupSaver saver ( KGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; + menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); + saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ; + showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true ); } KContextMenuManager::~KContextMenuManager() diff --git a/tdeui/kcmodule.cpp b/tdeui/kcmodule.cpp index 7d82d2957..9d2197362 100644 --- a/tdeui/kcmodule.cpp +++ b/tdeui/kcmodule.cpp @@ -21,7 +21,7 @@ */ -#include <tqlayout.h> +#include <layout.h> #include <kaboutdata.h> #include <kconfigskeleton.h> diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index 34227a8fb..e18885254 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -23,7 +23,7 @@ #include <tqpainter.h> #include <tqdrawutil.h> #include <tqapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqstyle.h> #include <kglobalsettings.h> #include <kstdaccel.h> @@ -85,7 +85,7 @@ void KColorButton::setColor( const TQColor &c ) { if ( col != c ) { col = c; - tqrepaint( false ); + repaint( false ); emit changed( col ); } } @@ -108,25 +108,25 @@ void KColorButton::drawButtonLabel( TQPainter *painter ) TQRect r = tqstyle().subRect( TQStyle::SR_PushButtonContents, this ); r.rect(&x, &y, &w, &h); - int margin = tqstyle().tqpixelMetric( TQStyle::PM_ButtonMargin, this ); + int margin = tqstyle().pixelMetric( TQStyle::PM_ButtonMargin, this ); x += margin; y += margin; w -= 2*margin; h -= 2*margin; if (isOn() || isDown()) { - x += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); - y += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical, this ); + x += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); + y += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical, this ); } TQColor fillCol = isEnabled() ? col : backgroundColor(); - qDrawShadePanel( painter, x, y, w, h, tqcolorGroup(), true, 1, NULL); + qDrawShadePanel( painter, x, y, w, h, colorGroup(), true, 1, NULL); if ( fillCol.isValid() ) painter->fillRect( x+1, y+1, w-2, h-2, fillCol ); if ( hasFocus() ) { TQRect focusRect = tqstyle().subRect( TQStyle::SR_PushButtonFocusRect, this ); - tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, tqcolorGroup() ); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() ); } } @@ -155,11 +155,11 @@ void KColorButton::keyPressEvent( TQKeyEvent *e ) if ( KStdAccel::copy().contains( key ) ) { TQMimeSource* mime = new KColorDrag( color() ); - TQApplication::tqclipboard()->setData( mime, TQClipboard::Clipboard ); + TQApplication::clipboard()->setData( mime, TQClipboard::Clipboard ); } else if ( KStdAccel::paste().contains( key ) ) { TQColor color; - KColorDrag::decode( TQApplication::tqclipboard()->data( TQClipboard::Clipboard ), color ); + KColorDrag::decode( TQApplication::clipboard()->data( TQClipboard::Clipboard ), color ); setColor( color ); } else diff --git a/tdeui/kcolorcombo.cpp b/tdeui/kcolorcombo.cpp index a7dd90ac7..2a8ee6f98 100644 --- a/tdeui/kcolorcombo.cpp +++ b/tdeui/kcolorcombo.cpp @@ -37,7 +37,7 @@ #include <tqfile.h> #include <tqimage.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqvalidator.h> #include <tqpainter.h> diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index a7a8540ce..eb0dbf540 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -38,7 +38,7 @@ #include <tqfile.h> #include <tqimage.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvalidator.h> #include <tqpainter.h> #include <tqpushbutton.h> @@ -376,7 +376,7 @@ void KColorCells::paintCell( TQPainter *painter, int row, int col ) if (shade) { qDrawShadePanel( painter, 1, 1, cellWidth()-2, - cellHeight()-2, tqcolorGroup(), true, 1, &brush ); + cellHeight()-2, colorGroup(), true, 1, &brush ); w = 2; } TQColor color = colors[ row * numCols() + col ]; @@ -1143,7 +1143,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) d->htmlName = new KLineEdit( page ); d->htmlName->setMaxLength( 13 ); // Qt's TQColor allows 12 hexa-digits d->htmlName->setText("#FFFFFF"); // But HTML uses only 6, so do not worry about the size - w = d->htmlName->fontMetrics().width(TQString::tqfromLatin1("#DDDDDDD")); + w = d->htmlName->fontMetrics().width(TQString::fromLatin1("#DDDDDDD")); d->htmlName->setFixedWidth(w); l_grid->addWidget(TQT_TQWIDGET(d->htmlName), 1, 2, Qt::AlignLeft); @@ -1479,7 +1479,7 @@ void KColorDialog::showColor( const KColor &color, const TQString &name ) d->valuePal->setValue( v ); d->valuePal->updateContents(); d->valuePal->blockSignals(false); - d->valuePal->tqrepaint( false ); + d->valuePal->repaint( false ); d->bRecursion = false; } diff --git a/tdeui/kcolordrag.cpp b/tdeui/kcolordrag.cpp index 3beed82ca..be1e93aec 100644 --- a/tdeui/kcolordrag.cpp +++ b/tdeui/kcolordrag.cpp @@ -92,7 +92,7 @@ KColorDrag::decode( TQMimeSource *e, TQColor &color) return true; TQByteArray data = e->encodedData( text_mime_string); - TQString colorName = TQString::tqfromLatin1(data.data(), data.size()); + TQString colorName = TQString::fromLatin1(data.data(), data.size()); if ((colorName.length() < 4) || (colorName[0] != '#')) return false; color.setNamedColor(colorName); diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index df84d0032..39af5164d 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -20,7 +20,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqclipboard.h> +#include <clipboard.h> #include <tqlistbox.h> #include <tqpopupmenu.h> #include <tqapplication.h> diff --git a/tdeui/kcombobox.h b/tdeui/kcombobox.h index 93ae6535e..12d6d065b 100644 --- a/tdeui/kcombobox.h +++ b/tdeui/kcombobox.h @@ -26,7 +26,7 @@ #include <tqcombobox.h> #include <tqvbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtoolbutton.h> #include <tqheader.h> diff --git a/tdeui/kcompletionbox.cpp b/tdeui/kcompletionbox.cpp index 988c1f1cc..069a1733f 100644 --- a/tdeui/kcompletionbox.cpp +++ b/tdeui/kcompletionbox.cpp @@ -485,7 +485,7 @@ void KCompletionBox::setItems( const TQStringList& items ) } else { //Keep track of whether we need to change anything, - //so we can avoid a tqrepaint for identical updates, + //so we can avoid a repaint for identical updates, //to reduce flicker bool dirty = false; diff --git a/tdeui/kconfigdialog.cpp b/tdeui/kconfigdialog.cpp index ccbba1cf0..54a152b5b 100644 --- a/tdeui/kconfigdialog.cpp +++ b/tdeui/kconfigdialog.cpp @@ -27,7 +27,7 @@ #include <kiconloader.h> #include <kdebug.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvbox.h> #include <tqmap.h> diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index 5907c4ba0..094e581be 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -370,9 +370,9 @@ KCursorPrivate::KCursorPrivate() hideCursorDelay = 5000; // 5s default value KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::tqfromLatin1("KDE") ); + KConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); enabled = kc->readBoolEntry( - TQString::tqfromLatin1("Autohiding cursor enabled"), true ); + TQString::fromLatin1("Autohiding cursor enabled"), true ); } KCursorPrivate::~KCursorPrivate() diff --git a/tdeui/kcursor.h b/tdeui/kcursor.h index 7be14601b..538cdcd72 100644 --- a/tdeui/kcursor.h +++ b/tdeui/kcursor.h @@ -33,7 +33,7 @@ class TQWidget; * * A wrapper around TQCursor that allows for "themed" cursors. * - * Currently, the only themed cursor is a hand tqshaped cursor. + * Currently, the only themed cursor is a hand shaped cursor. * * A typical usage would be * \code diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index 77ff907d7..224587c4d 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqlayout.h> +#include <layout.h> #include <tqframe.h> #include <tqpainter.h> #include <tqdialog.h> @@ -175,17 +175,17 @@ void KDatePicker::init( const TQDate &dt ) line->installEventFilter( this ); if ( TQApplication::reverseLayout() ) { - yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); - monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); + yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); + monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); } else { - yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow"))); - yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow"))); - monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow"))); - monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow"))); + yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow"))); + yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow"))); + monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); + monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); } connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate))); connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot())); @@ -529,7 +529,7 @@ KDatePicker::setCloseButton( bool enable ) TQToolTip::add(d->closeButton, i18n("Close")); d->closeButton->setPixmap( SmallIcon("remove") ); connect( d->closeButton, TQT_SIGNAL( clicked() ), - tqtopLevelWidget(), TQT_SLOT( close() ) ); + topLevelWidget(), TQT_SLOT( close() ) ); } else { delete d->closeButton; diff --git a/tdeui/kdatepicker.h b/tdeui/kdatepicker.h index 381095c49..f1a5fd9a6 100644 --- a/tdeui/kdatepicker.h +++ b/tdeui/kdatepicker.h @@ -136,7 +136,7 @@ public: /** * By calling this method with @p enable = true, KDatePicker will show * a little close-button in the upper button-row. Clicking the - * close-button will cause the KDatePicker's tqtopLevelWidget()'s close() + * close-button will cause the KDatePicker's topLevelWidget()'s close() * method being called. This is mostly useful for toplevel datepickers * without a window manager decoration. * @see hasCloseButton diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index e139ffd90..9387a6322 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -233,7 +233,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) ( daynum == 6 && calendar->calendarName() == "gregorian" ) ) normalday=false; - TQBrush brushInvertTitle(tqcolorGroup().base()); + TQBrush brushInvertTitle(colorGroup().base()); TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) ); TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) ); if (!normalday) @@ -250,7 +250,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) } painter->drawText(0, 0, w, h-1, AlignCenter, calendar->weekDayName(daynum, true), -1, &rect); - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); painter->moveTo(0, h-1); painter->lineTo(w-1, h-1); // ----- draw the weekday: @@ -267,7 +267,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) // ° painting a day of the previous month or // ° painting a day of the following month // TODO: don't hardcode gray here! Use a color with less contrast to the background than normal text. - painter->setPen( tqcolorGroup().mid() ); + painter->setPen( colorGroup().mid() ); // painter->setPen(gray); } else { // paint a day of the current month if ( d->useCustomColors ) @@ -292,9 +292,9 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) } painter->setPen( mode->fgColor ); } else - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); } else //if ( firstWeekDay < 4 ) // <- this doesn' make sense at all! - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); } pen=painter->pen(); @@ -308,25 +308,25 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) // draw the currently selected date if (isEnabled()) { - painter->setPen(tqcolorGroup().highlight()); - painter->setBrush(tqcolorGroup().highlight()); + painter->setPen(colorGroup().highlight()); + painter->setBrush(colorGroup().highlight()); } else { - painter->setPen(tqcolorGroup().text()); - painter->setBrush(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); + painter->setBrush(colorGroup().text()); } - pen=TQPen(tqcolorGroup().highlightedText()); + pen=TQPen(colorGroup().highlightedText()); } else { painter->setBrush(paletteBackgroundColor()); painter->setPen(paletteBackgroundColor()); -// painter->setBrush(tqcolorGroup().base()); -// painter->setPen(tqcolorGroup().base()); +// painter->setBrush(colorGroup().base()); +// painter->setPen(colorGroup().base()); } if ( pCellDate == TQDate::currentDate() ) { - painter->setPen(tqcolorGroup().text()); + painter->setPen(colorGroup().text()); } if ( paintRect ) painter->drawRect(0, 0, w, h); @@ -439,7 +439,7 @@ KDateTable::setFontSize(int size) maxCell.setHeight(QMAX(maxCell.height(), rect.height())); } // ----- compare with a real wide number and add some space: - rect=metrics.boundingRect(TQString::tqfromLatin1("88")); + rect=metrics.boundingRect(TQString::fromLatin1("88")); maxCell.setWidth(QMAX(maxCell.width()+2, rect.width())); maxCell.setHeight(QMAX(maxCell.height()+4, rect.height())); } @@ -815,7 +815,7 @@ KDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e) updateCell( row, col /*, false */ ); // mark the new active cell } } - if ( tmpRow > -1 ) // tqrepaint the former active cell + if ( tmpRow > -1 ) // repaint the former active cell updateCell( tmpRow, tmpCol /*, true */ ); } } @@ -1006,7 +1006,7 @@ int KPopupFrame::exec(TQPoint pos) { popup(pos); - tqrepaint(); + repaint(); d->exec = true; const TQGuardedPtr<TQObject> that = TQT_TQOBJECT(this); tqApp->enter_loop(); diff --git a/tdeui/kdatetimewidget.cpp b/tdeui/kdatetimewidget.cpp index d7b677af9..5db18cab2 100644 --- a/tdeui/kdatetimewidget.cpp +++ b/tdeui/kdatetimewidget.cpp @@ -1,4 +1,4 @@ -#include <tqlayout.h> +#include <layout.h> #include "kdatewidget.h" #include "kdebug.h" diff --git a/tdeui/kdatewidget.cpp b/tdeui/kdatewidget.cpp index ba46a599b..0c11890dc 100644 --- a/tdeui/kdatewidget.cpp +++ b/tdeui/kdatewidget.cpp @@ -19,7 +19,7 @@ #include <tqpopupmenu.h> #include <tqcombobox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include "knuminput.h" diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index 959de3cc1..bcea71e49 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -28,7 +28,7 @@ #include <kglobalsettings.h> #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <tqobjectlist.h> #include <tqguardedptr.h> #include <tqlineedit.h> @@ -405,7 +405,7 @@ KSMModalDialog::KSMModalDialog(TQWidget* parent) TQFrame* frame = new TQFrame( this ); frame->setFrameStyle( TQFrame::NoFrame ); - frame->setLineWidth( tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) ); + frame->setLineWidth( tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) ); // we need to set the minimum size for the window frame->setMinimumWidth(400); vbox->addWidget( frame ); diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index 93d1cb58e..a757d02a3 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -26,7 +26,7 @@ #include <tqgrid.h> #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqvbox.h> #include <tqwhatsthis.h> @@ -454,7 +454,7 @@ TQSize KDialogBase::minimumSizeHint() const // if( mUrlHelp ) { - s2 = mUrlHelp->tqminimumSize() + zeroByS; + s2 = mUrlHelp->minimumSize() + zeroByS; } s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); @@ -469,7 +469,7 @@ TQSize KDialogBase::minimumSizeHint() const else if( mMainWidget ) { s2 = mMainWidget->sizeHint() + zeroByS; - s2 = s2.expandedTo( mMainWidget->tqminimumSize() ); + s2 = s2.expandedTo( mMainWidget->minimumSize() ); s2 = s2.expandedTo( mMainWidget->minimumSizeHint() ); if( s2.isEmpty() ) { @@ -486,7 +486,7 @@ TQSize KDialogBase::minimumSizeHint() const if (d->detailsWidget && d->bDetails) { s2 = d->detailsWidget->sizeHint() + zeroByS; - s2 = s2.expandedTo( d->detailsWidget->tqminimumSize() ); + s2 = s2.expandedTo( d->detailsWidget->minimumSize() ); s2 = s2.expandedTo( d->detailsWidget->minimumSizeHint() ); s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); @@ -497,7 +497,7 @@ TQSize KDialogBase::minimumSizeHint() const // if( mActionSep ) { - s1.rheight() += mActionSep->tqminimumSize().height() + s; + s1.rheight() += mActionSep->minimumSize().height() + s; } // @@ -505,7 +505,7 @@ TQSize KDialogBase::minimumSizeHint() const // if( d->mButton.box ) { - s2 = d->mButton.box->tqminimumSize(); + s2 = d->mButton.box->minimumSize(); if( mButtonOrientation == Qt::Horizontal ) { s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() ); @@ -1492,10 +1492,10 @@ TQRect KDialogBase::getContentsRect() const r.setLeft( marginHint() ); r.setTop( marginHint() + (mUrlHelp ? mUrlHelp->height() : 0) ); r.setRight( width() - marginHint() ); - int h = (!mActionSep ? 0 : mActionSep->tqminimumSize().height()+marginHint()); + int h = (!mActionSep ? 0 : mActionSep->minimumSize().height()+marginHint()); if( d->mButton.box ) { - r.setBottom( height() - d->mButton.box->tqminimumSize().height() - h ); + r.setBottom( height() - d->mButton.box->minimumSize().height() - h ); } else { @@ -1513,14 +1513,14 @@ void KDialogBase::getBorderWidths(int& ulx, int& uly, int& lrx, int& lry) const uly = marginHint(); if( mUrlHelp ) { - uly += mUrlHelp->tqminimumSize().height(); + uly += mUrlHelp->minimumSize().height(); } lrx = marginHint(); - lry = d->mButton.box ? d->mButton.box->tqminimumSize().height() : 0; + lry = d->mButton.box ? d->mButton.box->minimumSize().height() : 0; if( mActionSep ) { - lry += mActionSep->tqminimumSize().height() + marginHint(); + lry += mActionSep->minimumSize().height() + marginHint(); } } @@ -1755,8 +1755,8 @@ TQSize KDialogBase::configDialogSize( KConfig& config, h = sizeHint().height(); KConfigGroupSaver cs(&config, groupName); - w = config.readNumEntry( TQString::tqfromLatin1("Width %1").arg( desk.width()), w ); - h = config.readNumEntry( TQString::tqfromLatin1("Height %1").arg( desk.height()), h ); + w = config.readNumEntry( TQString::fromLatin1("Width %1").arg( desk.width()), w ); + h = config.readNumEntry( TQString::fromLatin1("Height %1").arg( desk.height()), h ); return TQSize( w, h ); } @@ -1777,9 +1777,9 @@ void KDialogBase::saveDialogSize( KConfig& config, const TQString& groupName, KConfigGroupSaver cs(&config, groupName); TQSize sizeToSave = size(); - config.writeEntry( TQString::tqfromLatin1("Width %1").arg( desk.width()), + config.writeEntry( TQString::fromLatin1("Width %1").arg( desk.width()), TQString::number( sizeToSave.width()), true, global); - config.writeEntry( TQString::tqfromLatin1("Height %1").arg( desk.height()), + config.writeEntry( TQString::fromLatin1("Height %1").arg( desk.height()), TQString::number( sizeToSave.height()), true, global); } diff --git a/tdeui/kdialogbase.h b/tdeui/kdialogbase.h index d89b8c67e..f0da150b6 100644 --- a/tdeui/kdialogbase.h +++ b/tdeui/kdialogbase.h @@ -100,7 +100,7 @@ class KDialogBaseTile; * signals that are related to the standard action buttons will be used * when you don't use these buttons. * - * <b>Dialog tqshapes:</b>\n + * <b>Dialog shapes:</b>\n * * You can either use one of the prebuilt, easy to use, faces or * define your own main widget. The dialog provides ready to use @@ -733,7 +733,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog * Sets the page with @p index to be displayed. * * This method will only - * work when the dialog is using the predefined tqshape of TreeList, + * work when the dialog is using the predefined shape of TreeList, * IconList or Tabbed. * * @param index Index of the page to be shown. @@ -745,7 +745,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog * Returns the index of the active page. * * This method will only work when the dialog is using the - * predefined tqshape of Tabbed, TreeList or IconList. + * predefined shape of Tabbed, TreeList or IconList. * * @return The page index or -1 if there is no active page. */ @@ -1167,7 +1167,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog * set it as a minimum size for the resulting dialog. * * You should not need to use this method and never if you use one of - * the predefined tqshapes. + * the predefined shapes. * * @param w The width of you special widget. * @param h The height of you special widget. diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 005f76b4b..f1e4d44e7 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -22,7 +22,7 @@ #include "kdockwidget_p.h" #include <tqapplication.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqobjectlist.h> #include <tqstrlist.h> @@ -203,7 +203,7 @@ void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) paint.begin( this ); - tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); + tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } @@ -266,7 +266,7 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) layout->addWidget( closeButton ); layout->activate(); d->dummy->hide(); - drag->setFixedHeight( layout->tqminimumSize().height() ); + drag->setFixedHeight( layout->minimumSize().height() ); } void KDockWidgetHeader::setTopLevel( bool isTopLevel ) @@ -343,7 +343,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd ) if (dontShowDummy) d->dummy->hide(); else d->dummy->show(); layout->addWidget( closeButton ); layout->activate(); - kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<layout->tqminimumSize().height()<<endl; + kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<layout->minimumSize().height()<<endl; //FIXME somebody left this here, but we don't know what the hell it's for. drag->setFixedHeight( closeButton->height()); // /*layout->minimumS*/sizeHint().height() ); } @@ -378,7 +378,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { if (dontShowDummy) d->dummy->hide(); else d->dummy->show(); layout->addWidget( closeButton ); layout->activate(); - drag->setFixedHeight( layout->tqminimumSize().height() ); + drag->setFixedHeight( layout->minimumSize().height() ); } void KDockWidgetHeader::removeButton(KDockButton_Private* btn) { @@ -574,7 +574,7 @@ void KDockWidget::paintEvent(TQPaintEvent* pe) TQWidget::paintEvent(pe); TQPainter paint; paint.begin( this ); - tqstyle().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); + tqstyle().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } @@ -601,7 +601,7 @@ void KDockWidget::mousePressEvent(TQMouseEvent* mme) int styleheight; TQPoint mp; mp=mme->pos(); - styleheight=2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this); + styleheight=2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -689,7 +689,7 @@ void KDockWidget::mouseMoveEvent(TQMouseEvent* mme) int styleheight; TQPoint mp; mp=mme->pos(); - styleheight=2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this); + styleheight=2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -791,7 +791,7 @@ void KDockWidget::updateHeader() header->setTopLevel( true ); header->show(); #ifdef BORDERLESS_WINDOWS - layout->setMargin(2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this)); + layout->setMargin(2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth,this)); setMouseTracking(true); #endif } @@ -1497,7 +1497,7 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab ) tab->parentWidget()->setName( listOfName.utf8() ); tab->parentWidget()->setCaption( listOfCaption ); - tab->parentWidget()->tqrepaint( false ); // KDockWidget->tqrepaint + tab->parentWidget()->repaint( false ); // KDockWidget->repaint if ( tab->parentWidget()->parent() ) if ( tab->parentWidget()->parent()->inherits("KDockSplitter") ) ((KDockSplitter*)(tab->parentWidget()->parent()))->updateName(); @@ -1570,7 +1570,7 @@ void KDockWidget::loseFormerBrotherDockWidget() TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); formerBrotherDockWidget = 0L; - tqrepaint(); + repaint(); } void KDockWidget::dockBack() @@ -1850,7 +1850,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) return 0L; } #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) - p = p->tqtopLevelWidget(); + p = p->topLevelWidget(); #endif TQWidget* w = 0L; findChildDockWidget( w, p, p->mapFromGlobal(pos) ); @@ -1910,7 +1910,7 @@ void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const while ( it.current() ) { if ( it.current()->isWidgetType() ) { w = (TQWidget*)it.current(); - if ( w->isVisible() && w->tqgeometry().contains(pos) ) { + if ( w->isVisible() && w->geometry().contains(pos) ) { if ( w->inherits("KDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); return; @@ -2105,7 +2105,7 @@ static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagNam static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b) { - return createStringEntry(doc, tagName, TQString::tqfromLatin1(b? "true" : "false")); + return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false")); } @@ -2144,7 +2144,7 @@ static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName, TQStrListIterator it(list); for (; it.current(); ++it) { TQDomElement subel = doc.createElement(subTagName); - subel.appendChild(doc.createTextNode(TQString::tqfromLatin1(it.current()))); + subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current()))); el.appendChild(subel); } @@ -2214,7 +2214,7 @@ void KDockManager::writeConfig(TQDomElement &base) KDockWidget *obj1; while ( (obj1=(KDockWidget*)it.current()) ) { if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) ) - mainWidgetStr = TQString::tqfromLatin1(obj1->name()); + mainWidgetStr = TQString::fromLatin1(obj1->name()); nList.append(obj1->name()); ++it; } @@ -2279,7 +2279,7 @@ void KDockManager::writeConfig(TQDomElement &base) } } - groupEl.appendChild(createStringEntry(doc, "name", TQString::tqfromLatin1(obj->name()))); + groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name()))); groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent())); if ( !obj->parent() ) { groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); @@ -2950,7 +2950,7 @@ void KDockManager::slotMenuPopup() void KDockManager::slotMenuActivated( int id ) { - MenuDockData* data = menuData->tqat( id ); + MenuDockData* data = menuData->at( id ); data->dock->changeHideShowState(); } @@ -2994,14 +2994,14 @@ void KDockManager::drawDragRectangle() KDockMainWindow* pMain = 0L; KDockWidget* pTLDockWdg = 0L; TQWidget* topWdg; - if (pDockWdgAtRect->tqtopLevelWidget() == main) { + if (pDockWdgAtRect->topLevelWidget() == main) { isOverMainWdg = true; topWdg = pMain = (KDockMainWindow*) main; unclipped = pMain->testWFlags( WPaintUnclipped ); pMain->setWFlags( WPaintUnclipped ); } else { - topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->tqtopLevelWidget(); + topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->topLevelWidget(); unclipped = pTLDockWdg->testWFlags( WPaintUnclipped ); pTLDockWdg->setWFlags( WPaintUnclipped ); } @@ -3121,7 +3121,7 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize) // for (unsigned int i=0;i<children()->count();i++) { // TQPtrList<TQObject> list(children()); -// TQObject *obj=((TQPtrList<TQObject*>)children())->tqat(i); +// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i); TQObject *obj=children()->getFirst(); if (split = tqt_dynamic_cast<KDockSplitter*>(obj)) { @@ -3272,7 +3272,7 @@ void KDockContainer::prepareSave(TQStringList &names) names.remove(tmp->data); // for (uint i=0;i<m_children.count();i++) // { -// names.remove(m_children.tqat(i)); +// names.remove(m_children.at(i)); // } } diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index c084dff5b..b2b740ca6 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -452,7 +452,7 @@ public: */ KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = TQString::null, - const TQString& strTabPageLabel = TQString::tqfromLatin1( " " ), WFlags f = 0); + const TQString& strTabPageLabel = TQString::fromLatin1( " " ), WFlags f = 0); /** * Destructs a dockwidget. @@ -1377,7 +1377,7 @@ public: * @return a pointer to the new created dockwidget */ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, - const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::tqfromLatin1( " " ) ); + const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) ); /** * Saves the current dock window layout into a DOM tree below the given element. @@ -1503,7 +1503,7 @@ public: KDockWidget* getMainDockWidget(){ return mainDockWidget; } KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, - const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::tqfromLatin1( " " ) ); + const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) ); void writeDockConfig(TQDomElement &base); void readDockConfig(TQDomElement &base); diff --git a/tdeui/kdockwidget_private.cpp b/tdeui/kdockwidget_private.cpp index 55ffc6229..41372fdf6 100644 --- a/tdeui/kdockwidget_private.cpp +++ b/tdeui/kdockwidget_private.cpp @@ -497,8 +497,8 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) switch (e->type()) { case TQEvent::MouseMove: mev= (TQMouseEvent*)e; - child0->tqsetUpdatesEnabled(mOpaqueResize); - child1->tqsetUpdatesEnabled(mOpaqueResize); + child0->setUpdatesEnabled(mOpaqueResize); + child1->setUpdatesEnabled(mOpaqueResize); if (m_orientation == Qt::Horizontal) { if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) { @@ -513,7 +513,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) if (tmp_xpos != xpos) { xpos = tmp_xpos; resizeEvent(0); - divider->tqrepaint(true); + divider->repaint(true); } } } else { @@ -529,15 +529,15 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) if (tmp_xpos != xpos) { xpos = tmp_xpos; resizeEvent(0); - divider->tqrepaint(true); + divider->repaint(true); } } } handled= true; break; case TQEvent::MouseButtonRelease: - child0->tqsetUpdatesEnabled(true); - child1->tqsetUpdatesEnabled(true); + child0->setUpdatesEnabled(true); + child1->setUpdatesEnabled(true); mev= (TQMouseEvent*)e; if (m_orientation == Qt::Horizontal){ if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) @@ -546,7 +546,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) } xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); resizeEvent(0); - divider->tqrepaint(true); + divider->repaint(true); } else { if ((fixedWidth0!=-1) || (fixedWidth1!=-1)) { @@ -554,7 +554,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) } xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).x() ) / width(); resizeEvent(0); - divider->tqrepaint(true); + divider->repaint(true); } handled= true; break; @@ -587,7 +587,7 @@ void KDockSplitter::updateName() TQString new_name = TQString( child0->name() ) + "," + child1->name(); parentWidget()->setName( new_name.latin1() ); parentWidget()->setCaption( child0->caption() + "," + child1->caption() ); - parentWidget()->tqrepaint( false ); + parentWidget()->repaint( false ); ((KDockWidget*)parentWidget())->firstName = child0->name(); ((KDockWidget*)parentWidget())->lastName = child1->name(); @@ -634,7 +634,7 @@ KDockButton_Private::~KDockButton_Private() void KDockButton_Private::drawButton( TQPainter* p ) { - p->fillRect( 0,0, width(), height(), TQBrush(tqcolorGroup().brush(TQColorGroup::Background)) ); + p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) ); p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() ); if ( moveMouse && !isDown() ){ p->setPen( white ); @@ -642,12 +642,12 @@ void KDockButton_Private::drawButton( TQPainter* p ) p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); - p->setPen( tqcolorGroup().dark() ); + p->setPen( colorGroup().dark() ); p->lineTo( width() - 1, height() - 1 ); p->lineTo( 0, height() - 1 ); } if ( isOn() || isDown() ){ - p->setPen( tqcolorGroup().dark() ); + p->setPen( colorGroup().dark() ); p->moveTo( 0, height() - 1 ); p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); @@ -661,13 +661,13 @@ void KDockButton_Private::drawButton( TQPainter* p ) void KDockButton_Private::enterEvent( TQEvent * ) { moveMouse = true; - tqrepaint(); + repaint(); } void KDockButton_Private::leaveEvent( TQEvent * ) { moveMouse = false; - tqrepaint(); + repaint(); } /*************************************************************************/ diff --git a/tdeui/kdualcolorbutton.cpp b/tdeui/kdualcolorbutton.cpp index 64624df82..f6d49a97e 100644 --- a/tdeui/kdualcolorbutton.cpp +++ b/tdeui/kdualcolorbutton.cpp @@ -112,7 +112,7 @@ TQSize KDualColorButton::sizeHint() const void KDualColorButton::setForeground(const TQColor &c) { fg = TQBrush(c, Qt::SolidPattern); - tqrepaint(false); + repaint(false); emit fgChanged(fg.color()); } @@ -120,7 +120,7 @@ void KDualColorButton::setForeground(const TQColor &c) void KDualColorButton::setBackground(const TQColor &c) { bg = TQBrush(c, Qt::SolidPattern); - tqrepaint(false); + repaint(false); emit bgChanged(bg.color()); } @@ -131,13 +131,13 @@ void KDualColorButton::setCurrentColor(const TQColor &c) bg = TQBrush(c, Qt::SolidPattern); else fg = TQBrush(c, Qt::SolidPattern); - tqrepaint(false); + repaint(false); } void KDualColorButton::setCurrent(DualColor s) { curColor = s; - tqrepaint(false); + repaint(false); } void KDualColorButton::metrics(TQRect &fgRect, TQRect &bgRect) @@ -152,13 +152,13 @@ void KDualColorButton::paintEvent(TQPaintEvent *) TQPainter p(this); metrics(fgRect, bgRect); - TQBrush defBrush = tqcolorGroup().brush(TQColorGroup::Button); + TQBrush defBrush = colorGroup().brush(TQColorGroup::Button); - qDrawShadeRect(&p, bgRect, tqcolorGroup(), curColor == Background, 2, 0, + qDrawShadeRect(&p, bgRect, colorGroup(), curColor == Background, 2, 0, isEnabled() ? &bg : &defBrush); - qDrawShadeRect(&p, fgRect, tqcolorGroup(), curColor == Foreground, 2, 0, + qDrawShadeRect(&p, fgRect, colorGroup(), curColor == Foreground, 2, 0, isEnabled() ? &fg : &defBrush); - p.setPen(tqcolorGroup().shadow()); + p.setPen(colorGroup().shadow()); p.drawPixmap(fgRect.right()+2, 0, *arrowBitmap); p.drawPixmap(0, fgRect.bottom()+2, *resetPixmap); @@ -181,7 +181,7 @@ void KDualColorButton::dropEvent(TQDropEvent *ev) bg.setColor(c); emit(bgChanged(c)); } - tqrepaint(false); + repaint(false); } } @@ -217,7 +217,7 @@ void KDualColorButton::mousePressEvent(TQMouseEvent *ev) emit bgChanged(bg.color()); miniCtlFlag = true; } - tqrepaint(false); + repaint(false); } @@ -270,7 +270,7 @@ void KDualColorButton::mouseReleaseEvent(TQMouseEvent *ev) } } } - tqrepaint(false); + repaint(false); dragFlag = false; } else diff --git a/tdeui/kdualcolorbutton.h b/tdeui/kdualcolorbutton.h index 5b49be30e..39112bca8 100644 --- a/tdeui/kdualcolorbutton.h +++ b/tdeui/kdualcolorbutton.h @@ -19,7 +19,7 @@ #define __KDUALCOLORBTN_H class TQBitmap; -#include <tqbrush.h> +#include <brush.h> #include <tqwidget.h> #include <tdelibs_export.h> diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index fe886f434..b39a3ee10 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -21,7 +21,7 @@ #include <tqdragobject.h> #include <tqpopupmenu.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqtimer.h> #include <kapplication.h> @@ -104,7 +104,7 @@ KEdit::insertText(TQTextStream *stream) // MS: read everything at once if file <= 1MB, // else read in 5000-line chunks to keep memory usage acceptable. - TQIODevice *dev=stream->tqdevice(); + TQIODevice *dev=stream->device(); if (dev && dev->size()>(1024*1024)) { while(1) { int i; @@ -128,7 +128,7 @@ KEdit::insertText(TQTextStream *stream) setCursorPosition(saveline, savecol); // setAutoUpdate(true); -// tqrepaint(); +// repaint(); setModified(true); setFocus(); @@ -140,7 +140,7 @@ KEdit::insertText(TQTextStream *stream) // TQString str = text(); // 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()); } @@ -164,7 +164,7 @@ KEdit::cleanWhiteSpace() if (line.isEmpty()) { if (addSpace) - newText += TQString::tqfromLatin1("\n\n"); + newText += TQString::fromLatin1("\n\n"); if (firstLine) { if (firstChar.isSpace()) @@ -200,7 +200,7 @@ KEdit::cleanWhiteSpace() { deselect(); d->autoUpdate = true; - tqrepaint(); + repaint(); return; } if (wordWrap() == NoWrap) @@ -225,7 +225,7 @@ KEdit::cleanWhiteSpace() insert(newText); d->autoUpdate = true; - tqrepaint(); + repaint(); setModified(true); setFocus(); @@ -471,7 +471,7 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) else if ( isReadOnly() ) TQMultiLineEdit::keyPressEvent( e ); // 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 ); else if ( KStdAccel::paste().contains( key ) ) { paste(); diff --git a/tdeui/keditcl2.cpp b/tdeui/keditcl2.cpp index 4bbc12c30..30c5ce616 100644 --- a/tdeui/keditcl2.cpp +++ b/tdeui/keditcl2.cpp @@ -26,7 +26,7 @@ #include <tqlineedit.h> #include <tqvbuttongroup.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqhbox.h> #include <tqpopupmenu.h> diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp index 040e77c70..b6809e319 100644 --- a/tdeui/keditlistbox.cpp +++ b/tdeui/keditlistbox.cpp @@ -20,7 +20,7 @@ #include <tqstringlist.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <tqlistbox.h> #include <tqwhatsthis.h> diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index 664e206bd..4847c3c52 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -19,7 +19,7 @@ #include <kedittoolbar.h> #include <tqdom.h> -#include <tqlayout.h> +#include <layout.h> #include <tqdir.h> #include <tqfile.h> #include <tqheader.h> @@ -29,7 +29,7 @@ #include <tqlabel.h> #include <tqvaluelist.h> #include <tqapplication.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kaction.h> #include <kstandarddirs.h> @@ -378,7 +378,7 @@ const char *KEditToolbar::s_defaultToolbar = 0L; KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), - m_widget(new KEditToolbarWidget(TQString::tqfromLatin1(s_defaultToolbar), collection, file, global, this)) + m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), collection, file, global, this)) { init(); d->m_global = global; @@ -400,7 +400,7 @@ KEditToolbar::KEditToolbar(const TQString& defaultToolbar, KActionCollection *co KEditToolbar::KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), - m_widget(new KEditToolbarWidget(TQString::tqfromLatin1(s_defaultToolbar), factory, this)) + m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), factory, this)) { init(); d->m_factory = factory; @@ -467,7 +467,7 @@ void KEditToolbar::slotDefault() if (TQDir::isRelativePath(file)) { const KInstance *instance = client->instance() ? client->instance() : KGlobal::instance(); - file = locateLocal("data", TQString::tqfromLatin1( instance->instanceName() + '/' ) + file); + file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' ) + file); } else { @@ -488,7 +488,7 @@ void KEditToolbar::slotDefault() int slash = d->m_file.findRev('/')+1; if (slash) d->m_file = d->m_file.mid(slash); - TQString xml_file = locateLocal("data", TQString::tqfromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file); + TQString xml_file = locateLocal("data", TQString::fromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file); if ( TQFile::exists( xml_file ) ) if ( !TQFile::remove( xml_file ) ) @@ -816,7 +816,7 @@ void KEditToolbarWidget::setupLayout() // "change icon" button d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this ); - TQString kdialogExe = KStandardDirs::findExe(TQString::tqfromLatin1("kdialog")); + TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); d->m_hasKDialog = !kdialogExe.isEmpty(); d->m_changeIcon->setEnabled( d->m_hasKDialog ); @@ -975,7 +975,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) if (it.tagName() == tagSeparator) { ToolbarItem *act = new ToolbarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), TQString::null); - bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == TQString::tqfromLatin1("true") ); + bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == TQString::fromLatin1("true") ); if(isLineSep) act->setText(1, LINESEPARATORSTRING); else @@ -1382,10 +1382,10 @@ void KEditToolbarWidget::slotChangeIcon() return; d->m_kdialogProcess = new KProcIO; - TQString kdialogExe = KStandardDirs::findExe(TQString::tqfromLatin1("kdialog")); + TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); (*d->m_kdialogProcess) << kdialogExe; (*d->m_kdialogProcess) << "--embed"; - (*d->m_kdialogProcess) << TQString::number( (ulong)tqtopLevelWidget()->winId() ); + (*d->m_kdialogProcess) << TQString::number( (ulong)topLevelWidget()->winId() ); (*d->m_kdialogProcess) << "--geticon"; (*d->m_kdialogProcess) << "Toolbar"; (*d->m_kdialogProcess) << "Actions"; diff --git a/tdeui/kfontcombo.cpp b/tdeui/kfontcombo.cpp index e62360521..9ef3af912 100644 --- a/tdeui/kfontcombo.cpp +++ b/tdeui/kfontcombo.cpp @@ -132,7 +132,7 @@ void KFontListItem::paint(TQPainter *p) if (m_canPaintName) p->setFont(*m_font); else - t = TQString::tqfromLatin1("(%1)").arg(m_fontName); + t = TQString::fromLatin1("(%1)").arg(m_fontName); } TQFontMetrics fm(p->fontMetrics()); p->drawText(3, (m_combo->d->lineSpacing + fm.ascent() + fm.leading() / 2) / 2, t); diff --git a/tdeui/kfontdialog.cpp b/tdeui/kfontdialog.cpp index a5609a81e..7801f4422 100644 --- a/tdeui/kfontdialog.cpp +++ b/tdeui/kfontdialog.cpp @@ -34,7 +34,7 @@ #include <tqfont.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqscrollbar.h> #include <tqstringlist.h> #include <tqfontdatabase.h> @@ -331,8 +331,8 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, setSizeIsRelative( *sizeIsRelativeState ); KConfig *config = KGlobal::config(); - KConfigGroupSaver saver(config, TQString::tqfromLatin1("General")); - showXLFDArea(config->readBoolEntry(TQString::tqfromLatin1("fontSelectorShowXLFD"), false)); + KConfigGroupSaver saver(config, TQString::fromLatin1("General")); + showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } KFontChooser::~KFontChooser() @@ -464,7 +464,7 @@ void KFontChooser::toggled_checkbox() void KFontChooser::family_chosen_slot(const TQString& family) { TQFontDatabase dbase; - TQStringList styles = TQStringList(dbase.tqstyles(family)); + TQStringList styles = TQStringList(dbase.styles(family)); styleListBox->clear(); currentStyles.clear(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { @@ -526,7 +526,7 @@ void KFontChooser::style_chosen_slot(const TQString& style) fillSizeList(); } else { // is bitmap font. //sampleEdit->setPaletteBackgroundPixmap( BitmapPixmap ); // TODO - TQValueList<int> sizes = dbase.tqsmoothSizes(familyListBox->currentText(), currentStyles[currentStyle]); + TQValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]); if(sizes.count() > 0) { TQValueList<int>::iterator it; diff=1000; @@ -641,7 +641,7 @@ void KFontChooser::setupDisplay() void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria) { TQFontDatabase dbase; - TQStringList lstSys(dbase.tqfamilies()); + TQStringList lstSys(dbase.families()); // if we have criteria; then check fonts before adding if (fontListCriteria) @@ -681,13 +681,13 @@ void KFontChooser::addFont( TQStringList &list, const char *xfont ) if ( !ptr ) return; - TQString font = TQString::tqfromLatin1(ptr + 1); + TQString font = TQString::fromLatin1(ptr + 1); int pos; if ( ( pos = font.find( '-' ) ) > 0 ) { font.truncate( pos ); - if ( font.find( TQString::tqfromLatin1("open look"), 0, false ) >= 0 ) + if ( font.find( TQString::fromLatin1("open look"), 0, false ) >= 0 ) return; TQStringList::Iterator it = list.begin(); diff --git a/tdeui/kfontrequester.cpp b/tdeui/kfontrequester.cpp index 293f9d546..ca3dabf88 100644 --- a/tdeui/kfontrequester.cpp +++ b/tdeui/kfontrequester.cpp @@ -21,7 +21,7 @@ #include <tqlabel.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqwhatsthis.h> diff --git a/tdeui/kguiitem.cpp b/tdeui/kguiitem.cpp index abcc3868a..7b73c7401 100644 --- a/tdeui/kguiitem.cpp +++ b/tdeui/kguiitem.cpp @@ -135,7 +135,7 @@ TQString KGuiItem::plainText() const int resultLength = 0; stripped.setLength(len); - const TQChar* data = d->m_text.tqunicode(); + const TQChar* data = d->m_text.unicode(); for ( int pos = 0; pos < len; ++pos ) { if ( data[ pos ] != '&' ) diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 663838fa8..330362d45 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -119,7 +119,7 @@ KPopupMenu* KHelpMenu::menu() // compatible. // const KAboutData *aboutData = d->mAboutData ? d->mAboutData : KGlobal::instance()->aboutData(); - TQString appName = (aboutData)? aboutData->programName() : TQString::tqfromLatin1(tqApp->name()); + TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(tqApp->name()); mMenu = new KPopupMenu(); connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed())); diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp index 6d3f51a2b..a26519729 100644 --- a/tdeui/kiconview.cpp +++ b/tdeui/kiconview.cpp @@ -184,7 +184,7 @@ void KIconView::slotAutoSelect() bool select = !m_pCurrentItem->isSelected(); bool update = viewport()->isUpdatesEnabled(); - viewport()->tqsetUpdatesEnabled( false ); + viewport()->setUpdatesEnabled( false ); //Calculate the smallest rectangle that contains the current Item //and the one that got the autoselect event @@ -216,7 +216,7 @@ void KIconView::slotAutoSelect() } blockSignals( block ); - viewport()->tqsetUpdatesEnabled( update ); + viewport()->setUpdatesEnabled( update ); repaintContents( redraw, false ); emit selectionChanged(); @@ -485,7 +485,7 @@ void KIconViewItem::calcRect( const TQString& text_ ) KIconView *view = static_cast<KIconView *>(iconView()); TQRect itemIconRect = pixmapRect(); TQRect itemTextRect = textRect(); - TQRect tqitemRect = rect(); + TQRect itemRect = rect(); int pw = 0; int ph = 0; @@ -507,9 +507,9 @@ void KIconViewItem::calcRect( const TQString& text_ ) itemIconRect.setWidth( pw ); #if 1 // FIXME // There is a bug in Qt which prevents the item from being placed - // properly when the pixmapRect is not at the top of the tqitemRect, so we + // properly when the pixmapRect is not at the top of the itemRect, so we // have to increase the height of the pixmapRect and leave it at the top - // of the tqitemRect... + // of the itemRect... if ( d && !d->m_pixmapSize.isNull() ) itemIconRect.setHeight( d->m_pixmapSize.height() + 2 ); else @@ -574,8 +574,8 @@ void KIconViewItem::calcRect( const TQString& text_ ) h = itemTextRect.height() + itemIconRect.height() + 1; } - tqitemRect.setWidth( w ); - tqitemRect.setHeight( h ); + itemRect.setWidth( w ); + itemRect.setHeight( h ); int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() itemTextRect = TQRect( ( width - itemTextRect.width() ) / 2, height - itemTextRect.height(), @@ -597,8 +597,8 @@ void KIconViewItem::calcRect( const TQString& text_ ) h = QMAX( itemTextRect.height(), itemIconRect.height() ); w = itemTextRect.width() + itemIconRect.width() + 1; - tqitemRect.setWidth( w ); - tqitemRect.setHeight( h ); + itemRect.setWidth( w ); + itemRect.setHeight( h ); int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width() int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height() @@ -621,8 +621,8 @@ void KIconViewItem::calcRect( const TQString& text_ ) setPixmapRect( itemIconRect ); if ( itemTextRect != textRect() ) setTextRect( itemTextRect ); - if ( tqitemRect != rect() ) - setItemRect( tqitemRect ); + if ( itemRect != rect() ) + setItemRect( itemRect ); // Done by setPixmapRect, setTextRect and setItemRect ! [and useless if no rect changed] //view->updateItemContainer( this ); @@ -680,7 +680,7 @@ void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg ) #if 1 // FIXME // Move the pixmap manually because the pixmapRect is at the - // top of the tqitemRect + // top of the itemRect // (won't be needed anymore in future versions of qt) if ( d && !d->m_pixmapSize.isNull() ) { diff --git a/tdeui/kinputdialog.cpp b/tdeui/kinputdialog.cpp index 61b30cce1..31f384d2c 100644 --- a/tdeui/kinputdialog.cpp +++ b/tdeui/kinputdialog.cpp @@ -21,7 +21,7 @@ #undef Status #endif // USE_QT4 -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqvalidator.h> #include <tqwhatsthis.h> diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index 584780c8e..e982330b8 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -23,7 +23,7 @@ #include <tqhbox.h> #include <tqheader.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqobjectlist.h> #include <tqpixmap.h> #include <tqsplitter.h> @@ -518,7 +518,7 @@ bool KJanusWidget::setSwallowedWidget( TQWidget *widget ) TQObjectList l = mSwallowPage->childrenListObject(); // silence please for( uint i=0; i < l.count(); i++ ) { - TQObject *o = l.tqat(i); + TQObject *o = l.at(i); if( o->isWidgetType() ) { ((TQWidget*)o)->hide(); @@ -542,7 +542,7 @@ bool KJanusWidget::setSwallowedWidget( TQWidget *widget ) } gbox->addWidget(widget, 0, 0 ); gbox->activate(); - mSwallowPage->setMinimumSize( widget->tqminimumSize() ); + mSwallowPage->setMinimumSize( widget->minimumSize() ); } return true; @@ -769,20 +769,20 @@ TQSize KJanusWidget::minimumSizeHint() const if( mFace == TreeList ) { - s1.rwidth() += tqstyle().tqpixelMetric( TQStyle::PM_SplitterWidth ); - s2 = mTreeList->tqminimumSize(); + s1.rwidth() += tqstyle().pixelMetric( TQStyle::PM_SplitterWidth ); + s2 = mTreeList->minimumSize(); } else { mIconList->updateMinimumHeight(); mIconList->updateWidth(); - s2 = mIconList->tqminimumSize(); + s2 = mIconList->minimumSize(); } if( mTitleLabel->isVisible() ) { s3 += mTitleLabel->sizeHint(); - s3.rheight() += mTitleSep->tqminimumSize().height(); + s3.rheight() += mTitleSep->minimumSize().height(); } // @@ -799,7 +799,7 @@ TQSize KJanusWidget::minimumSizeHint() const } else if( mFace == Swallow ) { - return mSwallowPage->tqminimumSize(); + return mSwallowPage->minimumSize(); } else if( mFace == Plain ) { @@ -1074,13 +1074,13 @@ void KJanusWidget::IconListItem::highlight( bool erase ) // For now, always disable highlighting erase = true; - TQRect r = listBox()->tqitemRect( this ); + TQRect r = listBox()->itemRect( this ); r.addCoords( 1, 1, -1, -1 ); TQPainter p( listBox()->viewport() ); p.setClipRegion( r ); - const TQColorGroup &cg = listBox()->tqcolorGroup(); + const TQColorGroup &cg = listBox()->colorGroup(); if ( erase ) { p.setPen( cg.base() ); @@ -1129,7 +1129,7 @@ const TQPixmap &KJanusWidget::IconListItem::defaultPixmap() void KJanusWidget::IconListItem::paint( TQPainter *painter ) { - TQRect itemPaintRegion( listBox()->tqitemRect( this ) ); + TQRect itemPaintRegion( listBox()->itemRect( this ) ); TQRect r( 1, 1, itemPaintRegion.width() - 2, itemPaintRegion.height() - 2); if ( isSelected() ) @@ -1137,7 +1137,7 @@ void KJanusWidget::IconListItem::paint( TQPainter *painter ) painter->eraseRect( r ); painter->save(); - painter->setPen( listBox()->tqcolorGroup().highlight().dark( 160 ) ); + painter->setPen( listBox()->colorGroup().highlight().dark( 160 ) ); painter->drawRect( r ); painter->restore(); } diff --git a/tdeui/kjanuswidget.h b/tdeui/kjanuswidget.h index 4ddc8be17..8cc0c667c 100644 --- a/tdeui/kjanuswidget.h +++ b/tdeui/kjanuswidget.h @@ -50,7 +50,7 @@ class KGuiItem; * This class provides KJanusWidget::TreeList, KJanusWidget::IconList, * KJanusWidget::Tabbed, KJanusWidget::Plain and KJanusWidget::Swallow layouts. * - * For all modes it is important that you specify the TQWidget::tqminimumSize() + * For all modes it is important that you specify the TQWidget::minimumSize() * on the page, plain widget or the swallowed widget. If you use a QLayout * on the page, plain widget or the swallowed widget this will be taken care * of automatically. The size is used when the KJanusWidget determines its diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index ee26cc6de..6626a9a46 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -85,7 +85,7 @@ void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) d->bQtShortcut = bQtShortcut; m_cut = cut; TQString keyStr = m_cut.toString(); - keyStr.replace('&', TQString::tqfromLatin1("&&")); + keyStr.replace('&', TQString::fromLatin1("&&")); setText( keyStr.isEmpty() ? i18n("None") : keyStr ); } @@ -106,7 +106,7 @@ void KKeyButton::captureShortcut() KShortcut cut; m_bEditing = true; - tqrepaint(); + repaint(); { KShortcutDialog dlg( m_cut, d->bQtShortcut, this ); @@ -117,7 +117,7 @@ void KKeyButton::captureShortcut() emit capturedShortcut( cut ); m_bEditing = false; - tqrepaint(); + repaint(); } void KKeyButton::drawButton( TQPainter *painter ) @@ -146,11 +146,11 @@ void KKeyButton::drawButton( TQPainter *painter ) painter->setClipping( false ); if( width() > 12 && height() > 8 ) qDrawShadePanel( painter, 6, 4, width() - 12, height() - 8, - tqcolorGroup(), true, 1, 0L ); + colorGroup(), true, 1, 0L ); if ( m_bEditing ) { - painter->setPen( tqcolorGroup().base() ); - painter->setBrush( tqcolorGroup().base() ); + painter->setPen( colorGroup().base() ); + painter->setBrush( colorGroup().base() ); } else { @@ -162,7 +162,7 @@ void KKeyButton::drawButton( TQPainter *painter ) drawButtonLabel( painter ); - painter->setPen( tqcolorGroup().text() ); + painter->setPen( colorGroup().text() ); painter->setBrush( NoBrush ); if( hasFocus() || m_bEditing ) { diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index 84d367a65..5a38658ff 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -27,7 +27,7 @@ #include <tqbuttongroup.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqdrawutil.h> #include <tqpainter.h> #include <tqradiobutton.h> @@ -532,7 +532,7 @@ void KKeyChooser::updateButtons() d->pbtnShortcut->setShortcut( pItem->shortcut(), bQtShortcut ); //item->setText( 1, keyStrCfg ); - pItem->tqrepaint(); + pItem->repaint(); d->lInfo->setText( i18n("Default key:") + TQString(" %1").arg(keyStrDef.isEmpty() ? i18n("None") : keyStrDef) ); // Select the appropriate radio button. diff --git a/tdeui/klanguagebutton.cpp b/tdeui/klanguagebutton.cpp index bfc160c8e..a834be61a 100644 --- a/tdeui/klanguagebutton.cpp +++ b/tdeui/klanguagebutton.cpp @@ -23,7 +23,7 @@ #define INCLUDE_MENUITEM_DEF #include <tqpopupmenu.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include "klanguagebutton.h" @@ -131,12 +131,12 @@ KLanguageButton::~KLanguageButton() void KLanguageButton::insertLanguage( const TQString& path, const TQString& name, const TQString&, const TQString &submenu, int index ) { - TQString output = name + TQString::tqfromLatin1( " (" ) + path + - TQString::tqfromLatin1( ")" ); + TQString output = name + TQString::fromLatin1( " (" ) + path + + TQString::fromLatin1( ")" ); #if 0 // Nooooo ! Country != language TQPixmap flag( locate( "locale", sub + path + - TQString::tqfromLatin1( "/flag.png" ) ) ); + TQString::fromLatin1( "/flag.png" ) ) ); #endif insertItem( output, path, submenu, index ); } @@ -191,7 +191,7 @@ void KLanguageButton::slotActivated( int index ) setCurrentItem( index ); // Forward event from popup menu as if it was emitted from this widget: - TQString id = *m_ids->tqat( index ); + TQString id = *m_ids->at( index ); emit activated( id ); } @@ -199,7 +199,7 @@ void KLanguageButton::slotHighlighted( int index ) { //kdDebug() << "slotHighlighted" << index << endl; - TQString id = *m_ids->tqat( index ); + TQString id = *m_ids->at( index ); emit ( highlighted(id) ); } @@ -237,7 +237,7 @@ bool KLanguageButton::contains( const TQString & id ) const TQString KLanguageButton::current() const { - return *m_ids->tqat( currentItem() ); + return *m_ids->at( currentItem() ); } @@ -248,7 +248,7 @@ TQString KLanguageButton::id( int i ) const kdDebug() << "KLanguageButton::tag(), unknown tag " << i << endl; return TQString::null; } - return *m_ids->tqat( i ); + return *m_ids->at( i ); } diff --git a/tdeui/kled.cpp b/tdeui/kled.cpp index b78b06a38..7dd45f107 100644 --- a/tdeui/kled.cpp +++ b/tdeui/kled.cpp @@ -51,7 +51,7 @@ KLed::KLed(TQWidget *parent, const char *name) : TQWidget( parent, name), led_state(On), led_look(Raised), - led_tqshape(Circular) + led_shape(Circular) { TQColor col(green); d = new KLed::KLedPrivate; @@ -68,7 +68,7 @@ KLed::KLed(const TQColor& col, TQWidget *parent, const char *name) : TQWidget( parent, name), led_state(On), led_look(Raised), - led_tqshape(Circular) + led_shape(Circular) { d = new KLed::KLedPrivate; d->dark_factor = 300; @@ -81,11 +81,11 @@ KLed::KLed(const TQColor& col, TQWidget *parent, const char *name) } KLed::KLed(const TQColor& col, KLed::State state, - KLed::Look look, KLed::Shape tqshape, TQWidget *parent, const char *name ) + KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name ) : TQWidget(parent, name), led_state(state), led_look(look), - led_tqshape(tqshape) + led_shape(shape) { d = new KLed::KLedPrivate; d->dark_factor = 300; @@ -93,7 +93,7 @@ KLed::KLed(const TQColor& col, KLed::State state, d->off_map = 0; d->on_map = 0; - //setShape(tqshape); + //setShape(shape); setColor(col); } @@ -114,7 +114,7 @@ KLed::paintEvent(TQPaintEvent *) t.start(); for (int i=0; i<rounds; i++) { #endif - switch(led_tqshape) + switch(led_shape) { case Rectangular: switch (led_look) @@ -229,7 +229,7 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp brush.setColor( color ); pen.setWidth( scale ); - color = tqcolorGroup().dark(); + color = colorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing @@ -325,7 +325,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp // avoid that the border can be erased by the bright spot of the LED pen.setWidth( 2 * scale + 1 ); - color = tqcolorGroup().dark(); + color = colorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing brush.setStyle( Qt::NoBrush ); // Switch off the brush @@ -428,7 +428,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // drawing the shadow border at 45° (45*16 = 720). int angle = -720; - color = tqcolorGroup().light(); + color = colorGroup().light(); for ( int arc = 120; arc < 2880; arc += 240 ) { pen.setColor( color ); @@ -525,9 +525,9 @@ KLed::state() const } KLed::Shape -KLed::tqshape() const +KLed::shape() const { - return led_tqshape; + return led_shape; } TQColor @@ -561,9 +561,9 @@ KLed::toggleState() void KLed::setShape(KLed::Shape s) { - if(led_tqshape!=s) + if(led_shape!=s) { - led_tqshape = s; + led_shape = s; update(); } } diff --git a/tdeui/kled.h b/tdeui/kled.h index 7ae03e196..7b9f327fa 100644 --- a/tdeui/kled.h +++ b/tdeui/kled.h @@ -47,7 +47,7 @@ class TDEUI_EXPORT KLed : public TQWidget Q_OBJECT Q_ENUMS( State Shape Look ) Q_PROPERTY( State state READ state WRITE setState ) - Q_PROPERTY( Shape tqshape READ tqshape WRITE setShape ) + Q_PROPERTY( Shape shape READ shape WRITE setShape ) Q_PROPERTY( Look look READ look WRITE setLook ) Q_PROPERTY( TQColor color READ color WRITE setColor ) Q_PROPERTY( int darkFactor READ darkFactor WRITE setDarkFactor ) @@ -62,7 +62,7 @@ public: /** * Shades of the lamp. - * @short LED tqshape + * @short LED shape */ enum Shape { Rectangular, Circular }; @@ -114,12 +114,12 @@ public: * @param col Initial color of the LED. * @param state Sets the State. * @param look Sets the Look. - * @param tqshape Sets the Shape (rectangular or circular) + * @param shape Sets the Shape (rectangular or circular) * @param parent Will be handed over to TQWidget. * @param name Will be handed over to TQWidget. * @short Constructor */ - KLed(const TQColor& col, KLed::State state, KLed::Look look, KLed::Shape tqshape, + KLed(const TQColor& col, KLed::State state, KLed::Look look, KLed::Shape shape, TQWidget *parent=0, const char *name=0); @@ -137,7 +137,7 @@ public: */ State state() const; - Shape tqshape() const; + Shape shape() const; /** * Returns the color of the widget @@ -175,7 +175,7 @@ public: void setState( State state ); /** - * Set the tqshape of the LED to @p s. + * Set the shape of the LED to @p s. */ void setShape(Shape s); /** @@ -317,7 +317,7 @@ private: State led_state; TQColor led_color; Look led_look; - Shape led_tqshape; + Shape led_shape; protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index 87fc29d83..16c117c26 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqclipboard.h> +#include <clipboard.h> #include <tqpainter.h> #include <tqtimer.h> @@ -420,9 +420,9 @@ bool KLineEdit::copySqueezedText(bool clipboard) const return false; TQString t = d->squeezedText; t = t.mid(start, end - start); - disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0); - TQApplication::tqclipboard()->setText( t, clipboard ? TQClipboard::Clipboard : TQClipboard::Selection ); - connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, + disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0); + TQApplication::clipboard()->setText( t, clipboard ? TQClipboard::Clipboard : TQClipboard::Selection ); + connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) ); return true; } @@ -453,7 +453,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) } else if ( KStdAccel::pasteSelection().contains( key ) ) { - TQString text = TQApplication::tqclipboard()->text( TQClipboard::Selection); + TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); insert( text ); deselect(); return; @@ -575,7 +575,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) mode == KGlobalSettings::CompletionMan) && noModifier ) { TQString keycode = e->text(); - if ( !keycode.isEmpty() && (keycode.tqunicode()->isPrint() || + if ( !keycode.isEmpty() && (keycode.unicode()->isPrint() || e->key() == Key_Backspace || e->key() == Key_Delete ) ) { 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 // can set the new autocompletion again. if (hadSelection && !hasUserSelection && start>cPos && - ( (!keycode.isEmpty() && keycode.tqunicode()->isPrint()) || + ( (!keycode.isEmpty() && keycode.unicode()->isPrint()) || e->key() == Key_Backspace || e->key() == Key_Delete ) ) { del(); @@ -679,7 +679,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) int len = txt.length(); 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) ) { if ( e->key() == Key_Backspace ) @@ -840,7 +840,7 @@ void KLineEdit::mousePressEvent( TQMouseEvent* e ) void KLineEdit::mouseReleaseEvent( TQMouseEvent* e ) { TQLineEdit::mouseReleaseEvent( e ); - if (TQApplication::tqclipboard()->supportsSelection() ) { + if (TQApplication::clipboard()->supportsSelection() ) { if ( e->button() == Qt::LeftButton ) { // Fix copying of squeezed text if needed copySqueezedText( false ); diff --git a/tdeui/klineeditdlg.cpp b/tdeui/klineeditdlg.cpp index 9551fc1f6..f4081198c 100644 --- a/tdeui/klineeditdlg.cpp +++ b/tdeui/klineeditdlg.cpp @@ -22,7 +22,7 @@ #include <tqpushbutton.h> #include <tqlineedit.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #undef Unsorted // Required for --enable-final (tqdir.h) #include <tqfiledialog.h> diff --git a/tdeui/klistbox.cpp b/tdeui/klistbox.cpp index 30d418daf..13c5ab325 100644 --- a/tdeui/klistbox.cpp +++ b/tdeui/klistbox.cpp @@ -133,7 +133,7 @@ void KListBox::slotAutoSelect() bool select = !m_pCurrentItem->isSelected(); bool update = viewport()->isUpdatesEnabled(); - viewport()->tqsetUpdatesEnabled( false ); + viewport()->setUpdatesEnabled( false ); bool down = index( previousItem ) < index( m_pCurrentItem ); TQListBoxItem* it = down ? previousItem : m_pCurrentItem; @@ -150,7 +150,7 @@ void KListBox::slotAutoSelect() } blockSignals( block ); - viewport()->tqsetUpdatesEnabled( update ); + viewport()->setUpdatesEnabled( update ); triggerUpdate( false ); emit selectionChanged(); diff --git a/tdeui/klistview.cpp b/tdeui/klistview.cpp index e7b13325d..fd5a6c51c 100644 --- a/tdeui/klistview.cpp +++ b/tdeui/klistview.cpp @@ -197,7 +197,7 @@ void KListViewLineEdit::load(TQListViewItem *i, int c) item=i; col=c; - TQRect rect(p->tqitemRect(i)); + TQRect rect(p->itemRect(i)); setText(item->text(c)); home( true ); @@ -621,7 +621,7 @@ void KListView::slotAutoSelect() bool select = !d->pCurrentItem->isSelected(); bool update = viewport()->isUpdatesEnabled(); - viewport()->tqsetUpdatesEnabled( false ); + viewport()->setUpdatesEnabled( false ); bool down = previousItem->itemPos() < d->pCurrentItem->itemPos(); TQListViewItemIterator lit( down ? previousItem : d->pCurrentItem ); @@ -638,7 +638,7 @@ void KListView::slotAutoSelect() } blockSignals( block ); - viewport()->tqsetUpdatesEnabled( update ); + viewport()->setUpdatesEnabled( update ); triggerUpdate(); emit selectionChanged(); @@ -716,7 +716,7 @@ void KListView::focusInEvent( TQFocusEvent *fe ) && (currentItem())) { currentItem()->setSelected(true); - currentItem()->tqrepaint(); + currentItem()->repaint(); emit selectionChanged(); }; } @@ -736,7 +736,7 @@ void KListView::focusOutEvent( TQFocusEvent *fe ) && (!d->editor->isVisible())) { currentItem()->setSelected(false); - currentItem()->tqrepaint(); + currentItem()->repaint(); emit selectionChanged(); }; @@ -776,7 +776,7 @@ void KListView::contentsMousePressEvent( TQMouseEvent *e ) if (currentItem()) { currentItem()->setSelected(false); - currentItem()->tqrepaint(); + currentItem()->repaint(); // emit selectionChanged(); } } @@ -1008,7 +1008,7 @@ void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) { cleanDropVisualizer(); d->mOldDropVisualizer=tmpRect; - viewport()->tqrepaint(tmpRect); + viewport()->repaint(tmpRect); } } if (dropHighlighter()) @@ -1018,7 +1018,7 @@ void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) { cleanItemHighlighter(); d->mOldDropHighlighter=tmpRect; - viewport()->tqrepaint(tmpRect); + viewport()->repaint(tmpRect); } } } @@ -1045,7 +1045,7 @@ void KListView::cleanDropVisualizer() { TQRect rect=d->mOldDropVisualizer; d->mOldDropVisualizer = TQRect(); - viewport()->tqrepaint(rect, true); + viewport()->repaint(rect, true); } } @@ -1067,7 +1067,7 @@ void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListView else { // Get the closest item before us ('atpos' or the one above, if any) - if (p.y() - tqitemRect(atpos).topLeft().y() < (atpos->height()/2)) + if (p.y() - itemRect(atpos).topLeft().y() < (atpos->height()/2)) above = atpos->itemAbove(); else above = atpos; @@ -1327,12 +1327,12 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, it = it->firstChild(); } - insertmarker = tqitemRect (it ? it : after); + insertmarker = itemRect (it ? it : after); level = after->depth(); } else if (parent) { - insertmarker = tqitemRect (parent); + insertmarker = itemRect (parent); level = parent->depth() + 1; } insertmarker.setLeft( treeStepSize() * ( level + (rootIsDecorated() ? 1 : 0) ) + itemMargin() ); @@ -1355,11 +1355,11 @@ TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) if (item) { - r = tqitemRect(item); + r = itemRect(item); r.setLeft(r.left()+(item->depth()+(rootIsDecorated() ? 1 : 0))*treeStepSize()); if (painter) - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, tqcolorGroup(), - TQStyle::Style_FocusAtBorder, tqcolorGroup().highlight()); + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(), + TQStyle::Style_FocusAtBorder, colorGroup().highlight()); } return r; @@ -1371,7 +1371,7 @@ void KListView::cleanItemHighlighter () { TQRect rect=d->mOldDropHighlighter; d->mOldDropHighlighter = TQRect(); - viewport()->tqrepaint(rect, true); + viewport()->repaint(rect, true); } } @@ -1482,7 +1482,7 @@ void KListView::activateAutomaticSelection() if (currentItem()) { currentItem()->setSelected(true); - currentItem()->tqrepaint(); + currentItem()->repaint(); emit selectionChanged(); }; } @@ -1808,20 +1808,20 @@ void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) TQRect ir; if (repaintItem1) - ir = ir.unite( tqitemRect(repaintItem1) ); + ir = ir.unite( itemRect(repaintItem1) ); if (repaintItem2) - ir = ir.unite( tqitemRect(repaintItem2) ); + ir = ir.unite( itemRect(repaintItem2) ); if ( !ir.isEmpty() ) { // rectangle to be repainted if ( ir.x() < 0 ) ir.moveBy( -ir.x(), 0 ); - viewport()->tqrepaint( ir, false ); + viewport()->repaint( ir, false ); } /*if (repaintItem1) - repaintItem1->tqrepaint(); + repaintItem1->repaint(); if (repaintItem2) - repaintItem2->tqrepaint();*/ + repaintItem2->repaint();*/ update(); if (emitSelectionChanged) emit selectionChanged(); @@ -1895,7 +1895,7 @@ void KListView::emitContextMenu (KListView*, TQListViewItem* i) TQPoint p; if (i) - p = viewport()->mapToGlobal(tqitemRect(i).center()); + p = viewport()->mapToGlobal(itemRect(i).center()); else p = mapToGlobal(rect().center()); @@ -1940,7 +1940,7 @@ void KListView::viewportPaintEvent(TQPaintEvent *e) TQPainter painter(viewport()); // This is where we actually draw the drop-highlighter - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, tqcolorGroup(), + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(), TQStyle::Style_FocusAtBorder); } d->painting = false; @@ -2001,13 +2001,13 @@ const TQColor &KListView::alternateBackground() const void KListView::setAlternateBackground(const TQColor &c) { d->alternateBackground = c; - tqrepaint(); + repaint(); } void KListView::setShadeSortColumn(bool shadeSortColumn) { d->shadeSortColumn = shadeSortColumn; - tqrepaint(); + repaint(); } bool KListView::shadeSortColumn() const @@ -2231,7 +2231,7 @@ const TQColor &KListViewItem::backgroundColor() { if (isAlternate()) return static_cast< KListView* >(listView())->alternateBackground(); - return listView()->viewport()->tqcolorGroup().base(); + return listView()->viewport()->colorGroup().base(); } TQColor KListViewItem::backgroundColor(int column) @@ -2239,7 +2239,7 @@ TQColor KListViewItem::backgroundColor(int column) KListView* view = static_cast< KListView* >(listView()); TQColor color = isAlternate() ? view->alternateBackground() : - view->viewport()->tqcolorGroup().base(); + view->viewport()->colorGroup().base(); // calculate a different color if the current column is sorted (only if more than 1 column) if ( (view->columns() > 1) && view->shadeSortColumn() && (column == view->columnSorted()) ) @@ -2335,7 +2335,7 @@ bool KListViewItem::isAlternate() return false; } -void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) +void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { TQColorGroup _cg = cg; TQListView* lv = listView(); @@ -2353,7 +2353,7 @@ void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, TQColorGroup::Background : TQColorGroup::Base, backgroundColor(column)); } - TQListViewItem::paintCell(p, _cg, column, width, tqalignment); + TQListViewItem::paintCell(p, _cg, column, width, alignment); } void KListView::virtual_hook( int, void* ) diff --git a/tdeui/klistview.h b/tdeui/klistview.h index 07b514457..ed101927f 100644 --- a/tdeui/klistview.h +++ b/tdeui/klistview.h @@ -685,7 +685,7 @@ protected: */ inline bool below (TQListViewItem* i, const TQPoint& p) { - return below (tqitemRect(i), contentsToViewport(p)); + return below (itemRect(i), contentsToViewport(p)); } /** @@ -1070,7 +1070,7 @@ public: TQColor backgroundColor(int column); virtual void paintCell(TQPainter *p, const TQColorGroup &cg, - int column, int width, int tqalignment); + int column, int width, int alignment); private: void init(); diff --git a/tdeui/klistviewsearchline.cpp b/tdeui/klistviewsearchline.cpp index fb02a8259..7f96ed94d 100644 --- a/tdeui/klistviewsearchline.cpp +++ b/tdeui/klistviewsearchline.cpp @@ -145,7 +145,7 @@ void KListViewSearchLine::updateSearch(const TQString &s) it.current() && !currentItem; ++it) { - if(d->listView->tqitemRect(it.current()).isValid()) + if(d->listView->itemRect(it.current()).isValid()) currentItem = it.current(); } } @@ -302,7 +302,7 @@ void KListViewSearchLine::activateSearch() void KListViewSearchLine::itemAdded(TQListViewItem *item) const { - item->tqsetVisible(itemMatches(item, text())); + item->setVisible(itemMatches(item, text())); } void KListViewSearchLine::listViewDeleted() @@ -347,9 +347,9 @@ void KListViewSearchLine::checkItemParentsNotVisible() { TQListViewItem *item = it.current(); if(itemMatches(item, d->search)) - item->tqsetVisible(true); + item->setVisible(true); else - item->tqsetVisible(false); + item->setVisible(false); } } @@ -381,23 +381,23 @@ bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListVi visible = true; if (highestHiddenParent) { - highestHiddenParent->tqsetVisible(true); - // Calling tqsetVisible on our ancestor will unhide all its descendents. Hide the ones + highestHiddenParent->setVisible(true); + // Calling setVisible on our ancestor will unhide all its descendents. Hide the ones // before us that should not be shown. for(TQListViewItem *hide = first; hide != item; hide = hide->nextSibling()) - hide->tqsetVisible(false); + hide->setVisible(false); highestHiddenParent = 0; - // If we matched, than none of our children matched, yet the tqsetVisible() call on our + // If we matched, than none of our children matched, yet the setVisible() call on our // ancestor unhid them, undo the damage: if(!childMatch) for(TQListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling()) - hide->tqsetVisible(false); + hide->setVisible(false); } else - item->tqsetVisible(true); + item->setVisible(true); } else - item->tqsetVisible(false); + item->setVisible(false); } return visible; } diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp index e7d5469dc..67e314fa0 100644 --- a/tdeui/kmainwindow.cpp +++ b/tdeui/kmainwindow.cpp @@ -30,7 +30,7 @@ #include <tqsessionmanager.h> #include <tqobjectlist.h> #include <tqstyle.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwidgetlist.h> #include <tqtimer.h> @@ -105,8 +105,8 @@ public: n++; it.current()->savePropertiesInternal(config, n); } - config->setGroup(TQString::tqfromLatin1("Number")); - config->writeEntry(TQString::tqfromLatin1("NumberOfWindows"), n ); + config->setGroup(TQString::fromLatin1("Number")); + config->writeEntry(TQString::fromLatin1("NumberOfWindows"), n ); return true; } @@ -212,7 +212,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) unusedNumber = 0; // add numbers only when needed } for(;;) { - TQWidgetList* list = kapp->tqtopLevelWidgets(); + TQWidgetList* list = kapp->topLevelWidgets(); TQWidgetListIt it( *list ); bool found = false; for( TQWidget* w = it.current(); @@ -286,8 +286,8 @@ void KMainWindow::parseGeometry(bool parsewidth) int w, h; int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h); if (parsewidth) { - TQSize minSize = tqminimumSize(); - TQSize maxSize = tqmaximumSize(); + TQSize minSize = minimumSize(); + TQSize maxSize = maximumSize(); if ( !(m & WidthValue) ) w = width(); if ( !(m & HeightValue) ) @@ -356,8 +356,8 @@ bool KMainWindow::canBeRestored( int number ) KConfig *config = kapp->sessionConfig(); if ( !config ) return false; - config->setGroup( TQString::tqfromLatin1("Number") ); - int n = config->readNumEntry( TQString::tqfromLatin1("NumberOfWindows") , 1 ); + config->setGroup( TQString::fromLatin1("Number") ); + int n = config->readNumEntry( TQString::fromLatin1("NumberOfWindows") , 1 ); return number >= 1 && number <= n; } @@ -370,12 +370,12 @@ const TQString KMainWindow::classNameOfToplevel( int number ) return TQString::null; TQString s; s.setNum( number ); - s.prepend( TQString::tqfromLatin1("WindowProperties") ); + s.prepend( TQString::fromLatin1("WindowProperties") ); config->setGroup( s ); - if ( !config->hasKey( TQString::tqfromLatin1("ClassName") ) ) + if ( !config->hasKey( TQString::fromLatin1("ClassName") ) ) return TQString::null; else - return config->readEntry( TQString::tqfromLatin1("ClassName") ); + return config->readEntry( TQString::fromLatin1("ClassName") ); } void KMainWindow::show() @@ -491,7 +491,7 @@ void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xm void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) { // disabling the updates prevents unnecessary redraws - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); // just in case we are rebuilding, let's remove our old client guiFactory()->removeClient( this ); @@ -564,7 +564,7 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) conserveMemory(); } - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); updateGeometry(); } @@ -696,13 +696,13 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number ) TQString s; s.setNum(number); - s.prepend(TQString::tqfromLatin1("WindowProperties")); + s.prepend(TQString::fromLatin1("WindowProperties")); config->setGroup(s); // store objectName, className, Width and Height for later restoring // (Only useful for session management) - config->writeEntry(TQString::tqfromLatin1("ObjectName"), name()); - config->writeEntry(TQString::tqfromLatin1("ClassName"), className()); + config->writeEntry(TQString::fromLatin1("ObjectName"), name()); + config->writeEntry(TQString::fromLatin1("ClassName"), className()); saveMainWindowSettings(config); // Menubar, statusbar and Toolbar settings. @@ -738,7 +738,7 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &config TQMenuBar* mb = internalMenuBar(); if (mb) { - TQString MenuBar = TQString::tqfromLatin1("MenuBar"); + TQString MenuBar = TQString::fromLatin1("MenuBar"); if(!config->hasDefault("MenuBar") && !mb->isHidden() ) config->revertToDefault("MenuBar"); else @@ -810,13 +810,13 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) // in order they are in toolbar list TQString s; s.setNum(number); - s.prepend(TQString::tqfromLatin1("WindowProperties")); + s.prepend(TQString::fromLatin1("WindowProperties")); config->setGroup(s); // restore the object name (window role) - if ( config->hasKey(TQString::tqfromLatin1("ObjectName" )) ) - setName( config->readEntry(TQString::tqfromLatin1("ObjectName")).latin1()); // latin1 is right here + if ( config->hasKey(TQString::fromLatin1("ObjectName" )) ) + setName( config->readEntry(TQString::fromLatin1("ObjectName")).latin1()); // latin1 is right here applyMainWindowSettings(config); // Menubar, statusbar and toolbar settings. @@ -918,8 +918,8 @@ void KMainWindow::saveWindowSize( KConfig * config ) const #endif TQRect size( desk.width(), w, desk.height(), h ); bool defaultSize = (size == d->defaultWindowSize); - TQString widthString = TQString::tqfromLatin1("Width %1").arg(desk.width()); - TQString heightString = TQString::tqfromLatin1("Height %1").arg(desk.height()); + TQString widthString = TQString::fromLatin1("Width %1").arg(desk.width()); + TQString heightString = TQString::fromLatin1("Height %1").arg(desk.height()); if (!config->hasDefault(widthString) && defaultSize) config->revertToDefault(widthString); else @@ -941,16 +941,16 @@ void KMainWindow::restoreWindowSize( KConfig * config ) TQRect desk = TQApplication::desktop()->screenGeometry(scnum); if ( d->defaultWindowSize.isNull() ) // only once d->defaultWindowSize = TQRect(desk.width(), width(), desk.height(), height()); // store default values - TQSize size( config->readNumEntry( TQString::tqfromLatin1("Width %1").arg(desk.width()), 0 ), - config->readNumEntry( TQString::tqfromLatin1("Height %1").arg(desk.height()), 0 ) ); + TQSize size( config->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 0 ), + config->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 0 ) ); if (size.isEmpty()) { // try the KDE 2.0 way - size = TQSize( config->readNumEntry( TQString::tqfromLatin1("Width"), 0 ), - config->readNumEntry( TQString::tqfromLatin1("Height"), 0 ) ); + size = TQSize( config->readNumEntry( TQString::fromLatin1("Width"), 0 ), + config->readNumEntry( TQString::fromLatin1("Height"), 0 ) ); if (!size.isEmpty()) { // make sure the other resolutions don't get old settings - config->writeEntry( TQString::tqfromLatin1("Width"), 0 ); - config->writeEntry( TQString::tqfromLatin1("Height"), 0 ); + config->writeEntry( TQString::fromLatin1("Width"), 0 ); + config->writeEntry( TQString::fromLatin1("Height"), 0 ); } } if ( !size.isEmpty() ) { @@ -1197,7 +1197,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) break; case KToolBar::Flat: - size += TQSize(0, 3+kapp->tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent )); + size += TQSize(0, 3+kapp->tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); break; default: @@ -1207,7 +1207,7 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) KMenuBar *mb = internalMenuBar(); if (mb && !mb->isHidden()) { size += TQSize(0,mb->heightForWidth(size.width())); - if (tqstyle().tqstyleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this)) + if (tqstyle().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this)) size += TQSize( 0, dockWindowsMovable() ? 1 : 2); } TQStatusBar *sb = internalStatusBar(); diff --git a/tdeui/kmainwindow.h b/tdeui/kmainwindow.h index 8fb99fb2e..8aba596f1 100644 --- a/tdeui/kmainwindow.h +++ b/tdeui/kmainwindow.h @@ -455,7 +455,7 @@ public: * "virtual TQSize sizeHint() const;" to specify a default size rather * than letting TQWidget::adjust use the default size of 0x0. */ - void setAutoSaveSettings( const TQString & groupName = TQString::tqfromLatin1("MainWindow"), + void setAutoSaveSettings( const TQString & groupName = TQString::fromLatin1("MainWindow"), bool saveWindowSize = true ); /** @@ -1036,7 +1036,7 @@ template <typename T> inline void kRestoreMainWindows() { for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { const TQString className = KMainWindow::classNameOfToplevel( n ); - if ( className == TQString::tqfromLatin1( T::staticMetaObject()->className() ) ) + if ( className == TQString::fromLatin1( T::staticMetaObject()->className() ) ) (new T)->restore( n ); } } @@ -1048,9 +1048,9 @@ inline void kRestoreMainWindows() { classNames[1] = T1::staticMetaObject()->className(); for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { const TQString className = KMainWindow::classNameOfToplevel( n ); - if ( className == TQString::tqfromLatin1( classNames[0] ) ) + if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); - else if ( className == TQString::tqfromLatin1( classNames[1] ) ) + else if ( className == TQString::fromLatin1( classNames[1] ) ) (new T1)->restore( n ); } } @@ -1063,11 +1063,11 @@ inline void kRestoreMainWindows() { classNames[2] = T2::staticMetaObject()->className(); for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { const TQString className = KMainWindow::classNameOfToplevel( n ); - if ( className == TQString::tqfromLatin1( classNames[0] ) ) + if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); - else if ( className == TQString::tqfromLatin1( classNames[1] ) ) + else if ( className == TQString::fromLatin1( classNames[1] ) ) (new T1)->restore( n ); - else if ( className == TQString::tqfromLatin1( classNames[2] ) ) + else if ( className == TQString::fromLatin1( classNames[2] ) ) (new T2)->restore( n ); } } diff --git a/tdeui/kmainwindowiface.cpp b/tdeui/kmainwindowiface.cpp index 9394d27bb..966d22320 100644 --- a/tdeui/kmainwindowiface.cpp +++ b/tdeui/kmainwindowiface.cpp @@ -25,7 +25,7 @@ #include <kdcoppropertyproxy.h> #include <kmainwindow.h> #include <kaction.h> -#include <tqclipboard.h> +#include <clipboard.h> KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) @@ -135,7 +135,7 @@ int KMainWindowInterface::getWinID() } void KMainWindowInterface::grabWindowToClipBoard() { - TQClipboard *clipboard = TQApplication::tqclipboard(); + TQClipboard *clipboard = TQApplication::clipboard(); clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow)); } void KMainWindowInterface::hide() diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index b8f0f3326..4aab91980 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -168,7 +168,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) d->wasTopLevel = top_level; if( parentWidget() - && parentWidget()->tqtopLevelWidget()->isFullScreen()) + && parentWidget()->topLevelWidget()->isFullScreen()) top_level = false; if ( isTopLevelMenu() == top_level ) @@ -193,7 +193,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) #ifdef Q_WS_X11 KWin::setType( winId(), NET::TopMenu ); if( parentWidget()) - XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #endif TQMenuBar::setFrameStyle( NoFrame ); TQMenuBar::setLineWidth( 0 ); @@ -244,13 +244,13 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) { if ( d->topLevel ) { - if ( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->tqtopLevelWidget()) ) + if ( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget()) ) { if( ev->type() == TQEvent::Resize ) return false; // ignore resizing of parent, TQMenuBar would try to adjust size if ( ev->type() == TQEvent::Accel || ev->type() == TQEvent::AccelAvailable ) { - if ( TQApplication::sendEvent( tqtopLevelWidget(), ev ) ) + if ( TQApplication::sendEvent( topLevelWidget(), ev ) ) return true; } if(ev->type() == TQEvent::ShowFullScreen ) @@ -260,7 +260,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()) && ev->type() == TQEvent::Reparent ) { #ifdef Q_WS_X11 - XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? #endif @@ -271,7 +271,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) if( ev->type() == TQEvent::Show ) { #ifdef Q_WS_X11 - XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? #endif @@ -283,10 +283,10 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) } else { - if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->tqtopLevelWidget())) + if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget())) { if( ev->type() == TQEvent::WindowStateChange - && !parentWidget()->tqtopLevelWidget()->isFullScreen() ) + && !parentWidget()->topLevelWidget()->isFullScreen() ) setTopLevelMenuInternal( d->wasTopLevel ); } } @@ -506,14 +506,14 @@ void KMenuBar::drawContents( TQPainter* p ) BackgroundMode bg_mode = backgroundMode(); BackgroundOrigin bg_origin = backgroundOrigin(); - tqsetUpdatesEnabled(false); + setUpdatesEnabled(false); setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); p->eraseRect( rect() ); erase(); - TQColorGroup g = tqcolorGroup(); + TQColorGroup g = colorGroup(); bool e; for ( int i=0; i<(int)count(); i++ ) @@ -522,16 +522,16 @@ void KMenuBar::drawContents( TQPainter* p ) if ( !mi->text().isNull() || mi->pixmap() ) { - TQRect r = tqitemRect(i); + TQRect r = itemRect(i); if(r.isEmpty() || !mi->isVisible()) continue; e = mi->isEnabledAndVisible(); if ( e ) - g = isEnabled() ? ( isActiveWindow() ? tqpalette().active() : - tqpalette().inactive() ) : tqpalette().disabled(); + g = isEnabled() ? ( isActiveWindow() ? palette().active() : + palette().inactive() ) : palette().disabled(); else - g = tqpalette().disabled(); + g = palette().disabled(); bool item_active = ( actItem == i ); @@ -548,7 +548,7 @@ void KMenuBar::drawContents( TQPainter* p ) flags |= TQStyle::Style_Down; flags |= TQStyle::Style_HasFocus; - tqstyle().tqdrawControl(TQStyle::CE_MenuBarItem, p, this, + tqstyle().drawControl(TQStyle::CE_MenuBarItem, p, this, r, g, flags, TQStyleOption(mi)); } else @@ -561,7 +561,7 @@ void KMenuBar::drawContents( TQPainter* p ) setBackgroundOrigin(bg_origin); setBackgroundMode(bg_mode); - tqsetUpdatesEnabled(up_enabled); + setUpdatesEnabled(up_enabled); } } diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index 43284076c..a6fc740d0 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -26,10 +26,10 @@ #include <tqstringlist.h> #include <tqvbox.h> #include <tqvgroupbox.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqsimplerichtext.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> #include <kconfig.h> @@ -288,7 +288,7 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, btn->setFocus(); if ( (options & KMessageBox::Notify) ) - sendNotification( text, strlist, notifyType, dialog->tqtopLevelWidget()->winId()); + sendNotification( text, strlist, notifyType, dialog->topLevelWidget()->winId()); if (KMessageBox_queue) { @@ -342,7 +342,7 @@ KMessageBox::shouldBeShownYesNo(const TQString &dontShowAgainName, ButtonCode &result) { if ( dontShowAgainName.isEmpty() ) return true; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); TQString dontAsk = config->readEntry(dontShowAgainName).lower(); @@ -361,7 +361,7 @@ bool KMessageBox::shouldBeShownContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return true; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); return config->readBoolEntry(dontShowAgainName, true); @@ -372,7 +372,7 @@ KMessageBox::saveDontShowAgainYesNo(const TQString &dontShowAgainName, ButtonCode result) { if ( dontShowAgainName.isEmpty() ) return; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no", true, (dontShowAgainName[0] == ':')); @@ -383,7 +383,7 @@ void KMessageBox::saveDontShowAgainContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return; - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); KConfig *config = againConfig ? againConfig : KGlobal::config(); KConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, false, true, (dontShowAgainName[0] == ':')); @@ -936,7 +936,7 @@ void KMessageBox::enableAllMessages() { KConfig *config = againConfig ? againConfig : KGlobal::config(); - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; @@ -956,7 +956,7 @@ void KMessageBox::enableMessage(const TQString &dontShowAgainName) { KConfig *config = againConfig ? againConfig : KGlobal::config(); - TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages"); + TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; diff --git a/tdeui/knuminput.cpp b/tdeui/knuminput.cpp index 19c3268af..27b86f98e 100644 --- a/tdeui/knuminput.cpp +++ b/tdeui/knuminput.cpp @@ -86,7 +86,7 @@ void KNumInput::init() m_label = 0; m_slider = 0; - m_tqalignment = 0; + m_alignment = 0; } KNumInput::~KNumInput() @@ -103,17 +103,17 @@ void KNumInput::setLabel(const TQString & label, int a) if(label.isEmpty()) { delete m_label; m_label = 0; - m_tqalignment = 0; + m_alignment = 0; } else { if (m_label) m_label->setText(label); else m_label = new TQLabel(label, this, "KNumInput::TQLabel"); m_label->setAlignment((a & (~(AlignTop|AlignBottom|AlignVCenter))) | AlignVCenter); - // if no vertical tqalignment set, use Top tqalignment + // if no vertical alignment set, use Top alignment if(!(a & (AlignTop|AlignBottom|AlignVCenter))) a |= AlignTop; - m_tqalignment = a; + m_alignment = a; } layout(true); @@ -133,7 +133,7 @@ void KNumInput::layout(bool deep) // label sizeHint m_sizeLabel = (m_label ? m_label->sizeHint() : TQSize(0,0)); - if(m_label && (m_tqalignment & AlignVCenter)) + if(m_label && (m_alignment & AlignVCenter)) m_colw1 = m_sizeLabel.width() + 4; else m_colw1 = 0; @@ -422,7 +422,7 @@ TQSize KIntNumInput::minimumSizeHint() const h = 2 + QMAX(m_sizeSpin.height(), m_sizeSlider.height()); // if in extra row, then count it here - if(m_label && (m_tqalignment & (AlignBottom|AlignTop))) + if(m_label && (m_alignment & (AlignBottom|AlignTop))) h += 4 + m_sizeLabel.height(); else // label is in the same row as the other widgets @@ -431,7 +431,7 @@ TQSize KIntNumInput::minimumSizeHint() const w = m_slider ? m_slider->sizeHint().width() + 8 : 0; w += m_colw1 + m_colw2; - if(m_tqalignment & (AlignTop|AlignBottom)) + if(m_alignment & (AlignTop|AlignBottom)) w = QMAX(w, m_sizeLabel.width() + 4); return TQSize(w, h); @@ -451,12 +451,12 @@ void KIntNumInput::resizeEvent(TQResizeEvent* e) int w = m_colw1; int h = 0; - if(m_label && (m_tqalignment & AlignTop)) { + if(m_label && (m_alignment & AlignTop)) { m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); h += m_sizeLabel.height() + KDialog::spacingHint(); } - if(m_label && (m_tqalignment & AlignVCenter)) + if(m_label && (m_alignment & AlignVCenter)) m_label->setGeometry(0, 0, w, m_sizeSpin.height()); if (tqApp->reverseLayout()) @@ -477,7 +477,7 @@ void KIntNumInput::resizeEvent(TQResizeEvent* e) h += m_sizeSpin.height() + 2; - if(m_label && (m_tqalignment & AlignBottom)) + if(m_label && (m_alignment & AlignBottom)) m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); } @@ -663,7 +663,7 @@ TQSize KDoubleNumInput::minimumSizeHint() const h = 2 + QMAX(m_sizeEdit.height(), m_sizeSlider.height()); // if in extra row, then count it here - if(m_label && (m_tqalignment & (AlignBottom|AlignTop))) + if(m_label && (m_alignment & (AlignBottom|AlignTop))) h += 4 + m_sizeLabel.height(); else // label is in the same row as the other widgets @@ -672,7 +672,7 @@ TQSize KDoubleNumInput::minimumSizeHint() const w = m_slider ? m_slider->sizeHint().width() + 8 : 0; w += m_colw1 + m_colw2; - if(m_tqalignment & (AlignTop|AlignBottom)) + if(m_alignment & (AlignTop|AlignBottom)) w = QMAX(w, m_sizeLabel.width() + 4); return TQSize(w, h); @@ -683,12 +683,12 @@ void KDoubleNumInput::resizeEvent(TQResizeEvent* e) int w = m_colw1; int h = 0; - if(m_label && (m_tqalignment & AlignTop)) { + if(m_label && (m_alignment & AlignTop)) { m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); h += m_sizeLabel.height() + 4; } - if(m_label && (m_tqalignment & AlignVCenter)) + if(m_label && (m_alignment & AlignVCenter)) m_label->setGeometry(0, 0, w, m_sizeEdit.height()); if (tqApp->reverseLayout()) @@ -713,7 +713,7 @@ void KDoubleNumInput::resizeEvent(TQResizeEvent* e) h += m_sizeEdit.height() + 2; - if(m_label && (m_tqalignment & AlignBottom)) + if(m_label && (m_alignment & AlignBottom)) m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); } diff --git a/tdeui/knuminput.h b/tdeui/knuminput.h index c0a6d1847..5f0127cda 100644 --- a/tdeui/knuminput.h +++ b/tdeui/knuminput.h @@ -68,7 +68,7 @@ public: ~KNumInput(); /** - * Sets the text and tqalignment of the main description label. + * Sets the text and alignment of the main description label. * * @param label The text of the label. * Use TQString::null to remove an existing one. @@ -77,7 +77,7 @@ public: * @p AlignTop, @p AlignVCenter, @p AlignBottom. * default is @p AlignLeft | @p AlignTop. * - * The vertical tqalignment flags have special meaning with this + * The vertical alignment flags have special meaning with this * widget: * * @li @p AlignTop The label is placed above the edit/slider @@ -144,7 +144,7 @@ protected: TQSlider* m_slider; TQSize m_sizeSlider, m_sizeLabel; - int m_tqalignment; + int m_alignment; private: void init(); @@ -314,7 +314,7 @@ public: /** * This method returns the minimum size necessary to display the * control. The minimum size is enough to show all the labels - * in the current font (font change may tqinvalidate the return value). + * in the current font (font change may invalidate the return value). * * @return the minimum size necessary to show the control */ diff --git a/tdeui/knumvalidator.cpp b/tdeui/knumvalidator.cpp index 5ab97e840..fdc51022c 100644 --- a/tdeui/knumvalidator.cpp +++ b/tdeui/knumvalidator.cpp @@ -67,7 +67,7 @@ TQValidator::State KIntValidator::validate ( TQString &str, int & ) const if (_base > 10) newStr = newStr.upper(); - if (newStr == TQString::tqfromLatin1("-")) // a special case + if (newStr == TQString::fromLatin1("-")) // a special case if ((_min || _max) && _min >= 0) ok = false; else @@ -209,12 +209,12 @@ TQValidator::State KFloatValidator::validate ( TQString &str, int & ) const TQString newStr; newStr = str.stripWhiteSpace(); - if (newStr == TQString::tqfromLatin1("-")) // a special case + if (newStr == TQString::fromLatin1("-")) // a special case if ((_min || _max) && _min >= 0) ok = false; else return TQValidator::Acceptable; - else if (newStr == TQString::tqfromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case + else if (newStr == TQString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case return TQValidator::Acceptable; else if (newStr.length()) { diff --git a/tdeui/kpanelapplet.cpp b/tdeui/kpanelapplet.cpp index f04cd2177..7ca2999f1 100644 --- a/tdeui/kpanelapplet.cpp +++ b/tdeui/kpanelapplet.cpp @@ -47,7 +47,7 @@ KPanelApplet::KPanelApplet(const TQString& configFile, Type type, : TQFrame(parent, name, f) , _type(type) , _position( pBottom ) - , _tqalignment( LeftTop ) + , _alignment( LeftTop ) , _config(0) , _actions(actions) , d(new KPanelApplet::KPanelAppletPrivate()) @@ -80,8 +80,8 @@ void KPanelApplet::setPosition( Position p ) void KPanelApplet::setAlignment( Alignment a ) { - if( _tqalignment == a ) return; - _tqalignment = a; + if( _alignment == a ) return; + _alignment = a; alignmentChange( a ); } diff --git a/tdeui/kpanelapplet.h b/tdeui/kpanelapplet.h index a51f16fda..0d3ac430f 100644 --- a/tdeui/kpanelapplet.h +++ b/tdeui/kpanelapplet.h @@ -308,9 +308,9 @@ protected: **/ Position position() const { return _position; } /** - * @return the applet's tqalignment. (top/left, center, or bottom/right) + * @return the applet's alignment. (top/left, center, or bottom/right) **/ - Alignment tqalignment() const { return _tqalignment; } + Alignment alignment() const { return _alignment; } /** * The panel on which this applet resides has changed its position. @@ -320,7 +320,7 @@ protected: virtual void positionChange( Position p ); /** - * The panel on which this applet resides has changed its tqalignment. + * The panel on which this applet resides has changed its alignment. * Reimplement this change handler in order to adjust the look of your * applet. **/ @@ -383,7 +383,7 @@ protected: private: Type _type; Position _position; - Alignment _tqalignment; + Alignment _alignment; KConfig* _config; int _actions; protected: diff --git a/tdeui/kpanelextension.cpp b/tdeui/kpanelextension.cpp index e9cd564bd..47ddd7d95 100644 --- a/tdeui/kpanelextension.cpp +++ b/tdeui/kpanelextension.cpp @@ -49,7 +49,7 @@ KPanelExtension::KPanelExtension(const TQString& configFile, Type type, : TQFrame(parent, name) , _type(type) , _position( Top ) - , _tqalignment( LeftTop ) + , _alignment( LeftTop ) , _config(0) , _actions(actions) { @@ -73,8 +73,8 @@ void KPanelExtension::setPosition( Position p ) void KPanelExtension::setAlignment( Alignment a ) { - if( _tqalignment == a ) return; - _tqalignment = a; + if( _alignment == a ) return; + _alignment = a; alignmentChange( a ); } diff --git a/tdeui/kpanelextension.h b/tdeui/kpanelextension.h index 5045d5205..cdc97d14c 100644 --- a/tdeui/kpanelextension.h +++ b/tdeui/kpanelextension.h @@ -282,9 +282,9 @@ protected: Position position() const { return _position; } /** - * @return the extension's tqalignment. (left/top, center, or right/bottom) + * @return the extension's alignment. (left/top, center, or right/bottom) **/ - Alignment tqalignment() const { return _tqalignment; } + Alignment alignment() const { return _alignment; } /** * @return the extensions orientation. (horizontal or vertical) @@ -305,7 +305,7 @@ protected: virtual void positionChange( Position ) {} /** - * This extension has changed its tqalignment. + * This extension has changed its alignment. * Reimplement this change handler in order to adjust the look of your * applet. **/ @@ -333,7 +333,7 @@ protected: private: Type _type; Position _position; - Alignment _tqalignment; + Alignment _alignment; KConfig* _config; int _actions; protected: diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 8d024ac32..42c374998 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -23,7 +23,7 @@ #include <tqwidget.h> #include <tqlineedit.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsize.h> #include <tqevent.h> #include <tqkeycode.h> @@ -187,9 +187,9 @@ void KPasswordEdit::erase() void KPasswordEdit::focusInEvent(TQFocusEvent *e) { const TQString txt = text(); - tqsetUpdatesEnabled(false); + setUpdatesEnabled(false); TQLineEdit::focusInEvent(e); - tqsetUpdatesEnabled(true); + setUpdatesEnabled(true); setText(txt); } diff --git a/tdeui/kpassivepopup.cpp b/tdeui/kpassivepopup.cpp index b348e1040..b91ab20a6 100644 --- a/tdeui/kpassivepopup.cpp +++ b/tdeui/kpassivepopup.cpp @@ -10,7 +10,7 @@ #include <tqapplication.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <tqvbox.h> #include <tqpainter.h> diff --git a/tdeui/kpixmapregionselectorwidget.cpp b/tdeui/kpixmapregionselectorwidget.cpp index 615b50a23..5bc953979 100644 --- a/tdeui/kpixmapregionselectorwidget.cpp +++ b/tdeui/kpixmapregionselectorwidget.cpp @@ -27,7 +27,7 @@ #include <tqpainter.h> #include <tqcolor.h> #include <tqimage.h> -#include <tqlayout.h> +#include <layout.h> #include <kimageeffect.h> #include <kdebug.h> #include <klocale.h> diff --git a/tdeui/kpopupmenu.cpp b/tdeui/kpopupmenu.cpp index 7ca5ea21f..3b56dc873 100644 --- a/tdeui/kpopupmenu.cpp +++ b/tdeui/kpopupmenu.cpp @@ -90,14 +90,14 @@ void KPopupTitle::paintEvent(TQPaintEvent *) { TQRect r(rect()); TQPainter p(this); - kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSectionMenu, &p, r, tqpalette().active()); + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSectionMenu, &p, r, palette().active()); if (!miniicon.isNull()) p.drawPixmap(4, (r.height()-miniicon.height())/2, miniicon); if (!titleStr.isNull()) { - p.setPen(tqpalette().active().text()); + p.setPen(palette().active().text()); TQFont f = p.font(); f.setBold(true); p.setFont(f); @@ -117,7 +117,7 @@ void KPopupTitle::paintEvent(TQPaintEvent *) TQSize KPopupTitle::sizeHint() const { - return tqminimumSize(); + return minimumSize(); } class KPopupMenu::KPopupMenuPrivate diff --git a/tdeui/kprogress.cpp b/tdeui/kprogress.cpp index 34bc211d4..307689aba 100644 --- a/tdeui/kprogress.cpp +++ b/tdeui/kprogress.cpp @@ -25,7 +25,7 @@ #include <tqpainter.h> #include <tqpixmap.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqstring.h> #include <tqregexp.h> @@ -132,9 +132,9 @@ bool KProgress::setIndicator(TQString &indicator, int progress, int totalSteps) if (!totalSteps) return false; TQString newString(mFormat); - newString.replace(TQString::tqfromLatin1("%v"), + newString.replace(TQString::fromLatin1("%v"), TQString::number(progress)); - newString.replace(TQString::tqfromLatin1("%m"), + newString.replace(TQString::fromLatin1("%m"), TQString::number(totalSteps)); if (totalSteps > INT_MAX / 1000) { @@ -142,7 +142,7 @@ bool KProgress::setIndicator(TQString &indicator, int progress, int totalSteps) totalSteps /= 1000; } - newString.replace(TQString::tqfromLatin1("%p"), + newString.replace(TQString::fromLatin1("%p"), TQString::number((progress * 100) / totalSteps)); if (newString != indicator) diff --git a/tdeui/kprogressbox.cpp b/tdeui/kprogressbox.cpp index 4638f78fb..ab8c96d0a 100644 --- a/tdeui/kprogressbox.cpp +++ b/tdeui/kprogressbox.cpp @@ -26,7 +26,7 @@ #include <tqpainter.h> #include <tqpixmap.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqstring.h> #include <tqregexp.h> diff --git a/tdeui/krootpixmap.cpp b/tdeui/krootpixmap.cpp index b87e887d7..8b188c480 100644 --- a/tdeui/krootpixmap.cpp +++ b/tdeui/krootpixmap.cpp @@ -68,7 +68,7 @@ void KRootPixmap::init() m_bCustomPaint = false; connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int))); - connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(tqrepaint())); + connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(repaint())); #ifdef Q_WS_X11 connect(m_pPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool))); @@ -77,7 +77,7 @@ void KRootPixmap::init() connect(d->twin, TQT_SIGNAL(currentDesktopChanged(int)), TQT_SLOT(desktopChanged(int))); #endif - d->toplevel = m_pWidget->tqtopLevelWidget(); + d->toplevel = m_pWidget->topLevelWidget(); d->toplevel->installEventFilter(this); m_pWidget->installEventFilter(this); } @@ -115,7 +115,7 @@ void KRootPixmap::start() return; } if (m_bInit) - tqrepaint(true); + repaint(true); } @@ -136,7 +136,7 @@ void KRootPixmap::setFadeEffect(double fade, const TQColor &color) m_Fade = fade; m_FadeColor = color; - if ( m_bActive && m_bInit ) tqrepaint(true); + if ( m_bActive && m_bInit ) repaint(true); } void KRootPixmap::setBlurEffect(double radius, double sigma) @@ -170,7 +170,7 @@ bool KRootPixmap::eventFilter(TQObject *, TQEvent *event) case TQEvent::Reparent: d->toplevel->removeEventFilter(this); - d->toplevel = m_pWidget->tqtopLevelWidget(); + d->toplevel = m_pWidget->topLevelWidget(); d->toplevel->installEventFilter(this); break; @@ -188,31 +188,31 @@ void KRootPixmap::desktopChanged(int desktop) return; #ifdef Q_WS_X11 - if (KWin::windowInfo(m_pWidget->tqtopLevelWidget()->winId()).desktop() == NET::OnAllDesktops && + if (KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop() == NET::OnAllDesktops && pixmapName(m_Desk) != pixmapName(desktop)) #endif - tqrepaint(true); + repaint(true); } void KRootPixmap::desktopChanged( WId window, unsigned int properties ) { #ifdef Q_WS_X11 if( !(properties & NET::WMDesktop) || - (window != m_pWidget->tqtopLevelWidget()->winId())) + (window != m_pWidget->topLevelWidget()->winId())) return; #endif kdDebug() << k_funcinfo << endl; - tqrepaint(true); + repaint(true); } -void KRootPixmap::tqrepaint() +void KRootPixmap::repaint() { - tqrepaint(false); + repaint(false); } -void KRootPixmap::tqrepaint(bool force) +void KRootPixmap::repaint(bool force) { TQPoint p1 = m_pWidget->mapToGlobal(m_pWidget->rect().topLeft()); TQPoint p2 = m_pWidget->mapToGlobal(m_pWidget->rect().bottomRight()); @@ -233,7 +233,7 @@ void KRootPixmap::tqrepaint(bool force) } m_Rect = TQRect(p1, p2); #ifdef Q_WS_X11 - m_Desk = KWin::windowInfo(m_pWidget->tqtopLevelWidget()->winId()).desktop(); + m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop(); if (m_Desk == NET::OnAllDesktops) m_Desk = currentDesktop(); @@ -341,7 +341,7 @@ void KRootPixmap::slotBackgroundChanged(int desk) return; if (desk == m_Desk) - tqrepaint(true); + repaint(true); } #include "krootpixmap.moc" diff --git a/tdeui/krootpixmap.h b/tdeui/krootpixmap.h index 8ca135e1f..776863c46 100644 --- a/tdeui/krootpixmap.h +++ b/tdeui/krootpixmap.h @@ -159,16 +159,16 @@ public slots: * Repaints the widget background. Normally, you shouldn't need this * as it is handled automatically. * - * @param force Force a tqrepaint, even if the contents did not change. + * @param force Force a repaint, even if the contents did not change. */ - void tqrepaint( bool force ); + void repaint( bool force ); /** * Repaints the widget background. Normally, you shouldn't need this * as it is handled automatically. This is equivalent to calling - * tqrepaint( false ). + * repaint( false ). */ - void tqrepaint(); + void repaint(); /** * Enables custom handling of the background painting. If custom diff --git a/tdeui/kruler.cpp b/tdeui/kruler.cpp index 56d3703d8..fed264981 100644 --- a/tdeui/kruler.cpp +++ b/tdeui/kruler.cpp @@ -432,19 +432,19 @@ KRuler::setRulerMetricStyle(KRuler::MetricStyle style) } switch (style) { case Pixel: - setEndLabel(TQString::tqfromLatin1("pixel")); + setEndLabel(TQString::fromLatin1("pixel")); break; case Inch: - setEndLabel(TQString::tqfromLatin1("inch")); + setEndLabel(TQString::fromLatin1("inch")); break; case Millimetres: - setEndLabel(TQString::tqfromLatin1("mm")); + setEndLabel(TQString::fromLatin1("mm")); break; case Centimetres: - setEndLabel(TQString::tqfromLatin1("cm")); + setEndLabel(TQString::fromLatin1("cm")); break; case Metres: - setEndLabel(TQString::tqfromLatin1("m")); + setEndLabel(TQString::fromLatin1("m")); default: /* never reached, see above switch */ /* empty command */; } @@ -550,16 +550,16 @@ KRuler::slotNewValue(int _value) return; } // get the rectangular of the old and the new ruler pointer - // and tqrepaint only him + // and repaint only him if (dir == Qt::Horizontal) { TQRect oldrec(-5+oldvalue,10, 11,6); TQRect newrec(-5+_value,10, 11,6); - tqrepaint( oldrec.unite(newrec) ); + repaint( oldrec.unite(newrec) ); } else { TQRect oldrec(10,-5+oldvalue, 6,11); TQRect newrec(10,-5+_value, 6,11); - tqrepaint( oldrec.unite(newrec) ); + repaint( oldrec.unite(newrec) ); } } @@ -569,7 +569,7 @@ KRuler::slotNewOffset(int _offset) if (offset_ != _offset) { //setOffset(_offset); offset_ = _offset; - tqrepaint(contentsRect()); + repaint(contentsRect()); } } @@ -586,7 +586,7 @@ KRuler::slotEndOffset(int offset) } if (d->endOffset_length != tmp) { d->endOffset_length = tmp; - tqrepaint(contentsRect()); + repaint(contentsRect()); } } diff --git a/tdeui/kruler.h b/tdeui/kruler.h index 1c48a36dc..ecfcd7b3d 100644 --- a/tdeui/kruler.h +++ b/tdeui/kruler.h @@ -55,12 +55,12 @@ * To receive mouse clicks or mouse moves, * the class has to be overloaded. * - * For performance reasons, the public methods don't call TQWidget::tqrepaint(). + * For performance reasons, the public methods don't call TQWidget::repaint(). * (Slots do, see documentation below.) * All the changed settings will be painted once after leaving * to the main event loop. * For performance painting the slot methods should be used, - * they do a fast TQWidget::tqrepaint() call after changing the values. + * they do a fast TQWidget::repaint() call after changing the values. * For setting multiple values like minValue(), maxValue(), offset() etc. * using the public methods is recommended * so the widget will be painted only once when entering the main event loop. @@ -428,7 +428,7 @@ public slots: * Sets the pointer to a new position. * * The offset is NOT updated. - * TQWidget::tqrepaint() is called afterwards. + * TQWidget::repaint() is called afterwards. **/ void slotNewValue(int); @@ -436,7 +436,7 @@ public slots: * Sets the ruler marks to a new position. * * The pointer is NOT updated. - * TQWidget::tqrepaint() is called afterwards. + * TQWidget::repaint() is called afterwards. **/ void slotNewOffset(int); diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index aa2b62d49..a2f13e473 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -22,7 +22,7 @@ #include <tqcheckbox.h> #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtimer.h> #include <kapplication.h> @@ -363,8 +363,8 @@ KSpellConfig::interpret( TQString &fname, TQString &lname, } //We have explicitly chosen English as the default here. - if ( ( KGlobal::locale()->language() == TQString::tqfromLatin1("C") && - lname==TQString::tqfromLatin1("en") ) || + if ( ( KGlobal::locale()->language() == TQString::fromLatin1("C") && + lname==TQString::fromLatin1("en") ) || KGlobal::locale()->language() == lname ) return true; diff --git a/tdeui/kselect.cpp b/tdeui/kselect.cpp index 8801f5570..cda0c2685 100644 --- a/tdeui/kselect.cpp +++ b/tdeui/kselect.cpp @@ -53,7 +53,7 @@ KXYSelector::~KXYSelector() void KXYSelector::setRange( int _minX, int _minY, int _maxX, int _maxY ) { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); px = w; py = w; minX = _minX; @@ -74,7 +74,7 @@ void KXYSelector::setYValue( int _yPos ) void KXYSelector::setValues( int _xPos, int _yPos ) { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) w = 5; xPos = _xPos; @@ -98,7 +98,7 @@ void KXYSelector::setValues( int _xPos, int _yPos ) TQRect KXYSelector::contentsRect() const { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) { w = 5; } @@ -113,7 +113,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev ) TQRect paintRect = ev->rect(); TQRect borderRect = rect(); - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) { w = 5 - w; } @@ -123,7 +123,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev ) painter.begin( this ); tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, - borderRect, tqcolorGroup(), + borderRect, colorGroup(), TQStyle::Style_Sunken); drawContents( &painter ); @@ -135,7 +135,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev ) } else if (paintRect.intersects(cursorRect)) { - tqrepaint( cursorRect, false); + repaint( cursorRect, false); } painter.end(); @@ -150,7 +150,7 @@ void KXYSelector::mouseMoveEvent( TQMouseEvent *e ) { int xVal, yVal; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); valuesFromPosition( e->pos().x() - w, e->pos().y() - w, 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 { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) w = 5; xVal = ( (maxX-minX) * (x-w) ) / ( width()-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 ) { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); if (w < 5) w = 5; if ( xp < w ) xp = w; @@ -256,7 +256,7 @@ KSelector::~KSelector() TQRect KSelector::contentsRect() const { - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; if ( orientation() == Qt::Vertical ) return TQRect( w, iw, width() - w * 2 - 5, height() - 2 * iw ); @@ -267,7 +267,7 @@ TQRect KSelector::contentsRect() const void KSelector::paintEvent( TQPaintEvent * ) { TQPainter painter; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; painter.begin( this ); @@ -282,7 +282,7 @@ void KSelector::paintEvent( TQPaintEvent * ) else r.addCoords(iw - w, 0, w - iw, -iw); tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, - r, tqcolorGroup(), + r, colorGroup(), TQStyle::Style_Sunken); } @@ -329,7 +329,7 @@ void KSelector::valueChange() void KSelector::moveArrow( const TQPoint &pos ) { int val; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; if ( orientation() == Qt::Vertical ) @@ -346,7 +346,7 @@ TQPoint KSelector::calcArrowPos( int val ) { TQPoint p; - int w = tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + int w = tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; if ( orientation() == Qt::Vertical ) { @@ -374,7 +374,7 @@ void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) TQPointArray array(3); painter->setPen( TQPen() ); - painter->setBrush( TQBrush( tqcolorGroup().buttonText() ) ); + painter->setBrush( TQBrush( colorGroup().buttonText() ) ); array.setPoint( 0, pos.x()+0, pos.y()+0 ); array.setPoint( 1, pos.x()+5, pos.y()+5 ); if ( orientation() == Qt::Vertical ) @@ -392,11 +392,11 @@ void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) { if ( orientation() == Qt::Vertical ) { - tqrepaint(pos.x(), pos.y()-5, 6, 11, true); + repaint(pos.x(), pos.y()-5, 6, 11, true); } else { - tqrepaint(pos.x()-5, pos.y(), 11, 6, true); + repaint(pos.x()-5, pos.y(), 11, 6, true); } } } diff --git a/tdeui/kselect.h b/tdeui/kselect.h index cc011dcfe..58efab293 100644 --- a/tdeui/kselect.h +++ b/tdeui/kselect.h @@ -351,7 +351,7 @@ public: protected: virtual void drawContents( TQPainter * ); - virtual TQSize tqminimumSize() const + virtual TQSize minimumSize() const { return sizeHint(); } private: diff --git a/tdeui/kseparator.cpp b/tdeui/kseparator.cpp index 07d143266..2f3a1cde8 100644 --- a/tdeui/kseparator.cpp +++ b/tdeui/kseparator.cpp @@ -83,7 +83,7 @@ void KSeparator::drawFrame(TQPainter *p) { TQPoint p1, p2; TQRect r = frameRect(); - const TQColorGroup & g = tqcolorGroup(); + const TQColorGroup & g = colorGroup(); if ( frameStyle() & HLine ) { p1 = TQPoint( r.x(), r.height()/2 ); diff --git a/tdeui/ksharedpixmap.cpp b/tdeui/ksharedpixmap.cpp index d0a74f223..29c670265 100644 --- a/tdeui/ksharedpixmap.cpp +++ b/tdeui/ksharedpixmap.cpp @@ -102,7 +102,7 @@ bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect) // already active return false; - TQPixmap::resize(0, 0); // tqinvalidate + TQPixmap::resize(0, 0); // invalidate TQString str = TQString("KDESHPIXMAP:%1").arg(name); d->selection = XInternAtom(qt_xdisplay(), str.latin1(), true); diff --git a/tdeui/kshortcutdialog.cpp b/tdeui/kshortcutdialog.cpp index fbdd46519..812833dee 100644 --- a/tdeui/kshortcutdialog.cpp +++ b/tdeui/kshortcutdialog.cpp @@ -47,7 +47,7 @@ #include <tqbuttongroup.h> #include <tqcheckbox.h> #include <tqframe.h> -#include <tqlayout.h> +#include <layout.h> #include <tqradiobutton.h> #include <tqtimer.h> #include <tqvbox.h> @@ -169,8 +169,8 @@ void KShortcutDialog::updateShortcutDisplay() this->setFocus(); } - s[0].replace('&', TQString::tqfromLatin1("&&")); - s[1].replace('&', TQString::tqfromLatin1("&&")); + s[0].replace('&', TQString::fromLatin1("&&")); + s[1].replace('&', TQString::fromLatin1("&&")); m_simple->m_txtShortcut->setText( s[0] ); m_adv->m_txtPrimary->setText( s[0] ); diff --git a/tdeui/kspell.cpp b/tdeui/kspell.cpp index 9ca882962..0eb2b5b93 100644 --- a/tdeui/kspell.cpp +++ b/tdeui/kspell.cpp @@ -34,7 +34,7 @@ #endif #include <tqregexp.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqtimer.h> #include <kapplication.h> @@ -995,7 +995,7 @@ bool KSpell::check( const TQString &_buffer, bool _usedialog ) // origbuffer since I got errors otherwise if ( !origbuffer.endsWith("\n\n" ) ) { - if (origbuffer.tqat(origbuffer.length()-1)!='\n') + if (origbuffer.at(origbuffer.length()-1)!='\n') { origbuffer+='\n'; origbuffer+='\n'; //shouldn't these be removed at some point? @@ -1220,10 +1220,10 @@ void KSpell::dialog( const TQString & word, TQStringList & sugg, const char *_sl TQString marker( "_MARKER_" ); tmpBuf.replace( lastpos, word.length(), marker ); TQString context = tmpBuf.mid(QMAX(lastpos-18,0), 2*18+marker.length()); - context.replace( '\n',TQString::tqfromLatin1(" ")); - context.replace( '<', TQString::tqfromLatin1("<") ); - context.replace( '>', TQString::tqfromLatin1(">") ); - context.replace( marker, TQString::tqfromLatin1("<b>%1</b>").arg( word ) ); + context.replace( '\n',TQString::fromLatin1(" ")); + context.replace( '<', TQString::fromLatin1("<") ); + context.replace( '>', TQString::fromLatin1(">") ); + context.replace( marker, TQString::fromLatin1("<b>%1</b>").arg( word ) ); context = "<qt>" + context + "</qt>"; ksdlg->init( word, &sugg, context ); diff --git a/tdeui/kspelldlg.cpp b/tdeui/kspelldlg.cpp index d21b6975e..4bad2c3ff 100644 --- a/tdeui/kspelldlg.cpp +++ b/tdeui/kspelldlg.cpp @@ -22,7 +22,7 @@ #include <tqstringlist.h> #include <tqpushbutton.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> #include <klocale.h> diff --git a/tdeui/kspellui.ui b/tdeui/kspellui.ui index 18b755117..ac1deecd7 100644 --- a/tdeui/kspellui.ui +++ b/tdeui/kspellui.ui @@ -87,7 +87,7 @@ <property name="text"> <string>... the <b>misspelled</b> word shown in context ...</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignCenter</set> </property> <property name="toolTip" stdset="0"> diff --git a/tdeui/ksqueezedtextlabel.cpp b/tdeui/ksqueezedtextlabel.cpp index 63d85ab8f..f44b38916 100644 --- a/tdeui/ksqueezedtextlabel.cpp +++ b/tdeui/ksqueezedtextlabel.cpp @@ -73,11 +73,11 @@ void KSqueezedTextLabel::squeezeTextToLabel() { } } -void KSqueezedTextLabel::setAlignment( int tqalignment ) +void KSqueezedTextLabel::setAlignment( int alignment ) { // save fullText and restore it TQString tmpFull(fullText); - TQLabel::setAlignment(tqalignment); + TQLabel::setAlignment(alignment); fullText = tmpFull; } diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index 696f1294c..b70c8ae9c 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -65,8 +65,8 @@ KStatusBar::KStatusBar( TQWidget *parent, const char *name ) // ...but off by default (sven) KConfig *config = KGlobal::config(); TQString group(config->group()); - config->setGroup(TQString::tqfromLatin1("StatusBar style")); - bool grip_enabled = config->readBoolEntry(TQString::tqfromLatin1("SizeGripEnabled"), false); + config->setGroup(TQString::fromLatin1("StatusBar style")); + bool grip_enabled = config->readBoolEntry(TQString::fromLatin1("SizeGripEnabled"), false); setSizeGripEnabled(grip_enabled); config->setGroup(group); } diff --git a/tdeui/kstatusbar.h b/tdeui/kstatusbar.h index c481a551a..a1b89d0a7 100644 --- a/tdeui/kstatusbar.h +++ b/tdeui/kstatusbar.h @@ -167,7 +167,7 @@ public: void changeItem( const TQString& text, int id ); /** - * Sets the tqalignment of item @p id. By default all fields are aligned + * Sets the alignment of item @p id. By default all fields are aligned * @p AlignHCenter | @p AlignVCenter. See TQLabel::setAlignment for details. * */ diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index e9a87d71d..e1adac16a 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -72,7 +72,7 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch else aboutData = KGlobal::instance()->aboutData(); */ - TQString appName = (aboutData) ? aboutData->programName() : TQString::tqfromLatin1(tqApp->name()); + TQString appName = (aboutData) ? aboutData->programName() : TQString::fromLatin1(tqApp->name()); sLabel = i18n(pInfo->psLabel).arg(appName); } break; diff --git a/tdeui/kstdguiitem.cpp b/tdeui/kstdguiitem.cpp index fa9d99341..2367804a8 100644 --- a/tdeui/kstdguiitem.cpp +++ b/tdeui/kstdguiitem.cpp @@ -62,34 +62,34 @@ KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum ) TQString KStdGuiItem::stdItem( StdItem ui_enum ) { switch (ui_enum ) { - case Ok : return TQString::tqfromLatin1("ok"); - case Cancel : return TQString::tqfromLatin1("cancel"); - case Yes : return TQString::tqfromLatin1("yes"); - case No : return TQString::tqfromLatin1("no"); - case Discard : return TQString::tqfromLatin1("discard"); - case Save : return TQString::tqfromLatin1("save"); - case DontSave : return TQString::tqfromLatin1("dontSave"); - case SaveAs : return TQString::tqfromLatin1("saveAs"); - case Apply : return TQString::tqfromLatin1("apply"); - case Help : return TQString::tqfromLatin1("help"); - case Close : return TQString::tqfromLatin1("close"); - case Defaults : return TQString::tqfromLatin1("defaults"); - case Back : return TQString::tqfromLatin1("back"); - case Forward : return TQString::tqfromLatin1("forward"); - case Print : return TQString::tqfromLatin1("print"); - case Continue : return TQString::tqfromLatin1("continue"); - case Open : return TQString::tqfromLatin1("open"); - case Quit : return TQString::tqfromLatin1("quit"); - case AdminMode: return TQString::tqfromLatin1("adminMode"); - case Delete : return TQString::tqfromLatin1("delete"); - case Insert : return TQString::tqfromLatin1("insert"); - case Find : return TQString::tqfromLatin1("find"); - case Stop : return TQString::tqfromLatin1("stop"); - case Add : return TQString::tqfromLatin1("add"); - case Remove : return TQString::tqfromLatin1("remove"); - case Test : return TQString::tqfromLatin1("test"); - case Properties : return TQString::tqfromLatin1("properties"); - case Overwrite : return TQString::tqfromLatin1("overwrite"); + case Ok : return TQString::fromLatin1("ok"); + case Cancel : return TQString::fromLatin1("cancel"); + case Yes : return TQString::fromLatin1("yes"); + case No : return TQString::fromLatin1("no"); + case Discard : return TQString::fromLatin1("discard"); + case Save : return TQString::fromLatin1("save"); + case DontSave : return TQString::fromLatin1("dontSave"); + case SaveAs : return TQString::fromLatin1("saveAs"); + case Apply : return TQString::fromLatin1("apply"); + case Help : return TQString::fromLatin1("help"); + case Close : return TQString::fromLatin1("close"); + case Defaults : return TQString::fromLatin1("defaults"); + case Back : return TQString::fromLatin1("back"); + case Forward : return TQString::fromLatin1("forward"); + case Print : return TQString::fromLatin1("print"); + case Continue : return TQString::fromLatin1("continue"); + case Open : return TQString::fromLatin1("open"); + case Quit : return TQString::fromLatin1("quit"); + case AdminMode: return TQString::fromLatin1("adminMode"); + case Delete : return TQString::fromLatin1("delete"); + case Insert : return TQString::fromLatin1("insert"); + case Find : return TQString::fromLatin1("find"); + case Stop : return TQString::fromLatin1("stop"); + case Add : return TQString::fromLatin1("add"); + case Remove : return TQString::fromLatin1("remove"); + case Test : return TQString::fromLatin1("test"); + case Properties : return TQString::fromLatin1("properties"); + case Overwrite : return TQString::fromLatin1("overwrite"); default : return TQString::null; }; } diff --git a/tdeui/kswitchlanguagedialog.cpp b/tdeui/kswitchlanguagedialog.cpp index fa43dcaf2..20098d5e3 100644 --- a/tdeui/kswitchlanguagedialog.cpp +++ b/tdeui/kswitchlanguagedialog.cpp @@ -21,7 +21,7 @@ #include "kswitchlanguagedialog.h" -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqlabel.h> #include <tqmap.h> diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 5e334ac11..e118fcd74 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -148,14 +148,14 @@ int KSyntaxHighlighter::highlightParagraph( const TQString &text, int ) } TQString simplified = text; - simplified = TQString(simplified.replace( TQRegExp( "\\s" ), TQString() )).replace( '|', TQString::tqfromLatin1(">") ); - while ( simplified.startsWith( TQString::tqfromLatin1(">>>>") ) ) + simplified = TQString(simplified.replace( TQRegExp( "\\s" ), TQString() )).replace( '|', TQString::fromLatin1(">") ); + while ( simplified.startsWith( TQString::fromLatin1(">>>>") ) ) simplified = simplified.mid(3); - if ( simplified.startsWith( TQString::tqfromLatin1(">>>") ) || simplified.startsWith( TQString::tqfromLatin1("> > >") ) ) + if ( simplified.startsWith( TQString::fromLatin1(">>>") ) || simplified.startsWith( TQString::fromLatin1("> > >") ) ) setFormat( 0, text.length(), d->col2 ); - else if ( simplified.startsWith( TQString::tqfromLatin1(">>") ) || simplified.startsWith( TQString::tqfromLatin1("> >") ) ) + else if ( simplified.startsWith( TQString::fromLatin1(">>") ) || simplified.startsWith( TQString::fromLatin1("> >") ) ) setFormat( 0, text.length(), d->col3 ); - else if ( simplified.startsWith( TQString::tqfromLatin1(">") ) ) + else if ( simplified.startsWith( TQString::fromLatin1(">") ) ) setFormat( 0, text.length(), d->col4 ); else setFormat( 0, text.length(), d->col5 ); diff --git a/tdeui/ksyntaxhighlighter.h b/tdeui/ksyntaxhighlighter.h index 6ac4264ab..ba33c245c 100644 --- a/tdeui/ksyntaxhighlighter.h +++ b/tdeui/ksyntaxhighlighter.h @@ -24,7 +24,7 @@ #ifndef KSYNTAXHIGHLIGHTER_H #define KSYNTAXHIGHLIGHTER_H -#include <tqtextedit.h> +#include <textedit.h> #include <tqsyntaxhighlighter.h> #include <tqcolor.h> #include <tqstringlist.h> diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index dec85b7e8..100f86df8 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -69,7 +69,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) d->actionCollection = new KActionCollection(this); #ifdef Q_WS_X11 - KWin::setSystemTrayWindowFor( winId(), parent?parent->tqtopLevelWidget()->winId(): qt_xrootwin() ); + KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): qt_xrootwin() ); #endif setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); @@ -96,7 +96,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) d->on_all_desktops = false; } setCaption( KGlobal::instance()->aboutData()->programName()); - setAlignment( tqalignment() | Qt::AlignVCenter | Qt::AlignHCenter ); + setAlignment( alignment() | Qt::AlignVCenter | Qt::AlignHCenter ); // Handle the possibility that the requested system tray size is something other than 22x22 pixels, per the Free Desktop specifications setScaledContents(true); diff --git a/tdeui/ktabbar.cpp b/tdeui/ktabbar.cpp index eed23ebfe..e88c1f81e 100644 --- a/tdeui/ktabbar.cpp +++ b/tdeui/ktabbar.cpp @@ -67,7 +67,7 @@ void KTabBar::setTabEnabled( int id, bool enabled ) if ( !enabled && id == currentTab() && count()>1 ) { TQPtrList<TQTab> *tablist = tabList(); if ( mTabCloseActivatePrevious ) - t = tablist->tqat( count()-2 ); + t = tablist->at( count()-2 ); else { int index = indexOf( id ); index += ( index+1 == count() ) ? -1 : 1; @@ -80,7 +80,7 @@ void KTabBar::setTabEnabled( int id, bool enabled ) emit selected( t->identifier() ); } } - tqrepaint( r ); + repaint( r ); } } } @@ -172,8 +172,8 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) int xoff = 0, yoff = 0; // The additional offsets were found by try and error, TODO: find the rational behind them if ( t == tab( currentTab() ) ) { - xoff = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3; - yoff = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4; + xoff = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3; + yoff = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4; } else { xoff = 7; @@ -253,7 +253,7 @@ void KTabBar::dragMoveEvent( TQDragMoveEvent *e ) TQTab *tab = selectTab( e->pos() ); if( tab ) { bool accept = false; - // The tqreceivers of the testCanDecode() signal has to adjust + // The receivers of the testCanDecode() signal has to adjust // 'accept' accordingly. emit testCanDecode( e, accept); if ( accept && tab != TQTabBar::tab( currentTab() ) ) { @@ -294,7 +294,7 @@ void KTabBar::setTabColor( int id, const TQColor& color ) TQTab *t = tab( id ); if ( t ) { mTabColors.insert( id, color ); - tqrepaint( t->rect(), false ); + repaint( t->rect(), false ); } } @@ -303,7 +303,7 @@ const TQColor &KTabBar::tabColor( int id ) const if ( mTabColors.contains( id ) ) return mTabColors[id]; - return tqcolorGroup().foreground(); + return colorGroup().foreground(); } int KTabBar::insertTab( TQTab *t, int index ) @@ -341,8 +341,8 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br, r.setLeft( r.left() + pixw + 4 ); r.setRight( r.right() + 2 ); - int inactiveXShift = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ); - int inactiveYShift = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ); + int inactiveXShift = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ); + int inactiveYShift = tqstyle().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ); int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2; @@ -358,12 +358,12 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br, if ( has_focus ) flags |= TQStyle::Style_HasFocus; - TQColorGroup cg( tqcolorGroup() ); + TQColorGroup cg( colorGroup() ); if ( mTabColors.contains( t->identifier() ) ) cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] ); - tqstyle().tqdrawControl( TQStyle::CE_TabBarLabel, p, this, r, - t->isEnabled() ? cg : tqpalette().disabled(), + tqstyle().drawControl( TQStyle::CE_TabBarLabel, p, this, r, + t->isEnabled() ? cg : palette().disabled(), flags, TQStyleOption(t) ); } diff --git a/tdeui/ktabctl.cpp b/tdeui/ktabctl.cpp index 204a0979e..0ff9f64e4 100644 --- a/tdeui/ktabctl.cpp +++ b/tdeui/ktabctl.cpp @@ -56,8 +56,8 @@ void KTabCtl::resizeEvent(TQResizeEvent *) for (i=0; i<(int)pages.size(); i++) { pages[i]->setGeometry(r); } - if( ( tabs->tqshape() == TQTabBar::RoundedBelow ) || - ( tabs->tqshape() == TQTabBar::TriangularBelow ) ) { + if( ( tabs->shape() == TQTabBar::RoundedBelow ) || + ( tabs->shape() == TQTabBar::TriangularBelow ) ) { tabs->move( 0, height()-tabs->height()-4 ); } } @@ -104,7 +104,7 @@ bool KTabCtl::isTabEnabled(const TQString& name) unsigned int i; for(i = 0; i < pages.size(); i++) - if (TQString::tqfromLatin1(pages[i]->name()) == name) + if (TQString::fromLatin1(pages[i]->name()) == name) return tabs->isTabEnabled(i); /* return the enabled status */ return false; /* tab does not exist */ } @@ -117,7 +117,7 @@ void KTabCtl::setTabEnabled(const TQString& name, bool state) return; for (i = 0; i < pages.size(); i++) - if (TQString::tqfromLatin1(pages[i]->name()) == name) + if (TQString::fromLatin1(pages[i]->name()) == name) tabs->setTabEnabled(i, state); } @@ -138,14 +138,14 @@ void KTabCtl::setSizes() * check the actual minimum and maximum sizes */ - if (pages[i]->tqmaximumSize().height() < max.height()) - max.setHeight(pages[i]->tqmaximumSize().height()); - if (pages[i]->tqmaximumSize().width() < max.width()) - max.setWidth( pages[i]->tqmaximumSize().width()); - if ( pages[i]->tqminimumSize().height() > min.height()) - min.setHeight( pages[i]->tqminimumSize().height()); - if ( pages[i]->tqminimumSize().width() > min.width()) - min.setWidth( pages[i]->tqminimumSize().width()); + if (pages[i]->maximumSize().height() < max.height()) + max.setHeight(pages[i]->maximumSize().height()); + if (pages[i]->maximumSize().width() < max.width()) + max.setWidth( pages[i]->maximumSize().width()); + if ( pages[i]->minimumSize().height() > min.height()) + min.setHeight( pages[i]->minimumSize().height()); + if ( pages[i]->minimumSize().width() > min.width()) + min.setWidth( pages[i]->minimumSize().width()); } // BL: min and max are sizes of children, not tabcontrol @@ -184,9 +184,9 @@ void KTabCtl::setBorder( bool state ) blBorder = state; } -void KTabCtl::setShape( TQTabBar::Shape tqshape ) +void KTabCtl::setShape( TQTabBar::Shape shape ) { - tabs->setShape( tqshape ); + tabs->setShape( shape ); } TQSize @@ -251,16 +251,16 @@ void KTabCtl::paintEvent(TQPaintEvent *) int x1 = getChildRect().right() + 2; int x0 = getChildRect().left() - 1; - p.setPen(tqcolorGroup().light()); + p.setPen(colorGroup().light()); p.drawLine(x0, y0 - 1, x1 - 1, y0 - 1); /* 1st top line */ - p.setPen(tqcolorGroup().midlight()); + p.setPen(colorGroup().midlight()); p.drawLine(x0, y0, x1 - 1, y0); /* 2nd top line */ - p.setPen(tqcolorGroup().light()); + p.setPen(colorGroup().light()); p.drawLine(x0, y0 + 1, x0, y1); /* left line */ p.setPen(black); p.drawLine(x1, y1, x0, y1); /* bottom line */ p.drawLine(x1, y1 - 1, x1, y0); - p.setPen(tqcolorGroup().dark()); + p.setPen(colorGroup().dark()); p.drawLine(x0 + 1, y1 - 1, x1 - 1, y1 - 1); /* bottom */ p.drawLine(x1 - 1, y1 - 2, x1 - 1, y0 + 1); p.end(); @@ -273,8 +273,8 @@ void KTabCtl::paintEvent(TQPaintEvent *) TQRect KTabCtl::getChildRect() const { - if( ( tabs->tqshape() == TQTabBar::RoundedBelow ) || - ( tabs->tqshape() == TQTabBar::TriangularBelow ) ) { + if( ( tabs->shape() == TQTabBar::RoundedBelow ) || + ( tabs->shape() == TQTabBar::TriangularBelow ) ) { return TQRect(2, 1, width() - 4, height() - tabs->height() - 4); } else { diff --git a/tdeui/ktabctl.h b/tdeui/ktabctl.h index d18da9750..28de4805b 100644 --- a/tdeui/ktabctl.h +++ b/tdeui/ktabctl.h @@ -61,7 +61,7 @@ public: bool isTabEnabled(const TQString& ); void setTabEnabled(const TQString&, bool); void setBorder(bool); - void setShape( TQTabBar::Shape tqshape ); + void setShape( TQTabBar::Shape shape ); virtual TQSize sizeHint() const; protected: diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp index 36410921e..b0b721c3d 100644 --- a/tdeui/ktabwidget.cpp +++ b/tdeui/ktabwidget.cpp @@ -20,7 +20,7 @@ #include <tqapplication.h> #include <tqstyle.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <kconfig.h> #include <kiconloader.h> @@ -95,7 +95,7 @@ void KTabWidget::insertTab( TQWidget *child, TQTab *tab, int index ) resizeTabs( d->m_tabNames.count()-1 ); } else { - d->m_tabNames.insert( d->m_tabNames.tqat( index ), tab->text() ); + d->m_tabNames.insert( d->m_tabNames.at( index ), tab->text() ); resizeTabs( index ); } } @@ -163,8 +163,8 @@ bool KTabWidget::tabCloseActivatePrevious() const unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength ) { int hframe, overlap; - hframe = tabBar()->tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() ); - overlap = tabBar()->tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() ); + hframe = tabBar()->tqstyle().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() ); + overlap = tabBar()->tqstyle().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() ); TQFontMetrics fm = tabBar()->fontMetrics(); int x = 0; @@ -301,7 +301,7 @@ void KTabWidget::dragMoveEvent( TQDragMoveEvent *e ) { if ( isEmptyTabbarSpace( e->pos() ) ) { bool accept = false; - // The tqreceivers of the testCanDecode() signal has to adjust + // The receivers of the testCanDecode() signal has to adjust // 'accept' accordingly. emit testCanDecode( e, accept); e->accept( accept ); @@ -422,7 +422,7 @@ void KTabWidget::moveTab( int from, int to ) if ( to < 0 || to >= count() ) d->m_tabNames.append( TQString::null ); else - d->m_tabNames.insert( d->m_tabNames.tqat( to ), TQString::null ); + d->m_tabNames.insert( d->m_tabNames.at( to ), TQString::null ); } w = page( to ); @@ -441,7 +441,7 @@ void KTabWidget::removePage( TQWidget * w ) { if ( d->m_automaticResizeTabs ) { int index = indexOf( w ); if ( index != -1 ) - d->m_tabNames.remove( d->m_tabNames.tqat( index ) ); + d->m_tabNames.remove( d->m_tabNames.at( index ) ); } TQTabWidget::removePage( w ); if ( d->m_automaticResizeTabs ) diff --git a/tdeui/ktextbrowser.h b/tdeui/ktextbrowser.h index 32c81bd47..609a33b3f 100644 --- a/tdeui/ktextbrowser.h +++ b/tdeui/ktextbrowser.h @@ -20,7 +20,7 @@ #ifndef _KTEXT_BROWSER_H_ #define _KTEXT_BROWSER_H_ -#include <tqtextbrowser.h> +#include <textbrowser.h> #include <tdelibs_export.h> diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index 73bbf3c5f..07b847e0f 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -20,7 +20,7 @@ #include "ktextedit.h" #include <tqapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqpopupmenu.h> #include <ksyntaxhighlighter.h> @@ -172,7 +172,7 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) } else if ( KStdAccel::pasteSelection().contains( key ) ) { - TQString text = TQApplication::tqclipboard()->text( TQClipboard::Selection); + TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); if ( !text.isEmpty() ) insert( text ); e->accept(); @@ -182,7 +182,7 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) // ignore Ctrl-Return so that KDialogs can close the dialog else if ( e->state() == ControlButton && (e->key() == Key_Return || e->key() == Key_Enter) && - tqtopLevelWidget()->inherits( "KDialog" ) ) + topLevelWidget()->inherits( "KDialog" ) ) { e->ignore(); return; diff --git a/tdeui/ktextedit.h b/tdeui/ktextedit.h index 930409b04..30a0ca480 100644 --- a/tdeui/ktextedit.h +++ b/tdeui/ktextedit.h @@ -20,7 +20,7 @@ #ifndef KTEXTEDIT_H #define KTEXTEDIT_H -#include <tqtextedit.h> +#include <textedit.h> #include <tdelibs_export.h> diff --git a/tdeui/ktimewidget.cpp b/tdeui/ktimewidget.cpp index 4d48b2129..a822c31ee 100644 --- a/tdeui/ktimewidget.cpp +++ b/tdeui/ktimewidget.cpp @@ -1,5 +1,5 @@ #include <tqdatetimeedit.h> -#include <tqlayout.h> +#include <layout.h> #include "kdebug.h" #include "kdialog.h" diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index 70290f62c..fba5174fc 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -27,10 +27,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqfile.h> #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqregexp.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqimage.h> #include <kaboutdata.h> @@ -59,7 +59,7 @@ KTipDatabase::KTipDatabase(const TQString &_tipFile) { TQString tipFile = _tipFile; if (tipFile.isEmpty()) - tipFile = TQString::tqfromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"; + tipFile = TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"; loadTips(tipFile); @@ -72,7 +72,7 @@ KTipDatabase::KTipDatabase( const TQStringList& tipsFiles ) { if ( tipsFiles.isEmpty() || ( ( tipsFiles.count() == 1 ) && tipsFiles.first().isEmpty() ) ) { - addTips(TQString::tqfromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"); + addTips(TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"); } else { @@ -347,10 +347,10 @@ void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bo const int oneDay = 24*60*60; TQDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown"); // Show tip roughly once a week - if (lastShown.secsTo(TQDateTime::tqcurrentDateTime()) < (oneDay + (kapp->random() % (10*oneDay)))) + if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay)))) return; } - configGroup.writeEntry("TipLastShown", TQDateTime::tqcurrentDateTime()); + configGroup.writeEntry("TipLastShown", TQDateTime::currentDateTime()); kapp->config()->sync(); if (!hasLastShown) return; // Don't show tip on first start @@ -384,7 +384,7 @@ static TQString fixTip(TQString tip) void KTipDialog::prevTip() { mDatabase->prevTip(); - TQString currentTip = TQString::tqfromLatin1( + TQString currentTip = TQString::fromLatin1( "<qt text=\"%1\" bgcolor=\"%2\">%3</qt>") .arg(mTextColor.name()) .arg(mBaseColor.name()) @@ -399,7 +399,7 @@ static TQString fixTip(TQString tip) void KTipDialog::nextTip() { mDatabase->nextTip(); - TQString currentTip = TQString::tqfromLatin1( + TQString currentTip = TQString::fromLatin1( "<qt text=\"%1\" bgcolor=\"%2\">%3</qt>") .arg(mTextColor.name()) .arg(mBaseColor.name()) diff --git a/tdeui/ktoolbar.cpp b/tdeui/ktoolbar.cpp index ee531e102..f474064dd 100644 --- a/tdeui/ktoolbar.cpp +++ b/tdeui/ktoolbar.cpp @@ -40,7 +40,7 @@ #include <tqobjectlist.h> #include <tqtimer.h> #include <tqstyle.h> -#include <tqlayout.h> +#include <layout.h> #include <ktoolbar.h> #include <kmainwindow.h> @@ -170,7 +170,7 @@ void KToolBarSeparator::drawContents( TQPainter* p ) flags = flags | TQStyle::Style_Horizontal; tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, p, - contentsRect(), tqcolorGroup(), flags); + contentsRect(), colorGroup(), flags); } else { TQFrame::drawContents(p); } @@ -183,7 +183,7 @@ void KToolBarSeparator::styleChange( TQStyle& ) TQSize KToolBarSeparator::sizeHint() const { - int dim = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); + int dim = tqstyle().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); } @@ -193,7 +193,7 @@ TQSizePolicy KToolBarSeparator::sizePolicy() const } KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) - : TQToolBar( TQString::tqfromLatin1( name ), + : TQToolBar( TQString::fromLatin1( name ), tqt_dynamic_cast<TQMainWindow*>(parent), parent, false, name ? name : "mainToolBar") @@ -202,7 +202,7 @@ KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool re } KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) - : TQToolBar( TQString::tqfromLatin1( name ), + : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") { @@ -210,7 +210,7 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, } KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) - : TQToolBar( TQString::tqfromLatin1( name ), + : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") { @@ -734,7 +734,7 @@ int KToolBar::itemIndex (int id) int KToolBar::idAt (int index) { - TQWidget *w = widgets.tqat(index); + TQWidget *w = widgets.at(index); return widget2id[w]; } @@ -856,11 +856,11 @@ void KToolBar::setIconText(IconText icontext, bool update) // ugly hack to force a TQMainWindow::triggerLayout( true ) TQMainWindow *mw = mainWindow(); if ( mw ) { - mw->tqsetUpdatesEnabled( false ); + mw->setUpdatesEnabled( false ); // mw->setToolBarsMovable( !mw->toolBarsMovable() ); // Old way // mw->setToolBarsMovable( !mw->toolBarsMovable() ); mw->setCentralWidget(mw->centralWidget()); // This is a faster hack - mw->tqsetUpdatesEnabled( true ); + mw->setUpdatesEnabled( true ); } } @@ -894,11 +894,11 @@ void KToolBar::setIconSize(int size, bool update) // ugly hack to force a TQMainWindow::triggerLayout( true ) if ( mainWindow() ) { TQMainWindow *mw = mainWindow(); - mw->tqsetUpdatesEnabled( false ); + mw->setUpdatesEnabled( false ); // mw->setToolBarsMovable( !mw->toolBarsMovable() ); // Old way // mw->setToolBarsMovable( !mw->toolBarsMovable() ); mw->setCentralWidget(mw->centralWidget()); // This is a faster hack - mw->tqsetUpdatesEnabled( true ); + mw->setUpdatesEnabled( true ); } } @@ -1263,7 +1263,7 @@ void KToolBar::rebuildLayout() if ( stretchableWidget ) l->setStretchFactor( stretchableWidget, 10 ); } - l->tqinvalidate(); + l->invalidate(); TQApplication::postEvent( this, new TQEvent( TQEvent::LayoutHint ) ); } @@ -1358,12 +1358,12 @@ TQSize KToolBar::sizeHint() const for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); - if ( w->tqsizePolicy().horData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().horData() == TQSizePolicy::Ignored ) sh.setWidth( 1 ); - if ( w->tqsizePolicy().verData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().verData() == TQSizePolicy::Ignored ) sh.setHeight( 1 ); - sh = sh.boundedTo( w->tqmaximumSize() ) - .expandedTo( w->tqminimumSize() ).expandedTo( TQSize(1, 1) ); + sh = sh.boundedTo( w->maximumSize() ) + .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) ); minSize = minSize.expandedTo(TQSize(0, sh.height())); minSize += TQSize(sh.width()+1, 0); @@ -1371,7 +1371,7 @@ TQSize KToolBar::sizeHint() const minSize += TQSize(2, 0); // A little bit extra spacing behind it. } - minSize += TQSize(TQApplication::tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0); + minSize += TQSize(TQApplication::tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0); minSize += TQSize(margin*2, margin*2); break; @@ -1380,17 +1380,17 @@ TQSize KToolBar::sizeHint() const for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); - if ( w->tqsizePolicy().horData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().horData() == TQSizePolicy::Ignored ) sh.setWidth( 1 ); - if ( w->tqsizePolicy().verData() == TQSizePolicy::Ignored ) + if ( w->sizePolicy().verData() == TQSizePolicy::Ignored ) sh.setHeight( 1 ); - sh = sh.boundedTo( w->tqmaximumSize() ) - .expandedTo( w->tqminimumSize() ).expandedTo( TQSize(1, 1) ); + sh = sh.boundedTo( w->maximumSize() ) + .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) ); minSize = minSize.expandedTo(TQSize(sh.width(), 0)); minSize += TQSize(0, sh.height()+1); } - minSize += TQSize(0, TQApplication::tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent )); + minSize += TQSize(0, TQApplication::tqstyle().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); minSize += TQSize(margin*2, margin*2); break; @@ -1401,7 +1401,7 @@ TQSize KToolBar::sizeHint() const return minSize; } -TQSize KToolBar::tqminimumSize() const +TQSize KToolBar::minimumSize() const { return minimumSizeHint(); } @@ -1429,7 +1429,7 @@ void KToolBar::show() void KToolBar::resizeEvent( TQResizeEvent *e ) { bool b = isUpdatesEnabled(); - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); TQToolBar::resizeEvent( e ); if (b) { @@ -1446,7 +1446,7 @@ void KToolBar::resizeEvent( TQResizeEvent *e ) } // else { // printf("[WARNING] In KToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); -// tqsetUpdatesEnabled( true ); +// setUpdatesEnabled( true ); // } } @@ -1486,25 +1486,25 @@ void KToolBar::slotAppearanceChanged() //static bool KToolBar::highlightSetting() { - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - return KGlobal::config()->readBoolEntry(TQString::tqfromLatin1("Highlighting"),true); + return KGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true); } //static bool KToolBar::transparentSetting() { - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - return KGlobal::config()->readBoolEntry(TQString::tqfromLatin1("TransparentMoving"),true); + return KGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true); } //static KToolBar::IconText KToolBar::iconTextSetting() { - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - TQString icontext = KGlobal::config()->readEntry(TQString::tqfromLatin1("IconText"),TQString::tqfromLatin1("IconOnly")); + TQString icontext = KGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly")); if ( icontext == "IconTextRight" ) return IconTextRight; else if ( icontext == "IconTextBottom" ) @@ -1546,7 +1546,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG TQString iconText = d->IconTextDefault; // this is the first iteration - TQString grpToolbar(TQString::tqfromLatin1("Toolbar style")); + TQString grpToolbar(TQString::fromLatin1("Toolbar style")); { // start block for KConfigGroupSaver KConfigGroupSaver saver(gconfig, grpToolbar); @@ -1732,15 +1732,15 @@ bool KToolBar::event( TQEvent *e ) void KToolBar::slotRepaint() { - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); // Send a resizeEvent to update the "toolbar extension arrow" // (The button you get when your toolbar-items don't fit in // the available space) TQResizeEvent ev(size(), size()); resizeEvent(&ev); TQApplication::sendPostedEvents( this, TQEvent::LayoutHint ); - tqsetUpdatesEnabled( true ); - tqrepaint( true ); + setUpdatesEnabled( true ); + repaint( true ); } void KToolBar::toolBarPosChanged( TQToolBar *tb ) diff --git a/tdeui/ktoolbar.h b/tdeui/ktoolbar.h index 96d0872bc..947fd3bab 100644 --- a/tdeui/ktoolbar.h +++ b/tdeui/ktoolbar.h @@ -91,7 +91,7 @@ private: * Once you have a KToolBar object, you can insert items into it with the * insert... methods, or remove them with the removeItem() method. This * can be done at any time; the toolbar will be automatically updated. - * There are also many methods to set per-child properties like tqalignment + * There are also many methods to set per-child properties like alignment * and toggle behavior. * * KToolBar uses a global config group to load toolbar settings on @@ -947,7 +947,7 @@ public: bool highlight() const; TQSize sizeHint() const; TQSize minimumSizeHint() const; - TQSize tqminimumSize() const; + TQSize minimumSize() const; void hide(); void show(); diff --git a/tdeui/ktoolbarbutton.cpp b/tdeui/ktoolbarbutton.cpp index b7801a2f8..91bc5d253 100644 --- a/tdeui/ktoolbarbutton.cpp +++ b/tdeui/ktoolbarbutton.cpp @@ -36,7 +36,7 @@ #include <tqpopupmenu.h> #include <tqcursor.h> #include <tqpainter.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> #include <kdebug.h> @@ -263,7 +263,7 @@ void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) return; TQString txt(text); - if (txt.endsWith(TQString::tqfromLatin1("..."))) + if (txt.endsWith(TQString::fromLatin1("..."))) txt.truncate(txt.length() - 3); TQToolButton::setTextLabel(txt, tipToo); @@ -376,7 +376,7 @@ void KToolBarButton::leaveEvent(TQEvent *) { d->m_isRaised = false; d->m_isActive = false; - tqrepaint(false); + repaint(false); } emit highlighted(d->m_id, false); @@ -398,7 +398,7 @@ void KToolBarButton::enterEvent(TQEvent *) d->m_isActive = false; } - tqrepaint(false); + repaint(false); } emit highlighted(d->m_id, true); } @@ -494,8 +494,8 @@ void KToolBarButton::drawButton( TQPainter *_painter ) if (hasFocus()) flags |= TQStyle::Style_HasFocus; // Draw a styled toolbutton - tqstyle().tqdrawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(), - tqcolorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption()); + tqstyle().drawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(), + colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption()); int dx, dy; TQFont tmp_font(KGlobalSettings::toolBarFont()); @@ -513,7 +513,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) { dx = ( width() - pixmap.width() ) / 2; dy = ( height() - pixmap.height() ) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -531,7 +531,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) { dx = 4; dy = ( height() - pixmap.height() ) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -547,7 +547,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) else dx = 4; dy = 0; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -562,7 +562,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textFlags = AlignVCenter|AlignLeft; dx = (width() - fm.width(textLabel())) / 2; dy = (height() - fm.lineSpacing()) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -580,7 +580,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) { dx = (width() - pixmap.width()) / 2; dy = (height() - fm.lineSpacing() - pixmap.height()) / 2; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -594,7 +594,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) dx = (width() - fm.width(textLabel())) / 2; dy = height() - fm.lineSpacing() - 4; - if ( isDown() && tqstyle().tqstyleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) + if ( isDown() && tqstyle().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) { ++dx; ++dy; @@ -608,11 +608,11 @@ void KToolBarButton::drawButton( TQPainter *_painter ) { _painter->setFont(KGlobalSettings::toolBarFont()); if (!isEnabled()) - _painter->setPen(tqpalette().disabled().dark()); + _painter->setPen(palette().disabled().dark()); else if(d->m_isRaised) _painter->setPen(KGlobalSettings::toolBarHighlightColor()); else - _painter->setPen( tqcolorGroup().buttonText() ); + _painter->setPen( colorGroup().buttonText() ); _painter->drawText(textRect, textFlags, textLabel()); } @@ -624,7 +624,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, - TQRect(width()-7, height()-7, 7, 7), tqcolorGroup(), + TQRect(width()-7, height()-7, 7, 7), colorGroup(), arrowFlags, TQStyleOption() ); } } @@ -634,7 +634,7 @@ void KToolBarButton::paletteChange(const TQPalette &) if(!d->m_isSeparator) { modeChange(); - tqrepaint(false); // no need to delete it first therefore only false + repaint(false); // no need to delete it first therefore only false } } @@ -698,7 +698,7 @@ void KToolBarButton::setNoStyle(bool no_style) modeChange(); d->m_iconText = KToolBar::IconTextRight; - tqrepaint(false); + repaint(false); } void KToolBarButton::setRadio (bool f) @@ -716,13 +716,13 @@ void KToolBarButton::on(bool flag) setDown(flag); leaveEvent((TQEvent *) 0); } - tqrepaint(); + repaint(); } void KToolBarButton::toggle() { setOn(!isOn()); - tqrepaint(); + repaint(); } void KToolBarButton::setToggle(bool flag) @@ -744,7 +744,7 @@ TQSize KToolBarButton::minimumSizeHint() const return d->size; } -TQSize KToolBarButton::tqminimumSize() const +TQSize KToolBarButton::minimumSize() const { return d->size; } diff --git a/tdeui/ktoolbarbutton.h b/tdeui/ktoolbarbutton.h index 9f02a1f6b..e1da25ae8 100644 --- a/tdeui/ktoolbarbutton.h +++ b/tdeui/ktoolbarbutton.h @@ -294,7 +294,7 @@ protected: void showMenu(); TQSize sizeHint() const; TQSize minimumSizeHint() const; - TQSize tqminimumSize() const; + TQSize minimumSize() const; /// @since 3.1 bool isRaised() const; diff --git a/tdeui/ktoolbarhandler.cpp b/tdeui/ktoolbarhandler.cpp index 34bfe7046..bdeba7281 100644 --- a/tdeui/ktoolbarhandler.cpp +++ b/tdeui/ktoolbarhandler.cpp @@ -209,7 +209,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) if ( domDocument().documentElement().isNull() ) { - TQString completeDescription = TQString::tqfromLatin1( guiDescription ) + TQString completeDescription = TQString::fromLatin1( guiDescription ) .arg( actionListName ); setXML( completeDescription, false /*merge*/ ); diff --git a/tdeui/ktoolbarlabelaction.cpp b/tdeui/ktoolbarlabelaction.cpp index 8fb5a1341..b86906e57 100644 --- a/tdeui/ktoolbarlabelaction.cpp +++ b/tdeui/ktoolbarlabelaction.cpp @@ -68,7 +68,7 @@ KToolBarLabelAction::KToolBarLabelAction(TQLabel* label, : KWidgetAction(label, label->text(), cut, receiver, slot, parent, name), d(new KToolBarLabelActionPrivate) { - Q_ASSERT(TQString::tqfromLatin1("kde toolbar widget") == label->name()); + Q_ASSERT(TQString::fromLatin1("kde toolbar widget") == label->name()); init(); } diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index f9f5591ce..e2b11d935 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -356,7 +356,7 @@ bool KURLLabel::event (TQEvent *e) // use parentWidget() unless you are a toplevel widget, then try qAapp TQPalette p = parentWidget() ? parentWidget()->palette() : tqApp->palette(); 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); d->LinkColor = KGlobalSettings::linkColor(); setLinkColor(d->LinkColor); @@ -367,7 +367,7 @@ bool KURLLabel::event (TQEvent *e) if (result && hasFocus()) { TQPainter p(this); TQRect r( activeRect() ); - tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, tqcolorGroup() ); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() ); } return result; } @@ -407,7 +407,7 @@ TQRect KURLLabel::activeRect() const TQRect r( contentsRect() ); if (text().isEmpty() || (!d->MarginAltered && sizePolicy() == TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed))) return r; //fixed size is sometimes used with pixmap - int hAlign = TQApplication::horizontalAlignment( tqalignment() ); + int hAlign = TQApplication::horizontalAlignment( alignment() ); int indentX = (hAlign && indent()>0) ? indent() : 0; TQFontMetrics fm(font()); r.setWidth( QMIN(fm.width(text()), r.width())); diff --git a/tdeui/kwhatsthismanager.cpp b/tdeui/kwhatsthismanager.cpp index b7873ed0e..56a25a4db 100644 --- a/tdeui/kwhatsthismanager.cpp +++ b/tdeui/kwhatsthismanager.cpp @@ -20,7 +20,7 @@ #include "tqwhatsthis.h" #include <tqvariant.h> #include <kdebug.h> -#include <tqtextedit.h> +#include <textedit.h> #include <klocale.h> #include <kapplication.h> @@ -68,11 +68,11 @@ bool KWhatsThisUndefined::clicked (const TQString& href) body . append ("Widget text: '" + (m_widget -> property ("text") . toString ()) + "'\n"); TQString dsc = TQString ("current --> ") + m_widget -> name (); dsc . append (TQString (" (") + m_widget -> className () + ")\n"); - for (w = m_widget; w && w != m_widget -> tqtopLevelWidget (); w = w -> parentWidget ()) { + for (w = m_widget; w && w != m_widget -> topLevelWidget (); w = w -> parentWidget ()) { dsc . append (w -> name ()); dsc . append (TQString (" (") + w -> className () + ")\n"); } - w = m_widget -> tqtopLevelWidget (); + w = m_widget -> topLevelWidget (); if (w) { dsc . append ("toplevel --> "); dsc . append (w -> name ()); diff --git a/tdeui/kwordwrap.cpp b/tdeui/kwordwrap.cpp index b7eeaff7c..d104b421a 100644 --- a/tdeui/kwordwrap.cpp +++ b/tdeui/kwordwrap.cpp @@ -35,7 +35,7 @@ KWordWrap* KWordWrap::formatText( TQFontMetrics &fm, const TQRect & r, int /*fla { KWordWrap* kw = new KWordWrap( r ); // The wordwrap algorithm - // The variable names and the global tqshape of the algorithm are inspired + // The variable names and the global shape of the algorithm are inspired // from QTextFormatterBreakWords::format(). //kdDebug() << "KWordWrap::formatText " << str << " r=" << r.x() << "," << r.y() << " " << r.width() << "x" << r.height() << endl; int height = fm.height(); @@ -201,7 +201,7 @@ void KWordWrap::drawFadeoutText(TQPainter *p, int x, int y, int maxW, int n = TQMIN( tl, 3); for (int i = 0; i < n; i++) { p->setPen( mixColors( 0.70 - i * 0.25, textColor, bgColor ) ); - TQString s( t.tqat( tl - n + i ) ); + TQString s( t.at( tl - n + i ) ); p->drawText( x, y, s ); x += fm.width( s ); } diff --git a/tdeui/kwordwrap.h b/tdeui/kwordwrap.h index 50d90e1e7..3fb48acd9 100644 --- a/tdeui/kwordwrap.h +++ b/tdeui/kwordwrap.h @@ -91,12 +91,12 @@ public: /** * Draw the text that has been previously wrapped, at position x,y. - * Flags are for tqalignment, e.g. Qt::AlignHCenter. Default is + * Flags are for alignment, e.g. Qt::AlignHCenter. Default is * Qt::AlignAuto. * @param painter the TQPainter to use. * @param x the horizontal position of the text * @param y the vertical position of the text - * @param flags the ORed text tqalignment flags from the Qt namespace, + * @param flags the ORed text alignment flags from the Qt namespace, * ORed with FadeOut if you want the text to fade out if it * does not fit (the @p painter's background must be set * accordingly) diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index 123d85b2c..c31242ff1 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -70,24 +70,24 @@ KXMLGUIBuilder::KXMLGUIBuilder( TQWidget *widget ) d = new KXMLGUIBuilderPrivate; d->m_widget = widget; - d->tagMainWindow = TQString::tqfromLatin1( "mainwindow" ); - d->tagMenuBar = TQString::tqfromLatin1( "menubar" ); - d->tagMenu = TQString::tqfromLatin1( "menu" ); - d->tagToolBar = TQString::tqfromLatin1( "toolbar" ); - d->tagStatusBar = TQString::tqfromLatin1( "statusbar" ); + d->tagMainWindow = TQString::fromLatin1( "mainwindow" ); + d->tagMenuBar = TQString::fromLatin1( "menubar" ); + d->tagMenu = TQString::fromLatin1( "menu" ); + d->tagToolBar = TQString::fromLatin1( "toolbar" ); + d->tagStatusBar = TQString::fromLatin1( "statusbar" ); - d->tagSeparator = TQString::tqfromLatin1( "separator" ); - d->tagTearOffHandle = TQString::tqfromLatin1( "tearoffhandle" ); - d->tagMenuTitle = TQString::tqfromLatin1( "title" ); + d->tagSeparator = TQString::fromLatin1( "separator" ); + d->tagTearOffHandle = TQString::fromLatin1( "tearoffhandle" ); + d->tagMenuTitle = TQString::fromLatin1( "title" ); - d->attrName = TQString::tqfromLatin1( "name" ); - d->attrLineSeparator = TQString::tqfromLatin1( "lineseparator" ); + d->attrName = TQString::fromLatin1( "name" ); + d->attrLineSeparator = TQString::fromLatin1( "lineseparator" ); - d->attrText1 = TQString::tqfromLatin1( "text" ); - d->attrText2 = TQString::tqfromLatin1( "Text" ); - d->attrContext = TQString::tqfromLatin1( "context" ); + d->attrText1 = TQString::fromLatin1( "text" ); + d->attrText2 = TQString::fromLatin1( "Text" ); + d->attrContext = TQString::fromLatin1( "context" ); - d->attrIcon = TQString::tqfromLatin1( "icon" ); + d->attrIcon = TQString::fromLatin1( "icon" ); d->m_instance = 0; d->m_client = 0; @@ -332,7 +332,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo TQDomAttr attr = attributes.item( i ).toAttr(); if ( attr.name().lower() == d->attrLineSeparator && - attr.value().lower() == TQString::tqfromLatin1("false") ) + attr.value().lower() == TQString::fromLatin1("false") ) { isLineSep = false; break; diff --git a/tdeui/kxmlguiclient.cpp b/tdeui/kxmlguiclient.cpp index dd7458ede..8ca9fd97a 100644 --- a/tdeui/kxmlguiclient.cpp +++ b/tdeui/kxmlguiclient.cpp @@ -24,7 +24,7 @@ #include <tqdir.h> #include <tqfile.h> #include <tqdom.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <tqguardedptr.h> @@ -143,7 +143,7 @@ TQString KXMLGUIClient::localXMLFile() const if ( !TQDir::isRelativePath(d->m_xmlFile) ) return TQString::null; // can't save anything here - return locateLocal( "data", TQString::tqfromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile ); + return locateLocal( "data", TQString::fromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile ); } @@ -178,7 +178,7 @@ void KXMLGUIClient::setXMLFile( const TQString& _file, bool merge, bool setXMLDo { TQString doc; - TQString filter = TQString::tqfromLatin1( instance()->instanceName() + '/' ) + _file; + TQString filter = TQString::fromLatin1( instance()->instanceName() + '/' ) + _file; TQStringList allFiles = instance()->dirs()->findAllResources( "data", filter ) + instance()->dirs()->findAllResources( "data", _file ); @@ -699,7 +699,7 @@ TQString KXMLGUIClient::findMostRecentXMLFile( const TQStringList &files, TQStri else { TQString f = (*local).file; - TQString backup = f + TQString::tqfromLatin1( ".backup" ); + TQString backup = f + TQString::fromLatin1( ".backup" ); TQDir dir; dir.rename( f, backup ); } @@ -760,9 +760,9 @@ TQString KXMLGUIClient::findVersionNumber( const TQString &xml ) unsigned int 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.. - if (xml[endpos].tqunicode() == '"') //End of parameter + if (xml[endpos].unicode() == '"') //End of parameter break; else //This shouldn't be here.. { diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 2714b1207..11a08fb95 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -27,7 +27,7 @@ #include <tqdir.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqwidget.h> #include <tqdatetime.h> #include <tqvariant.h> @@ -110,7 +110,7 @@ TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_nu xml_file = filename; else { - xml_file = locate("data", TQString::tqfromLatin1(instance->instanceName() + '/' ) + filename); + xml_file = locate("data", TQString::fromLatin1(instance->instanceName() + '/' ) + filename); if ( !TQFile::exists( xml_file ) ) xml_file = locate( "data", filename ); } @@ -120,7 +120,7 @@ TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_nu { kdError(240) << "No such XML file " << filename << endl; if ( never_null ) - return TQString::tqfromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" ); + return TQString::fromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" ); else return TQString::null; } @@ -146,7 +146,7 @@ bool KXMLGUIFactory::saveConfigFile( const TQDomDocument& doc, TQString xml_file(filename); if (TQDir::isRelativePath(xml_file)) - xml_file = locateLocal("data", TQString::tqfromLatin1( instance->instanceName() + '/' ) + xml_file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' ) + filename); TQFile file( xml_file ); @@ -566,7 +566,7 @@ int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSe TQDomElement KXMLGUIFactory::actionPropertiesElement( TQDomDocument& doc ) { - const TQString tagActionProp = TQString::tqfromLatin1("ActionProperties"); + const TQString tagActionProp = TQString::fromLatin1("ActionProperties"); // first, lets see if we have existing properties TQDomElement elem; TQDomNode it = doc.documentElement().firstChild(); diff --git a/tdeui/qxembed.cpp b/tdeui/qxembed.cpp index e0ce2166b..95bd1bc9b 100644 --- a/tdeui/qxembed.cpp +++ b/tdeui/qxembed.cpp @@ -310,8 +310,8 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // active and has just been given the Qt focus (L0614) or // because the widget already had the Qt focus and just became // active (L0615). - if ( TQT_BASE_OBJECT(tqApp->tqfocusWidget()) == TQT_BASE_OBJECT(o) && - ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->topData()->embedded ) { + if ( TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && + ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { TQFocusEvent* fe = (TQFocusEvent*) e; if ( obeyFocus || fe->reason() != TQFocusEvent::ActiveWindow /*|| fe->reason() == TQFocusEvent::Mouse || fe->reason() == TQFocusEvent::Shortcut*/ ) { @@ -320,11 +320,11 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // activity in the client. The XEMBED_REQUEST_FOCUS message causes // the embedding widget to take the Qt focus (L2085). #ifdef USE_QT4 - WId window = ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->effectiveWinId(); + WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->effectiveWinId(); #else // USE_QT4 - WId window = ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->topData()->parentWinId; + WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->parentWinId; #endif // USE_QT4 - focusMap->remove( tqApp->tqfocusWidget()->tqtopLevelWidget() ); + focusMap->remove( tqApp->focusWidget()->topLevelWidget() ); sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else if ( fe->reason() == TQFocusEvent::ActiveWindow ) { // L0615: Both the embedder and the embedded client became active. @@ -332,20 +332,20 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // So we clear the Qt focus for now. If indeed the QXEmbed widget // has the focus, it will receive a FocusIn message (L1530) and // tell us to restore the focus (L0680, L0683). - focusMap->remove( tqApp->tqfocusWidget()->tqtopLevelWidget() ); - focusMap->insert( tqApp->tqfocusWidget()->tqtopLevelWidget(), - new TQGuardedPtr<TQWidget>(tqApp->tqfocusWidget()->tqtopLevelWidget()->tqfocusWidget() ) ); - // L0616: tqApp->tqfocusWidget() might belong to a modal dialog and not be - // equal to tqApp->tqfocusWidget()->tqtopLevelWidget()->tqfocusWidget() ! - tqApp->tqfocusWidget()->clearFocus(); + focusMap->remove( tqApp->focusWidget()->topLevelWidget() ); + focusMap->insert( tqApp->focusWidget()->topLevelWidget(), + new TQGuardedPtr<TQWidget>(tqApp->focusWidget()->topLevelWidget()->focusWidget() ) ); + // L0616: tqApp->focusWidget() might belong to a modal dialog and not be + // equal to tqApp->focusWidget()->topLevelWidget()->focusWidget() ! + tqApp->focusWidget()->clearFocus(); // L0617: ??? [why not {obeyFocus=false; return true;} here?] } obeyFocus = false; } break; case TQEvent::KeyPress: - if (TQT_BASE_OBJECT(tqApp->tqfocusWidget()) == TQT_BASE_OBJECT(o) && - ((QPublicWidget*)tqApp->tqfocusWidget()->tqtopLevelWidget())->topData()->embedded ) { + if (TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && + ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { // L0620: The following code replaces the Qt code that // handles focus focus changes with the tab key. See the // XEMBED specification for details. The keypress event @@ -359,7 +359,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // (L0653, L0654) which then performs tab navigation // (L2081). TQKeyEvent *k = (TQKeyEvent *)e; - TQWidget *w = tqApp->tqfocusWidget(); + TQWidget *w = tqApp->focusWidget(); // L0621: The following tests are copied from TQWidget::event(). bool res = false; bool tabForward = true; @@ -387,19 +387,19 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // Now check whether we have been looping around. TQFocusData *fd = ((QPublicWidget*)w)->focusData(); #ifdef USE_QT4 - WId window = ((QPublicWidget*)w->tqtopLevelWidget())->effectiveWinId(); + WId window = ((QPublicWidget*)w->topLevelWidget())->effectiveWinId(); #else // USE_QT4 - WId window = ((QPublicWidget*)w->tqtopLevelWidget())->topData()->parentWinId; + WId window = ((QPublicWidget*)w->topLevelWidget())->topData()->parentWinId; #endif // USE_QT4 TQWidget *cw = 0; TQWidget *fw = fd->home(); if (tabForward && window) { - while (cw != w && cw != fw && cw != w->tqtopLevelWidget()) + while (cw != w && cw != fw && cw != w->topLevelWidget()) cw = fd->prev(); if (cw != w) sendXEmbedMessage( window, XEMBED_FOCUS_NEXT ); } else if (window) { - while (cw != w && cw != fw && cw != w->tqtopLevelWidget()) + while (cw != w && cw != fw && cw != w->topLevelWidget()) cw = fd->next(); if (cw != w) sendXEmbedMessage( window, XEMBED_FOCUS_PREV ); @@ -443,7 +443,7 @@ static int qxembed_x11_event_filter( XEvent* e) switch ( message) { case XEMBED_EMBEDDED_NOTIFY: { // L0675: We just have been embedded into a XEMBED aware widget. - TQTLWExtra *extra = ((QPublicWidget*)w->tqtopLevelWidget())->topData(); + TQTLWExtra *extra = ((QPublicWidget*)w->topLevelWidget())->topData(); extra->embedded = 1; #ifdef USE_QT4 // [FIXME] @@ -451,7 +451,7 @@ static int qxembed_x11_event_filter( XEvent* e) #else // USE_QT4 extra->parentWinId = e->xclient.data.l[3]; #endif // USE_QT4 - w->tqtopLevelWidget()->show(); + w->topLevelWidget()->show(); break; } case XEMBED_WINDOW_ACTIVATE: { @@ -464,7 +464,7 @@ static int qxembed_x11_event_filter( XEvent* e) memset(&ev, 0, sizeof(ev)); ev.xfocus.display = qt_xdisplay(); ev.xfocus.type = XFocusIn; - ev.xfocus.window = w->tqtopLevelWidget()->winId(); + ev.xfocus.window = w->topLevelWidget()->winId(); ev.xfocus.mode = NotifyNormal; ev.xfocus.detail = NotifyAncestor; tqApp->x11ProcessEvent( &ev ); @@ -478,7 +478,7 @@ static int qxembed_x11_event_filter( XEvent* e) memset(&ev, 0, sizeof(ev)); ev.xfocus.display = qt_xdisplay(); ev.xfocus.type = XFocusOut; - ev.xfocus.window = w->tqtopLevelWidget()->winId(); + ev.xfocus.window = w->topLevelWidget()->winId(); ev.xfocus.mode = NotifyNormal; ev.xfocus.detail = NotifyAncestor; tqApp->x11ProcessEvent( &ev ); @@ -489,11 +489,11 @@ static int qxembed_x11_event_filter( XEvent* e) { // L0681: Search saved focus widget. TQWidget* focusCurrent = 0; - TQGuardedPtr<TQWidget>* fw = focusMap->find( w->tqtopLevelWidget() ); + TQGuardedPtr<TQWidget>* fw = focusMap->find( w->topLevelWidget() ); if ( fw ) { focusCurrent = *fw; // L0682: Remove it from the map - focusMap->remove( w->tqtopLevelWidget() ); + focusMap->remove( w->topLevelWidget() ); } switch ( detail ) { case XEMBED_FOCUS_CURRENT: @@ -503,19 +503,19 @@ static int qxembed_x11_event_filter( XEvent* e) if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( focusCurrent )) emb->updateEmbeddedFocus( true ); } - else if ( !w->tqtopLevelWidget()->tqfocusWidget() ) - w->tqtopLevelWidget()->setFocus(); + else if ( !w->topLevelWidget()->focusWidget() ) + w->topLevelWidget()->setFocus(); break; case XEMBED_FOCUS_FIRST: { // L0684: Search first widget in tab chain #ifdef USE_QT4 - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(true); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); #else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Tab ); - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(true); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); TQFocusEvent::resetReason(); #endif // USE_QT4 } @@ -524,12 +524,12 @@ static int qxembed_x11_event_filter( XEvent* e) { // L0686: Search last widget in tab chain #ifdef USE_QT4 - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(false); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); #else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Backtab ); - w->tqtopLevelWidget()->setFocus(); - ((QPublicWidget*)w->tqtopLevelWidget())->focusNextPrev(false); + w->topLevelWidget()->setFocus(); + ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); TQFocusEvent::resetReason(); #endif // USE_QT4 } @@ -543,12 +543,12 @@ static int qxembed_x11_event_filter( XEvent* e) // L0688: Embedding application takes the focus away // We first record what the focus widget was // and clear the Qt focus. - if ( w->tqtopLevelWidget()->tqfocusWidget() ) { - if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( w->tqtopLevelWidget()->tqfocusWidget())) + if ( w->topLevelWidget()->focusWidget() ) { + if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget())) emb->updateEmbeddedFocus( false ); - focusMap->insert( w->tqtopLevelWidget(), - new TQGuardedPtr<TQWidget>(w->tqtopLevelWidget()->tqfocusWidget() ) ); - w->tqtopLevelWidget()->tqfocusWidget()->clearFocus(); + focusMap->insert( w->topLevelWidget(), + new TQGuardedPtr<TQWidget>(w->topLevelWidget()->focusWidget() ) ); + w->topLevelWidget()->focusWidget()->clearFocus(); } break; default: @@ -651,7 +651,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f) // whole embedding application. They compete between themselves and // against Qt (L0690, L0914, L1040, L1310, L1510, L1580). // This would be much simpler if implemented within Qt. - d->focusProxy = new TQWidget( tqtopLevelWidget(), "xembed_focus" ); + d->focusProxy = new TQWidget( topLevelWidget(), "xembed_focus" ); d->focusProxy->setGeometry( -1, -1, 1, 1 ); d->focusProxy->show(); // make sure it's shown - for XSetInputFocus @@ -686,13 +686,13 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f) // L0913: all application events pass through eventFilter(). // This is mostly used to force the X11 focus on the // proxy focus window. See L1300. - tqtopLevelWidget()->installEventFilter( this ); + topLevelWidget()->installEventFilter( this ); tqApp->installEventFilter( this ); // L0914: Start moving the X11 focus on the focus proxy window. // See L1581 to know why we do not use isActiveWindow(). - if ( tqApp->activeWindow() == tqtopLevelWidget() ) - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) + if ( tqApp->activeWindow() == topLevelWidget() ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(), RevertToParent, GET_QT_X_TIME() ); // L0915: ??? [drag&drop?] @@ -746,7 +746,7 @@ QXEmbed::~QXEmbed() int revert; XGetInputFocus( qt_xdisplay(), &focus, &revert ); if( focus == d->focusProxy->winId()) - XSetInputFocus( qt_xdisplay(), tqtopLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() ); + XSetInputFocus( qt_xdisplay(), topLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() ); // L01045: Delete our private data. delete d; } @@ -810,10 +810,10 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) switch ( e->type() ) { case TQEvent::WindowActivate: - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(tqtopLevelWidget()) ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { // L1310: Qt thinks the application window has just been activated. // Make sure the X11 focus is on the focus proxy window. See L0686. - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) if (! hasFocus() ) XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(), RevertToParent, GET_QT_X_TIME() ); @@ -826,7 +826,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) } break; case TQEvent::WindowDeactivate: - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(tqtopLevelWidget()) ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { if (d->xplain) // L1321: Activation has changed. Grab state might change. See L2800. checkGrab(); @@ -838,7 +838,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) case TQEvent::Move: { TQWidget* pos = this; - while( TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(o) && TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(tqtopLevelWidget())) + while( TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(o) && TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(topLevelWidget())) pos = pos->parentWidget(); if( TQT_BASE_OBJECT(pos) == TQT_BASE_OBJECT(o) ) { // L1390: Send fake configure notify events whenever the @@ -894,8 +894,8 @@ void QXEmbed::focusInEvent( TQFocusEvent * e ){ return; // L1510: This is a good time to set the X11 focus on the focus proxy window. // Except if the the embedding application itself is embedded into another. - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) - if ( tqApp->activeWindow() == tqtopLevelWidget() ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) + if ( tqApp->activeWindow() == topLevelWidget() ) // L1511: Alter X focus only when window is active. // This is dual safety here because FocusIn implies this. // But see L1581 for an example where this really matters. @@ -943,8 +943,8 @@ void QXEmbed::focusOutEvent( TQFocusEvent * ){ // is properly set to the X11 focus widget. We do this because // the client application might have moved the X11 focus after // receiving the fake focus messages. - if ( !((QPublicWidget*) tqtopLevelWidget())->topData()->embedded ) - if ( tqApp->activeWindow() == tqtopLevelWidget() ) + if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) + if ( tqApp->activeWindow() == topLevelWidget() ) // L1581: Alter X focus only when window is active. // The test above is not the same as isActiveWindow(). // Function isActiveWindow() also returns true when a modal @@ -1210,13 +1210,13 @@ bool QXEmbed::x11Event( XEvent* e) break; // L2085: The client asks for the focus. case XEMBED_REQUEST_FOCUS: - if( ((QPublicWidget*)tqtopLevelWidget())->topData()->embedded ) { - focusMap->remove( tqtopLevelWidget() ); - focusMap->insert( tqtopLevelWidget(), new TQGuardedPtr<TQWidget>( this )); + if( ((QPublicWidget*)topLevelWidget())->topData()->embedded ) { + focusMap->remove( topLevelWidget() ); + focusMap->insert( topLevelWidget(), new TQGuardedPtr<TQWidget>( this )); #ifdef USE_QT4 - WId window = ((QPublicWidget*)tqtopLevelWidget())->effectiveWinId(); + WId window = ((QPublicWidget*)topLevelWidget())->effectiveWinId(); #else // USE_QT4 - WId window = ((QPublicWidget*)tqtopLevelWidget())->topData()->parentWinId; + WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId; #endif // USE_QT4 sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else { diff --git a/tdeui/tests/itemcontainertest.cpp b/tdeui/tests/itemcontainertest.cpp index 1767bec5f..5ed7264ee 100644 --- a/tdeui/tests/itemcontainertest.cpp +++ b/tdeui/tests/itemcontainertest.cpp @@ -8,7 +8,7 @@ * */ -#include <tqlayout.h> +#include <layout.h> #include <tqvbox.h> #include <tqhbox.h> #include <tqbuttongroup.h> diff --git a/tdeui/tests/kbuttonboxtest.cpp b/tdeui/tests/kbuttonboxtest.cpp index 1773c47f9..167d8b41e 100644 --- a/tdeui/tests/kbuttonboxtest.cpp +++ b/tdeui/tests/kbuttonboxtest.cpp @@ -18,7 +18,7 @@ */ #include <kapplication.h> #include "kbuttonbox.h" -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqdialog.h> #include <tqpushbutton.h> diff --git a/tdeui/tests/kcomboboxtest.cpp b/tdeui/tests/kcomboboxtest.cpp index 44b849b44..50aa0995d 100644 --- a/tdeui/tests/kcomboboxtest.cpp +++ b/tdeui/tests/kcomboboxtest.cpp @@ -14,7 +14,7 @@ #include <ksimpleconfig.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpixmap.h> #include <tqlabel.h> #include <tqhbox.h> diff --git a/tdeui/tests/kcompletiontest.cpp b/tdeui/tests/kcompletiontest.cpp index bdd47ab48..916944063 100644 --- a/tdeui/tests/kcompletiontest.cpp +++ b/tdeui/tests/kcompletiontest.cpp @@ -13,7 +13,7 @@ #include <tqlabel.h> #include <tqlistbox.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvariant.h> #include <tqtooltip.h> #include <tqwhatsthis.h> diff --git a/tdeui/tests/kdesattest.cpp b/tdeui/tests/kdesattest.cpp index e75b320a7..28f7d4cf2 100644 --- a/tdeui/tests/kdesattest.cpp +++ b/tdeui/tests/kdesattest.cpp @@ -23,7 +23,7 @@ KDesatWidget::KDesatWidget(TQWidget *parent, const char *name) void KDesatWidget::change(double) { desat_value = slide->value(); - tqrepaint(false); + repaint(false); } void KDesatWidget::paintEvent(TQPaintEvent */*ev*/) diff --git a/tdeui/tests/kdialogbasetest.cpp b/tdeui/tests/kdialogbasetest.cpp index 35da840a1..35b9da4fe 100644 --- a/tdeui/tests/kdialogbasetest.cpp +++ b/tdeui/tests/kdialogbasetest.cpp @@ -2,7 +2,7 @@ #include <kdialogbase.h> #include <tqstring.h> -#include <tqtextview.h> +#include <textview.h> int main(int argc, char** argv) { @@ -64,7 +64,7 @@ int main(int argc, char** argv) widget may change before the dialog is shown. Additionally, setting a help chapter may cause a need for adjustment since it modifies the height of the upper frame. */ - dialog.resize(dialog.tqminimumSize()); + dialog.resize(dialog.minimumSize()); /* The dialog object is used just as any other TQDialog: */ if(dialog.exec()) { diff --git a/tdeui/tests/kdockwidgetdemo.cpp b/tdeui/tests/kdockwidgetdemo.cpp index 9b65db594..a08cb78ba 100644 --- a/tdeui/tests/kdockwidgetdemo.cpp +++ b/tdeui/tests/kdockwidgetdemo.cpp @@ -3,10 +3,10 @@ #include <tqheader.h> #include <tqtoolbutton.h> #include <tqtooltip.h> -#include <tqtextview.h> +#include <textview.h> #include <tqfileinfo.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqhbox.h> #include <tqlabel.h> #include <tqmultilineedit.h> @@ -82,7 +82,7 @@ SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const :TQDialog(0L,name,true) { KConfig* config = kapp->config(); - config->setGroup( TQString::tqfromLatin1("SFileDialogData:") + name ); + config->setGroup( TQString::fromLatin1("SFileDialogData:") + name ); if ( initially.isNull() ){ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() ); } @@ -242,7 +242,7 @@ void PixmapView::setPixmap( const TQPixmap &pix ) { pixmap = pix; resizeContents( pixmap.size().width(), pixmap.size().height() ); - viewport()->tqrepaint( true ); + viewport()->repaint( true ); } void PixmapView::drawContents( TQPainter *p, int, int, int, int ) @@ -643,7 +643,7 @@ void Directory::setOpen( bool o ) return; } - listView()->tqsetUpdatesEnabled( false ); + listView()->setUpdatesEnabled( false ); const QFileInfoList * files = thisDir.entryInfoList(); if ( files ){ QFileInfoListIterator it( *files ); @@ -654,7 +654,7 @@ void Directory::setOpen( bool o ) (void)new Directory( this, f->fileName() ); } } - listView()->tqsetUpdatesEnabled( true ); + listView()->setUpdatesEnabled( true ); } TQListViewItem::setOpen( o ); } @@ -777,13 +777,13 @@ int main(int argc, char* argv[]) { #endif #if 0 - qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::tqfromLatin1("All (*)"), - TQString::tqfromLatin1("DockWidget Demo"), "dialog1" ) ); + qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::fromLatin1("All (*)"), + TQString::fromLatin1("DockWidget Demo"), "dialog1" ) ); #endif #if 1 - TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::tqfromLatin1("All (*)"), - TQString::tqfromLatin1("DockWidget Demo"), "dialog1" ); + TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::fromLatin1("All (*)"), + TQString::fromLatin1("DockWidget Demo"), "dialog1" ); TQStringList::Iterator it = s.begin(); for ( ; it != s.end(); ++it ){ qDebug( "%s", (*it).local8Bit().data() ); diff --git a/tdeui/tests/kdualcolortest.cpp b/tdeui/tests/kdualcolortest.cpp index 942d52f8d..6ed2715a0 100644 --- a/tdeui/tests/kdualcolortest.cpp +++ b/tdeui/tests/kdualcolortest.cpp @@ -2,16 +2,16 @@ #include <kdualcolorbutton.h> #include <kapplication.h> #include <klocale.h> -#include <tqlayout.h> -#include <tqpalette.h> +#include <layout.h> +#include <palette.h> KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name) : TQWidget(parent, name) { lbl = new TQLabel("Testing, testing, 1, 2, 3...", this); KDualColorButton *colorBtn = - new KDualColorButton(lbl->tqcolorGroup().text(), - lbl->tqcolorGroup().background(), this); + new KDualColorButton(lbl->colorGroup().text(), + lbl->colorGroup().background(), this); connect(colorBtn, TQT_SIGNAL(fgChanged(const TQColor &)), TQT_SLOT(slotFgChanged(const TQColor &))); connect(colorBtn, TQT_SIGNAL(bgChanged(const TQColor &)), diff --git a/tdeui/tests/keditlistboxtest.cpp b/tdeui/tests/keditlistboxtest.cpp index fdc90a742..90dbb74d0 100644 --- a/tdeui/tests/keditlistboxtest.cpp +++ b/tdeui/tests/keditlistboxtest.cpp @@ -7,14 +7,14 @@ int main( int argc, char **argv ) KApplication app( argc, argv, "keditlistboxtest" ); KEditListBox::CustomEditor editor( new KComboBox( true, 0L, "test" ) ); - KEditListBox *box = new KEditListBox( TQString::tqfromLatin1("KEditListBox"), + KEditListBox *box = new KEditListBox( TQString::fromLatin1("KEditListBox"), editor ); - box->insertItem( TQString::tqfromLatin1("Test") ); - box->insertItem( TQString::tqfromLatin1("for") ); - box->insertItem( TQString::tqfromLatin1("this") ); - box->insertItem( TQString::tqfromLatin1("KEditListBox") ); - box->insertItem( TQString::tqfromLatin1("Widget") ); + box->insertItem( TQString::fromLatin1("Test") ); + box->insertItem( TQString::fromLatin1("for") ); + box->insertItem( TQString::fromLatin1("this") ); + box->insertItem( TQString::fromLatin1("KEditListBox") ); + box->insertItem( TQString::fromLatin1("Widget") ); box->show(); return app.exec(); diff --git a/tdeui/tests/kledtest.cpp b/tdeui/tests/kledtest.cpp index f8d031530..d68f1e366 100644 --- a/tdeui/tests/kledtest.cpp +++ b/tdeui/tests/kledtest.cpp @@ -50,14 +50,14 @@ KLedTest::KLedTest(TQWidget* parent) } else { y=Grid; index=0; - for( int tqshape=0; (int)tqshape<2; tqshape=(KLed::Shape)(tqshape+1)) { + for( int shape=0; (int)shape<2; shape=(KLed::Shape)(shape+1)) { x=Grid; for( int look=0; (int)look<3; look=(KLed::Look)(look+1)) { for(state=KLed::Off; (int)state<2; state=(KLed::State)(state+1)) { leds[index]=new KLed(Qt::yellow, state, (KLed::Look)(look+1), - (KLed::Shape)(tqshape+1), this); + (KLed::Shape)(shape+1), this); leds[index]->setGeometry(x, y, LedWidth, LedHeight); ++index; x+=Grid+LedWidth; @@ -108,7 +108,7 @@ KLedTest::nextLook() { ledlook = static_cast<KLed::Look>(tmp); l->setLook(ledlook); //qDebug("painting look %i", ledlook); - //l->tqrepaint(); + //l->repaint(); } diff --git a/tdeui/tests/kledtest.h b/tdeui/tests/kledtest.h index 5d660f5a3..5652e306e 100644 --- a/tdeui/tests/kledtest.h +++ b/tdeui/tests/kledtest.h @@ -15,7 +15,7 @@ protected: const int LedWidth; const int LedHeight; const int Grid; - KLed::Shape tqshape; + KLed::Shape shape; KLed::Look look; KLed::State state; int x, y, index; diff --git a/tdeui/tests/klineeditdlgtest.cpp b/tdeui/tests/klineeditdlgtest.cpp index e43085c0c..be7decb82 100644 --- a/tdeui/tests/klineeditdlgtest.cpp +++ b/tdeui/tests/klineeditdlgtest.cpp @@ -2,7 +2,7 @@ #include <klineeditdlg.h> #include <tqstring.h> -#include <tqtextview.h> +#include <textview.h> int main(int argc, char** argv) { diff --git a/tdeui/tests/klineedittest.cpp b/tdeui/tests/klineedittest.cpp index 3508982fa..7ddab8182 100644 --- a/tdeui/tests/klineedittest.cpp +++ b/tdeui/tests/klineedittest.cpp @@ -1,6 +1,6 @@ #include <tqstring.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqhbox.h> #include <tqtimer.h> diff --git a/tdeui/tests/kmessageboxtest.cpp b/tdeui/tests/kmessageboxtest.cpp index 31f8f1735..d5b84095a 100644 --- a/tdeui/tests/kmessageboxtest.cpp +++ b/tdeui/tests/kmessageboxtest.cpp @@ -1,7 +1,7 @@ #include "kmessagebox.h" #include <tqdialog.h> -#include <tqlayout.h> +#include <layout.h> #include <stdlib.h> @@ -79,11 +79,11 @@ case 1: i = KMessageBox::warningContinueCancel(w, "You are about to <Print>.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print"), "dontask", false); + "Print", TQString::fromLatin1("&Print"), "dontask", false); i = KMessageBox::warningContinueCancel(0, "You are about to <Print>.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print"), "dontask", KMessageBox::AllowLink); + "Print", TQString::fromLatin1("&Print"), "dontask", KMessageBox::AllowLink); i = KMessageBox::questionYesNo(0, "<p>Do you have a printer? thisisaverylongdkldhklghklghklashgkllasghkdlsghkldfghklsabla bla bbla bla. It also has <a href=http://www.kde.org>this URL</a>.</p>", TQString("Bla"), TQString("Yes"), TQString("No"), "bla", KMessageBox::AllowLink); break; @@ -96,7 +96,7 @@ case 2: case 3: i = KMessageBox::questionYesNo(0, "Does your printer support color or only black and white?", - "Printer setup", TQString::tqfromLatin1("&Color"), TQString::tqfromLatin1("&Black & White")); + "Printer setup", TQString::fromLatin1("&Color"), TQString::fromLatin1("&Black & White")); break; case 4: @@ -123,13 +123,13 @@ case 6: i = KMessageBox::warningContinueCancel(0, "You are about to print.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print")); + "Print", TQString::fromLatin1("&Print")); break; case 7: i = KMessageBox::warningContinueCancel(0, "You are about to <Print>.\n" "Are you sure?", - "Print", TQString::tqfromLatin1("&Print"), "dontask", false); + "Print", TQString::fromLatin1("&Print"), "dontask", false); break; case 8: @@ -142,14 +142,14 @@ case 9: i = KMessageBox::warningYesNoCancel(0, "Your document contains unsaved changes.\n" "Do you want to save your changes?\n", - TQString::tqfromLatin1("Close")); + TQString::fromLatin1("Close")); break; case 10: i = KMessageBox::warningYesNoCancel(0, "Your document contains unsaved changes.\n" "Do you want to save or discard your changes?\n", - "Close", TQString::tqfromLatin1("&Save"), TQString::tqfromLatin1("&Discard") ); + "Close", TQString::fromLatin1("&Save"), TQString::fromLatin1("&Discard") ); break; case 11: diff --git a/tdeui/tests/knuminputtest.cpp b/tdeui/tests/knuminputtest.cpp index fdf8697e9..4a3dece9f 100644 --- a/tdeui/tests/knuminputtest.cpp +++ b/tdeui/tests/knuminputtest.cpp @@ -8,7 +8,7 @@ * */ -#include <tqlayout.h> +#include <layout.h> #include <tqvgroupbox.h> #include <kapplication.h> diff --git a/tdeui/tests/krulertest.cpp b/tdeui/tests/krulertest.cpp index ad2f5630a..bd7fcb2f5 100644 --- a/tdeui/tests/krulertest.cpp +++ b/tdeui/tests/krulertest.cpp @@ -3,7 +3,7 @@ #include "krulertest.h" #include "kruler.h" -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqgroupbox.h> diff --git a/tdeui/tests/kseparatortest.cpp b/tdeui/tests/kseparatortest.cpp index 17e965ca8..181722f8e 100644 --- a/tdeui/tests/kseparatortest.cpp +++ b/tdeui/tests/kseparatortest.cpp @@ -19,7 +19,7 @@ #include <kapplication.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwidget.h> #include "kseparator.h" diff --git a/tdeui/tests/kspelltest.cpp b/tdeui/tests/kspelltest.cpp index 9180ed376..5d7c4852c 100644 --- a/tdeui/tests/kspelltest.cpp +++ b/tdeui/tests/kspelltest.cpp @@ -22,7 +22,7 @@ #include <tqstring.h> #include <tqlabel.h> -#include <tqtextcodec.h> +#include <textcodec.h> int main(int argc, char **argv) { diff --git a/tdeui/tests/ktabctltest.cpp b/tdeui/tests/ktabctltest.cpp index 33e7fc5b7..b8fc19104 100644 --- a/tdeui/tests/ktabctltest.cpp +++ b/tdeui/tests/ktabctltest.cpp @@ -17,7 +17,7 @@ #include <tqtooltip.h> #include <tqmessagebox.h> #include <tqtabbar.h> -#include <tqpalette.h> +#include <palette.h> #include <tqmultilineedit.h> #include <stdio.h> diff --git a/tdeui/tests/ktabwidgettest.cpp b/tdeui/tests/ktabwidgettest.cpp index 5f9fb3dcc..be7b1cd26 100644 --- a/tdeui/tests/ktabwidgettest.cpp +++ b/tdeui/tests/ktabwidgettest.cpp @@ -1,5 +1,5 @@ #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqdragobject.h> #include <kapplication.h> @@ -73,9 +73,9 @@ Test::Test( TQWidget* parent, const char *name ) gridlayout->addWidget( mTabsBottom, 3, 0 ); connect( mTabsBottom, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabPosition(bool) ) ); - TQCheckBox * tabtqshape = new TQCheckBox( "Triangular tab tqshape", grid ); - gridlayout->addWidget( tabtqshape, 3, 1 ); - connect( tabtqshape, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabShape(bool) ) ); + TQCheckBox * tabshape = new TQCheckBox( "Triangular tab shape", grid ); + gridlayout->addWidget( tabshape, 3, 1 ); + connect( tabshape, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabShape(bool) ) ); TQCheckBox *tabClose = new TQCheckBox( "Close button on icon hover", grid ); gridlayout->addWidget( tabClose, 4, 0 ); diff --git a/tdeui/tests/kunbalancedgrdtest.cpp b/tdeui/tests/kunbalancedgrdtest.cpp index 9f616496d..1297d1ac8 100644 --- a/tdeui/tests/kunbalancedgrdtest.cpp +++ b/tdeui/tests/kunbalancedgrdtest.cpp @@ -3,7 +3,7 @@ #include <kpixmapeffect.h> #include <tqpainter.h> #include <tqstring.h> -#include <tqlayout.h> +#include <layout.h> int cols = 3, rows = 3; // how many @@ -159,7 +159,7 @@ void myTopWidget::rebalance() if ((otime - itime )> 500) { - grds->tqrepaint(false); + grds->repaint(false); itime = time.elapsed(); } } diff --git a/tdeui/tests/kwizardtest.cpp b/tdeui/tests/kwizardtest.cpp index 91974263e..0f10fed89 100644 --- a/tdeui/tests/kwizardtest.cpp +++ b/tdeui/tests/kwizardtest.cpp @@ -19,7 +19,7 @@ */ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> #include <kwizard.h> diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index 1334abd6e..5058695a3 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -186,7 +186,7 @@ void KWindowListMenu::init() } // Avoid creating unwanted accelerators. - itemText.replace('&', TQString::tqfromLatin1("&&")); + itemText.replace('&', TQString::fromLatin1("&&")); insertItem( pm, itemText, i); map.insert(i, info->win()); if (info->win() == active_window) diff --git a/win/qeventloopex.cpp b/win/qeventloopex.cpp index b4b32e838..da5eba60c 100644 --- a/win/qeventloopex.cpp +++ b/win/qeventloopex.cpp @@ -204,7 +204,7 @@ void QEventLoopEx::registerSocketNotifier( TQSocketNotifier *notifier ) while ( p && p->fd > sockfd ) p = list->next(); if ( p ) - list->insert( list->tqat(), sn ); + list->insert( list->at(), sn ); else list->append( sn ); } |