Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Kiten
Commits
d61e2002
Commit
d61e2002
authored
Aug 28, 2022
by
Laurent Montel
Browse files
Remove old code
parent
0a91880f
Pipeline
#224320
passed with stage
in 1 minute and 4 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/kiten.cpp
View file @
d61e2002
...
...
@@ -11,7 +11,6 @@
#include
"kiten.h"
#include
<kxmlgui_version.h>
#include
<KActionCollection>
#include
<KConfig>
#include
<KConfigGui>
...
...
@@ -143,13 +142,7 @@ void Kiten::setupActions()
// (void) KStandardAction::print(this, SLOT(print()), actionCollection());
(
void
)
KStandardAction
::
preferences
(
this
,
SLOT
(
slotConfigure
()),
actionCollection
()
);
//old style cast seems needed here, (const QObject*)
#if KXMLGUI_VERSION >= QT_VERSION_CHECK(5, 84, 0)
KStandardAction
::
keyBindings
(
guiFactory
(),
&
KXMLGUIFactory
::
showConfigureShortcutsDialog
,
actionCollection
());
#else
KStandardAction
::
keyBindings
(
(
const
QObject
*
)
guiFactory
()
,
SLOT
(
configureShortcuts
())
,
actionCollection
()
);
#endif
/* Setup the Go-to-learn-mode actions */
/* TODO: put back when Dictionary Editor is reorganised */
...
...
@@ -595,13 +588,7 @@ void Kiten::newToolBarConfig()
/** Opens the dialog for configuring the global accelerator keys. */
void
Kiten
::
configureGlobalKeys
()
{
#if KXMLGUI_VERSION >= QT_VERSION_CHECK(5, 84, 0)
KShortcutsDialog
::
showDialog
(
actionCollection
(),
KShortcutsEditor
::
LetterShortcutsAllowed
,
this
);
#else
KShortcutsDialog
::
configure
(
actionCollection
()
,
KShortcutsEditor
::
LetterShortcutsAllowed
,
this
);
#endif
}
/**
...
...
app/searchstringinput.cpp
View file @
d61e2002
...
...
@@ -72,11 +72,7 @@ SearchStringInput::SearchStringInput( Kiten *parent )
}
//connect(actionTextInput, SIGNAL(returnPressed()), this, SIGNAL(search()));
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
connect
(
_actionTextInput
,
static_cast
<
void
(
KHistoryComboBox
::*
)(
const
QString
&
)
>
(
&
KHistoryComboBox
::
activated
),
this
,
&
SearchStringInput
::
test
);
#else
connect
(
_actionTextInput
,
static_cast
<
void
(
KHistoryComboBox
::*
)(
const
QString
&
)
>
(
&
KHistoryComboBox
::
textActivated
),
this
,
&
SearchStringInput
::
test
);
#endif
}
void
SearchStringInput
::
focusInput
()
...
...
kanjibrowser/kanjibrowser.cpp
View file @
d61e2002
...
...
@@ -89,17 +89,9 @@ void KanjiBrowser::loadKanji()
// manage that information in KanjiBrowserView.
int
grade
=
0
;
int
strokes
=
0
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
gradeSection
=
line
.
split
(
' '
,
QString
::
SkipEmptyParts
)
#else
QStringList
gradeSection
=
line
.
split
(
' '
,
Qt
::
SkipEmptyParts
)
#endif
.
filter
(
gradeMatch
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
strokesSection
=
line
.
split
(
' '
,
QString
::
SkipEmptyParts
)
#else
QStringList
strokesSection
=
line
.
split
(
' '
,
Qt
::
SkipEmptyParts
)
#endif
.
filter
(
strokeMatch
);
// There are some kanji without grade (example: those not in Jouyou list).
...
...
lib/DictEdict/entryedict.cpp
View file @
d61e2002
...
...
@@ -272,11 +272,7 @@ bool EntryEdict::loadEntry( const QString &entryLine )
QString
remainingLine
=
entryLine
.
mid
(
endOfKanjiAndKanaSection
);
//Trim to last '/'
remainingLine
=
remainingLine
.
left
(
remainingLine
.
lastIndexOf
(
'/'
)
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
Meanings
=
remainingLine
.
split
(
'/'
,
QString
::
SkipEmptyParts
);
#else
Meanings
=
remainingLine
.
split
(
'/'
,
Qt
::
SkipEmptyParts
);
#endif
if
(
Meanings
.
size
()
==
0
)
{
...
...
radselect/radicalfile.cpp
View file @
d61e2002
...
...
@@ -88,17 +88,9 @@ bool RadicalFile::loadRadicalFile( QString &radkfile )
else
if
(
newestRadical
!=
nullptr
)
{
// List of m_kanji, potentially
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QList
<
QString
>
m_kanjiList
=
line
.
trimmed
().
split
(
QLatin1String
(
""
),
QString
::
SkipEmptyParts
);
#else
const
QList
<
QString
>
m_kanjiList
=
line
.
trimmed
().
split
(
QLatin1String
(
""
),
Qt
::
SkipEmptyParts
);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
newestRadical
->
addKanji
(
m_kanjiList
.
toSet
()
);
#else
const
QSet
<
QString
>
kanjiSet
=
QSet
<
QString
>
(
m_kanjiList
.
begin
(),
m_kanjiList
.
end
());
newestRadical
->
addKanji
(
kanjiSet
);
#endif
foreach
(
const
QString
&
kanji
,
m_kanjiList
)
{
krad
[
kanji
]
+=
newestRadical
->
toString
();
...
...
@@ -135,11 +127,7 @@ bool RadicalFile::loadKanjidic( const QString &kanjidic )
{
const
QString
kanji
=
line
[
0
];
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
strokesSection
=
line
.
split
(
" "
,
QString
::
SkipEmptyParts
)
#else
QStringList
strokesSection
=
line
.
split
(
" "
,
Qt
::
SkipEmptyParts
)
#endif
.
filter
(
strokeMatch
);
unsigned
int
strokes
=
strokesSection
.
first
().
remove
(
0
,
1
).
toInt
();
...
...
radselect/radselect.cpp
View file @
d61e2002
...
...
@@ -12,7 +12,6 @@
#include
"ui_radselectprefdialog.h"
#include
<kxmlgui_version.h>
#include
<KActionCollection>
#include
<KConfig>
#include
<KConfigDialog>
...
...
@@ -41,11 +40,7 @@ RadSelect::RadSelect()
KStandardAction
::
quit
(
this
,
SLOT
(
close
()),
actionCollection
()
);
KStandardAction
::
preferences
(
this
,
SLOT
(
optionsPreferences
()),
actionCollection
()
);
#if KXMLGUI_VERSION >= QT_VERSION_CHECK(5, 84, 0)
KStandardAction
::
keyBindings
(
guiFactory
(),
&
KXMLGUIFactory
::
showConfigureShortcutsDialog
,
actionCollection
());
#else
KStandardAction
::
keyBindings
(
(
const
QObject
*
)
guiFactory
(),
SLOT
(
configureShortcuts
()),
actionCollection
()
);
#endif
statusBar
()
->
show
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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