Commit c89fbc04 authored by Stephan Kulow's avatar Stephan Kulow

merge kconfigroup_port branch

svn path=/trunk/KDE/kdemultimedia/juk/; revision=635495
parents 35b50f4a d0f618a5
......@@ -32,7 +32,6 @@
#include <kpushbutton.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <ksimpleconfig.h>
#include <kvbox.h>
#include <QFile>
......@@ -1022,8 +1021,8 @@ void FileRenamer::setFolderIcon(const KUrl &dst, const PlaylistItem *item)
QPixmap thumb = item->file().coverInfo()->pixmap(CoverInfo::Thumbnail);
thumb.save(path + "/.juk-thumbnail.png", "PNG");
KSimpleConfig config(path + "/.directory");
config.setGroup("Desktop Entry");
KConfig _config( path + "/.directory", KConfig::OnlyLocal );
KConfigGroup config(&_config, "Desktop Entry");
if(!config.hasKey("Icon")) {
config.writeEntry("Icon", QString("%1/.juk-thumbnail.png").arg(path));
......
......@@ -450,9 +450,9 @@ void TagEditor::readConfig()
KConfigGroup config(KGlobal::config(), "TagEditor");
if(m_artistNameBox && m_albumNameBox) {
readCompletionMode(&config, m_artistNameBox, "ArtistNameBoxMode");
readCompletionMode(&config, m_albumNameBox, "AlbumNameBoxMode");
readCompletionMode(&config, m_genreBox, "GenreBoxMode");
readCompletionMode(config, m_artistNameBox, "ArtistNameBoxMode");
readCompletionMode(config, m_albumNameBox, "AlbumNameBoxMode");
readCompletionMode(config, m_genreBox, "GenreBoxMode");
}
bool show = config.readEntry("Show", false);
......@@ -471,10 +471,10 @@ void TagEditor::readConfig()
m_genreBox->completionObject()->setItems(m_genreList);
}
void TagEditor::readCompletionMode(KConfigBase *config, KComboBox *box, const QString &key)
void TagEditor::readCompletionMode(const KConfigGroup &config, KComboBox *box, const QString &key)
{
KGlobalSettings::Completion mode =
KGlobalSettings::Completion(config->readEntry(key, (int)KGlobalSettings::CompletionAuto));
KGlobalSettings::Completion(config.readEntry(key, (int)KGlobalSettings::CompletionAuto));
box->setCompletionMode(mode);
}
......
......@@ -28,7 +28,7 @@ class KLineEdit;
class KIntSpinBox;
class KTextEdit;
class KPushButton;
class KConfigBase;
class KConfigGroup;
class QCheckBox;
class QBoxLayout;
......@@ -66,7 +66,7 @@ private:
void setupActions();
void setupLayout();
void readConfig();
void readCompletionMode(KConfigBase *config, KComboBox *box, const QString &key);
void readCompletionMode(const KConfigGroup &config, KComboBox *box, const QString &key);
void saveConfig();
void save(const PlaylistItemList &list);
void saveChangesPrompt();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment