Commit c2d37f85 authored by Stephan Kulow's avatar Stephan Kulow
Browse files

less use of deprecated functions

svn path=/trunk/KDE/kdebase/konqueror/; revision=535352
parent 594299fb
......@@ -34,7 +34,7 @@
KonqMainWindowIface::KonqMainWindowIface( KonqMainWindow * mainWindow )
:
// ARGL I hate this "virtual public DCOPObject" stuff!
DCOPObject( mainWindow->name() ),
DCOPObject( mainWindow->objectName().toUtf8() ),
KMainWindowInterface( mainWindow ), m_pMainWindow( mainWindow )
{
m_dcopActionProxy = new KDCOPActionProxy( mainWindow->actionCollection(), this );
......
......@@ -25,7 +25,7 @@
#include <dcopclient.h>
KonqViewIface::KonqViewIface( KonqView * view )
: DCOPObject( view->name() ), m_pView ( view )
: DCOPObject( DCOPCString( view->objectName().toUtf8() ) ), m_pView ( view )
{
}
......
......@@ -223,7 +223,7 @@ void KonquerorIface::updateProfileList()
QString KonquerorIface::crashLogFile()
{
return KonqMainWindow::s_crashlog_file->name();
return KonqMainWindow::s_crashlog_file->objectName();
}
QList<DCOPRef> KonquerorIface::getWindows()
......@@ -268,7 +268,7 @@ bool KonquerorIface::processCanBeReused( int screen )
return true;
QStringList allowed_parts = KonqSettings::safeParts();
bool all_parts_allowed = false;
if( allowed_parts.count() == 1 && allowed_parts.first() == QLatin1String( "SAFE" ))
{
allowed_parts.clear();
......
......@@ -86,7 +86,8 @@ KonqFrameStatusBar::KonqFrameStatusBar( KonqFrame *_parent )
m_pStatusLabel->installEventFilter(this);
addWidget( m_pStatusLabel, 1 /*stretch*/, false ); // status label
m_pLinkedViewCheckBox = new KonqCheckBox( this, "m_pLinkedViewCheckBox" );
m_pLinkedViewCheckBox = new KonqCheckBox( this );
m_pLinkedViewCheckBox->setObjectName( "m_pLinkedViewCheckBox" );
m_pLinkedViewCheckBox->setFocusPolicy(Qt::NoFocus);
m_pLinkedViewCheckBox->setSizePolicy(QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ));
m_pLinkedViewCheckBox->setWhatsThis( i18n("Checking this box on at least two views sets those views as 'linked'. "
......@@ -439,9 +440,10 @@ void KonqFrame::setTabIcon( const KUrl &url, QWidget* /*sender*/ )
if (m_pParentContainer) m_pParentContainer->setTabIcon( url, this );
}
void KonqFrame::reparentFrame( QWidget* parent, const QPoint & p, bool showIt )
void KonqFrame::reparentFrame( QWidget* parent, const QPoint & p )
{
QWidget::reparent( parent, p, showIt );
setParent( parent );
move( p );
}
void KonqFrame::slotStatusBarClicked()
......@@ -489,9 +491,8 @@ void KonqFrameContainerBase::printFrameInfo(const QString& spaces)
KonqFrameContainer::KonqFrameContainer( Qt::Orientation o,
QWidget* parent,
KonqFrameContainerBase* parentContainer,
const char * name)
: QSplitter( o, parent, name ), m_bAboutToBeDeleted(false)
KonqFrameContainerBase* parentContainer )
: QSplitter( o, parent ), m_bAboutToBeDeleted(false)
{
m_pParentContainer = parentContainer;
m_pFirstChild = 0L;
......@@ -598,9 +599,10 @@ void KonqFrameContainer::printFrameInfo( const QString& spaces )
kDebug(1202) << spaces << " Null child" << endl;
}
void KonqFrameContainer::reparentFrame( QWidget* parent, const QPoint & p, bool showIt )
void KonqFrameContainer::reparentFrame( QWidget* parent, const QPoint & p )
{
QWidget::reparent( parent, p, showIt );
setParent( parent );
move( p );
}
void KonqFrameContainer::swapChildren()
......
......@@ -75,8 +75,8 @@ class KonqCheckBox : public QCheckBox
{
Q_OBJECT // for classname
public:
KonqCheckBox(QWidget *parent=0, const char *name=0)
:QCheckBox( parent, name ) {}
KonqCheckBox(QWidget *parent=0)
:QCheckBox( parent ) {}
protected:
void drawButton( QPainter * );
};
......@@ -170,7 +170,7 @@ class KonqFrameBase
virtual void printFrameInfo( const QString& spaces );
virtual void reparentFrame( QWidget* parent,
const QPoint & p, bool showIt=false ) = 0;
const QPoint & p ) = 0;
virtual KonqFrameContainerBase* parentContainer() const { return m_pParentContainer; }
virtual void setParentContainer(KonqFrameContainerBase* parent) { m_pParentContainer = parent; }
......@@ -260,7 +260,7 @@ public:
virtual void setTabIcon( const KUrl &url, QWidget* sender );
virtual void reparentFrame(QWidget * parent,
const QPoint & p, bool showIt=false );
const QPoint & p );
//virtual KonqFrameContainerBase* parentContainer();
virtual QWidget* widget() { return this; }
......@@ -326,7 +326,7 @@ public:
virtual QByteArray frameType() { return QByteArray("ContainerBase"); }
virtual void reparentFrame(QWidget * parent,
const QPoint & p, bool showIt=false ) = 0;
const QPoint & p ) = 0;
virtual KonqFrameBase* activeChild() { return m_pActiveChild; }
......@@ -360,8 +360,7 @@ class KonqFrameContainer : public QSplitter, public KonqFrameContainerBase
public:
KonqFrameContainer( Qt::Orientation o,
QWidget* parent,
KonqFrameContainerBase* parentContainer,
const char * name = 0);
KonqFrameContainerBase* parentContainer );
virtual ~KonqFrameContainer();
virtual void listViews( ChildViewList *viewList );
......@@ -394,7 +393,7 @@ public:
//inherited
virtual void reparentFrame(QWidget * parent,
const QPoint & p, bool showIt=false );
const QPoint & p );
//make this one public
int idAfter( QWidget* w ){ return QSplitter::indexOf( w ) + 1; }
......
......@@ -5480,7 +5480,7 @@ void KonqMainWindow::copyHistory( KonqFrameBase *other ) { if( m_pChildFrame ) m
void KonqMainWindow::printFrameInfo( const QString &spaces ) { if( m_pChildFrame ) m_pChildFrame->printFrameInfo( spaces ); }
void KonqMainWindow::reparentFrame( QWidget* /*parent*/,
const QPoint & /*p*/, bool /*showIt*/ ) { return; }
const QPoint & /*p*/ ) { return; }
KonqFrameContainerBase* KonqMainWindow::parentContainer()const { return 0L; }
void KonqMainWindow::setParentContainer(KonqFrameContainerBase* /*parent*/) { return; }
......
......@@ -289,7 +289,7 @@ public:
void printFrameInfo( const QString &spaces );
void reparentFrame( QWidget* parent,
const QPoint & p, bool showIt=false );
const QPoint & p );
KonqFrameContainerBase* parentContainer()const;
void setParentContainer(KonqFrameContainerBase* parent);
......
......@@ -109,8 +109,8 @@ KonqMainWindow * KonqMisc::createNewWindow( const KUrl &url, const KParts::URLAr
? "webbrowsing" : "filemanagement";
QString profile = locate( "data", QLatin1String("konqueror/profiles/") + profileName );
return createBrowserWindowFromProfile(profile, profileName,
url, args,
return createBrowserWindowFromProfile(profile, profileName,
url, args,
forbidUseHTML, filesToSelect, tempFile, openURL );
}
......@@ -172,16 +172,16 @@ KonqMainWindow * KonqMisc::newWindowFromHistory( KonqView* view, int steps )
int oldPos = view->historyIndex();
int newPos = oldPos + steps;
const HistoryEntry * he = view->historyAt(newPos);
const HistoryEntry * he = view->historyAt(newPos);
if(!he)
return 0L;
KonqMainWindow* mainwindow = createNewWindow(he->url, KParts::URLArgs(),
KonqMainWindow* mainwindow = createNewWindow(he->url, KParts::URLArgs(),
false, QStringList(), false, /*openURL*/false);
if(!mainwindow)
return 0L;
KonqView* newView = mainwindow->currentView();
KonqView* newView = mainwindow->currentView();
if(!newView)
return 0L;
......@@ -225,9 +225,10 @@ QString KonqMisc::konqFilteredURL( QWidget* parent, const QString& _url, const Q
}
KonqDraggableLabel::KonqDraggableLabel( KonqMainWindow* mw, const QString& text )
: QLabel( text, 0L, "kde toolbar widget" ) // Use this name for it to be styled!
: QLabel( text ) // Use this name for it to be styled!
, m_mw(mw)
{
setObjectName( "kde toolbar widget" );
setBackgroundMode( Qt::PaletteButton );
setAlignment( (QApplication::isRightToLeft() ? Qt::AlignRight : Qt::AlignLeft) |
Qt::AlignVCenter | Qt::TextShowMnemonic );
......
......@@ -89,7 +89,7 @@ KonqFrameTabs::KonqFrameTabs(QWidget* parent, KonqFrameContainerBase* parentCont
i18n("&Duplicate Tab"),
m_pViewManager->mainWindow(),
SLOT( slotDuplicateTabPopup() ),
m_pViewManager->mainWindow()->action("duplicatecurrenttab")->shortcut(),
m_pViewManager->mainWindow()->action("duplicatecurrenttab")->shortcut(),
DUPLICATE_ID );
m_pPopupMenu->insertItem( SmallIconSet( "reload" ),
i18n( "&Reload Tab" ),
......@@ -244,9 +244,10 @@ void KonqFrameTabs::printFrameInfo( const QString& spaces )
}
}
void KonqFrameTabs::reparentFrame( QWidget* parent, const QPoint & p, bool showIt )
void KonqFrameTabs::reparentFrame( QWidget* parent, const QPoint & p )
{
QWidget::reparent( parent, p, showIt );
setParent( parent );
move( p );
}
void KonqFrameTabs::setTitle( const QString &title , QWidget* sender)
......@@ -362,21 +363,21 @@ void KonqFrameTabs::slotMovedTab( int from, int to )
void KonqFrameTabs::slotContextMenu( const QPoint &p )
{
refreshSubPopupMenuTab();
m_pPopupMenu->setItemEnabled( RELOAD_ID, false );
m_pPopupMenu->setItemEnabled( DUPLICATE_ID, false );
m_pPopupMenu->setItemEnabled( BREAKOFF_ID, false );
m_pPopupMenu->setItemEnabled( CLOSETAB_ID, false );
m_pPopupMenu->setItemEnabled( OTHERTABS_ID, true );
m_pSubPopupMenuTab->setItemEnabled( m_closeOtherTabsId, false );
m_pPopupMenu->exec( p );
}
void KonqFrameTabs::slotContextMenu( QWidget *w, const QPoint &p )
{
refreshSubPopupMenuTab();
uint tabCount = m_pChildFrameList->count();
m_pPopupMenu->setItemEnabled( RELOAD_ID, true );
m_pPopupMenu->setItemEnabled( DUPLICATE_ID, true );
......
......@@ -85,7 +85,7 @@ public:
//inherited
virtual void reparentFrame(QWidget * parent,
const QPoint & p, bool showIt=false );
const QPoint & parent );
void moveTabBackward(int index);
void moveTabForward(int index);
......
......@@ -132,7 +132,8 @@ KonqView* KonqViewManager::splitView ( Qt::Orientation orientation,
//kDebug(1202) << "Move out child" << endl;
QPoint pos = splitFrame->widget()->pos();
parentContainer->removeChildFrame( splitFrame );
splitFrame->widget()->reparent( m_pMainWindow, pos );
splitFrame->widget()->setParent( m_pMainWindow );
splitFrame->widget()->move( pos );
//kDebug(1202) << "Create new Container" << endl;
KonqFrameContainer *newContainer = new KonqFrameContainer( orientation, parentContainer->widget(), parentContainer );
......@@ -145,7 +146,8 @@ KonqView* KonqViewManager::splitView ( Qt::Orientation orientation,
}
//kDebug(1202) << "Move in child" << endl;
splitFrame->widget()->reparent( newContainer, pos );
splitFrame->widget()->setParent( newContainer );
splitFrame->widget()->move( pos );
newContainer->insertChildFrame( splitFrame );
#ifndef NDEBUG
......@@ -233,7 +235,8 @@ KonqView* KonqViewManager::splitWindow( Qt::Orientation orientation,
m_pMainWindow->insertChildFrame( newContainer );
newContainer->insertChildFrame( mainFrame );
mainFrame->widget()->reparent( newContainer, pos );
mainFrame->widget()->setParent( newContainer );
mainFrame->widget()->move( pos );
KonqView* childView = setupView( newContainer, newViewFactory, service, partServiceOffers, appServiceOffers, serviceType, true );
......@@ -278,13 +281,15 @@ void KonqViewManager::convertDocContainer()
//kDebug(1202) << "Move out child" << endl;
QPoint pos = m_pDocContainer->widget()->pos();
parentContainer->removeChildFrame( m_pDocContainer );
m_pDocContainer->widget()->reparent( m_pMainWindow, pos );
m_pDocContainer->widget()->setParent( m_pMainWindow );
m_pDocContainer->widget()->move( pos );
KonqFrameTabs* newContainer = new KonqFrameTabs( parentContainer->widget() , parentContainer, this);
parentContainer->insertChildFrame( newContainer );
connect( newContainer, SIGNAL(ctrlTabPressed()), m_pMainWindow, SLOT(slotCtrlTabPressed()) );
m_pDocContainer->widget()->reparent( newContainer, pos );
m_pDocContainer->widget()->setParent( newContainer );
m_pDocContainer->widget()->move( pos );
newContainer->insertChildFrame( m_pDocContainer );
if ( moveNewContainer ) {
......
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