Commit b3f4727e authored by Jeremy Whiting's avatar Jeremy Whiting

Initial port to frameworks.

It builds and runs, seems to compare files and folders ok.
Created logging categories for kompareshell, komparepart, and komparenavview
REVIEW:120554
parent 5d393577
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.8.12)
project(kompare)
# search packages used by KDE
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include(FeatureSummary)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
find_package(Qt5 OPTIONAL_COMPONENTS PrintSupport)
find_package(ECM 0.0.9 NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMInstallIcons)
find_package(KF5 REQUIRED COMPONENTS
DocTools
KDELibs4Support
Parts
TextEditor
WidgetsAddons
)
find_package(LibKompareDiff2 REQUIRED)
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${LIBKOMPAREDIFF2_INCLUDE_DIR})
include_directories (${LIBKOMPAREDIFF2_INCLUDE_DIR})
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
add_subdirectory( doc )
add_subdirectory( interfaces )
......@@ -31,11 +48,18 @@ kompare_shell.cpp
kompareurldialog.cpp
)
kde4_add_app_icon(kompare_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/hi*-app-kompare.png")
# kde4_add_app_icon(kompare_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/hi*-app-kompare.png")
kde4_add_executable(kompare ${kompare_SRCS})
add_executable(kompare ${kompare_SRCS})
target_link_libraries(kompare kompareinterface ${LIBKOMPAREDIFF2_LIBRARIES} komparedialogpages ${KDE4_KTEXTEDITOR_LIBS} )
target_link_libraries(kompare
kompareinterface
${LIBKOMPAREDIFF2_LIBRARIES}
komparedialogpages
KF5::TextEditor
KF5::WidgetsAddons
Qt5::Widgets
)
install(TARGETS kompare ${INSTALL_TARGETS_DEFAULT_ARGS} )
......
########### install files ###############
#
#
kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kompare)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kompare)
......@@ -7,9 +7,11 @@
set(kompareinterface_LIB_SRCS kompareinterface.cpp )
kde4_add_library(kompareinterface SHARED ${kompareinterface_LIB_SRCS})
add_library(kompareinterface SHARED ${kompareinterface_LIB_SRCS})
target_link_libraries(kompareinterface ${KDE4_KDECORE_LIBS} )
target_link_libraries(kompareinterface
Qt5::Core
)
set_target_properties(kompareinterface PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
install(TARGETS kompareinterface ${INSTALL_TARGETS_DEFAULT_ARGS} )
......
......@@ -6,7 +6,7 @@
published by the Free Software Foundation; either version 2 of
the License or (at your option) version 3 or any later version
accepted by the membership of KDE e.V. (or its successor approved
by the membership of KDE e.V.), which shall act as a proxy
by the membership of KDE e.V.), which shall act as a proxy
defined in Section 14 of version 3 of the license.
This program is distributed in the hope that it will be useful,
......@@ -20,8 +20,8 @@
#ifndef _KOMPARE_INTERFACE_H
#define _KOMPARE_INTERFACE_H
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QString>
#include <QStringList>
#include <kdemacros.h>
class KConfig;
......@@ -67,12 +67,12 @@ public:
* appropriate method(s)
*/
virtual void compare( const KUrl& sourceFile, const KUrl& destinationFile ) = 0;
/**
* Compare a Source file to a custom Destination string
*/
virtual void compareFileString( const KUrl & sourceFile, const QString & destination) = 0;
/**
* Compare a custom Source string to a Destination file
*/
......
......@@ -18,27 +18,29 @@
#include "kompare_shell.h"
#include <QtCore/QTextStream>
#include <QtGui/QDockWidget>
#include <QDockWidget>
#include <QEventLoopLocker>
#include <QFileDialog>
#include <QMimeDatabase>
#include <QPushButton>
#include <ktexteditor/document.h>
#include <ktexteditor/view.h>
#include <kdebug.h>
#include <kedittoolbar.h>
#include <kencodingfiledialog.h>
#include <kiconloader.h>
#include <kfile.h>
#include <kshortcutsdialog.h>
#include <klibloader.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kparts/componentfactory.h>
#include <ksqueezedtextlabel.h>
#include <kstatusbar.h>
#include <kstandardaction.h>
#include <kmimetypetrader.h>
#include <kservicetypetrader.h>
#include <ktoggleaction.h>
// #include <kuserprofile.h>
#include <kactioncollection.h>
#include <kconfiggroup.h>
#include "kompareinterface.h"
#include "kompareurldialog.h"
......@@ -47,10 +49,13 @@
#define ID_N_OF_N_FILES 2
#define ID_GENERAL 3
Q_LOGGING_CATEGORY(KOMPARESHELL, "kompareshell")
KompareShell::KompareShell()
: KParts::MainWindow( ),
m_textViewPart( 0 ),
m_textViewWidget( 0 )
m_textViewWidget( 0 ),
m_eventLoopLocker( new QEventLoopLocker() )
{
if ( !initialGeometrySet() )
resize( 800, 480 );
......@@ -144,26 +149,30 @@ KompareShell::KompareShell()
KompareShell::~KompareShell()
{
delete m_eventLoopLocker;
m_eventLoopLocker = 0;
}
bool KompareShell::queryClose()
{
bool rv = m_viewPart->queryClose();
if ( rv )
KGlobal::deref();
{
close();
}
return rv;
}
void KompareShell::openDiff(const KUrl& url)
{
kDebug(8102) << "Url = " << url.prettyUrl() << endl;
qCDebug(KOMPARESHELL) << "Url = " << url.prettyUrl() ;
m_diffURL = url;
viewPart()->openDiff( url );
}
void KompareShell::openStdin()
{
kDebug(8102) << "Using stdin to read the diff" << endl;
qCDebug(KOMPARESHELL) << "Using stdin to read the diff" ;
QFile file;
file.open( stdin, QIODevice::ReadOnly );
QTextStream stream( &file );
......@@ -194,11 +203,11 @@ void KompareShell::blend( const KUrl& url1, const KUrl& diff )
void KompareShell::setupActions()
{
KAction *a;
QAction *a;
a = actionCollection()->addAction(KStandardAction::Open, this, SLOT(slotFileOpen()));
a->setText( i18n( "&Open Diff..." ) );
a = actionCollection()->addAction("file_compare_files", this, SLOT(slotFileCompareFiles()));
a->setIcon(KIcon("document-open"));
a->setIcon(QIcon::fromTheme("document-open"));
a->setText(i18n("&Compare Files..."));
a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
a = actionCollection()->addAction("file_blend_url", this, SLOT(slotFileBlendURLAndDiff()));
......@@ -221,8 +230,10 @@ void KompareShell::setupActions()
void KompareShell::setupStatusBar()
{
// Made these entries permanent so they will appear on the right side
statusBar()->insertPermanentItem( i18n(" 0 of 0 differences "), ID_N_OF_N_DIFFERENCES, 0);
statusBar()->insertPermanentItem( i18n(" 0 of 0 files "), ID_N_OF_N_FILES, 0);
m_differencesLabel = new QLabel(i18n(" 0 of 0 differences "));
m_filesLabel = new QLabel(i18n(" 0 of 0 files "));
statusBar()->insertPermanentWidget( ID_N_OF_N_DIFFERENCES, m_differencesLabel, 0);
statusBar()->insertPermanentWidget( ID_N_OF_N_FILES, m_filesLabel, 0);
m_generalLabel = new KSqueezedTextLabel( "", 0 );
statusBar()->addWidget( m_generalLabel, 1 );
......@@ -231,7 +242,7 @@ void KompareShell::setupStatusBar()
void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount )
{
kDebug(8102) << "KompareShell::updateStatusBar()" << endl;
qCDebug(KOMPARESHELL) << "KompareShell::updateStatusBar()" ;
QString fileStr;
QString diffStr;
......@@ -247,8 +258,8 @@ void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int
else
diffStr = i18np( " %1 difference ", " %1 differences ", differenceCount );
statusBar()->changeItem( fileStr, ID_N_OF_N_FILES );
statusBar()->changeItem( diffStr, ID_N_OF_N_DIFFERENCES );
m_filesLabel->setText( fileStr );
m_differencesLabel->setText( diffStr );
}
void KompareShell::slotSetStatusBarText( const QString& text )
......@@ -314,10 +325,9 @@ void KompareShell::readProperties(const KConfigGroup &config)
void KompareShell::slotFileOpen()
{
// FIXME: use different filedialog which gets encoding
KUrl url = KFileDialog::getOpenUrl( KUrl(), "text/x-patch", this );
KUrl url = QFileDialog::getOpenFileUrl( this, QString(), QUrl(), QMimeDatabase().mimeTypeForName("text/x-patch").filterString() );
if( !url.isEmpty() ) {
KompareShell* shell = new KompareShell();
KGlobal::ref();
shell->show();
shell->openDiff( url );
}
......@@ -327,12 +337,14 @@ void KompareShell::slotFileBlendURLAndDiff()
{
KompareURLDialog dialog( this );
dialog.setCaption( i18n( "Blend File/Folder with diff Output" ) );
dialog.setWindowTitle( i18n( "Blend File/Folder with diff Output" ) );
dialog.setFirstGroupBoxTitle( i18n( "File/Folder" ) );
dialog.setSecondGroupBoxTitle( i18n( "Diff Output" ) );
KGuiItem blendGuiItem( i18n( "Blend" ), QString(), i18n( "Blend this file or folder with the diff output" ), i18n( "If you have entered a file or folder name and a file that contains diff output in the fields in this dialog then this button will be enabled and pressing it will open kompare's main view where the output of the entered file or files from the folder are mixed with the diff output so you can then apply the difference(s) to a file or to the files. " ) );
dialog.setButtonGuiItem( KDialog::Ok, blendGuiItem );
QPushButton *okButton = dialog.button( QDialogButtonBox::Ok );
okButton->setText( i18n( "Blend" ) );
okButton->setToolTip( i18n( "Blend this file or folder with the diff output" ) );
okButton->setWhatsThis( i18n( "If you have entered a file or folder name and a file that contains diff output in the fields in this dialog then this button will be enabled and pressing it will open kompare's main view where the output of the entered file or files from the folder are mixed with the diff output so you can then apply the difference(s) to a file or to the files. " ) );
dialog.setGroup( "Recent Blend Files" );
......@@ -345,7 +357,6 @@ void KompareShell::slotFileBlendURLAndDiff()
m_destinationURL = dialog.getSecondURL();
// Leak???
KompareShell* shell = new KompareShell();
KGlobal::ref();
shell->show();
shell->viewPart()->setEncoding( dialog.encoding() );
shell->blend( m_sourceURL, m_destinationURL );
......@@ -356,12 +367,14 @@ void KompareShell::slotFileCompareFiles()
{
KompareURLDialog dialog( this );
dialog.setCaption( i18n( "Compare Files or Folders" ) );
dialog.setWindowTitle( i18n( "Compare Files or Folders" ) );
dialog.setFirstGroupBoxTitle( i18n( "Source" ) );
dialog.setSecondGroupBoxTitle( i18n( "Destination" ) );
KGuiItem compareGuiItem( i18n( "Compare" ), QString(), i18n( "Compare these files or folders" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
dialog.setButtonGuiItem( KDialog::Ok, compareGuiItem );
QPushButton *okButton = dialog.button( QDialogButtonBox::Ok );
okButton->setText( i18n( "Compare" ) );
okButton->setToolTip( i18n( "Compare these files or folders" ) );
okButton->setWhatsThis( i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
dialog.setGroup( "Recent Compare Files" );
......@@ -373,9 +386,8 @@ void KompareShell::slotFileCompareFiles()
m_sourceURL = dialog.getFirstURL();
m_destinationURL = dialog.getSecondURL();
KompareShell* shell = new KompareShell();
KGlobal::ref();
shell->show();
kDebug(8102) << "The encoding is: " << dialog.encoding() << endl;
qCDebug(KOMPARESHELL) << "The encoding is: " << dialog.encoding() ;
shell->viewPart()->setEncoding( dialog.encoding() );
shell->compare( m_sourceURL, m_destinationURL );
}
......@@ -385,7 +397,7 @@ void KompareShell::slotFileClose()
{
if ( m_viewPart->queryClose() )
{
KGlobal::deref();
close();
}
}
......
......@@ -20,9 +20,14 @@
#define KOMPARESHELL_H
#include <kapplication.h>
#include <kurl.h>
#include <kparts/mainwindow.h>
#include <kompare.h>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KOMPARESHELL)
class KompareInterface;
namespace KParts {
class ReadOnlyPart;
......@@ -33,6 +38,8 @@ class KToggleAction;
class KSqueezedTextLabel;
class KomparePart;
class KompareNavTreePart;
class QLabel;
class QEventLoopLocker;
namespace KTextEditor {
class Document;
......@@ -145,6 +152,9 @@ private:
KSqueezedTextLabel* m_generalLabel;
QString m_diffString;
QLabel* m_filesLabel;
QLabel* m_differencesLabel;
QEventLoopLocker* m_eventLoopLocker;
};
#endif // KOMPARE_H
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../libdiff2 ${CMAKE_CURRENT_SOURCE_DIR}/../komparepart )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../komparepart)
########### next target ###############
......@@ -7,11 +7,16 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../libdiff2 ${CMAKE_CURRENT_SOU
set(komparenavtreepart_PART_SRCS komparenavtreepart.cpp )
kde4_add_plugin(komparenavtreepart ${komparenavtreepart_PART_SRCS})
add_library(komparenavtreepart MODULE ${komparenavtreepart_PART_SRCS})
target_link_libraries(komparenavtreepart ${KDE4_KPARTS_LIBS} ${LIBKOMPAREDIFF2_LIBRARIES} )
target_link_libraries(komparenavtreepart
Qt5::Widgets
KF5::KDELibs4Support
KF5::Parts
${LIBKOMPAREDIFF2_LIBRARIES}
)
install(TARGETS komparenavtreepart DESTINATION ${PLUGIN_INSTALL_DIR} )
......
......@@ -18,20 +18,20 @@
#include "komparenavtreepart.h"
#include <QtGui/QTreeWidgetItemIterator>
#include <QDebug>
#include <QTreeWidgetItemIterator>
#include <kdebug.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmimetype.h>
#include <kaboutdata.h>
#include <k4aboutdata.h>
#include <kcomponentdata.h>
#include <kpluginfactory.h>
#include "difference.h"
#include "diffmodel.h"
#include "diffmodellist.h"
#include "komparemodellist.h"
#include <difference.h>
#include <diffmodel.h>
#include <diffmodellist.h>
#include <komparemodellist.h>
#define COL_SOURCE 0
#define COL_DESTINATION 1
......@@ -39,6 +39,8 @@
using namespace Diff2;
Q_LOGGING_CATEGORY(KOMPARENAVVIEW, "komparenavview")
KompareNavTreePart::KompareNavTreePart( QWidget* parentWidget, QObject* parent, const QVariantList& )
: KParts::ReadOnlyPart( parent ),
m_splitter( 0 ),
......@@ -109,7 +111,7 @@ void KompareNavTreePart::slotKompareInfo( struct Kompare::Info* info )
void KompareNavTreePart::slotModelsChanged( const DiffModelList* modelList )
{
kDebug(8105) << "Models (" << modelList << ") have changed... scanning the models... " << endl;
qCDebug(KOMPARENAVVIEW) << "Models (" << modelList << ") have changed... scanning the models... " ;
if ( modelList )
{
......@@ -132,17 +134,17 @@ void KompareNavTreePart::slotModelsChanged( const DiffModelList* modelList )
void KompareNavTreePart::buildTreeInMemory()
{
kDebug(8105) << "BuildTreeInMemory called" << endl;
qCDebug(KOMPARENAVVIEW) << "BuildTreeInMemory called" ;
if ( m_modelList->count() == 0 )
{
kDebug(8105) << "No models... weird shit..." << endl;
qCDebug(KOMPARENAVVIEW) << "No models... weird shit..." ;
return; // avoids a crash on clear()
}
if ( m_info == 0 )
{
kDebug(8105) << "No Info... weird shit..." << endl;
qCDebug(KOMPARENAVVIEW) << "No Info... weird shit..." ;
return;
}
......@@ -185,11 +187,11 @@ void KompareNavTreePart::buildTreeInMemory()
case Kompare::BlendingFile:
case Kompare::BlendingDir:
default:
kDebug(8105) << "Oops needs to implement this..." << endl;
qCDebug(KOMPARENAVVIEW) << "Oops needs to implement this..." ;
}
// kDebug(8105) << "srcBase = " << srcBase << endl;
// kDebug(8105) << "destBase = " << destBase << endl;
// qCDebug(KOMPARENAVVIEW) << "srcBase = " << srcBase ;
// qCDebug(KOMPARENAVVIEW) << "destBase = " << destBase ;
m_srcRootItem = new KDirLVI( m_srcDirTree, srcBase );
m_destRootItem = new KDirLVI( m_destDirTree, destBase );
......@@ -207,8 +209,8 @@ void KompareNavTreePart::buildTreeInMemory()
srcPath = model->sourcePath();
destPath = model->destinationPath();
kDebug(8105) << "srcPath = " << srcPath << endl;
kDebug(8105) << "destPath = " << destPath << endl;
qCDebug(KOMPARENAVVIEW) << "srcPath = " << srcPath ;
qCDebug(KOMPARENAVVIEW) << "destPath = " << destPath ;
m_srcRootItem->addModel( srcPath, model, &m_modelToSrcDirItemDict );
m_destRootItem->addModel( destPath, model, &m_modelToDestDirItemDict );
}
......@@ -218,7 +220,7 @@ void KompareNavTreePart::buildTreeInMemory()
void KompareNavTreePart::buildDirectoryTree()
{
// FIXME: afaict this can be deleted
// kDebug(8105) << "BuildDirTree called" << endl;
// qCDebug(KOMPARENAVVIEW) << "BuildDirTree called" ;
}
QString KompareNavTreePart::compareFromEndAndReturnSame(
......@@ -246,7 +248,7 @@ QString KompareNavTreePart::compareFromEndAndReturnSame(
void KompareNavTreePart::slotSetSelection( const DiffModel* model, const Difference* diff )
{
kDebug(8105) << "KompareNavTreePart::slotSetSelection model = " << model << ", diff = " << diff << endl;
qCDebug(KOMPARENAVVIEW) << "KompareNavTreePart::slotSetSelection model = " << model << ", diff = " << diff ;
if ( model == m_selectedModel )
{
// model is the same, so no need to update that...
......@@ -285,14 +287,14 @@ void KompareNavTreePart::setSelectedDir( const DiffModel* model )
{
KDirLVI* currentDir;
currentDir = m_modelToSrcDirItemDict[ model ];
kDebug(8105) << "Manually setting selection in srcdirtree with currentDir = " << currentDir << endl;
qCDebug(KOMPARENAVVIEW) << "Manually setting selection in srcdirtree with currentDir = " << currentDir ;
m_srcDirTree->blockSignals( true );
m_srcDirTree->setCurrentItem( currentDir );
m_srcDirTree->scrollToItem( currentDir );
m_srcDirTree->blockSignals( false );
currentDir = m_modelToDestDirItemDict[ model ];
kDebug(8105) << "Manually setting selection in destdirtree with currentDir = " << currentDir << endl;
qCDebug(KOMPARENAVVIEW) << "Manually setting selection in destdirtree with currentDir = " << currentDir ;
m_destDirTree->blockSignals( true );
m_destDirTree->setCurrentItem( currentDir );
m_destDirTree->scrollToItem( currentDir );
......@@ -307,7 +309,7 @@ void KompareNavTreePart::setSelectedFile( const DiffModel* model )
{
KFileLVI* currentFile;
currentFile = m_modelToFileItemDict[ model ];
kDebug(8105) << "Manually setting selection in filelist" << endl;
qCDebug(KOMPARENAVVIEW) << "Manually setting selection in filelist" ;
m_fileList->blockSignals( true );
m_fileList->setCurrentItem( currentFile );
m_fileList->scrollToItem( currentFile );
......@@ -322,7 +324,7 @@ void KompareNavTreePart::setSelectedDifference( const Difference* diff )
{
KChangeLVI* currentDiff;
currentDiff = m_diffToChangeItemDict[ diff ];
kDebug(8105) << "Manually setting selection in changeslist to " << currentDiff << endl;
qCDebug(KOMPARENAVVIEW) << "Manually setting selection in changeslist to " << currentDiff ;
m_changesList->blockSignals( true );
m_changesList->setCurrentItem( currentDiff );
m_changesList->scrollToItem( currentDiff );
......@@ -331,10 +333,10 @@ void KompareNavTreePart::setSelectedDifference( const Difference* diff )
void KompareNavTreePart::slotSetSelection( const Difference* diff )
{
// kDebug(8105) << "Scotty i need more power !!" << endl;
// qCDebug(KOMPARENAVVIEW) << "Scotty i need more power !!" ;
if ( m_selectedDifference != diff )
{
// kDebug(8105) << "But sir, i am giving you all she's got" << endl;
// qCDebug(KOMPARENAVVIEW) << "But sir, i am giving you all she's got" ;
m_selectedDifference = diff;
setSelectedDifference( diff );
}
......@@ -345,7 +347,7 @@ void KompareNavTreePart::slotSrcDirTreeSelectionChanged( QTreeWidgetItem* item )
if (!item)
return;
kDebug(8105) << "Sent by the sourceDirectoryTree with item = " << item << endl;
qCDebug(KOMPARENAVVIEW) << "Sent by the sourceDirectoryTree with item = " << item ;
m_srcDirTree->scrollToItem( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the dest tree view to set its selected item to the same as here
......@@ -366,7 +368,7 @@ void KompareNavTreePart::slotDestDirTreeSelectionChanged( QTreeWidgetItem* item
if (!item)
return;
kDebug(8105) << "Sent by the destinationDirectoryTree with item = " << item << endl;
qCDebug(KOMPARENAVVIEW) << "Sent by the destinationDirectoryTree with item = " << item ;
m_destDirTree->scrollToItem( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the src tree view to set its selected item to the same as here
......@@ -387,7 +389,7 @@ void KompareNavTreePart::slotFileListSelectionChanged( QTreeWidgetItem* item )
if (!item)
return;
kDebug(8105) << "Sent by the fileList with item = " << item << endl;
qCDebug(KOMPARENAVVIEW) << "Sent by the fileList with item = " << item ;
KFileLVI* file = static_cast<KFileLVI*>(item);
m_selectedModel = file->model();
......@@ -409,7 +411,7 @@ void KompareNavTreePart::slotChangesListSelectionChanged( QTreeWidgetItem* item
if (!item)
return;
kDebug(8105) << "Sent by the changesList" << endl;
qCDebug(KOMPARENAVVIEW) << "Sent by the changesList" ;
KChangeLVI* change = static_cast<KChangeLVI*>(item);
m_selectedDifference = change->difference();
......@@ -429,7 +431,7 @@ void KompareNavTreePart::slotApplyAllDifferences( bool /*apply*/ )
QHash<const Diff2::Difference*, KChangeLVI*>::ConstIterator it = m_diffToChangeItemDict.constBegin();
QHash<const Diff2::Difference*, KChangeLVI*>::ConstIterator end = m_diffToChangeItemDict.constEnd();
kDebug(8105) << "m_diffToChangeItemDict.count() = " << m_diffToChangeItemDict.count() << endl;
qCDebug(KOMPARENAVVIEW) << "m_diffToChangeItemDict.count() = " << m_diffToChangeItemDict.count() ;
for ( ; it != end ; ++it )
{
......@@ -476,7 +478,7 @@ void KChangeLVI::setDifferenceText()
m_difference->sourceLineCount() );
break;
default:
kDebug(8105) << "Unknown or Unchanged enum value when checking for diff->type() in KChangeLVI's constructor" << endl;
qCDebug(KOMPARENAVVIEW) << "Unknown or Unchanged enum value when checking for diff->type() in KChangeLVI's constructor" ;
text = "";
}
......@@ -620,7 +622,7 @@ KFileLVI::~KFileLVI()
KDirLVI::KDirLVI( QTreeWidget* parent, QString& dir ) : QTreeWidgetItem( parent )
{
// kDebug(8105) << "KDirLVI (QTreeWidget) constructor called with dir = " << dir << endl;
// qCDebug(KOMPARENAVVIEW) << "KDirLVI (QTreeWidget) constructor called with dir = " << dir ;
m_rootItem = true;
m_dirName = dir;
setIcon( 0, SmallIcon( "folder" ) );
......@@ -633,7 +635,7 @@ KDirLVI::KDirLVI( QTreeWidget* parent, QString& dir ) : QTreeWidgetItem( parent
KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : QTreeWidgetItem( parent )
{
// kDebug(8105) << "KDirLVI (KDirLVI) constructor called with dir = " << dir << endl;
// qCDebug(KOMPARENAVVIEW) << "KDirLVI (KDirLVI) constructor called with dir = " << dir ;
m_rootItem = false;
m_dirName = dir;
setIcon( 0, SmallIcon( "folder" ) );
......@@ -644,7 +646,7 @@ KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : QTreeWidgetItem( parent )
// addModel always removes it own path from the beginning
void KDirLVI::addModel( QString& path, DiffModel* model, QHash<const Diff2::DiffModel*, KDirLVI*>* modelToDirItemDict )
{
// kDebug(8105) << "KDirLVI::addModel called with path = " << path << " from KDirLVI with m_dirName = " << m_dirName << endl;
// qCDebug(KOMPARENAVVIEW) << "KDirLVI::addModel called with path = " << path << " from KDirLVI with m_dirName = " << m_dirName ;
if ( !m_dirName.isEmpty() )
{
......@@ -652,7 +654,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QHash<const Diff2::Diff
path = path.remove( path.indexOf( m_dirName ), m_dirName.length() );
}
// kDebug(8105) << "Path after removal of own dir (\"" << m_dirName << "\") = " << path << endl;
// qCDebug(KOMPARENAVVIEW) << "Path after removal of own dir (\"" << m_dirName << "\") = " << path ;
if ( path.isEmpty() ) {
m_modelList.append( model );
......@@ -667,7 +669,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QHash<const Diff2::Diff