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
b2e5957d
Commit
b2e5957d
authored
Oct 21, 2016
by
David Faure
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pixmap of size 0,0 being requested; actually make the int arg explicit.
parent
1303a2d1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
8 deletions
+14
-8
konqueror/src/CMakeLists.txt
konqueror/src/CMakeLists.txt
+1
-0
konqueror/src/konqcloseditem.cpp
konqueror/src/konqcloseditem.cpp
+2
-1
konqueror/src/konqcombo.cpp
konqueror/src/konqcombo.cpp
+3
-3
konqueror/src/konqmainwindow.cpp
konqueror/src/konqmainwindow.cpp
+1
-1
konqueror/src/konqpixmapprovider.cpp
konqueror/src/konqpixmapprovider.cpp
+6
-2
konqueror/src/konqpixmapprovider.h
konqueror/src/konqpixmapprovider.h
+1
-1
No files found.
konqueror/src/CMakeLists.txt
View file @
b2e5957d
...
...
@@ -35,6 +35,7 @@ set(konquerorprivate_SRCS
add_library
(
konquerorprivate SHARED
${
konquerorprivate_SRCS
}
)
target_link_libraries
(
konquerorprivate
KF5::IconThemes
KF5::Konq
KF5::Parts
KF5::KIOGui
...
...
konqueror/src/konqcloseditem.cpp
View file @
b2e5957d
...
...
@@ -29,6 +29,7 @@
#include <kglobalsettings.h>
#include <QIcon>
#include <kiconeffect.h>
#include <kiconloader.h>
#include <konqpixmapprovider.h>
#include <kcolorscheme.h>
...
...
@@ -74,7 +75,7 @@ KonqClosedTabItem::~KonqClosedTabItem()
QPixmap
KonqClosedTabItem
::
icon
()
const
{
return
KonqPixmapProvider
::
self
()
->
pixmapFor
(
m_url
);
return
KonqPixmapProvider
::
self
()
->
pixmapFor
(
m_url
,
KIconLoader
::
SizeSmall
);
}
KonqClosedWindowItem
::
KonqClosedWindowItem
(
const
QString
&
title
,
quint64
serialNumber
,
int
numTabs
)
...
...
konqueror/src/konqcombo.cpp
View file @
b2e5957d
...
...
@@ -218,7 +218,7 @@ void KonqCombo::setURL(const QString &url)
void
KonqCombo
::
setTemporary
(
const
QString
&
text
)
{
setTemporary
(
text
,
KonqPixmapProvider
::
self
()
->
pixmapFor
(
text
));
setTemporary
(
text
,
KonqPixmapProvider
::
self
()
->
pixmapFor
(
text
,
KIconLoader
::
SizeSmall
));
}
void
KonqCombo
::
setTemporary
(
const
QString
&
url
,
const
QPixmap
&
pix
)
...
...
@@ -284,7 +284,7 @@ void KonqCombo::applyPermanent()
}
QString
item
=
temporaryItem
();
insertItem
(
KonqPixmapProvider
::
self
()
->
pixmapFor
(
item
),
item
,
1
,
titleOfURL
(
item
));
insertItem
(
KonqPixmapProvider
::
self
()
->
pixmapFor
(
item
,
KIconLoader
::
SizeSmall
),
item
,
1
,
titleOfURL
(
item
));
//qDebug() << url;
// Remove all duplicates starting from index = 2
...
...
@@ -350,7 +350,7 @@ void KonqCombo::updatePixmaps()
setUpdatesEnabled
(
false
);
KonqPixmapProvider
*
prov
=
KonqPixmapProvider
::
self
();
for
(
int
i
=
1
;
i
<
count
();
i
++
)
{
setItemIcon
(
i
,
prov
->
pixmapFor
(
itemText
(
i
)));
setItemIcon
(
i
,
prov
->
pixmapFor
(
itemText
(
i
)
,
KIconLoader
::
SizeSmall
));
}
setUpdatesEnabled
(
true
);
repaint
();
...
...
konqueror/src/konqmainwindow.cpp
View file @
b2e5957d
...
...
@@ -4994,7 +4994,7 @@ void KonqMainWindow::addClosedWindowToUndoList()
void
KonqMainWindow
::
updateWindowIcon
()
{
const
QString
url
=
m_combo
->
currentText
();
const
QPixmap
pix
=
KonqPixmapProvider
::
self
()
->
pixmapFor
(
url
);
const
QPixmap
pix
=
KonqPixmapProvider
::
self
()
->
pixmapFor
(
url
,
KIconLoader
::
SizeSmall
);
KParts
::
MainWindow
::
setWindowIcon
(
pix
);
QPixmap
big
=
pix
;
...
...
konqueror/src/konqpixmapprovider.cpp
View file @
b2e5957d
...
...
@@ -20,13 +20,14 @@
#include "konqpixmapprovider.h"
#include <QMimeDatabase>
#include <QMimeType>
#include <QIcon>
#include <KIO/FavIconRequestJob>
#include <kio/global.h>
#include <QMimeType>
#include <QIcon>
#include <kprotocolinfo.h>
#include <kconfiggroup.h>
#include <kiconloader.h>
class
KonqPixmapProviderSingleton
{
...
...
@@ -182,6 +183,9 @@ void KonqPixmapProvider::clear()
QPixmap
KonqPixmapProvider
::
loadIcon
(
const
QString
&
icon
,
int
size
)
{
if
(
size
==
0
)
{
size
=
KIconLoader
::
SizeSmall
;
}
return
QIcon
::
fromTheme
(
icon
).
pixmap
(
size
);
}
konqueror/src/konqpixmapprovider.h
View file @
b2e5957d
...
...
@@ -51,7 +51,7 @@ public:
/**
* Looks up a pixmap for @p url. Uses a cache for the iconname of url.
*/
virtual
QPixmap
pixmapFor
(
const
QString
&
url
,
int
size
=
0
);
virtual
QPixmap
pixmapFor
(
const
QString
&
url
,
int
size
);
/**
* Loads the cache to @p kc from key @p key.
...
...
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