Drop USE_TQT4 code

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/388/head
Michele Calgaro 9 months ago
parent 2317bee246
commit 014f6d2586
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -85,7 +85,6 @@ public:
bool reverseScrollPolarity; bool reverseScrollPolarity;
#ifdef HAVE_LIBUSB #ifdef HAVE_LIBUSB
// TODO: In Qt4, replace with a better container.
TQPtrList <LogitechMouse> logitechMouseList; TQPtrList <LogitechMouse> logitechMouseList;
#endif #endif
}; };

@ -256,12 +256,8 @@ ProxyWidget::ProxyWidget(TDECModule *client, TQString title, const char *name,
ProxyWidget::~ProxyWidget() ProxyWidget::~ProxyWidget()
{ {
#ifdef USE_QT4
#warning Possible memory leak in ProxyWidget::~ProxyWidget()
#else // USE_QT4
if (_client) delete _client; if (_client) delete _client;
_client = 0; _client = 0;
#endif // USE_QT4
} }
TQString ProxyWidget::quickHelp() const TQString ProxyWidget::quickHelp() const

@ -211,38 +211,6 @@ ContainerAreaLayout::ContainerAreaLayout(TQWidget* parent)
{ {
} }
#ifdef USE_QT4
/*!
\reimp
*/
int ContainerAreaLayout::count() const {
return m_items.count();
}
/*!
\reimp
*/
TQLayoutItem* ContainerAreaLayout::itemAt(int index) const {
return index >= 0 && index < m_items.count() ? (*m_items.at(index))->item : 0;
}
/*!
\reimp
*/
TQLayoutItem* ContainerAreaLayout::takeAt(int index) {
if (index < 0 || index >= m_items.count())
return 0;
ContainerAreaLayoutItem *b = *m_items.at(index);
m_items.remove(m_items.at(index));
TQLayoutItem *item = b->item;
b->item = 0;
delete b;
invalidate();
return item;
}
#endif // USE_QT4
void ContainerAreaLayout::addItem(TQLayoutItem* item) void ContainerAreaLayout::addItem(TQLayoutItem* item)
{ {
m_items.append(new ContainerAreaLayoutItem(static_cast<TQLayoutItem*>(item), this)); m_items.append(new ContainerAreaLayoutItem(static_cast<TQLayoutItem*>(item), this));
@ -445,13 +413,7 @@ TQSize ContainerAreaLayout::minimumSize() const
TQLayoutIterator ContainerAreaLayout::iterator() TQLayoutIterator ContainerAreaLayout::iterator()
{ {
// [FIXME]
#ifdef USE_QT4
#warning [FIXME] ContainerAreaLayout iterators may not function correctly under Qt4
return TQLayoutIterator(this); // [FIXME]
#else // USE_QT4
return TQLayoutIterator(new ContainerAreaLayoutIterator(&m_items)); return TQLayoutIterator(new ContainerAreaLayoutIterator(&m_items));
#endif // USE_QT4
} }
void ContainerAreaLayout::setGeometry(const TQRect& rect) void ContainerAreaLayout::setGeometry(const TQRect& rect)

@ -108,12 +108,6 @@ class ContainerAreaLayout : public TQLayout
int leftR() const; int leftR() const;
int rightR() const; int rightR() const;
#ifdef USE_QT4
QLAYOUT_REQUIRED_METHOD_DECLARATIONS
#endif // USE_QT4
private: private:
int moveContainerPushRecursive(ItemList::const_iterator it, int distance); int moveContainerPushRecursive(ItemList::const_iterator it, int distance);
int distanceToPreviousItem(ItemList::const_iterator it) const; int distanceToPreviousItem(ItemList::const_iterator it) const;

@ -122,9 +122,6 @@ void PanelKMenu::hideMenu()
{ {
hide(); hide();
#ifdef USE_QT4
// The hacks below aren't needed any more because Qt4 supports true transparency for the fading logout screen
#else // USE_QT4
// Try to redraw the area under the menu // Try to redraw the area under the menu
// Qt makes this surprisingly difficult to do in a timely fashion! // Qt makes this surprisingly difficult to do in a timely fashion!
while (isShown() == true) while (isShown() == true)
@ -148,7 +145,6 @@ void PanelKMenu::hideMenu()
delaytimer->start( 100, TRUE ); // Wait for 100 milliseconds delaytimer->start( 100, TRUE ); // Wait for 100 milliseconds
while (windowTimerTimedOut == false) while (windowTimerTimedOut == false)
kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 1000); kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 1000);
#endif // USE_QT4
} }
void PanelKMenu::windowClearTimeout() void PanelKMenu::windowClearTimeout()

@ -470,14 +470,9 @@ void drawBlendedRect(TQPainter *p, const TQRect &r, const TQColor &color, int al
if (pix.isNull() || last_color != color || last_alpha != alpha) if (pix.isNull() || last_color != color || last_alpha != alpha)
{ {
TQImage img(16, 16, 32); TQImage img(16, 16, 32);
#ifdef USE_QT4 img.setAlphaBuffer(false);
img.fill(((uint)(alpha & 0xFF) << 24) | (color.rgb() & 0xFFFFFF));
img.setAlphaBuffer(true); img.setAlphaBuffer(true);
img.fill(((uint)(alpha & 0xFF) << 24) | (color.rgb() & 0xFFFFFF));
#else // USE_QT4
img.setAlphaBuffer(false);
img.fill(((uint)(alpha & 0xFF) << 24) | (color.rgb() & 0xFFFFFF));
img.setAlphaBuffer(true);
#endif // USE_QT4
pix.convertFromImage(img); pix.convertFromImage(img);
last_color = color; last_color = color;
last_alpha = alpha; last_alpha = alpha;

@ -118,9 +118,6 @@ private:
}; };
extern bool tqt_qclipboard_bailout_hack; extern bool tqt_qclipboard_bailout_hack;
#if KDE_IS_VERSION( 15, 0, 0 )
#error Check status of #80072 with Qt4.
#endif
static void ensureGlobalSyncOff(TDEConfig* config); static void ensureGlobalSyncOff(TDEConfig* config);

@ -460,11 +460,7 @@ void KonqFrame::slotLinkedViewClicked( bool mode )
void void
KonqFrame::paintEvent( TQPaintEvent* ) KonqFrame::paintEvent( TQPaintEvent* )
{ {
#ifdef USE_QT4
#warning [INFO] Repaint call disabled in Qt4 to prevent recursive repaint (which otherwise occurs for unknown reasons)
#else // USE_QT4
m_pStatusBar->repaint(); m_pStatusBar->repaint();
#endif // USE_QT4
} }
void KonqFrame::slotRemoveView() void KonqFrame::slotRemoveView()

@ -636,11 +636,7 @@ void TEWidget::drawAttrStr(TQPainter &paint, TQRect rect,
if (pm) if (pm)
paint.setBackgroundMode( Qt::TransparentMode ); paint.setBackgroundMode( Qt::TransparentMode );
if (clear || (blinking && (attr->r & RE_BLINK))) { if (clear || (blinking && (attr->r & RE_BLINK))) {
#ifdef USE_QT4
paint.eraseRect(rect);
#else // USE_QT4
erase(rect); erase(rect);
#endif // USE_QT4
} }
} }
else else

@ -297,7 +297,7 @@ private:
TQPtrDict<TDERadioAction> session2action; TQPtrDict<TDERadioAction> session2action;
TQPtrList<TESession> sessions; TQPtrList<TESession> sessions;
TQIntDict<KSimpleConfig> no2command; //QT4 - convert to QList TQIntDict<KSimpleConfig> no2command;
KSimpleConfig* m_defaultSession; KSimpleConfig* m_defaultSession;
TQString m_defaultSessionFilename; TQString m_defaultSessionFilename;

@ -187,10 +187,6 @@ public:
uint count() const { return TQPtrList<ColorSchema>::count(); } ; uint count() const { return TQPtrList<ColorSchema>::count(); } ;
const ColorSchema *at(unsigned int i) const ColorSchema *at(unsigned int i)
{ return TQPtrList<ColorSchema>::at(i); } ; { return TQPtrList<ColorSchema>::at(i); } ;
#ifdef USE_QT4
const ColorSchema *at(unsigned int i)
{ return at(i); } ;
#endif // USE_QT4
void sort() {TQPtrList<ColorSchema>::sort();}; void sort() {TQPtrList<ColorSchema>::sort();};

@ -10,8 +10,4 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#define KSMVendorString "KDE" #define KSMVendorString "KDE"
#define KSMReleaseString "1.0" #define KSMReleaseString "1.0"
#ifdef USE_QT4
#define NO_QT3_DBUS_SUPPORT
#endif
#endif #endif

@ -313,9 +313,6 @@ void KSplash::startupComplete()
void KSplash::close() void KSplash::close()
{ {
TQWidget::close(); TQWidget::close();
#ifdef USE_QT4
exit(0);
#endif // USE_QT4
} }
void KSplash::hide() void KSplash::hide()

@ -56,17 +56,7 @@ public:
ASYNC startupComplete(); ASYNC startupComplete();
ASYNC show(); ASYNC show();
ASYNC hide(); ASYNC hide();
// [FIXME] How can I more easily let Qt know about these slots? moc-tqt perhaps?
// More importantly, how was this code even running under Qt3?
// Was it somehow running the TQWidget::close() slot instead of the KSplash::close() non-slot method?
// Either way it looks like accidental/undefined behaviour to me...
#ifndef Q_MOC_RUN
ASYNC close(); ASYNC close();
#else // Q_MOC_RUN
public slots:
void close();
#endif // Q_MOC_RUN
signals: signals:
void stepsChanged(int); void stepsChanged(int);

@ -4190,13 +4190,13 @@ static char *scan_request(char *c)
if (mode) if (mode)
{ {
// .rm ReMove // .rm ReMove
s_stringDefinitionMap.remove(name); // ### QT4: removeAll s_stringDefinitionMap.remove(name);
} }
else else
{ {
// .rn ReName // .rn ReName
StringDefinition def=(*it); StringDefinition def=(*it);
s_stringDefinitionMap.remove(name); // ### QT4: removeAll s_stringDefinitionMap.remove(name);
s_stringDefinitionMap.insert(name2,def); s_stringDefinitionMap.insert(name2,def);
} }
} }
@ -5152,7 +5152,7 @@ static char *scan_request(char *c)
else else
{ {
NumberDefinition def=(*it); NumberDefinition def=(*it);
s_numberDefinitionMap.remove(name); // ### QT4: removeAll s_numberDefinitionMap.remove(name);
s_numberDefinitionMap.insert(name2,def); s_numberDefinitionMap.insert(name2,def);
} }
kdDebug(7107) << "end .rnn" << endl; kdDebug(7107) << "end .rnn" << endl;

