Commit 7b5243f4 authored by Laurent Montel's avatar Laurent Montel 😁

Port some deprecated methods

parent f433a0ed
......@@ -32,6 +32,8 @@
#include <QMouseEvent>
#include <QPainter>
#include <iostream>
namespace Oxygen
{
......@@ -79,8 +81,8 @@ namespace Oxygen
QString type( _eventTypes[event->type()] );
if( !type.isEmpty() )
{
QTextStream( stdout ) << "Oxygen::WidgetExplorer::eventFilter - widget: " << object << " (" << object->metaObject()->className() << ")";
QTextStream( stdout ) << " type: " << type << endl;
std::cout << "Oxygen::WidgetExplorer::eventFilter - widget: " << object << " (" << qPrintable(object->metaObject()->className()) << ")";
std::cout << " type: " << qPrintable(type) << std::endl;
}
}
......@@ -112,20 +114,20 @@ namespace Oxygen
QWidget* widget( qobject_cast<QWidget*>(object) );
if( !widget ) return false;
QTextStream( stdout )
std::cout
<< "Oxygen::WidgetExplorer::eventFilter -"
<< " event: " << event << " type: " << eventType( event->type() )
<< " widget: " << widgetInformation( widget )
<< endl;
<< " event: " << event << " type: " << qPrintable(eventType( event->type() ))
<< " widget: " << qPrintable(widgetInformation( widget ))
<< std::endl;
// print parent information
QWidget* parent( widget->parentWidget() );
while( parent )
{
QTextStream( stdout ) << " parent: " << widgetInformation( parent ) << endl;
std::cout << " parent: " << qPrintable(widgetInformation( parent )) << std::endl;
parent = parent->parentWidget();
}
QTextStream( stdout ) << "" << endl;
std::cout << "" << std::endl;
}
break;
......
......@@ -298,7 +298,7 @@ namespace Oxygen
// FIXME: to be removed when fixed upstream
if( widget->inherits( "K3b::ThemedHeader" ) && widget->layout() )
{
widget->layout()->setMargin( 0 );
widget->layout()->setContentsMargins( 0, 0, 0, 0 );
_frameShadowFactory->setHasContrast( widget, true );
}
......
......@@ -258,7 +258,7 @@ namespace Oxygen
for( int i = widgets.size() - 1; i>=0; i-- )
{
QWidget* w = widgets.at(i);
w->render( &p, -widget->mapTo( w, rect.topLeft() ), rect, 0 );
w->render( &p, -widget->mapTo( w, rect.topLeft() ), rect, {} );
}
// end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment