Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
JuK
Commits
094ed868
Commit
094ed868
authored
Aug 25, 2017
by
Michael Pyne
Browse files
Avoid deprecated KGlobal::config.
parent
925bc93a
Changes
16
Hide whitespace changes
Inline
Side-by-side
collectionlist.cpp
View file @
094ed868
...
...
@@ -116,7 +116,7 @@ void CollectionList::completedLoadingCachedItems()
{
// The CollectionList is created with sorting disabled for speed. Re-enable
// it here, and perform the sort.
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Playlists"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Playlists"
);
Qt
::
SortOrder
order
=
Qt
::
DescendingOrder
;
if
(
config
.
readEntry
(
"CollectionListSortAscending"
,
true
))
...
...
@@ -355,7 +355,7 @@ CollectionList::CollectionList(PlaylistCollection *collection) :
CollectionList
::~
CollectionList
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Playlists"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Playlists"
);
config
.
writeEntry
(
"CollectionListSortColumn"
,
header
()
->
sortIndicatorSection
());
config
.
writeEntry
(
"CollectionListSortAscending"
,
header
()
->
sortIndicatorOrder
()
==
Qt
::
AscendingOrder
);
...
...
deletedialog.cpp
View file @
094ed868
...
...
@@ -38,7 +38,7 @@ DeleteWidget::DeleteWidget(QWidget *parent)
setObjectName
(
QLatin1String
(
"delete_dialog_widget"
));
KConfigGroup
messageGroup
(
K
Global
::
config
()
->
group
(
"FileRemover"
)
)
;
KConfigGroup
messageGroup
(
K
SharedConfig
::
openConfig
(),
"FileRemover"
);
bool
deleteInstead
=
messageGroup
.
readEntry
(
"deleteInsteadOfTrash"
,
false
);
slotShouldDelete
(
deleteInstead
);
...
...
@@ -119,7 +119,7 @@ void DeleteDialog::setFiles(const QStringList &files)
void
DeleteDialog
::
accept
()
{
KConfigGroup
messageGroup
(
K
Global
::
config
()
->
group
(
"FileRemover"
)
)
;
KConfigGroup
messageGroup
(
K
SharedConfig
::
openConfig
(),
"FileRemover"
);
// Save user's preference
...
...
filerenamer.cpp
View file @
094ed868
...
...
@@ -122,7 +122,7 @@ public:
ConfigCategoryReader
::
ConfigCategoryReader
()
:
CategoryReaderInterface
(),
m_currentItem
(
0
)
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"FileRenamer"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"FileRenamer"
);
QList
<
int
>
categoryOrder
=
config
.
readEntry
(
"CategoryOrder"
,
QList
<
int
>
());
int
categoryCount
[
NumTypes
]
=
{
0
};
// Keep track of each category encountered.
...
...
@@ -278,7 +278,7 @@ FileRenamerWidget::FileRenamerWidget(QWidget *parent) :
void
FileRenamerWidget
::
loadConfig
()
{
QList
<
int
>
checkedSeparators
;
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"FileRenamer"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"FileRenamer"
);
for
(
int
i
=
0
;
i
<
m_rows
.
count
();
++
i
)
m_rows
[
i
].
options
=
TagRenamerOptions
(
m_rows
[
i
].
category
);
...
...
@@ -301,7 +301,7 @@ void FileRenamerWidget::loadConfig()
void
FileRenamerWidget
::
saveConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"FileRenamer"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"FileRenamer"
);
QList
<
int
>
checkedSeparators
;
QList
<
int
>
categoryOrder
;
...
...
@@ -501,7 +501,7 @@ void FileRenamerWidget::addFolderSeparatorCheckbox()
void
FileRenamerWidget
::
createTagRows
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"FileRenamer"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"FileRenamer"
);
QList
<
int
>
categoryOrder
=
config
.
readEntry
(
"CategoryOrder"
,
QList
<
int
>
());
if
(
categoryOrder
.
isEmpty
())
...
...
juk.cpp
View file @
094ed868
...
...
@@ -99,10 +99,10 @@ JuK::JuK(const QStringList &filesToOpen, QWidget *parent) :
setupActions
();
setupLayout
();
bool
firstRun
=
!
K
Global
::
c
onfig
()
->
hasGroup
(
"MainWindow"
);
bool
firstRun
=
!
K
SharedConfig
::
openC
onfig
()
->
hasGroup
(
"MainWindow"
);
if
(
firstRun
)
{
KConfigGroup
mainWindowConfig
(
K
Global
::
c
onfig
(),
"MainWindow"
);
KConfigGroup
mainWindowConfig
(
K
SharedConfig
::
openC
onfig
(),
"MainWindow"
);
KConfigGroup
playToolBarConfig
(
&
mainWindowConfig
,
"Toolbar playToolBar"
);
playToolBarConfig
.
writeEntry
(
"ToolButtonStyle"
,
"IconOnly"
);
}
...
...
@@ -410,7 +410,7 @@ void JuK::keyPressEvent(QKeyEvent *e)
void
JuK
::
readSettings
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Settings"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Settings"
);
m_showSplash
=
config
.
readEntry
(
"ShowSplashScreen"
,
true
);
m_startDocked
=
config
.
readEntry
(
"StartDocked"
,
false
);
}
...
...
@@ -419,7 +419,7 @@ void JuK::readConfig()
{
// player settings
KConfigGroup
playerConfig
(
K
Global
::
c
onfig
(),
"Player"
);
KConfigGroup
playerConfig
(
K
SharedConfig
::
openC
onfig
(),
"Player"
);
if
(
m_player
)
{
...
...
@@ -449,7 +449,7 @@ void JuK::readConfig()
// general settings
KConfigGroup
settingsConfig
(
K
Global
::
c
onfig
(),
"Settings"
);
KConfigGroup
settingsConfig
(
K
SharedConfig
::
openC
onfig
(),
"Settings"
);
bool
dockInSystemTray
=
settingsConfig
.
readEntry
(
"DockInSystemTray"
,
true
);
m_toggleSystemTrayAction
->
setChecked
(
dockInSystemTray
);
...
...
@@ -467,7 +467,7 @@ void JuK::saveConfig()
{
// player settings
KConfigGroup
playerConfig
(
K
Global
::
c
onfig
(),
"Player"
);
KConfigGroup
playerConfig
(
K
SharedConfig
::
openC
onfig
(),
"Player"
);
if
(
m_player
)
{
...
...
@@ -492,14 +492,14 @@ void JuK::saveConfig()
// general settings
KConfigGroup
settingsConfig
(
K
Global
::
c
onfig
(),
"Settings"
);
KConfigGroup
settingsConfig
(
K
SharedConfig
::
openC
onfig
(),
"Settings"
);
settingsConfig
.
writeEntry
(
"ShowSplashScreen"
,
m_toggleSplashAction
->
isChecked
());
settingsConfig
.
writeEntry
(
"StartDocked"
,
m_startDocked
);
settingsConfig
.
writeEntry
(
"DockInSystemTray"
,
m_toggleSystemTrayAction
->
isChecked
());
settingsConfig
.
writeEntry
(
"DockOnClose"
,
m_toggleDockOnCloseAction
->
isChecked
());
settingsConfig
.
writeEntry
(
"TrackPopup"
,
m_togglePopupsAction
->
isChecked
());
K
Global
::
c
onfig
()
->
sync
();
K
SharedConfig
::
openC
onfig
()
->
sync
();
}
bool
JuK
::
queryClose
()
...
...
keydialog.cpp
View file @
094ed868
...
...
@@ -98,7 +98,7 @@ KeyDialog::KeyDialog(KActionCollection *actionCollection, QWidget *parent)
// Read key group from configuration
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Shortcuts"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Shortcuts"
);
int
selectedButton
=
config
.
readEntry
(
"GlobalKeys"
,
int
(
StandardKeys
));
// Create widgets for key chooser
...
...
@@ -148,10 +148,10 @@ int KeyDialog::configure()
int
retcode
=
exec
();
if
(
retcode
==
Accepted
)
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Shortcuts"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Shortcuts"
);
config
.
writeEntry
(
"GlobalKeys"
,
m_group
->
checkedId
());
K
Global
::
c
onfig
()
->
sync
();
K
SharedConfig
::
openC
onfig
()
->
sync
();
m_pKeyChooser
->
save
();
}
...
...
@@ -203,7 +203,7 @@ void KeyDialog::setupActionShortcut(const QString &actionName)
KShortcut
shortcut
=
KShortcut
();
// Find out what type is selected so we know what keys to setup.
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Shortcuts"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Shortcuts"
);
int
selectedKeys
=
config
.
readEntry
(
"GlobalKeys"
,
int
(
StandardKeys
));
for
(
uint
i
=
0
;
i
<
keyInfoCount
;
i
++
)
{
...
...
lyricswidget.cpp
View file @
094ed868
...
...
@@ -46,7 +46,7 @@ LyricsWidget::LyricsWidget(QWidget* parent): QTextBrowser(parent),
ActionCollection
::
actions
()
->
addAction
(
"showLyrics"
,
show
);
connect
(
show
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
setVisible
(
bool
)));
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"LyricsWidget"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"LyricsWidget"
);
bool
shown
=
config
.
readEntry
(
"Show"
,
true
);
show
->
setChecked
(
shown
);
setVisible
(
shown
);
...
...
@@ -60,7 +60,7 @@ LyricsWidget::~LyricsWidget()
void
LyricsWidget
::
saveConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"LyricsWidget"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"LyricsWidget"
);
config
.
writeEntry
(
"Show"
,
ActionCollection
::
action
<
KToggleAction
>
(
"showLyrics"
)
->
isChecked
());
}
...
...
main.cpp
View file @
094ed868
...
...
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
if
(
a
.
isSessionRestored
()
&&
KMainWindow
::
canBeRestored
(
1
))
juk
->
restore
(
1
,
false
/* don't show */
);
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Settings"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Settings"
);
if
(
!
config
.
readEntry
(
"StartDocked"
,
false
))
{
juk
->
show
();
}
...
...
playlist.cpp
View file @
094ed868
...
...
@@ -265,7 +265,7 @@ void Playlist::SharedSettings::apply(Playlist *l) const
Playlist
::
SharedSettings
::
SharedSettings
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"PlaylistShared"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"PlaylistShared"
);
bool
resizeColumnsManually
=
config
.
readEntry
(
"ResizeColumnsManually"
,
false
);
action
(
"resizeColumnsManually"
)
->
setChecked
(
resizeColumnsManually
);
...
...
@@ -306,7 +306,7 @@ Playlist::SharedSettings::SharedSettings()
void
Playlist
::
SharedSettings
::
writeConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"PlaylistShared"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"PlaylistShared"
);
config
.
writeEntry
(
"ColumnOrder"
,
m_columnOrder
);
QList
<
int
>
l
;
...
...
@@ -318,7 +318,7 @@ void Playlist::SharedSettings::writeConfig()
config
.
writeEntry
(
"ResizeColumnsManually"
,
manualResize
());
K
Global
::
c
onfig
()
->
sync
();
K
SharedConfig
::
openC
onfig
()
->
sync
();
}
////////////////////////////////////////////////////////////////////////////////
...
...
playlistbox.cpp
View file @
094ed868
...
...
@@ -308,15 +308,15 @@ void PlaylistBox::removePlaylist(Playlist *playlist)
void
PlaylistBox
::
readConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"PlaylistBox"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"PlaylistBox"
);
m_viewModeIndex
=
config
.
readEntry
(
"ViewMode"
,
0
);
}
void
PlaylistBox
::
saveConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"PlaylistBox"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"PlaylistBox"
);
config
.
writeEntry
(
"ViewMode"
,
action
<
KSelectAction
>
(
"viewModeMenu"
)
->
currentItem
());
K
Global
::
c
onfig
()
->
sync
();
K
SharedConfig
::
openC
onfig
()
->
sync
();
}
void
PlaylistBox
::
remove
()
...
...
@@ -747,7 +747,7 @@ void PlaylistBox::setupItem(Item *item)
void
PlaylistBox
::
setupUpcomingPlaylist
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Playlists"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Playlists"
);
bool
enable
=
config
.
readEntry
(
"showUpcoming"
,
false
);
setUpcomingPlaylistEnabled
(
enable
);
...
...
playlistcollection.cpp
View file @
094ed868
...
...
@@ -875,7 +875,7 @@ void PlaylistCollection::newItems(const KFileItemList &list) const
void
PlaylistCollection
::
readConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Playlists"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Playlists"
);
m_importPlaylists
=
config
.
readEntry
(
"ImportPlaylists"
,
true
);
m_folderList
=
config
.
readEntry
(
"DirectoryList"
,
QStringList
());
...
...
@@ -889,7 +889,7 @@ void PlaylistCollection::readConfig()
void
PlaylistCollection
::
saveConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Playlists"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Playlists"
);
config
.
writeEntry
(
"ImportPlaylists"
,
m_importPlaylists
);
config
.
writeEntry
(
"showUpcoming"
,
action
(
"showUpcoming"
)
->
isChecked
());
config
.
writePathEntry
(
"DirectoryList"
,
m_folderList
);
...
...
playlistsplitter.cpp
View file @
094ed868
...
...
@@ -268,7 +268,7 @@ void PlaylistSplitter::setupLayout()
void
PlaylistSplitter
::
readConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Splitter"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Splitter"
);
QList
<
int
>
splitterSizes
=
config
.
readEntry
(
"PlaylistSplitterSizes"
,
QList
<
int
>
());
if
(
splitterSizes
.
isEmpty
())
{
...
...
@@ -295,7 +295,7 @@ void PlaylistSplitter::readConfig()
void
PlaylistSplitter
::
saveConfig
()
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Splitter"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Splitter"
);
config
.
writeEntry
(
"PlaylistSplitterSizes"
,
sizes
());
config
.
writeEntry
(
"ShowSearch"
,
ActionCollection
::
action
<
KToggleAction
>
(
"showSearch"
)
->
isChecked
());
config
.
writeEntry
(
"EditorSplitterSizes"
,
m_editorSplitter
->
sizes
());
...
...
scrobbleconfigdlg.cpp
View file @
094ed868
...
...
@@ -82,7 +82,7 @@ ScrobbleConfigDlg::ScrobbleConfigDlg(QWidget* parent, Qt::WindowFlags f)
// Warning message, KWallet is safer than KConfig.
KMessageBox
::
information
(
this
,
i18n
(
"KWallet is unavailable, your Last.fm credentials will be stored without encryption."
),
i18n
(
"KWallet is unavailable"
));
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
m_usernameEdit
->
setText
(
config
.
readEntry
(
"Username"
,
""
));
m_passwordEdit
->
setText
(
config
.
readEntry
(
"Password"
,
""
));
}
...
...
@@ -126,7 +126,7 @@ void ScrobbleConfigDlg::save()
}
else
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
config
.
writeEntry
(
"Username"
,
m_usernameEdit
->
text
());
config
.
writeEntry
(
"Password"
,
m_passwordEdit
->
text
());
}
...
...
scrobbler.cpp
View file @
094ed868
...
...
@@ -48,7 +48,7 @@ Scrobbler::Scrobbler(QObject* parent)
}
else
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
sessionKey
.
append
(
config
.
readEntry
(
"SessionKey"
,
""
));
}
...
...
@@ -67,7 +67,7 @@ bool Scrobbler::isScrobblingEnabled()
if
(
KWallet
::
Wallet
::
folderDoesNotExist
(
KWallet
::
Wallet
::
LocalWallet
(),
"JuK"
))
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
username
=
config
.
readEntry
(
"Username"
,
""
);
password
=
config
.
readEntry
(
"Password"
,
""
);
...
...
@@ -187,7 +187,7 @@ void Scrobbler::getAuthToken()
}
else
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
username
=
config
.
readEntry
(
"Username"
,
""
);
password
=
config
.
readEntry
(
"Password"
,
""
);
}
...
...
@@ -229,7 +229,7 @@ void Scrobbler::handleAuthenticationReply()
}
else
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
config
.
writeEntry
(
"SessionKey"
,
sessionKey
);
}
...
...
@@ -248,7 +248,7 @@ void Scrobbler::nowPlaying(const FileHandle& file)
}
else
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
sessionKey
=
config
.
readEntry
(
"SessionKey"
,
""
);
}
...
...
@@ -284,7 +284,7 @@ void Scrobbler::scrobble()
}
else
{
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"Scrobbling"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"Scrobbling"
);
sessionKey
=
config
.
readEntry
(
"SessionKey"
,
""
);
}
...
...
tageditor.cpp
View file @
094ed868
...
...
@@ -437,7 +437,7 @@ void TagEditor::readConfig()
{
// combo box completion modes
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"TagEditor"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"TagEditor"
);
if
(
artistNameBox
&&
albumNameBox
)
{
readCompletionMode
(
config
,
artistNameBox
,
"ArtistNameBoxMode"
);
readCompletionMode
(
config
,
albumNameBox
,
"AlbumNameBoxMode"
);
...
...
@@ -473,7 +473,7 @@ void TagEditor::saveConfig()
{
// combo box completion modes
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"TagEditor"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"TagEditor"
);
if
(
artistNameBox
&&
albumNameBox
)
{
config
.
writeEntry
(
"ArtistNameBoxMode"
,
(
int
)
artistNameBox
->
completionMode
());
...
...
tagguesser.cpp
View file @
094ed868
...
...
@@ -103,7 +103,7 @@ QString FileNameScheme::composeRegExp(const QString &s) const
{
QHash
<
QChar
,
QString
>
substitutions
;
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"TagGuesser"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"TagGuesser"
);
substitutions
[
't'
]
=
config
.
readEntry
(
"Title regexp"
,
"([
\\
w
\\
s'&_,
\\
.]+)"
);
substitutions
[
'a'
]
=
config
.
readEntry
(
"Artist regexp"
,
"([
\\
w
\\
s'&_,
\\
.]+)"
);
...
...
@@ -123,7 +123,7 @@ QStringList TagGuesser::schemeStrings()
{
QStringList
schemes
;
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"TagGuesser"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"TagGuesser"
);
schemes
=
config
.
readEntry
(
"Filename schemes"
,
QStringList
());
if
(
schemes
.
isEmpty
()
)
{
...
...
@@ -160,7 +160,7 @@ QStringList TagGuesser::schemeStrings()
void
TagGuesser
::
setSchemeStrings
(
const
QStringList
&
schemes
)
{
KSharedConfig
::
Ptr
cfg
=
K
Global
::
c
onfig
();
KSharedConfig
::
Ptr
cfg
=
K
SharedConfig
::
openC
onfig
();
KConfigGroup
group
(
cfg
,
"TagGuesser"
);
group
.
writeEntry
(
"Filename schemes"
,
schemes
);
cfg
->
sync
();
...
...
tagrenameroptions.cpp
View file @
094ed868
...
...
@@ -66,7 +66,7 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category)
// Make sure we don't use translated strings for the config file keys.
QString
typeKey
=
tagTypeText
(
category
.
category
,
false
);
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"FileRenamer"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"FileRenamer"
);
if
(
categoryNum
>
0
)
typeKey
.
append
(
QString
::
number
(
categoryNum
));
...
...
@@ -141,7 +141,7 @@ void TagRenamerOptions::saveConfig(unsigned categoryNum) const
if
(
categoryNum
>
0
)
typeKey
.
append
(
QString
::
number
(
categoryNum
));
KConfigGroup
config
(
K
Global
::
c
onfig
(),
"FileRenamer"
);
KConfigGroup
config
(
K
SharedConfig
::
openC
onfig
(),
"FileRenamer"
);
config
.
writeEntry
(
QString
(
"%1Suffix"
).
arg
(
typeKey
),
suffix
());
config
.
writeEntry
(
QString
(
"%1Prefix"
).
arg
(
typeKey
),
prefix
());
...
...
Write
Preview
Supports
Markdown
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