Commit 0362467c authored by David Faure's avatar David Faure
Browse files

make kdeinit_konqueror/fast ; make konqueror/fast compiles.

svn path=/trunk/KDE/kdebase/konqueror/; revision=551309
parent b3c00789
......@@ -28,11 +28,13 @@ add_subdirectory( tests )
########### next target ###############
#TODO: port those to DBUS
# KonquerorIface.cc
# KonqMainWindowIface.cc
# KonqViewIface.cc
set(konqueror_KDEINIT_SRCS ${libkonqueror_intern_SRCS}
konq_main.cc
KonquerorIface.cc
KonqMainWindowIface.cc
KonqViewIface.cc
konq_guiclients.cc
konq_run.cc
konq_view.cc
......
......@@ -37,8 +37,6 @@
#include <konq_mainwindow.h>
#include <kstringhandler.h>
#include <dcopclient.h>
#include "konq_view.h"
#include "konq_combo.h"
......@@ -138,9 +136,6 @@ KonqCombo::KonqCombo( QWidget *parent )
connect( this, SIGNAL(highlighted( int )), SLOT(slotSetIcon( int )) );
connect( this, SIGNAL(activated( const QString& )),
SLOT(slotActivated( const QString& )) );
if ( !kapp->dcopClient()->isAttached() )
kapp->dcopClient()->attach();
}
KonqCombo::~KonqCombo()
......@@ -163,13 +158,17 @@ void KonqCombo::setURL( const QString& url )
if ( m_returnPressed ) { // Really insert...
m_returnPressed = false;
#ifdef __GNUC__
#warning port to DBUS signal addToCombo
#endif
#if 0
QByteArray data;
QDataStream s( &data, QIODevice::WriteOnly );
s.setVersion(QDataStream::Qt_3_1);
s << url << kapp->dcopClient()->defaultObject();
kapp->dcopClient()->send( "konqueror*", "KonquerorIface",
"addToCombo(QString,QCString)", data);
#endif
}
}
......@@ -216,7 +215,7 @@ void KonqCombo::removeDuplicates( int index )
}
}
// called via DCOP in all instances
// called via DBUS in all instances
void KonqCombo::insertPermanent( const QString& url )
{
//kDebug(1202) << "KonqCombo::insertPermanent: URL = " << url << endl;
......@@ -525,12 +524,16 @@ void KonqCombo::selectWord(QKeyEvent *e)
void KonqCombo::slotCleared()
{
#ifdef __GNUC__
#warning port to DBUS signal comboCleared
#endif
#if 0
QByteArray data;
QDataStream s( &data, QIODevice::WriteOnly );
s.setVersion(QDataStream::Qt_3_1);
s << kapp->dcopClient()->defaultObject();
kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "comboCleared(QCString)", data);
#endif
}
void KonqCombo::removeURL( const QString& url )
......
This diff is collapsed.
......@@ -44,7 +44,6 @@
#include <kcompletion.h>
#include <kurlcompletion.h>
#include <kglobalsettings.h>
#include <dcopobject.h>
#include <kxmlguifactory.h>
#include <kxmlguiclient.h>
#include <kservice.h>
......@@ -111,7 +110,7 @@ public:
enum ComboAction { ComboClear, ComboAdd, ComboRemove };
enum PageSecurity { NotCrypted, Encrypted, Mixed };
KonqMainWindow( const KUrl &initialURL = KUrl(), bool openInitialURL = true, const char *name = 0, const QString& xmluiFile="konqueror.rc");
KonqMainWindow( const KUrl &initialURL = KUrl(), bool openInitialURL = true, const QString& xmluiFile="konqueror.rc");
~KonqMainWindow();
......@@ -157,7 +156,7 @@ public:
void setInitialFrameName( const QString &name );
KonqMainWindowIface * dcopObject();
// KonqMainWindowIface * dcopObject();
void reparseConfiguration();
......@@ -744,7 +743,7 @@ private:
// it holds a map library name (libkonqiconview/libkonqlistview) ==> service (service for
// iconview, multicolumnview, treeview, etc .)
KonqMainWindowIface * m_dcopObject;
// KonqMainWindowIface * m_dcopObject;
static QStringList *s_plstAnimatedLogo;
......
......@@ -153,7 +153,7 @@ KonqMainWindow * KonqMisc::createBrowserWindowFromProfile( const QString &path,
cfg.setGroup( "Profile" );
QString xmluiFile=cfg.readEntry("XMLUIFile","konqueror.rc");
mainWindow = new KonqMainWindow( KUrl(), false, 0, xmluiFile );
mainWindow = new KonqMainWindow( KUrl(), false, xmluiFile );
if ( forbidUseHTML )
mainWindow->setShowHTML( false );
KonqOpenURLRequest req;
......@@ -258,9 +258,7 @@ void KonqDraggableLabel::mouseMoveEvent( QMouseEvent * ev )
drag->setMimeData( md );
QString iconName = KMimeType::iconNameForURL( lst.first() );
#warning switch the following statements on next kdelibs snapshot update
drag->setPixmap(KGlobal::iconLoader()->loadIcon(iconName, K3Icon::Small));
//drag->setPixmap(KGlobal::iconLoader()->loadMimeTypeIcon(iconName, K3Icon::Small));
drag->setPixmap(KGlobal::iconLoader()->loadMimeTypeIcon(iconName, K3Icon::Small));
drag->start();
}
......@@ -275,7 +273,7 @@ void KonqDraggableLabel::mouseReleaseEvent( QMouseEvent * )
void KonqDraggableLabel::dragEnterEvent( QDragEnterEvent *ev )
{
if ( KUrl::List::canDecode( ev->mimeData() ) )
ev->acceptAction();
ev->accept();
}
void KonqDraggableLabel::dropEvent( QDropEvent* ev )
......
......@@ -252,7 +252,7 @@ void KonqView::switchView( KonqViewFactory &viewFactory )
// Activate the new part
if ( oldPart )
{
m_pPart->setObjectName( oldPart->name() );
m_pPart->setObjectName( oldPart->objectName() );
emit sigPartChanged( this, oldPart, m_pPart );
delete oldPart;
}
......@@ -465,7 +465,7 @@ void KonqView::connectPart( )
if ( ext )
urlDropHandling = ext->property( "urlDropHandling" );
else
urlDropHandling = QVariant( true, 0 );
urlDropHandling = QVariant( true );
// Handle url drops if
// a) either the property says "ok"
......@@ -1116,12 +1116,12 @@ void KonqView::setViewName( const QString &name )
{
//kDebug() << "KonqView::setViewName this=" << this << " name=" << name << endl;
if ( m_pPart )
m_pPart->setObjectName( name.toLocal8Bit().data() );
m_pPart->setObjectName( name );
}
QString KonqView::viewName() const
{
return m_pPart ? QString::fromLocal8Bit( m_pPart->name() ) : QString();
return m_pPart ? m_pPart->objectName() : QString();
}
void KonqView::enablePopupMenu( bool b )
......@@ -1211,8 +1211,9 @@ void KonqView::disableScrolling()
KonqViewIface * KonqView::dcopObject()
{
if ( !m_dcopObject )
m_dcopObject = new KonqViewIface( this );
// TODO
// if ( !m_dcopObject )
// m_dcopObject = new KonqViewIface( this );
return m_dcopObject;
}
......@@ -1229,13 +1230,13 @@ bool KonqView::eventFilter( QObject *obj, QEvent *e )
{
KUrl::List lstDragURLs = KUrl::List::fromMimeData( ev->mimeData() );
QObjectList children = m_pPart->widget()->queryList( "QWidget" );
QList<QWidget *> children = qFindChildren<QWidget *>( m_pPart->widget() );
if ( !lstDragURLs.isEmpty()
&& !lstDragURLs.first().url().contains( "javascript:", Qt::CaseInsensitive ) && // ### this looks like a hack to me
&& !lstDragURLs.first().url().startsWith( "javascript:", Qt::CaseInsensitive ) && // ### this looks like a hack to me
ev->source() != m_pPart->widget() &&
children.indexOf( ev->source() ) == -1 )
ev->acceptAction();
!children.contains( ev->source() ) )
ev->acceptProposedAction();
}
}
else if ( e->type() == QEvent::Drop && m_bURLDropHandling && obj == m_pPart->widget() )
......@@ -1281,9 +1282,9 @@ bool KonqView::eventFilter( QObject *obj, QEvent *e )
if ( ev->button() == Qt::RightButton )
{
obj->removeEventFilter( this );
QMouseEvent me( QEvent::MouseButtonPress, ev->pos(), 2, 2 );
QMouseEvent me( QEvent::MouseButtonPress, ev->pos(), Qt::RightButton, Qt::RightButton, Qt::NoModifier );
QApplication::sendEvent( obj, &me );
QContextMenuEvent ce( QContextMenuEvent::Mouse, ev->pos(), 2 );
QContextMenuEvent ce( QContextMenuEvent::Mouse, ev->pos(), ev->globalPos() );
QApplication::sendEvent( obj, &ce );
obj->installEventFilter( this );
return true;
......@@ -1301,9 +1302,9 @@ bool KonqView::eventFilter( QObject *obj, QEvent *e )
void KonqView::setActiveInstance()
{
if ( m_bBuiltinView || !m_pPart->instance() /*never!*/)
KGlobal::_activeInstance = KGlobal::instance();
KGlobal::setActiveInstance( KGlobal::instance() );
else
KGlobal::_activeInstance = m_pPart->instance();
KGlobal::setActiveInstance( m_pPart->instance() );
}
bool KonqView::prepareReload( KParts::URLArgs& args )
......
......@@ -35,7 +35,6 @@
#include <kapplication.h>
#include <kglobalsettings.h>
#include <ktempfile.h>
#include <dcopclient.h>
#include <klocale.h>
#include <kmessagebox.h>
......@@ -1682,7 +1681,10 @@ void KonqViewManager::profileListDirty( bool broadcast )
return;
}
kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "updateProfileList()", QByteArray() );
#ifdef __GNUC__
#warning port to DBUS signal updateProfileList
#endif
// kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "updateProfileList()", QByteArray() );
}
void KonqViewManager::slotProfileActivated( int id )
......
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