~ubuntu-branches/ubuntu/natty/kde4libs/natty-proposed

« back to all changes in this revision

Viewing changes to kdecore/config/kconfig.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Scott Kitterman, Jonathan Riddell
  • Date: 2010-11-22 17:59:02 UTC
  • mfrom: (1.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101122175902-yubxubd0pg6hn11z
Tags: 4:4.5.80a-0ubuntu1
[ Scott Kitterman ]
* New upstream beta release
  - Refreshed all patches
  - Updated debian/patches/10_make_libkdeinit4_private.diff to use Qfile
    instead of Qstring in kdecore/kernel/kstandarddirs_unix.cpp
  - Updated debian/patches/kubuntu_01_kubuntu_useragent.diff to provide
    Kubuntu in the Konqueror user agen string with the changes in
    kio/kio/kprotocolmanager.cpp
  - Partially updated debian/patches/kubuntu_05_langpack_desktop_files.diff
    and left the balance in kdecore/localization/klocale.cpp.rej for later
    revision
  - Update debian/patches/kubuntu_06_user_disk_mounting.diff for changes in
    solid/solid/backends/hal/halstorageaccess.cpp
  - Remove debian/patches/kubuntu_71_backport_plasma_webview_changes.diff
    (backported from upstream, so already present now)
  - Add minimum version for libattica-dev of 0.1.90 to build-depends
  - Bump minimum version for libsoprano-dev build-depend to 2.5.60
  - Add minimum version for shared-desktop-ontologies of 0.5 in build-dep

[ Jonathan Riddell ]
* Add build-depends on grantlee, libudev-dev, hupnp (FIXME needs packaging fixes)
* Update kubuntu_04_add_langpack_path.diff 28_find_old_kde4_html_documentation.diff
  22_hack_in_etc_kde4_in_kstandarddirs.diff for QT_NO_CAST_FROM_ASCII
* Update kubuntu_05_langpack_desktop_files.diff for new upstream code
* Add kubuntu_78_solid_trunk.diff to fix solid linking
* Add libnepomukutils4 package for new library
* Don't install kcm_ssl for now, e-mailed upstream to suggest moving to kdebase
* Add kubuntu_79_knewstuff_fix.diff to fix compile broken by non-trunk commit
  http://websvn.kde.org/?view=revision&revision=1199825
* kdelibs5-data replaces old kdebase-runtime-data due to moved file
* Add kubuntu_80_find_hupnp.diff to find hupnp include files, committed upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
      bFileImmutable(false), bForceGlobal(false), bSuppressGlobal(false),
60
60
      componentData(componentData_), configState(KConfigBase::NoAccess)
61
61
{
62
 
    sGlobalFileName = componentData.dirs()->saveLocation("config") + QLatin1String("kdeglobals");
 
62
    sGlobalFileName = componentData.dirs()->saveLocation("config", QString(), false) + QLatin1String("kdeglobals");
63
63
 
64
64
    static int use_etc_kderc = -1;
65
65
    if (use_etc_kderc < 0)
70
70
#ifdef Q_WS_WIN
71
71
            QFile::decodeName( qgetenv("WINDIR") + "/kde4rc" );
72
72
#else
73
 
        QLatin1String("/etc/kde4rc");
 
73
            QLatin1String("/etc/kde4rc");
74
74
#endif
75
75
        if (!KStandardDirs::checkAccess(etc_kderc, R_OK)) {
76
76
            etc_kderc.clear();
210
210
        const QByteArray group = entryMapIt.key().mGroup;
211
211
        if (entryMapIt.key().mKey.isNull() && !group.isEmpty() && group != "<default>" && group != "$Version") {
212
212
            QString groupname = QString::fromUtf8(group);
213
 
            groups << groupname.left(groupname.indexOf('\x1d'));
 
213
            groups << groupname.left(groupname.indexOf(QLatin1Char('\x1d')));
214
214
        }
215
215
    }
216
216
 
224
224
 
225
225
    for (KEntryMap::ConstIterator entryMapIt( entryMap.constBegin() ); entryMapIt != entryMap.constEnd(); ++entryMapIt)
226
226
        if (entryMapIt.key().mKey.isNull() && entryMapIt.key().mGroup.startsWith(theGroup)) {
227
 
            QString groupname = QString::fromUtf8(entryMapIt.key().mGroup.mid(theGroup.length()));
228
 
            groups << groupname.left(groupname.indexOf('\x1d'));
 
227
            const QString groupname = QString::fromUtf8(entryMapIt.key().mGroup.mid(theGroup.length()));
 
228
            groups << groupname.left(groupname.indexOf(QLatin1Char('\x1d')));
229
229
        }
230
230
 
231
231
    return groups.toList();
364
364
void KConfig::checkUpdate(const QString &id, const QString &updateFile)
365
365
{
366
366
    const KConfigGroup cg(this, "$Version");
367
 
    const QString cfg_id = updateFile+':'+id;
 
367
    const QString cfg_id = updateFile+QLatin1Char(':')+id;
368
368
    const QStringList ids = cg.readEntry("update_info", QStringList());
369
369
    if (!ids.contains(cfg_id)) {
370
 
        KToolInvocation::kdeinitExecWait("kconf_update", QStringList() << "--check" << updateFile);
 
370
        KToolInvocation::kdeinitExecWait(QString::fromLatin1("kconf_update"), QStringList() << QString::fromLatin1("--check") << updateFile);
371
371
        reparseConfiguration();
372
372
    }
373
373
}
612
612
    return isImmutable() || d->entryMap.getEntryOption(aGroup, 0, 0, KEntryMap::EntryImmutable);
613
613
}
614
614
 
 
615
#ifndef KDE_NO_DEPRECATED
615
616
void KConfig::setForceGlobal(bool b)
616
617
{
617
618
    Q_D(KConfig);
618
619
    d->bForceGlobal = b;
619
620
}
 
621
#endif
620
622
 
 
623
#ifndef KDE_NO_DEPRECATED
621
624
bool KConfig::forceGlobal() const
622
625
{
623
626
    Q_D(const KConfig);
624
627
    return d->bForceGlobal;
625
628
}
 
629
#endif
626
630
 
627
631
KConfigGroup KConfig::groupImpl(const QByteArray &group)
628
632
{
686
690
 
687
691
        // Note: We don't ask the user if we should not ask this question again because we can't save the answer.
688
692
        errorMsg += i18n("Please contact your system administrator.");
689
 
        QString cmdToExec = KStandardDirs::findExe(QString("kdialog"));
 
693
        QString cmdToExec = KStandardDirs::findExe(QString::fromLatin1("kdialog"));
690
694
        if (!cmdToExec.isEmpty() && componentData().isValid())
691
695
        {
692
 
            QProcess::execute(cmdToExec,QStringList() << "--title" << componentData().componentName()
693
 
                    << "--msgbox" << errorMsg);
 
696
            QProcess::execute(cmdToExec, QStringList()
 
697
                              << QString::fromLatin1("--title") << componentData().componentName()
 
698
                              << QString::fromLatin1("--msgbox") << errorMsg);
694
699
        }
695
700
    }
696
701