Replaced various '#define' with actual strings - part 4

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/55/head
Michele Calgaro 1 year ago
parent dcc4dc7a89
commit b727f4b3b1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -335,7 +335,7 @@ void KisPreviewWidget::runFilterHelper() {
m_scaledImage = new KisImage(*m_origDevice->image()); m_scaledImage = new KisImage(*m_origDevice->image());
if(!m_origDevice->parentLayer()) return; if(!m_origDevice->parentLayer()) return;
TQString layerName = m_origDevice->parentLayer()->name(); TQString layerName = m_origDevice->parentLayer()->name();
KisPaintLayerSP pl = ::tqqt_cast<KisPaintLayer*>(m_scaledImage->findLayer(layerName)); KisPaintLayerSP pl = ::tqt_cast<KisPaintLayer*>(m_scaledImage->findLayer(layerName));
if(!pl) return; if(!pl) return;
scaledDevice = pl->paintDevice(); scaledDevice = pl->paintDevice();

@ -126,7 +126,7 @@ KoFilter::ConversionStatus CSVExport::convert( const TQCString & from, const TQC
if ( !document ) if ( !document )
return KoFilter::StupidError; return KoFilter::StupidError;
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) if ( !::tqt_cast<const KSpread::Doc *>( document ) )
{ {
kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -67,7 +67,7 @@ KoFilter::ConversionStatus CSVFilter::convert( const TQCString& from, const TQCS
kdDebug(30501) << "here we go... " << document->className() << endl; kdDebug(30501) << "here we go... " << document->className() << endl;
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) if ( !::tqt_cast<const KSpread::Doc *>( document ) )
{ {
kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -949,7 +949,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const TQCString& from, const
if (!document) if (!document)
return KoFilter::StupidError; return KoFilter::StupidError;
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) if ( !::tqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :)
{ {
kdWarning(30521) << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning(30521) << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -1835,7 +1835,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const TQCString & from, cons
kdDebug(30521) << "here we go... " << document->className() << endl; kdDebug(30521) << "here we go... " << document->className() << endl;
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) if ( !::tqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :)
{ {
kdWarning(30521) << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning(30521) << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -89,7 +89,7 @@ KoFilter::ConversionStatus HTMLExport::convert( const TQCString& from, const TQC
if ( !document ) if ( !document )
return KoFilter::StupidError; return KoFilter::StupidError;
if( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) if( !::tqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :)
{ {
kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -99,7 +99,7 @@ KoFilter::ConversionStatus KSpreadKexiImport::convert( const TQCString& from, co
kdDebug() << "here we go... " << document->className() << endl; kdDebug() << "here we go... " << document->className() << endl;
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) if ( !::tqt_cast<const KSpread::Doc *>( document ) )
{ {
kdWarning() << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning() << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -74,7 +74,7 @@ KoFilter::ConversionStatus Leader::convert() {
kdWarning(30508) << "the KSpreadDoc is NULL!" << endl; kdWarning(30508) << "the KSpreadDoc is NULL!" << endl;
return KoFilter::StupidError; return KoFilter::StupidError;
} }
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) { if ( !::tqt_cast<const KSpread::Doc *>( document ) ) {
kdWarning(30508) << "the document is not a KSpreadDoc!" << endl; kdWarning(30508) << "the document is not a KSpreadDoc!" << endl;
return KoFilter::StupidError; return KoFilter::StupidError;
} }

@ -104,7 +104,7 @@ KoFilter::ConversionStatus OpenCalcExport::convert( const TQCString & from,
if ( !document ) if ( !document )
return KoFilter::StupidError; return KoFilter::StupidError;
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) if ( !::tqt_cast<const KSpread::Doc *>( document ) )
{ {
kdWarning(30518) << "document isn't a KSpread::Doc but a " kdWarning(30518) << "document isn't a KSpread::Doc but a "
<< document->className() << endl; << document->className() << endl;

@ -2743,7 +2743,7 @@ KoFilter::ConversionStatus OpenCalcImport::convert( TQCString const & from, TQCS
if ( !document ) if ( !document )
return KoFilter::StupidError; return KoFilter::StupidError;
if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) if ( !::tqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :)
{ {
kdWarning(30518) << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning(30518) << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -104,7 +104,7 @@ KoFilter::ConversionStatus QpImport::convert( const TQCString& from, const TQCSt
kdDebug(30523) << "here we go... " << document->className() << endl; kdDebug(30523) << "here we go... " << document->className() << endl;
if( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) if( !::tqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :)
{ {
kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl;
return KoFilter::NotImplemented; return KoFilter::NotImplemented;

@ -81,7 +81,7 @@ void StencilBarDockManager::insertStencilSet( TQWidget* w, const TQString& capti
TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockLeft); TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockLeft);
for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) { for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) {
if(::tqqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) { if(::tqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) {
bar = static_cast<KivioStackBar*>(dock); bar = static_cast<KivioStackBar*>(dock);
break; break;
} }
@ -95,7 +95,7 @@ void StencilBarDockManager::insertStencilSet( TQWidget* w, const TQString& capti
TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockTop); TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockTop);
for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) { for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) {
if(::tqqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) { if(::tqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) {
bar = static_cast<KivioStackBar*>(dock); bar = static_cast<KivioStackBar*>(dock);
break; break;
} }
@ -109,7 +109,7 @@ void StencilBarDockManager::insertStencilSet( TQWidget* w, const TQString& capti
TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockRight); TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockRight);
for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) { for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) {
if(::tqqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) { if(::tqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) {
bar = static_cast<KivioStackBar*>(dock); bar = static_cast<KivioStackBar*>(dock);
break; break;
} }
@ -123,7 +123,7 @@ void StencilBarDockManager::insertStencilSet( TQWidget* w, const TQString& capti
TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockBottom); TQPtrList<TQDockWindow> dockList = m_pView->mainWindow()->dockWindows(TQt::DockBottom);
for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) { for(TQDockWindow* dock = dockList.first(); dock; dock = dockList.next()) {
if(::tqqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) { if(::tqt_cast<KivioStackBar*>(dock) && (static_cast<KivioStackBar*>(dock)->view() == m_pView)) {
bar = static_cast<KivioStackBar*>(dock); bar = static_cast<KivioStackBar*>(dock);
break; break;
} }

@ -84,7 +84,7 @@ int MouseToolAction::plug(TQWidget* widget, int index)
return usedIndex; return usedIndex;
} }
if(::tqqt_cast<TDEToolBar*>(widget)) { if(::tqt_cast<TDEToolBar*>(widget)) {
TDEToolBar* toolBar = static_cast<TDEToolBar*>(widget); TDEToolBar* toolBar = static_cast<TDEToolBar*>(widget);
TDEToolBarButton* button = toolBar->getButton(itemId(usedIndex)); TDEToolBarButton* button = toolBar->getButton(itemId(usedIndex));
connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL(doubleClicked())); connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL(doubleClicked()));

@ -679,7 +679,7 @@ bool EmbeddedChart::loadDocument( KoStore* _store )
KoChart::Part* EmbeddedChart::chart() KoChart::Part* EmbeddedChart::chart()
{ {
// Returns 0 when the chart couldn't be loaded and we get KoUnavailPart instead. // Returns 0 when the chart couldn't be loaded and we get KoUnavailPart instead.
return ::tqqt_cast<KoChart::Part *>( m_embeddedObject->document() ); return ::tqt_cast<KoChart::Part *>( m_embeddedObject->document() );
} }
/********************************************************** /**********************************************************

@ -360,7 +360,7 @@ KoDocument* KWDocumentChild::hitTest( const TQPoint& p, const TQWMatrix& _matrix
// Only activate when it's already selected, and when not clicking on the border. // Only activate when it's already selected, and when not clicking on the border.
// KWFrameView and the part frame policy have that logic already. // KWFrameView and the part frame policy have that logic already.
KWView* kwView = ::tqqt_cast<KWView *>( parentDocument()->hitTestView() ); KWView* kwView = ::tqt_cast<KWView *>( parentDocument()->hitTestView() );
Q_ASSERT( kwView ); Q_ASSERT( kwView );
if ( kwView ) { if ( kwView ) {
KWFrame* frame = m_partFrameSet->frame(0); KWFrame* frame = m_partFrameSet->frame(0);

@ -76,7 +76,7 @@ public:
} }
virtual bool eventFilter( TQObject *obj, TQEvent *ev ) virtual bool eventFilter( TQObject *obj, TQEvent *ev )
{ {
if ( !obj->isWidgetType() || ::tqqt_cast<KoFrame *>( obj ) ) if ( !obj->isWidgetType() || ::tqt_cast<KoFrame *>( obj ) )
return false; return false;
return KParts::PartManager::eventFilter( obj, ev ); return KParts::PartManager::eventFilter( obj, ev );
} }

@ -279,11 +279,11 @@ TQWidgetList* KKbdAccessExtensions::getAllPanels()
TQWidget* widget = allWidgets->first(); TQWidget* widget = allWidgets->first();
while (widget) { while (widget) {
if (widget->isVisible()) { if (widget->isVisible()) {
if (::tqqt_cast<TQSplitter*>( widget )) { if (::tqt_cast<TQSplitter*>( widget )) {
// Only size TQSplitters with at least two handles (there is always one hidden). // Only size TQSplitters with at least two handles (there is always one hidden).
if (dynamic_cast<TQSplitter *>(widget)->sizes().count() >= 2) if (dynamic_cast<TQSplitter *>(widget)->sizes().count() >= 2)
allPanels->append(widget); allPanels->append(widget);
} else if (::tqqt_cast<TQDockWindow*>( widget )) { } else if (::tqt_cast<TQDockWindow*>( widget )) {
if (dynamic_cast<TQDockWindow *>(widget)->isResizeEnabled()) { if (dynamic_cast<TQDockWindow *>(widget)->isResizeEnabled()) {
// kdDebug() << "KKbdAccessExtensions::getAllPanels: TQDockWindow = " << widget->name() << endl; // kdDebug() << "KKbdAccessExtensions::getAllPanels: TQDockWindow = " << widget->name() << endl;
allPanels->append(widget); allPanels->append(widget);
@ -303,7 +303,7 @@ void KKbdAccessExtensions::nextHandle()
if (panel) { if (panel) {
bool advance = true; bool advance = true;
d->handleNdx++; d->handleNdx++;
if (::tqqt_cast<TQSplitter*>( panel )) if (::tqt_cast<TQSplitter*>( panel ))
advance = (d->handleNdx >= dynamic_cast<TQSplitter *>(panel)->sizes().count()); advance = (d->handleNdx >= dynamic_cast<TQSplitter *>(panel)->sizes().count());
else else
// Undocked windows have only one "handle" (center). // Undocked windows have only one "handle" (center).
@ -345,7 +345,7 @@ void KKbdAccessExtensions::prevHandle()
if (allWidgets->current()) panel = allWidgets->prev(); if (allWidgets->current()) panel = allWidgets->prev();
delete allWidgets; delete allWidgets;
if (panel) { if (panel) {
if (::tqqt_cast<TQSplitter*>( panel )) if (::tqt_cast<TQSplitter*>( panel ))
d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1; d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
else { else {
if (dynamic_cast<TQDockWindow *>(panel)->area()) if (dynamic_cast<TQDockWindow *>(panel)->area())
@ -361,7 +361,7 @@ void KKbdAccessExtensions::prevHandle()
panel = allWidgets->last(); panel = allWidgets->last();
delete allWidgets; delete allWidgets;
if (panel) { if (panel) {
if (::tqqt_cast<TQSplitter*>( panel )) if (::tqt_cast<TQSplitter*>( panel ))
d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1; d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
else { else {
if (dynamic_cast<TQDockWindow *>(panel)->area()) if (dynamic_cast<TQDockWindow *>(panel)->area())
@ -391,7 +391,7 @@ void KKbdAccessExtensions::showIcon()
if (!d->panel) return; if (!d->panel) return;
TQPoint p; TQPoint p;
// kdDebug() << "KKbdAccessExtensions::showIcon: topLevelWidget = " << d->panel->topLevelWidget()->name() << endl; // kdDebug() << "KKbdAccessExtensions::showIcon: topLevelWidget = " << d->panel->topLevelWidget()->name() << endl;
if (::tqqt_cast<TQSplitter*>( d->panel )) { if (::tqt_cast<TQSplitter*>( d->panel )) {
TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel); TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
int handleNdx = d->handleNdx - 1; int handleNdx = d->handleNdx - 1;
TQValueList<int> sizes = splitter->sizes(); TQValueList<int> sizes = splitter->sizes();
@ -461,7 +461,7 @@ void KKbdAccessExtensions::resizePanel(int dx, int dy, int state)
int adj = dx + dy; int adj = dx + dy;
if (adj == 0) return; if (adj == 0) return;
// kdDebug() << "KKbdAccessExtensions::resizePanel: panel = " << d->panel->name() << endl; // kdDebug() << "KKbdAccessExtensions::resizePanel: panel = " << d->panel->name() << endl;
if (::tqqt_cast<TQSplitter*>( d->panel )) { if (::tqt_cast<TQSplitter*>( d->panel )) {
TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel); TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
int handleNdx = d->handleNdx - 1; int handleNdx = d->handleNdx - 1;
TQValueList<int> sizes = splitter->sizes(); TQValueList<int> sizes = splitter->sizes();
@ -534,7 +534,7 @@ void KKbdAccessExtensions::resizePanelFromKey(int key, int state)
if (adj != 0) if (adj != 0)
resizePanel(dx, dy, state); resizePanel(dx, dy, state);
else { else {
if (key == TQt::Key_Enter && ::tqqt_cast<TQDockWindow*>( d->panel )) { if (key == TQt::Key_Enter && ::tqt_cast<TQDockWindow*>( d->panel )) {
TQDockWindow* dockWindow = dynamic_cast<TQDockWindow *>(d->panel); TQDockWindow* dockWindow = dynamic_cast<TQDockWindow *>(d->panel);
if (dockWindow->area()) if (dockWindow->area())
dockWindow->undock(); dockWindow->undock();

Loading…
Cancel
Save