Drop TQT_TQ*_OBJECT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/381/head
Michele Calgaro 9 months ago
parent 2937383dce
commit 7bc43c68b3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -597,7 +597,7 @@ bool KateDocManager::computeUrlMD5(const KURL &url, TQCString &result)
{
KMD5 md5;
if (!md5.update(TQT_TQIODEVICE_OBJECT(f)))
if (!md5.update(f))
return false;
md5.hexDigest(result);

@ -107,7 +107,7 @@ void KDateTimeDlg::setTime(const TQTime& qtime) {
void KDateTimeDlg::setDateTime(const TQDateTime& qdatetime) {
_date->setDate(TQT_TQDATE_OBJECT(qdatetime.date()));
_date->setDate(qdatetime.date());
_hours->setValue(qdatetime.time().hour());
_mins->setValue(qdatetime.time().minute());
_secs->setValue(qdatetime.time().second());

@ -90,9 +90,9 @@ void TDELocaleSample::slotUpdateTime()
{
TQDateTime dt = TQDateTime::currentDateTime();
m_dateSample->setText(m_locale->formatDate(TQT_TQDATE_OBJECT(dt.date()), false));
m_dateShortSample->setText(m_locale->formatDate(TQT_TQDATE_OBJECT(dt.date()), true));
m_timeSample->setText(m_locale->formatTime(TQT_TQTIME_OBJECT(dt.time()), true));
m_dateSample->setText(m_locale->formatDate(dt.date(), false));
m_dateShortSample->setText(m_locale->formatDate(dt.date(), true));
m_timeSample->setText(m_locale->formatTime(dt.time(), true));
}
void TDELocaleSample::slotLocaleChanged()

@ -2570,7 +2570,7 @@ bool LockProcess::forwardVkbdEvent( XEvent* event )
}
// vkbd windows are kept topmost, so just find the first one in the position
for( TQValueList< VkbdWindow >::ConstIterator it = mVkbdWindows.begin(); it != mVkbdWindows.end(); ++it ) {
if( TQT_TQRECT_OBJECT((*it).rect).contains( pos )) {
if( (*it).rect.contains( pos )) {
// Find the subwindow where the event should actually go.
// Not exactly cheap in the number of X roundtrips but oh well.
Window window = (*it).id;

@ -86,7 +86,7 @@ void KDateCombo::mousePressEvent (TQMouseEvent * e)
{
if (e->button() & Qt::LeftButton)
{
if (TQT_TQRECT_OBJECT(rect()).contains( e->pos()))
if (rect().contains( e->pos()))
{
TQDate tempDate;
getDate(& tempDate);
@ -103,7 +103,7 @@ bool KDateCombo::eventFilter (TQObject*, TQEvent* e)
{
TQMouseEvent *me = (TQMouseEvent *)e;
TQPoint p = mapFromGlobal( me->globalPos() );
if (TQT_TQRECT_OBJECT(rect()).contains( p ) )
if (rect().contains( p ) )
{
TQTimer::singleShot(10, this, TQT_SLOT(dateEnteredEvent()));
return true;

@ -1542,14 +1542,14 @@ void ClockApplet::aboutToShowContextMenu()
TDELocale *loc = TDEGlobal::locale();
TQDateTime dt = TQDateTime::currentDateTime();
dt = TQT_TQDATETIME_OBJECT(dt.addSecs(TZoffset));
dt = dt.addSecs(TZoffset);
TDEPopupMenu *copyMenu = new TDEPopupMenu( menu );
copyMenu->insertItem(loc->formatDateTime(dt), 201);
copyMenu->insertItem(loc->formatDate(TQT_TQDATE_OBJECT(dt.date())), 202);
copyMenu->insertItem(loc->formatDate(TQT_TQDATE_OBJECT(dt.date()), true), 203);
copyMenu->insertItem(loc->formatTime(TQT_TQTIME_OBJECT(dt.time())), 204);
copyMenu->insertItem(loc->formatTime(TQT_TQTIME_OBJECT(dt.time()), true), 205);
copyMenu->insertItem(loc->formatDate(dt.date()), 202);
copyMenu->insertItem(loc->formatDate(dt.date(), true), 203);
copyMenu->insertItem(loc->formatTime(dt.time()), 204);
copyMenu->insertItem(loc->formatTime(dt.time(), true), 205);
copyMenu->insertItem(dt.date().toString(), 206);
copyMenu->insertItem(dt.time().toString(), 207);
copyMenu->insertItem(dt.toString(), 208);
@ -1610,12 +1610,12 @@ void ClockApplet::slotCopyMenuActivated( int id )
TQTime ClockApplet::clockGetTime()
{
return TQT_TQTIME_OBJECT(TQTime::currentTime().addSecs(TZoffset));
return TQTime::currentTime().addSecs(TZoffset);
}
TQDate ClockApplet::clockGetDate()
{
return TQT_TQDATE_OBJECT(TQDateTime::currentDateTime().addSecs(TZoffset).date());
return TQDateTime::currentDateTime().addSecs(TZoffset).date();
}
void ClockApplet::showZone(int z)
@ -1840,7 +1840,7 @@ void ClockAppletToolTip::maybeTip( const TQPoint & /*point*/ )
(m_clock->type() == Prefs::EnumType::Analog) )
{
// show full time (incl. hour) as tooltip for Fuzzy clock
tipText = TDEGlobal::locale()->formatDateTime(TQT_TQDATETIME_OBJECT(TQDateTime::currentDateTime().addSecs(m_clock->TZoffset)));
tipText = TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime().addSecs(m_clock->TZoffset));
}
else
{

@ -113,7 +113,7 @@ bool KNewButton::eventFilter(TQObject *o, TQEvent *e)
e->type() == TQEvent::MouseButtonDblClick )
{
TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())))
if (rect().contains(mapFromGlobal(me->globalPos())))
{
if (m_pressedDuringPopup && m_popup && m_openTimer != -1
&& (me->button() & Qt::LeftButton) )

@ -200,7 +200,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e)
// a hack for applets that have out-of-process
// elements (e.g the systray) so that the handle
// doesn't flicker when moving over those elements
if (TQT_TQRECT_OBJECT(w->rect()).contains(w->mapFromGlobal(TQCursor::pos())))
if (w->rect().contains(w->mapFromGlobal(TQCursor::pos())))
{
nowDrawIt = true;
}

@ -962,7 +962,7 @@ void ContainerArea::mouseMoveEvent(TQMouseEvent *ev)
return;
}
if (ev->state() == Qt::LeftButton && !TQT_TQRECT_OBJECT(rect()).contains(ev->pos()))
if (ev->state() == Qt::LeftButton && !rect().contains(ev->pos()))
{
// leaveEvent() doesn't work, while grabbing the mouse
_autoScrollTimer.stop();

@ -840,7 +840,7 @@ void PanelServiceMenu::dragEnterEvent(TQDragEnterEvent *event)
void PanelServiceMenu::dragLeaveEvent(TQDragLeaveEvent *)
{
// see PanelServiceMenu::dragEnterEvent why this is nescessary
if (!TQT_TQRECT_OBJECT(frameGeometry()).contains(TQCursor::pos()))
if (!frameGeometry().contains(TQCursor::pos()))
{
KURLDrag::setTarget(0);
}

@ -568,7 +568,7 @@ void PanelButton::drawButton(TQPainter *p)
if (hasFocus() || m_hasAcceptedDrag)
{
int x1, y1, x2, y2;
TQT_TQRECT_OBJECT(rect()).coords(&x1, &y1, &x2, &y2);
rect().coords(&x1, &y1, &x2, &y2);
TQRect r(x1+2, y1+2, x2-x1-3, y2-y1-3);
style().tqdrawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
TQStyle::Style_Default, colorGroup().button());
@ -607,7 +607,7 @@ void PanelButton::drawDeepButton(TQPainter *p)
if (hasFocus() || m_hasAcceptedDrag)
{
int x1, y1, x2, y2;
TQT_TQRECT_OBJECT(rect()).coords(&x1, &y1, &x2, &y2);
rect().coords(&x1, &y1, &x2, &y2);
TQRect r(x1+2, y1+2, x2-x1-3, y2-y1-3);
style().tqdrawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
TQStyle::Style_Default, colorGroup().button());
@ -997,7 +997,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
if (e->type() == TQEvent::MouseMove)
{
TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())) &&
if (rect().contains(mapFromGlobal(me->globalPos())) &&
((me->state() & ControlButton) != 0 ||
(me->state() & ShiftButton) != 0))
{
@ -1009,7 +1009,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
e->type() == TQEvent::MouseButtonDblClick)
{
TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())))
if (rect().contains(mapFromGlobal(me->globalPos())))
{
m_pressedDuringPopup = true;
return true;
@ -1018,7 +1018,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
else if (e->type() == TQEvent::MouseButtonRelease)
{
TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())))
if (rect().contains(mapFromGlobal(me->globalPos())))
{
if (m_pressedDuringPopup && m_popup)
{

@ -224,7 +224,7 @@ void PrefMenu::dragEnterEvent(TQDragEnterEvent *event)
void PrefMenu::dragLeaveEvent(TQDragLeaveEvent */*event*/)
{
// see PrefMenu::dragEnterEvent why this is nescessary
if (!TQT_TQRECT_OBJECT(frameGeometry()).contains(TQCursor::pos()))
if (!frameGeometry().contains(TQCursor::pos()))
{
KURLDrag::setTarget(0);
}

@ -114,7 +114,7 @@ void RecentDocsMenu::mouseMoveEvent(TQMouseEvent* e) {
if (!(e->state() & Qt::LeftButton))
return;
if (!TQT_TQRECT_OBJECT(rect()).contains(_mouseDown))
if (!rect().contains(_mouseDown))
return;
int dragLength = (e->pos() - _mouseDown).manhattanLength();

@ -1061,7 +1061,7 @@ void TaskContainer::mouseReleaseEvent(TQMouseEvent *e)
// This is to avoid the flicker caused by redrawing the
// button as unpressed just before it's activated.
if (!TQT_TQRECT_OBJECT(rect()).contains(e->pos()))
if (!rect().contains(e->pos()))
{
TQToolButton::mouseReleaseEvent(e);
return;

@ -183,7 +183,7 @@ TQString CurrentMgr::makeTimeStr(int b)
TQDateTime dt;
dt.setTime_t(b);
return (dt.daysTo(TQDateTime::currentDateTime()) > 31)
? TDEGlobal::locale()->formatDate(TQT_TQDATE_OBJECT(dt.date()), false)
? TDEGlobal::locale()->formatDate(dt.date(), false)
: TDEGlobal::locale()->formatDateTime(dt, false);
}

@ -161,7 +161,7 @@ void KonqListViewItem::updateContents()
const TQString entryStr = retrieveExtraEntry( m_fileitem, numExtra );
if ( tmpColumn->type == TQVariant::DateTime )
{
TQDateTime dt = TQT_TQDATETIME_OBJECT(TQDateTime::fromString( entryStr, Qt::ISODate ));
TQDateTime dt = TQDateTime::fromString( entryStr, Qt::ISODate );
setText(tmpColumn->displayInColumn,
TDEGlobal::locale()->formatDateTime(dt));
}
@ -292,9 +292,9 @@ int KonqBaseListViewItem::compare( TQListViewItem* item, int col, bool ascending
{
if ( cInfo->type & TQVariant::DateTime ) {
const TQString entryStr1 = retrieveExtraEntry( m_fileitem, numExtra );
TQDateTime dt1 = TQT_TQDATETIME_OBJECT(TQDateTime::fromString( entryStr1, Qt::ISODate ));
TQDateTime dt1 = TQDateTime::fromString( entryStr1, Qt::ISODate );
const TQString entryStr2 = retrieveExtraEntry( k->m_fileitem, numExtra );
TQDateTime dt2 = TQT_TQDATETIME_OBJECT(TQDateTime::fromString( entryStr2, Qt::ISODate ));
TQDateTime dt2 = TQDateTime::fromString( entryStr2, Qt::ISODate );
return ( dt1 > dt2 ) ? 1 : ( dt1 < dt2 ) ? -1 : 0;
}
}

@ -132,18 +132,18 @@ void KonqSidebarHistoryItem::paintCell( TQPainter *p, const TQColorGroup & cg,
TQDateTime current = TQDateTime::currentDateTime();
if ( s_settings->m_metricYoungerThan == KonqSidebarHistorySettings::DAYS )
dt = TQT_TQDATETIME_OBJECT(current.addDays( - s_settings->m_valueYoungerThan ));
dt = current.addDays( - s_settings->m_valueYoungerThan );
else
dt = TQT_TQDATETIME_OBJECT(current.addSecs( - (s_settings->m_valueYoungerThan * 60) ));
dt = current.addSecs( - (s_settings->m_valueYoungerThan * 60) );
if ( m_entry->lastVisited > dt )
p->setFont( s_settings->m_fontYoungerThan );
else {
if ( s_settings->m_metricOlderThan == KonqSidebarHistorySettings::DAYS )
dt = TQT_TQDATETIME_OBJECT(current.addDays( - s_settings->m_valueOlderThan ));
dt = current.addDays( - s_settings->m_valueOlderThan );
else
dt = TQT_TQDATETIME_OBJECT(current.addSecs( - (s_settings->m_valueOlderThan * 60) ));
dt = current.addSecs( - (s_settings->m_valueOlderThan * 60) );
if ( m_entry->lastVisited < dt )
p->setFont( s_settings->m_fontOlderThan );

@ -117,8 +117,8 @@ LogSensor::answerReceived(int id, const TQString& answer)
KNotifyClient::event(monitor->winId(), "sensor_alarm", TQString("sensor '%1' at '%2' reached upper limit").arg(sensorName).arg(hostName));
timerOn();
}
TQDate date = TQT_TQDATE_OBJECT(TQDateTime::currentDateTime().date());
TQTime time = TQT_TQTIME_OBJECT(TQDateTime::currentDateTime().time());
TQDate date = TQDateTime::currentDateTime().date();
TQTime time = TQDateTime::currentDateTime().time();
stream << TQString("%1 %2 %3 %4 %5: %6\n").arg(date.shortMonthName(date.month())).arg(date.day()).arg(time.toString()).arg(hostName).arg(sensorName).arg(value);
}

@ -637,7 +637,7 @@ bool TrashImpl::readInfoFile( const TQString& infoPath, TrashedFileInfo& info, i
}
TQString line = cfg.readEntry( "DeletionDate" );
if ( !line.isEmpty() ) {
info.deletionDate = TQT_TQDATETIME_OBJECT(TQDateTime::fromString( line, Qt::ISODate ));
info.deletionDate = TQDateTime::fromString( line, Qt::ISODate );
}
return true;
}

@ -1412,7 +1412,7 @@ void B2Titlebar::mouseDoubleClickEvent(TQMouseEvent *e)
void B2Titlebar::wheelEvent(TQWheelEvent *e)
{
if (client->isSetShade() || TQT_TQRECT_OBJECT(rect()).contains(e->pos()))
if (client->isSetShade() || rect().contains(e->pos()))
client->titlebarMouseWheelOperation( e->delta());
}

@ -723,7 +723,7 @@ void QuartzClient::paintEvent( TQPaintEvent* )
// Draw the title bar.
// ===================
int r_x, r_y, r_x2, r_y2;
TQT_TQRECT_OBJECT(widget()->rect()).coords(&r_x, &r_y, &r_x2, &r_y2);
widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
const int titleEdgeLeft = layoutMetric(LM_TitleEdgeLeft);
const int titleEdgeTop = layoutMetric(LM_TitleEdgeTop);
const int titleEdgeRight = layoutMetric(LM_TitleEdgeRight);

@ -216,7 +216,7 @@ WebClient::reset( unsigned long changed )
WebClient::paintEvent(TQPaintEvent * pe)
{
int r_x, r_y, r_x2, r_y2;
TQT_TQRECT_OBJECT(widget()->rect()).coords(&r_x, &r_y, &r_x2, &r_y2);
widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
const int titleEdgeLeft = layoutMetric(LM_TitleEdgeLeft);
const int titleEdgeTop = layoutMetric(LM_TitleEdgeTop);
const int titleEdgeRight = layoutMetric(LM_TitleEdgeRight);

@ -881,7 +881,7 @@ bool KCommonDecoration::isToolWindow() const
TQRect KCommonDecoration::titleRect() const
{
int r_x, r_y, r_x2, r_y2;
TQT_TQRECT_OBJECT(widget()->rect()).coords(&r_x, &r_y, &r_x2, &r_y2);
widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
const int titleEdgeLeft = layoutMetric(LM_TitleEdgeLeft);
const int titleEdgeTop = layoutMetric(LM_TitleEdgeTop);
const int titleEdgeRight = layoutMetric(LM_TitleEdgeRight);

Loading…
Cancel
Save