@ -39,9 +39,7 @@
class KURL; class KURL;
class TQCString; class TQCString;
template <typename T> class TQMemArray; template <typename T> class TQMemArray;
#ifdef USE_QT3
typedef TQMemArray<char> TQByteArray; typedef TQMemArray<char> TQByteArray;
#endif // USE_QT3
namespace KioSMTP { namespace KioSMTP {
class Response; class Response;

@ -84,10 +84,6 @@ int x11ErrorHandler(Display *d, XErrorEvent *e)
Application::Application( ) Application::Application( )
: TDEApplication( ), owner( screen_number ) : TDEApplication( ), owner( screen_number )
{ {
#ifdef USE_QT4
// I'm special...
setQuitOnLastWindowClosed(false);
#endif // USE_QT4
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
if (!config()->isImmutable() && args->isSet("lock")) if (!config()->isImmutable() && args->isSet("lock"))
{ {

@ -37,10 +37,6 @@ License. See the file "COPYING" for the exact licensing terms.
#include "atoms.h" #include "atoms.h"
#include "notifications.h" #include "notifications.h"
#ifdef USE_QT4
#include <Qt/qx11info_x11.h>
#endif // USE_QT4
#endif #endif
namespace KWinInternal namespace KWinInternal

Loading…
Cancel
Save