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
Tusooa Zhu
Krita
Commits
12c2427f
Commit
12c2427f
authored
Sep 03, 2015
by
Halla Rempt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all checks for various KDE 4 versions
parent
d0991e3c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
54 deletions
+0
-54
krita/plugins/extensions/gmic/kis_gmic_settings_widget.cpp
krita/plugins/extensions/gmic/kis_gmic_settings_widget.cpp
+0
-3
krita/sketch/SketchApplication.cpp
krita/sketch/SketchApplication.cpp
+0
-4
krita/ui/KisApplication.cpp
krita/ui/KisApplication.cpp
+0
-4
krita/ui/KisMainWindow.cpp
krita/ui/KisMainWindow.cpp
+0
-5
krita/ui/KisRecentDocumentsPane.cpp
krita/ui/KisRecentDocumentsPane.cpp
+0
-10
libs/main/KoApplication.cpp
libs/main/KoApplication.cpp
+0
-6
libs/main/KoDocument.cpp
libs/main/KoDocument.cpp
+0
-5
libs/main/KoMainWindow.cpp
libs/main/KoMainWindow.cpp
+0
-5
libs/main/KoRecentDocumentsPane.cpp
libs/main/KoRecentDocumentsPane.cpp
+0
-9
libs/main/config/KoConfigGridPage.cpp
libs/main/config/KoConfigGridPage.cpp
+0
-3
No files found.
krita/plugins/extensions/gmic/kis_gmic_settings_widget.cpp
View file @
12c2427f
...
...
@@ -36,7 +36,6 @@
//
#include "widgets/kis_url_requester.h"
#include <kdeversion.h>
#include <kcolorbutton.h>
#include <klocalizedstring.h>
#include <kseparator.h>
...
...
@@ -281,9 +280,7 @@ void KisGmicSettingsWidget::createSettingsWidget(ROLE role)
if
(
role
==
CreateRole
)
{
colorButton
=
new
KColorButton
;
#if KDE_IS_VERSION(4,5,0)
colorButton
->
setAlphaChannelEnabled
(
colorParam
->
m_hasAlpha
);
#endif
m_widgetToParameterIndexMapper
[
colorButton
]
=
i
;
mapParameterWidget
(
colorParam
,
colorButton
);
...
...
krita/sketch/SketchApplication.cpp
View file @
12c2427f
...
...
@@ -24,7 +24,6 @@
#include "KoGlobal.h"
#include <kcrash.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kdesktopfile.h>
...
...
@@ -36,10 +35,7 @@
#include <kconfig.h>
#include <kglobal.h>
#include <kconfiggroup.h>
#if KDE_IS_VERSION(4,6,0)
#include <krecentdirs.h>
#endif
#include <QFile>
#include <QWidget>
...
...
krita/ui/KisApplication.cpp
View file @
12c2427f
...
...
@@ -29,7 +29,6 @@
#include "KoConfig.h"
#include <kcrash.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kdesktopfile.h>
...
...
@@ -41,10 +40,7 @@
#include <kconfig.h>
#include <kglobal.h>
#include <kconfiggroup.h>
#if KDE_IS_VERSION(4,6,0)
#include <krecentdirs.h>
#endif
#include <QFile>
#include <QWidget>
...
...
krita/ui/KisMainWindow.cpp
View file @
12c2427f
...
...
@@ -45,10 +45,7 @@
#include <QTabBar>
#include <QMoveEvent>
#include <kdeversion.h>
#if KDE_IS_VERSION(4,6,0)
#include <krecentdirs.h>
#endif
#include <kaboutdata.h>
#include <kactioncollection.h>
#include <kaction.h>
...
...
@@ -624,9 +621,7 @@ void KisMainWindow::addRecentURL(const KUrl& url)
ok
=
false
;
// it's in the tmp resource
if
(
ok
)
{
KRecentDocument
::
add
(
path
);
#if KDE_IS_VERSION(4,6,0)
KRecentDirs
::
add
(
":OpenDialog"
,
QFileInfo
(
path
).
dir
().
canonicalPath
());
#endif
}
}
else
{
KRecentDocument
::
add
(
url
.
url
(
KUrl
::
RemoveTrailingSlash
),
true
);
...
...
krita/ui/KisRecentDocumentsPane.cpp
View file @
12c2427f
...
...
@@ -23,7 +23,6 @@
#include <QFile>
#include <QStandardItemModel>
#include <kdeversion.h>
#include <kcomponentdata.h>
#include <kfileitem.h>
#include <kio/previewjob.h>
...
...
@@ -124,12 +123,8 @@ KisRecentDocumentsPane::KisRecentDocumentsPane(QWidget* parent, const KComponent
m_documentList
->
selectionModel
()
->
select
(
firstIndex
,
QItemSelectionModel
::
Select
);
m_documentList
->
selectionModel
()
->
setCurrentIndex
(
firstIndex
,
QItemSelectionModel
::
Select
);
#if KDE_IS_VERSION(4,6,80)
QStringList
availablePlugins
=
KIO
::
PreviewJob
::
availablePlugins
();
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
QSize
(
IconExtent
,
IconExtent
),
&
availablePlugins
);
#else
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
IconExtent
,
IconExtent
,
0
);
#endif
d
->
m_previewJobs
.
append
(
previewJob
);
connect
(
previewJob
,
SIGNAL
(
result
(
KJob
*
)),
SLOT
(
previewResult
(
KJob
*
)));
...
...
@@ -155,13 +150,8 @@ void KisRecentDocumentsPane::selectionChanged(const QModelIndex& index)
if
(
preview
.
isNull
())
{
// need to fetch preview
const
KFileItemList
fileList
=
KFileItemList
()
<<
fileItem
;
#if KDE_IS_VERSION(4,6,80)
QStringList
availablePlugins
=
KIO
::
PreviewJob
::
availablePlugins
();
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
QSize
(
PreviewExtent
,
PreviewExtent
),
&
availablePlugins
);
#else
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
PreviewExtent
,
PreviewExtent
,
0
);
#endif
d
->
m_previewJobs
.
append
(
previewJob
);
connect
(
previewJob
,
SIGNAL
(
result
(
KJob
*
)),
SLOT
(
previewResult
(
KJob
*
)));
connect
(
previewJob
,
SIGNAL
(
gotPreview
(
KFileItem
,
QPixmap
)),
...
...
libs/main/KoApplication.cpp
View file @
12c2427f
...
...
@@ -40,7 +40,6 @@
#include <KoJsonTrader.h>
#include <KoConfig.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kdesktopfile.h>
...
...
@@ -52,10 +51,7 @@
#include <kconfig.h>
#include <kglobal.h>
#include <kconfiggroup.h>
#if KDE_IS_VERSION(4,6,0)
#include <krecentdirs.h>
#endif
#include <QFile>
#include <QWidget>
...
...
@@ -301,13 +297,11 @@ bool KoApplication::start()
}
// No argument -> create an empty document
if
(
!
argsCount
)
{
#if KDE_IS_VERSION(4,6,0)
// if there's no document, add the current working directory
// to the recent dirs so the open dialog and open pane show
// the directory from where the app was started, instead of
// the last directory from where we opened a file
KRecentDirs
::
add
(
":OpenDialog"
,
QDir
::
currentPath
());
#endif
QString
errorMsg
;
KoPart
*
part
=
entry
.
createKoPart
(
&
errorMsg
);
d
->
partList
<<
part
;
...
...
libs/main/KoDocument.cpp
View file @
12c2427f
...
...
@@ -61,7 +61,6 @@
#include <kio/job.h>
#include <kdirnotify.h>
#include <ktemporaryfile.h>
#include <kdeversion.h>
#include <QtGlobal>
#include <QBuffer>
...
...
@@ -384,11 +383,7 @@ public:
// this could maybe confuse some apps? So for now we'll just fallback to KIO::get
// and error again. Well, maybe this even helps with wrong stat results.
if
(
!
job
->
error
())
{
#if KDE_IS_VERSION(4,4,0)
const
KUrl
localUrl
=
static_cast
<
KIO
::
StatJob
*>
(
job
)
->
mostLocalUrl
();
#else
const
KUrl
localUrl
=
static_cast
<
KIO
::
StatJob
*>
(
job
)
->
url
();
#endif
if
(
localUrl
.
isLocalFile
())
{
m_file
=
localUrl
.
toLocalFile
();
openLocalFile
();
...
...
libs/main/KoMainWindow.cpp
View file @
12c2427f
...
...
@@ -41,10 +41,7 @@
#include <KoIcon.h>
#include <KoConfig.h>
#include <kdeversion.h>
#if KDE_IS_VERSION(4,6,0)
#include <krecentdirs.h>
#endif
#include <khelpmenu.h>
#include <krecentfilesaction.h>
#include <kaboutdata.h>
...
...
@@ -620,9 +617,7 @@ void KoMainWindow::addRecentURL(const KUrl& url)
ok
=
false
;
// it's in the tmp resource
if
(
ok
)
{
KRecentDocument
::
add
(
path
);
#if KDE_IS_VERSION(4,6,0)
KRecentDirs
::
add
(
":OpenDialog"
,
QFileInfo
(
path
).
dir
().
canonicalPath
());
#endif
}
}
else
{
KRecentDocument
::
add
(
url
.
url
(
KUrl
::
RemoveTrailingSlash
),
true
);
...
...
libs/main/KoRecentDocumentsPane.cpp
View file @
12c2427f
...
...
@@ -23,7 +23,6 @@
#include <QFile>
#include <QStandardItemModel>
#include <kdeversion.h>
#include <kcomponentdata.h>
#include <kconfiggroup.h>
#include <kurl.h>
...
...
@@ -123,12 +122,8 @@ KoRecentDocumentsPane::KoRecentDocumentsPane(QWidget* parent, const KComponentDa
m_documentList
->
selectionModel
()
->
select
(
firstIndex
,
QItemSelectionModel
::
Select
);
m_documentList
->
selectionModel
()
->
setCurrentIndex
(
firstIndex
,
QItemSelectionModel
::
Select
);
#if KDE_IS_VERSION(4,6,80)
QStringList
availablePlugins
=
KIO
::
PreviewJob
::
availablePlugins
();
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
QSize
(
IconExtent
,
IconExtent
),
&
availablePlugins
);
#else
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
IconExtent
,
IconExtent
,
0
);
#endif
d
->
m_previewJobs
.
append
(
previewJob
);
connect
(
previewJob
,
SIGNAL
(
result
(
KJob
*
)),
SLOT
(
previewResult
(
KJob
*
)));
...
...
@@ -154,12 +149,8 @@ void KoRecentDocumentsPane::selectionChanged(const QModelIndex& index)
if
(
preview
.
isNull
())
{
// need to fetch preview
const
KFileItemList
fileList
=
KFileItemList
()
<<
fileItem
;
#if KDE_IS_VERSION(4,6,80)
QStringList
availablePlugins
=
KIO
::
PreviewJob
::
availablePlugins
();
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
QSize
(
PreviewExtent
,
PreviewExtent
),
&
availablePlugins
);
#else
KIO
::
PreviewJob
*
previewJob
=
KIO
::
filePreview
(
fileList
,
PreviewExtent
,
PreviewExtent
,
0
);
#endif
d
->
m_previewJobs
.
append
(
previewJob
);
connect
(
previewJob
,
SIGNAL
(
result
(
KJob
*
)),
SLOT
(
previewResult
(
KJob
*
)));
...
...
libs/main/config/KoConfigGridPage.cpp
View file @
12c2427f
...
...
@@ -29,7 +29,6 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
#include <kcolorbutton.h>
#include <kconfiggroup.h>
#include <kdeversion.h>
#include <QCheckBox>
#include <QGroupBox>
...
...
@@ -72,9 +71,7 @@ KoConfigGridPage::KoConfigGridPage(KoDocument* doc, char* name)
d
->
snapChBox
=
new
QCheckBox
(
generalGrp
);
d
->
snapChBox
->
setChecked
(
gd
.
snapToGrid
());
d
->
gridColorBtn
=
new
KColorButton
(
gd
.
gridColor
(),
generalGrp
);
#if KDE_IS_VERSION(4,5,0)
d
->
gridColorBtn
->
setAlphaChannelEnabled
(
true
);
#endif
layoutGeneral
->
addRow
(
i18n
(
"Show grid:"
),
d
->
gridChBox
);
layoutGeneral
->
addRow
(
i18n
(
"Snap to grid:"
),
d
->
snapChBox
);
layoutGeneral
->
addRow
(
i18n
(
"Grid color:"
),
d
->
gridColorBtn
);
...
...
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