Commit 6b9849e5 authored by David Faure's avatar David Faure

Source code reorganization: switch to .cpp extension, move konq sources to src...

Source code reorganization: switch to .cpp extension, move konq sources to src subdir (like dolphin and konsole, and to separate it from all the kcontrol modules and plugins), remove '_' so that kdab-insert-header (xemacs macro) works.

svn path=/trunk/KDE/kdebase/apps/; revision=678019
parent d26b06c4
project(konqueror)
add_definitions(-D_LARGEFILE64_SOURCE )
add_definitions (-DQT3_SUPPORT)
check_symbol_exists(mallinfo "malloc.h" KDE_MALLINFO_MALLOC)
check_symbol_exists(mallinfo "stdlib.h" KDE_MALLINFO_STDLIB)
# TODO KDE_MALLINFO_FIELD_hblkhd
# TODO KDE_MALLINFO_FIELD_uordblks
# TODO KDE_MALLINFO_FIELD_usmblks
configure_file(config-konqueror.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konqueror.h )
add_subdirectory( src )
add_subdirectory( client )
# on the way out
#add_subdirectory( iconview )
#add_subdirectory( listview )
if(UNIX)
add_subdirectory( shellcmdplugin )
endif(UNIX)
add_subdirectory( about )
add_subdirectory( pics )
......@@ -29,62 +15,16 @@ add_subdirectory( quickprint )
add_subdirectory( remoteencodingplugin )
add_subdirectory( dirpart )
add_subdirectory( settings )
add_subdirectory( kttsplugin )
include_directories( ${CMAKE_SOURCE_DIR}/libkonq ${CMAKE_SOURCE_DIR}/workspace/kcontrol/input )
add_subdirectory( tests )
########### next target ###############
set(konquerorprivate_SRCS
konq_application.cpp
konq_guiclients.cc
konq_run.cc
konq_view.cc
konq_viewmgr.cc
konq_misc.cc
konq_frame.cc
konq_framecontainer.cc
konq_tabs.cc
konq_actions.cc
konq_profiledlg.cc
konq_factory.cc
konq_combo.cc
konq_browseriface.cc
delayedinitializer.cc
konq_mainwindow.cc
konq_extensionmanager.cc
KonquerorAdaptor.cpp
KonqMainWindowAdaptor.cpp
KonqViewAdaptor.cpp
)
kde4_add_kcfg_files(konquerorprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/konq_settingsxt.kcfgc)
kde4_automoc(${konquerorprivate_SRCS})
qt4_add_dbus_interface(konquerorprivate_SRCS org.kde.Konqueror.Main.xml konqueror_interface)
kde4_add_library(konquerorprivate SHARED ${konquerorprivate_SRCS})
target_link_libraries(konquerorprivate ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KUTILS_LIBS} konq)
set_target_properties(konquerorprivate PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install(TARGETS konquerorprivate DESTINATION ${LIB_INSTALL_DIR})
kde4_add_kdeinit_executable( konqueror konq_main.cc)
target_link_libraries(kdeinit_konqueror konquerorprivate )
target_link_libraries( konqueror kdeinit_konqueror )
install(TARGETS kdeinit_konqueror DESTINATION ${LIB_INSTALL_DIR} )
install(TARGETS konqueror DESTINATION ${BIN_INSTALL_DIR})
if(UNIX)
add_subdirectory( shellcmdplugin )
endif(UNIX)
########### install files ###############
install( FILES konqfilemgr.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES kfmclient.desktop kfmclient_dir.desktop kfmclient_html.desktop kfmclient_war.desktop konqbrowser.desktop konquerorsu.desktop Home.desktop DESTINATION ${XDG_APPS_DIR} )
install( FILES konqueror.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES konqueror.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES konqueror.rc konq-simplebrowser.rc DESTINATION ${DATA_INSTALL_DIR}/konqueror )
install(FILES profile_webbrowsing.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/profiles/ RENAME webbrowsing)
install(FILES profile_filemanagement.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/profiles/ RENAME filemanagement)
......@@ -94,4 +34,3 @@ endif(NOT WIN32)
install(FILES profile_tabbedbrowsing.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/profiles/ RENAME tabbedbrowsing)
install(FILES profile_kde_devel.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/profiles/ RENAME kde_devel)
install(FILES profile_simplebrowser.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/profiles/ RENAME simplebrowser)
install(FILES org.kde.Konqueror.Main.xml org.kde.Konqueror.MainWindow.xml DESTINATION ${DBUS_INTERFACES_DIR} )
#! /usr/bin/env bash
### TEMPORARY for KDE4, might extract too much
### Consider restricting to the src subdir?
$EXTRACTRC `find . -name \*.rc` >> rc.cpp || exit 11
$EXTRACTRC sidebar/trees/history_module/history_dlg.ui >> rc.cpp || exit 12
$XGETTEXT -kaliasLocal `find . -name \*.cc -o -name \*.cpp -o -name \*.h` -o $podir/konqueror.pot
......@@ -2,8 +2,8 @@
set(kfmclient_SRCS kfmclient.cpp )
qt4_add_dbus_interface( kfmclient_SRCS ../org.kde.Konqueror.Main.xml konq_main_interface )
qt4_add_dbus_interface( kfmclient_SRCS ../org.kde.Konqueror.MainWindow.xml konq_mainwindow_interface )
qt4_add_dbus_interface( kfmclient_SRCS ../src/org.kde.Konqueror.Main.xml konq_main_interface )
qt4_add_dbus_interface( kfmclient_SRCS ../src/org.kde.Konqueror.MainWindow.xml konq_mainwindow_interface )
kde4_automoc(${kfmclient_SRCS})
......
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/.. )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../src ${CMAKE_CURRENT_BINARY_DIR}/../src )
########### next target ###############
set(kded_konqy_preloader_PART_SRCS preloader.cc )
kde4_add_kcfg_files(kded_konqy_preloader_PART_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../konq_settingsxt.kcfgc)
kde4_add_kcfg_files(kded_konqy_preloader_PART_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../src/konqsettingsxt.kcfgc)
qt4_add_dbus_adaptor(kded_konqy_preloader_PART_SRCS org.kde.konqueror.Preloader.xml preloader.h KonqyPreloader)
kde4_automoc(${kded_konqy_preloader_PART_SRCS})
kde4_add_plugin(kded_konqy_preloader ${kded_konqy_preloader_PART_SRCS})
target_link_libraries(kded_konqy_preloader ${KDE4_KDEUI_LIBS})
target_link_libraries(kded_konqy_preloader ${KDE4_KDEUI_LIBS})
install(TARGETS kded_konqy_preloader DESTINATION ${PLUGIN_INSTALL_DIR})
install(TARGETS kded_konqy_preloader DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install(FILES konqy_preload.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
install(FILES konqy_preloader.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded)
install(FILES konqy_preloader.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded)
install(FILES org.kde.konqueror.Preloader.xml DESTINATION ${DBUS_INTERFACES_DIR} )
......@@ -18,7 +18,7 @@
*/
#include "preloader.h"
#include "konq_settingsxt.h"
#include "konqsettingsxt.h"
#include "preloaderadaptor.h"
#include <kconfig.h>
......
add_subdirectory( tests )
check_symbol_exists(mallinfo "malloc.h" KDE_MALLINFO_MALLOC)
check_symbol_exists(mallinfo "stdlib.h" KDE_MALLINFO_STDLIB)
# TODO KDE_MALLINFO_FIELD_hblkhd
# TODO KDE_MALLINFO_FIELD_uordblks
# TODO KDE_MALLINFO_FIELD_usmblks
configure_file(config-konqueror.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konqueror.h )
include_directories( ${CMAKE_SOURCE_DIR}/libkonq ${CMAKE_SOURCE_DIR}/workspace/kcontrol/input )
########### next target ###############
set(konquerorprivate_SRCS
konqapplication.cpp
konqguiclients.cpp
konqrun.cpp
konqview.cpp
konqviewmanager.cpp
konqmisc.cpp
konqframe.cpp
konqframestatusbar.cpp
konqframecontainer.cpp
konqtabs.cpp
konqactions.cpp
konqprofiledlg.cpp
konqfactory.cpp
konqcombo.cpp
konqbrowseriface.cpp
delayedinitializer.cpp
konqmainwindow.cpp
konqextensionmanager.cpp
KonquerorAdaptor.cpp
KonqMainWindowAdaptor.cpp
KonqViewAdaptor.cpp
)
kde4_add_kcfg_files(konquerorprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/konqsettingsxt.kcfgc)
kde4_automoc(${konquerorprivate_SRCS})
qt4_add_dbus_interface(konquerorprivate_SRCS org.kde.Konqueror.Main.xml konqueror_interface)
kde4_add_library(konquerorprivate SHARED ${konquerorprivate_SRCS})
# This lib is private. Don't even think about linking to it!!!
# It *only* exists so that unit tests can be written.
target_link_libraries(konquerorprivate ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KUTILS_LIBS} konq)
set_target_properties(konquerorprivate PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install(TARGETS konquerorprivate DESTINATION ${LIB_INSTALL_DIR})
kde4_add_kdeinit_executable( konqueror konqmain.cpp)
target_link_libraries(kdeinit_konqueror konquerorprivate )
target_link_libraries( konqueror kdeinit_konqueror )
install(TARGETS kdeinit_konqueror DESTINATION ${LIB_INSTALL_DIR} )
install(TARGETS konqueror DESTINATION ${BIN_INSTALL_DIR})
########### install files ###############
install( FILES konqueror.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES konqueror.rc konq-simplebrowser.rc DESTINATION ${DATA_INSTALL_DIR}/konqueror )
install(FILES org.kde.Konqueror.Main.xml org.kde.Konqueror.MainWindow.xml DESTINATION ${DBUS_INTERFACES_DIR} )
......@@ -20,7 +20,7 @@
#include "KonqMainWindowAdaptor.h"
#include "KonqViewAdaptor.h"
#include "konq_view.h"
#include "konqview.h"
#include <kdebug.h>
#include <kstartupinfo.h>
......
......@@ -19,7 +19,7 @@
*/
#include "KonqViewAdaptor.h"
#include "konq_view.h"
#include "konqview.h"
KonqViewAdaptor::KonqViewAdaptor( KonqView * view )
: m_pView ( view )
......
......@@ -19,12 +19,12 @@
*/
#include "KonquerorAdaptor.h"
#include "konq_misc.h"
#include "konqmisc.h"
#include "KonqMainWindowAdaptor.h"
#include "konq_mainwindow.h"
#include "konq_viewmgr.h"
#include "konq_view.h"
#include "konq_settingsxt.h"
#include "konqmainwindow.h"
#include "konqviewmanager.h"
#include "konqview.h"
#include "konqsettingsxt.h"
#include <konq_settings.h>
#include <kapplication.h>
......@@ -173,7 +173,7 @@ QDBusObjectPath KonquerorAdaptor::windowForTab()
if( winfo.isOnCurrentDesktop() &&
#else
if(
#endif
#endif
!KonqMainWindow::isPreloaded() ) { // we want a tab in an already shown window
return QDBusObjectPath( '/' + window->objectName() );
}
......
......@@ -21,8 +21,7 @@
#define __delayedinitializer_h__
#include <QtCore/QObject>
//Added by qt3to4:
#include <QtCore/QEvent>
class QEvent;
class DelayedInitializer : public QObject
{
......@@ -30,6 +29,7 @@ class DelayedInitializer : public QObject
public:
DelayedInitializer( int eventType, QObject *parent, const char *name = 0 );
protected:
virtual bool eventFilter( QObject *receiver, QEvent *event );
Q_SIGNALS:
......@@ -43,5 +43,3 @@ private:
};
#endif
/* vim: et sw=4
*/
......@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
#include "konq_actions.h"
#include "konqactions.h"
#include <assert.h>
......@@ -31,8 +31,8 @@
#include <kmenu.h>
#include <kapplication.h>
#include "konq_view.h"
#include "konq_settingsxt.h"
#include "konqview.h"
#include "konqsettingsxt.h"
#include <kauthorized.h>
#include <algorithm>
......@@ -397,7 +397,7 @@ void KonqMostOftenURLSAction::parseHistory() // only ever called once
const KonqHistoryList mgrEntries = mgr->entries();
KonqHistoryList::const_iterator it = mgrEntries.begin();
const KonqHistoryList::const_iterator end = mgrEntries.end();
for ( uint i = 0; it != end && i < s_maxEntries; ++i, ++it ) {
for ( int i = 0; it != end && i < s_maxEntries; ++i, ++it ) {
s_mostEntries->append( *it );
}
qSort( s_mostEntries->begin(), s_mostEntries->end(), numberOfVisitOrder );
......@@ -492,4 +492,4 @@ void KonqMostOftenURLSAction::slotActivated( int id )
m_popupList.clear();
}
#include "konq_actions.moc"
#include "konqactions.moc"
......@@ -16,12 +16,12 @@
Boston, MA 02110-1301, USA.
*/
#include "konq_application.h"
#include "konqapplication.h"
#include <konq_settings.h>
#include <QtDBus/QtDBus>
#include "konq_mainwindow.h"
#include "konqmainwindow.h"
#include "KonquerorAdaptor.h"
#include "konq_viewmgr.h"
#include "konqviewmanager.h"
KonquerorApplication::KonquerorApplication()
: KApplication(),
......@@ -58,4 +58,4 @@ void KonquerorApplication::slotUpdateProfileList()
}
#include "konq_application.moc"
#include "konqapplication.moc"
#include "konq_browseriface.h"
#include "konq_view.h"
#include "konqbrowseriface.h"
#include "konqview.h"
KonqBrowserInterface::KonqBrowserInterface( KonqView *view )
: KParts::BrowserInterface( view )
......@@ -18,5 +18,5 @@ void KonqBrowserInterface::goHistory( int steps )
m_view->goHistory( steps );
}
#include "konq_browseriface.moc"
#include "konqbrowseriface.moc"
......@@ -18,7 +18,7 @@
*/
// Own
#include "konq_combo.h"
#include "konqcombo.h"
// Qt
#include <QtGui/QPainter>
......@@ -38,11 +38,11 @@
#include <klineedit.h>
#include <konq_pixmapprovider.h>
#include <kstandardshortcut.h>
#include <konq_mainwindow.h>
#include <konqmainwindow.h>
#include <kstringhandler.h>
// Local
#include "konq_view.h"
#include "konqview.h"
#include "KonquerorAdaptor.h"
#include "konqueror_interface.h"
......@@ -931,4 +931,4 @@ void KonqComboCompletionBox::insertStringList( const QStringList & list, int ind
insertItem( index++ , new KonqComboListBoxPixmap( *it ) );
}
}
#include "konq_combo.moc"
#include "konqcombo.moc"
......@@ -18,8 +18,11 @@
Boston, MA 02110-1301, USA.
*/
#ifndef __konq_mainwindow_p_h__
#define __konq_mainwindow_p_h__
#ifndef KONQEXTENDEDBOOKMARKOWNER_H
#define KONQEXTENDEDBOOKMARKOWNER_H
#include <konqbookmarkmenu.h>
#include <QObject>
class KonqExtendedBookmarkOwner : public QObject, public KonqBookmarkOwner
{
......
......@@ -15,7 +15,7 @@
*/
// Own
#include "konq_extensionmanager.h"
#include "konqextensionmanager.h"
// Qt
#include <QtGui/QLayout>
......@@ -35,8 +35,8 @@
#include <kstandardguiitem.h>
// Local
#include "konq_view.h"
#include "konq_mainwindow.h"
#include "konqview.h"
#include "konqmainwindow.h"
class KonqExtensionManagerPrivate
......@@ -163,4 +163,4 @@ void KonqExtensionManager::showEvent(QShowEvent *event)
KDialog::showEvent(event);
}
#include "konq_extensionmanager.moc"
#include "konqextensionmanager.moc"
......@@ -20,7 +20,7 @@
*/
// Own
#include "konq_factory.h"
#include "konqfactory.h"
// std
#include <assert.h>
......@@ -43,7 +43,7 @@
// Local
#include "konq_settings.h"
#include "konq_mainwindow.h"
#include "konqmainwindow.h"
static KAboutData *s_aboutData = 0;
......
/* This file is part of the KDE project
Copyright (C) 1998, 1999 Michael Reiher <michael.reiher@gmx.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
// Own
#include "konqframe.h"
// Local
#include "konqtabs.h"
#include "konqview.h"
#include "konqviewmanager.h"
#include "konqframevisitor.h"
#include "konqframestatusbar.h"
// std
#include <assert.h>
// Qt
#include <QtGui/QPainter>
#include <QtGui/QToolButton>
#include <QtGui/QTabBar>
#include <QtGui/QMenu>
#include <QtGui/QKeySequence>
#include <QtGui/QProgressBar>
#include <QtGui/QPixmap>
#include <QtGui/QKeyEvent>
#include <QtCore/QEvent>
#include <QtGui/QLabel>
#include <QtGui/QBoxLayout>
// KDE
#include <konq_pixmapprovider.h>
#include <kactioncollection.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kicon.h>
#include <kiconloader.h>
#include <klocale.h>
#include <ksqueezedtextlabel.h>
#include <kstandardshortcut.h>
#include <konq_events.h>
KonqFrame::KonqFrame( QWidget* parent, KonqFrameContainerBase *parentContainer )
: QWidget ( parent )
{
//kDebug(1202) << "KonqFrame::KonqFrame()" << endl;
m_pLayout = 0L;
m_pView = 0L;
// the frame statusbar
m_pStatusBar = new KonqFrameStatusBar( this);
m_pStatusBar->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
connect(m_pStatusBar, SIGNAL(clicked()), this, SLOT(slotStatusBarClicked()));
connect( m_pStatusBar, SIGNAL( linkedViewClicked( bool ) ), this, SLOT( slotLinkedViewClicked( bool ) ) );
m_separator = 0;
m_pParentContainer = parentContainer;
}
KonqFrame::~KonqFrame()
{
//kDebug(1202) << "KonqFrame::~KonqFrame() " << this << endl;
}
bool KonqFrame::isActivePart()
{
return ( m_pView &&
static_cast<KonqView*>(m_pView) == m_pView->mainWindow()->currentView() );
}
void KonqFrame::listViews( ChildViewList *viewList )
{
viewList->append( childView() );
}
void KonqFrame::saveConfig( KConfigGroup& config, const QString &prefix, bool saveURLs, KonqFrameBase* docContainer, int /*id*/, int /*depth*/ )
{
if (saveURLs)
config.writePathEntry( QString::fromLatin1( "URL" ).prepend( prefix ),
childView()->url().url() );
config.writeEntry( QString::fromLatin1( "ServiceType" ).prepend( prefix ), childView()->serviceType() );
config.writeEntry( QString::fromLatin1( "ServiceName" ).prepend( prefix ), childView()->service()->desktopEntryName() );
config.writeEntry( QString::fromLatin1( "PassiveMode" ).prepend( prefix ), childView()->isPassiveMode() );
config.writeEntry( QString::fromLatin1( "LinkedView" ).prepend( prefix ), childView()->isLinkedView() );
config.writeEntry( QString::fromLatin1( "ToggleView" ).prepend( prefix ), childView()->isToggleView() );
config.writeEntry( QString::fromLatin1( "LockedLocation" ).prepend( prefix ), childView()->isLockedLocation() );
//config.writeEntry( QString::fromLatin1( "ShowStatusBar" ).prepend( prefix ), statusbar()->isVisible() );
if (this == docContainer) config.writeEntry( QString::fromLatin1( "docContainer" ).prepend( prefix ), true );
KonqConfigEvent ev( config.config(), prefix+'_', true/*save*/);
QApplication::sendEvent( childView()->part(), &ev );
}
void KonqFrame::copyHistory( KonqFrameBase *other )
{
assert( other->frameType() == "View" );
childView()->copyHistory( static_cast<KonqFrame *>( other )->childView() );
}
KParts::ReadOnlyPart *KonqFrame::attach( const KonqViewFactory &viewFactory )
{
KonqViewFactory factory( viewFactory );
// Note that we set the parent to 0.
// We don't want that deleting the widget deletes the part automatically
// because we already have that taken care of in KParts...
m_pPart = factory.create( this, 0 );
assert( m_pPart->widget() );
attachWidget(m_pPart->widget());
m_pStatusBar->slotConnectToNewView(0, 0, m_pPart);
return m_pPart;
}
void KonqFrame::attachWidget(QWidget* widget)