Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Network
Konqueror
Commits
bc87b353
Commit
bc87b353
authored
Aug 25, 2014
by
David Faure
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Almost finish the port to KF5. Sonnet::ConfigDialog is the last hurdle, asked for help.
parent
7eef62e6
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
47 additions
and
34 deletions
+47
-34
konqueror/CMakeLists.txt
konqueror/CMakeLists.txt
+1
-1
konqueror/src/CMakeLists.txt
konqueror/src/CMakeLists.txt
+5
-0
konqueror/src/konqbookmarkbar.cpp
konqueror/src/konqbookmarkbar.cpp
+11
-9
konqueror/src/konqbookmarkbar.h
konqueror/src/konqbookmarkbar.h
+2
-4
konqueror/src/konqcloseditem.cpp
konqueror/src/konqcloseditem.cpp
+1
-1
konqueror/src/konqclosedwindowsmanager.cpp
konqueror/src/konqclosedwindowsmanager.cpp
+2
-6
konqueror/src/konqextensionmanager.cpp
konqueror/src/konqextensionmanager.cpp
+4
-4
konqueror/src/konqhistorydialog.cpp
konqueror/src/konqhistorydialog.cpp
+2
-0
konqueror/src/konqmainwindow.cpp
konqueror/src/konqmainwindow.cpp
+15
-6
konqueror/src/konqmainwindow.h
konqueror/src/konqmainwindow.h
+1
-1
konqueror/src/konqsessionmanager.cpp
konqueror/src/konqsessionmanager.cpp
+3
-2
No files found.
konqueror/CMakeLists.txt
View file @
bc87b353
add_definitions
(
-D_LARGEFILE64_SOURCE
)
find_package
(
KF5 REQUIRED COMPONENTS Parts KCMUtils
)
find_package
(
KF5 REQUIRED COMPONENTS Parts KCMUtils
KHtml
)
if
(
Q_WS_X11
)
find_package
(
X11 REQUIRED
)
# both subdirs require the X11 libs
...
...
konqueror/src/CMakeLists.txt
View file @
bc87b353
...
...
@@ -111,6 +111,11 @@ target_link_libraries(kdeinit_konqueror
KF5::Parts
KF5::KDELibs4Support
)
# For khtmldefaults.h. We don't need to link to khtml, just to include that header...
get_target_property
(
khtml_include_dir KF5::KHtml INTERFACE_INCLUDE_DIRECTORIES
)
target_include_directories
(
kdeinit_konqueror PRIVATE
"
${
khtml_include_dir
}
"
)
if
(
UNIX
)
target_link_libraries
(
kdeinit_konqueror
${
X11_LIBRARIES
}
)
endif
(
UNIX
)
...
...
konqueror/src/konqbookmarkbar.cpp
View file @
bc87b353
...
...
@@ -28,18 +28,20 @@
#include <QEvent>
#include <QFile>
#include <QRegExp>
#include <QMenu>
#include <ktoolbar.h>
#include <kactionmenu.h>
#include <kconfig.h>
#include <kglobal.h>
#include <kmenu.h>
#include <kdebug.h>
#include <kconfiggroup.h>
#include <kio/global.h>
#include <kbookmarkmanager.h>
#include "konqbookmarkmenu.h"
#include "kbookmarkimporter.h"
#include "kbookmarkaction.h"
#include "kbookmarkdombuilder.h"
...
...
@@ -47,7 +49,7 @@
class
KBookmarkBarPrivate
{
public:
QList
<
K
Action
*>
m_actions
;
QList
<
Q
Action
*>
m_actions
;
int
m_sepIndex
;
QList
<
int
>
widgetPositions
;
//right edge, bottom edge
QString
tempLabel
;
...
...
@@ -88,7 +90,7 @@ KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr,
KBookmarkGroup
toolbar
=
getToolbar
();
fillBookmarkBar
(
toolbar
);
m_toolBarSeparator
=
new
K
Action
(
this
);
m_toolBarSeparator
=
new
Q
Action
(
this
);
}
QString
KBookmarkBar
::
parentAddress
()
...
...
@@ -193,7 +195,7 @@ void KBookmarkBar::fillBookmarkBar(const KBookmarkGroup & parent)
}
else
{
K
Action
*
action
=
new
KBookmarkAction
(
bm
,
m_pOwner
,
0
);
Q
Action
*
action
=
new
KBookmarkAction
(
bm
,
m_pOwner
,
0
);
if
(
m_toolBar
)
{
m_toolBar
->
addAction
(
action
);
}
...
...
@@ -229,7 +231,7 @@ void KBookmarkBar::removeTempSep()
* @param actions the list of actions plugged into the bar
* returned action was dropped on
*/
bool
KBookmarkBar
::
handleToolbarDragMoveEvent
(
const
QPoint
&
p
,
const
QList
<
K
Action
*>&
actions
,
const
QString
&
text
)
bool
KBookmarkBar
::
handleToolbarDragMoveEvent
(
const
QPoint
&
p
,
const
QList
<
Q
Action
*>&
actions
,
const
QString
&
text
)
{
if
(
d
->
m_filteredToolbar
)
return
false
;
...
...
@@ -321,7 +323,7 @@ void KBookmarkBar::contextMenu(const QPoint & pos)
}
else
{
K
Menu
*
menu
=
new
KonqBookmarkContextMenu
(
action
->
bookmark
(),
m_pManager
,
m_pOwner
);
Q
Menu
*
menu
=
new
KonqBookmarkContextMenu
(
action
->
bookmark
(),
m_pManager
,
m_pOwner
);
menu
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
menu
->
popup
(
m_toolBar
->
mapToGlobal
(
pos
));
}
...
...
@@ -356,7 +358,7 @@ bool KBookmarkBar::eventFilter( QObject *, QEvent *e )
if
(
d
->
m_sepIndex
==
0
)
{
KBookmark
newBookmark
=
parentBookmark
.
addBookmark
(
toInsert
.
fullText
(),
toInsert
.
url
()
);
KBookmark
newBookmark
=
parentBookmark
.
addBookmark
(
toInsert
.
fullText
(),
toInsert
.
url
()
,
KIO
::
iconNameForUrl
(
toInsert
.
url
())
);
parentBookmark
.
moveBookmark
(
newBookmark
,
KBookmark
()
);
m_pManager
->
emitChanged
(
parentBookmark
);
...
...
@@ -368,7 +370,7 @@ bool KBookmarkBar::eventFilter( QObject *, QEvent *e )
for
(
int
i
=
0
;
i
<
d
->
m_sepIndex
-
1
;
++
i
)
after
=
parentBookmark
.
next
(
after
);
KBookmark
newBookmark
=
parentBookmark
.
addBookmark
(
toInsert
.
fullText
(),
toInsert
.
url
()
);
KBookmark
newBookmark
=
parentBookmark
.
addBookmark
(
toInsert
.
fullText
(),
toInsert
.
url
()
,
KIO
::
iconNameForUrl
(
toInsert
.
url
())
);
parentBookmark
.
moveBookmark
(
newBookmark
,
after
);
m_pManager
->
emitChanged
(
parentBookmark
);
...
...
@@ -388,7 +390,7 @@ bool KBookmarkBar::eventFilter( QObject *, QEvent *e )
const
QList
<
KBookmark
>
list
=
KBookmark
::
List
::
fromMimeData
(
dme
->
mimeData
(),
doc
);
if
(
list
.
isEmpty
()
)
return
false
;
d
->
tempLabel
=
list
.
first
().
url
().
pathOrUrl
(
);
d
->
tempLabel
=
list
.
first
().
url
().
toDisplayString
(
QUrl
::
PreferLocalFile
);
d
->
widgetPositions
.
clear
();
...
...
konqueror/src/konqbookmarkbar.h
View file @
bc87b353
...
...
@@ -25,13 +25,11 @@
#include <QtCore/QPointer>
#include <QtCore/QList>
#include <kbookmark.h>
#include <kaction.h>
#include <kaction
collection
.h>
class
KToolBar
;
class
KBookmarkMenu
;
class
KBookmarkOwner
;
class
KActionCollection
;
class
KAction
;
class
KBookmarkBarPrivate
;
/**
...
...
@@ -77,7 +75,7 @@ protected:
private:
KBookmarkGroup
getToolbar
();
void
removeTempSep
();
bool
handleToolbarDragMoveEvent
(
const
QPoint
&
pos
,
const
QList
<
K
Action
*>&
actions
,
const
QString
&
text
);
bool
handleToolbarDragMoveEvent
(
const
QPoint
&
pos
,
const
QList
<
Q
Action
*>&
actions
,
const
QString
&
text
);
KBookmarkOwner
*
m_pOwner
;
QPointer
<
KToolBar
>
m_toolBar
;
...
...
konqueror/src/konqcloseditem.cpp
View file @
bc87b353
...
...
@@ -140,7 +140,7 @@ void KonqClosedRemoteWindowItem::readConfig() const
if
(
m_remoteConfig
||
m_remoteConfigGroup
)
return
;
m_remoteConfig
=
new
KConfig
(
m_remoteConfigFileName
,
KConfig
::
SimpleConfig
,
"tmp"
);
m_remoteConfig
=
new
KConfig
(
m_remoteConfigFileName
,
KConfig
::
SimpleConfig
);
m_remoteConfigGroup
=
new
KConfigGroup
(
m_remoteConfig
,
m_remoteGroupName
);
kDebug
();
}
...
...
konqueror/src/konqclosedwindowsmanager.cpp
View file @
bc87b353
...
...
@@ -66,7 +66,7 @@ KonqClosedWindowsManager::KonqClosedWindowsManager()
m_konqClosedItemsConfig
=
0L
;
m_blockClosedItems
=
false
;
m_konqClosedItemsStore
=
new
KConfig
(
file
name
,
KConfig
::
SimpleConfig
,
"tmp"
);
m_konqClosedItemsStore
=
new
KConfig
(
file
,
KConfig
::
SimpleConfig
);
}
KonqClosedWindowsManager
::~
KonqClosedWindowsManager
()
...
...
@@ -183,10 +183,6 @@ bool isSenderOfSignal( const QString& service )
void
KonqClosedWindowsManager
::
emitNotifyClosedWindowItem
(
const
KonqClosedWindowItem
*
closedWindowItem
)
{
QString
filename
=
"closeditems/"
+
KonqMisc
::
encodeFilename
(
QDBusConnection
::
sessionBus
().
baseService
());
QString
file
=
KStandardDirs
::
locateLocal
(
"tmp"
,
filename
);
emit
notifyClosedWindowItem
(
closedWindowItem
->
title
(),
closedWindowItem
->
numTabs
(),
m_konqClosedItemsStore
->
name
(),
...
...
@@ -356,7 +352,7 @@ void KonqClosedWindowsManager::saveConfig()
QString
file
=
KStandardDirs
::
locateLocal
(
"appdata"
,
filename
);
QFile
::
remove
(
file
);
KConfig
*
config
=
new
KConfig
(
file
name
,
KConfig
::
SimpleConfig
,
"appdata"
);
KConfig
*
config
=
new
KConfig
(
file
,
KConfig
::
SimpleConfig
);
// Populate the config file
KonqClosedWindowItem
*
closedWindowItem
=
0L
;
...
...
konqueror/src/konqextensionmanager.cpp
View file @
bc87b353
...
...
@@ -74,8 +74,8 @@ KonqExtensionManager::KonqExtensionManager(QWidget *parent, KonqMainWindow *main
d
->
pluginSelector
->
addPlugins
(
"konqueror"
,
i18n
(
"Extensions"
),
"Extensions"
,
KGlobal
::
config
());
if
(
activePart
)
{
KAboutData
componentData
=
activePart
->
componentData
();
d
->
pluginSelector
->
addPlugins
(
componentData
.
componentName
(),
i18n
(
"Extensions"
),
"Tools"
,
componentData
.
config
()
);
d
->
pluginSelector
->
addPlugins
(
componentData
.
componentName
(),
i18n
(
"Extensions"
),
"Statusbar"
,
componentData
.
config
()
);
d
->
pluginSelector
->
addPlugins
(
componentData
.
componentName
(),
i18n
(
"Extensions"
),
"Tools"
);
d
->
pluginSelector
->
addPlugins
(
componentData
.
componentName
(),
i18n
(
"Extensions"
),
"Statusbar"
);
}
connect
(
this
,
SIGNAL
(
okClicked
()),
SLOT
(
slotOk
())
);
...
...
@@ -109,7 +109,7 @@ void KonqExtensionManager::apply()
if
(
d
->
mainWindow
)
{
KParts
::
Plugin
::
loadPlugins
(
d
->
mainWindow
,
d
->
mainWindow
,
KGlobal
::
mainComponent
()
);
KParts
::
Plugin
::
loadPlugins
(
d
->
mainWindow
,
d
->
mainWindow
,
"konqueror"
);
QList
<
KParts
::
Plugin
*>
plugins
=
KParts
::
Plugin
::
pluginObjects
(
d
->
mainWindow
);
for
(
int
i
=
0
;
i
<
plugins
.
size
();
++
i
)
{
...
...
@@ -119,7 +119,7 @@ void KonqExtensionManager::apply()
if
(
d
->
activePart
)
{
KParts
::
Plugin
::
loadPlugins
(
d
->
activePart
,
d
->
activePart
,
d
->
activePart
->
component
Data
()
);
KParts
::
Plugin
::
loadPlugins
(
d
->
activePart
,
d
->
activePart
,
d
->
activePart
->
component
Name
());
QList
<
KParts
::
Plugin
*>
plugins
=
KParts
::
Plugin
::
pluginObjects
(
d
->
activePart
);
for
(
int
i
=
0
;
i
<
plugins
.
size
();
++
i
)
{
...
...
konqueror/src/konqhistorydialog.cpp
View file @
bc87b353
...
...
@@ -35,6 +35,8 @@
#include <kaction.h>
#include <kactioncollection.h>
#include <kguiitem.h>
#include <kglobal.h>
#include <kicon.h>
#include <klocale.h>
#include <klineedit.h>
#include <ktoggleaction.h>
...
...
konqueror/src/konqmainwindow.cpp
View file @
bc87b353
...
...
@@ -122,6 +122,7 @@
#include <kurlrequester.h>
#include <kmimetypetrader.h>
#include <kwindowsystem.h>
#include <KJobWidgets>
#include <kfiledialog.h>
#include <klocale.h>
#include <kicon.h>
...
...
@@ -131,7 +132,9 @@
#include <kio/scheduler.h>
#include <kio/netaccess.h>
#include <KIO/JobUiDelegate>
#include <KIO/CopyJob>
#include <KIO/Job>
#include <KIO/FileUndoManager>
#include <kparts/browseropenorsavequestion.h>
#include <KParts/OpenUrlEvent>
#include <KParts/BrowserHostExtension>
...
...
@@ -2696,7 +2699,7 @@ void KonqMainWindow::slotDumpDebugInfo()
#endif
}
bool
KonqMainWindow
::
askForTarget
(
const
KLocalizedString
&
text
,
K
Url
&
url
)
bool
KonqMainWindow
::
askForTarget
(
const
KLocalizedString
&
text
,
Q
Url
&
url
)
{
const
KUrl
initialUrl
=
(
viewCount
()
==
2
)
?
otherView
(
m_currentView
)
->
url
()
:
m_currentView
->
url
();
QString
label
=
text
.
subs
(
m_currentView
->
url
().
pathOrUrl
()
).
toString
();
...
...
@@ -2719,20 +2722,26 @@ bool KonqMainWindow::askForTarget(const KLocalizedString& text, KUrl& url)
void
KonqMainWindow
::
slotCopyFiles
()
{
K
Url
dest
;
Q
Url
dest
;
if
(
!
askForTarget
(
ki18n
(
"Copy selected files from %1 to:"
),
dest
))
return
;
KonqOperations
::
copy
(
this
,
KonqOperations
::
COPY
,
currentURLs
(),
dest
);
KIO
::
CopyJob
*
job
=
KIO
::
copy
(
currentURLs
(),
dest
);
KIO
::
FileUndoManager
::
self
()
->
recordCopyJob
(
job
);
KJobWidgets
::
setWindow
(
job
,
this
);
job
->
ui
()
->
setAutoErrorHandlingEnabled
(
true
);
}
void
KonqMainWindow
::
slotMoveFiles
()
{
K
Url
dest
;
Q
Url
dest
;
if
(
!
askForTarget
(
ki18n
(
"Move selected files from %1 to:"
),
dest
))
return
;
KonqOperations
::
copy
(
this
,
KonqOperations
::
MOVE
,
currentURLs
(),
dest
);
KIO
::
CopyJob
*
job
=
KIO
::
move
(
currentURLs
(),
dest
);
KIO
::
FileUndoManager
::
self
()
->
recordCopyJob
(
job
);
KJobWidgets
::
setWindow
(
job
,
this
);
job
->
ui
()
->
setAutoErrorHandlingEnabled
(
true
);
}
KUrl
::
List
KonqMainWindow
::
currentURLs
()
const
...
...
@@ -4502,7 +4511,7 @@ QList<KBookmarkOwner::FutureBookmark> KonqExtendedBookmarkOwner::currentBookmark
KonqView
*
view
=
frame
->
activeChildView
();
if
(
view
->
locationBarURL
().
isEmpty
()
)
continue
;
list
<<
KBookmarkOwner
::
FutureBookmark
(
view
->
caption
(),
view
->
url
(),
QString
()
/* TODO view->icon() ? */
);
list
<<
KBookmarkOwner
::
FutureBookmark
(
view
->
caption
(),
view
->
url
(),
KIO
::
iconNameForUrl
(
view
->
url
())
);
}
return
list
;
}
...
...
konqueror/src/konqmainwindow.h
View file @
bc87b353
...
...
@@ -539,7 +539,7 @@ protected:
virtual
void
closeEvent
(
QCloseEvent
*
);
bool
askForTarget
(
const
KLocalizedString
&
text
,
K
Url
&
url
);
bool
askForTarget
(
const
KLocalizedString
&
text
,
Q
Url
&
url
);
private
Q_SLOTS
:
void
slotUndoTextChanged
(
const
QString
&
newText
);
...
...
konqueror/src/konqsessionmanager.cpp
View file @
bc87b353
...
...
@@ -35,6 +35,7 @@
#include <klocale.h>
#include <kdialog.h>
#include <kurl.h>
#include <kicon.h>
#include <ktempdir.h>
#include <ksqueezedtextlabel.h>
...
...
@@ -414,7 +415,7 @@ void KonqSessionManager::enableAutosave()
const
QString
filePath
=
KStandardDirs
::
locateLocal
(
"appdata"
,
filename
);
delete
m_sessionConfig
;
m_sessionConfig
=
new
KConfig
(
filePath
,
KConfig
::
SimpleConfig
,
"appdata"
);
m_sessionConfig
=
new
KConfig
(
filePath
,
KConfig
::
SimpleConfig
);
//kDebug() << "config filename:" << m_sessionConfig->name();
m_autosaveEnabled
=
true
;
...
...
@@ -471,7 +472,7 @@ void KonqSessionManager::slotSaveCurrentSession(const QString & path)
void
KonqSessionManager
::
saveCurrentSessionToFile
(
const
QString
&
sessionConfigPath
)
{
QFile
::
remove
(
sessionConfigPath
);
KConfig
config
(
sessionConfigPath
,
KConfig
::
SimpleConfig
,
"appdata"
);
KConfig
config
(
sessionConfigPath
,
KConfig
::
SimpleConfig
);
saveCurrentSessionToFile
(
&
config
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment