KDED
kbuildsycoca.cpp
Go to the documentation of this file.
100 return KSycoca::absoluteFilePath(bGlobalDatabase ? KSycoca::GlobalDatabase : KSycoca::LocalDatabase);
130 if (g_currentFactory == g_buildServiceGroupFactory) // Strip .directory from service-group entries
316 KServiceGroup::Ptr entry = g_buildServiceGroupFactory->addNew("/", kdeMenu->directoryFile, KServiceGroup::Ptr(), false);
338 void KBuildSycoca::createMenu(const QString &caption_, const QString &name_, VFolderMenu::SubMenu *menu)
373 entry = g_buildServiceGroupFactory->addNew(subName, subMenu->directoryFile, entry, subMenu->isDeleted);
387 printf("%s\t%s\t%s\n", qPrintable( caption ), qPrintable( p->menuId() ), qPrintable( KStandardDirs::locate("apps", p->entryPath() ) ) );
419 kDebug(7021).nospace() << "Recreating ksycoca file (" << path << ", version " << KSycoca::version() << ")";
432 if (str->status() != QDataStream::Ok) // ######## TODO: does this detect write errors, e.g. disk full?
438 fprintf(stderr, "kbuildsycoca4: ERROR writing database '%s'!\n", database.fileName().toLocal8Bit().data());
519 if (str->status() != QDataStream::Ok) // ######## TODO: does this detect write errors, e.g. disk full?
545 bool KBuildSycoca::checkDirTimestamps( const QString& dirname, const QDateTime& stamp, bool top )
680 if (QDBusConnection::sessionBus().interface()->registerService(appFullName, QDBusConnectionInterface::QueueService)
762 if( checkfiles && ( !checkstamps || !KBuildSycoca::checkTimestamps( filestamp, oldresourcedirs )))
819 QDBusMessage signal = QDBusMessage::createSignal("/", "org.kde.KSycoca", "notifyDatabaseChanged" );
QString saveLocation(const char *type, const QString &suffix=QString(), bool create=true) const
QString caption()
static void addCmdLineOptions(const KCmdLineOptions &options, const KLocalizedString &name=KLocalizedString(), const QByteArray &id=QByteArray(), const QByteArray &afterId=QByteArray())
KSycocaFactoryList * factories()
static QStringList existingResourceDirs()
Definition: kbuildsycoca.cpp:594
KAboutData & addAuthor(const KLocalizedString &name, const KLocalizedString &task=KLocalizedString(), const QByteArray &emailAddress=QByteArray(), const QByteArray &webAddress=QByteArray())
QFile::FileError error() const
Definition: vfolder_menu.h:40
bool addResourceType(const char *type, const QString &relativename, bool priority=true)
KCmdLineOptions & add(const QByteArray &name, const KLocalizedString &description=KLocalizedString(), const QByteArray &defaultValue=QByteArray())
KLocalizedString ki18n(const char *msg)
static KCmdLineArgs * parsedArgs(const QByteArray &id=QByteArray())
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
static QStringList resourceTypes()
Returns all resource types for this service factory.
Definition: kbuildservicegroupfactory.cpp:43
virtual bool open(OpenMode flags=QIODevice::ReadWrite)
KStandardDirs * dirs()
const char * name(StandardAction id)
void defaultCrashHandler(int signal)
void setApplicationName(const QString &name)
Definition: ksycocaresourcelist.h:32
static KBuildServiceGroupFactory * g_buildServiceGroupFactory
Definition: kbuildsycoca.cpp:72
static void disableAutoRebuild()
virtual KSycocaEntry * createEntry(const QString &file, const char *resource) const =0
void abort()
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
SubMenu * parseMenu(const QString &file, bool forceLegacyLoad=false)
Parses VFolder menu definition and generates a menu layout.
Definition: vfolder_menu.cpp:1590
Internal factory for storing the timestamp of each file in ksycoca.
Definition: kctimefactory.h:49
bool isSet(const QByteArray &option) const
QString language()
static QStringList resourceTypes()
Returns all resource types for this service factory.
Definition: kbuildservicefactory.cpp:60
Protocol Info factory for building ksycoca.
Definition: kbuildprotocolinfofactory.h:30
QString fileName() const
QString errorString() const
static int version()
Definition: vfolder_menu.h:35
Definition: kbuildsycoca.h:39
void setEmergencySaveFunction(HandlerType saveFunction=0)
QString kfsstnd_prefixes()
void setTrackId(const QString &id)
Debug function to enable tracking of what happens with a specific menu item id.
Definition: vfolder_menu.cpp:1651
static void fileContentsChanged(const QString &filename)
quint32 calcResourceHash(const char *type, const QString &filename, SearchOptions options=NoSearchOptions) const
QString language() const
quint32 updateSignature()
QStringList allDirectories()
Returns a list of all directories involved in the last call to parseMenu(), excluding the KDE Legacy ...
Definition: vfolder_menu.cpp:88
static QStringList resourceTypes()
Returns all resource types for this factory.
Definition: kbuildmimetypefactory.cpp:43
QString kfsstnd_prefixes()
Service group factory for building ksycoca.
Definition: kbuildservicegroupfactory.h:30
KServiceGroup::Ptr addNew(const QString &menuName, const QString &file, KServiceGroup::Ptr entry, bool isDeleted)
Add new menu menuName defined by file When entry is non-null it is re-used, otherwise a new group is ...
Definition: kbuildservicegroupfactory.cpp:78
quint32 timeStamp()
static QStringList resourceTypes()
Returns all resource types for this service factory.
Definition: kbuildprotocolinfofactory.cpp:39
bool finalize()
quint32 ctime(const QString &path, const QByteArray &resource) const
Definition: kctimefactory.cpp:37
QStringList resourceDirs(const char *type) const
KLocale * locale()
void addCTime(const QString &path, const QByteArray &resource, quint32 ctime)
Definition: kctimefactory.cpp:31
void remove(const QString &path, const QByteArray &resource)
Definition: kctimefactory.cpp:42
QString dir(const QString &fileClass)
void postProcessServices()
Definition: kbuildservicefactory.cpp:192
static QStringList resourceTypes()
Returns all resource types for this factory.
Definition: kbuildservicetypefactory.cpp:42
Definition: ksycocaresourcelist.h:26
const KComponentData & mainComponent()
static void init(int argc, char **argv, const QByteArray &appname, const QByteArray &catalog, const KLocalizedString &programName, const QByteArray &version, const KLocalizedString &description=KLocalizedString(), StdCmdLineArgs stdargs=StdCmdLineArgs(CmdLineArgQt|CmdLineArgKDE))
QString getOption(const QByteArray &option) const
KAction * quit(const QObject *recvr, const char *slot, QObject *parent)
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
const KShortcut & end()
static KSycoca * self()
Simple dict for assocating a timestamp with each file in ksycoca.
Definition: kctimefactory.h:28
static QString absoluteFilePath(DatabaseType type=LocalDatabase)
static bool checkTimestamps(quint32 timestamp, const QStringList &dirs)
Definition: kbuildsycoca.cpp:578
void addNewEntryTo(const QString &menuName, const KService::Ptr &newEntry)
Adds the entry newEntry to the menu menuName.
Definition: kbuildservicegroupfactory.cpp:62
void setCrashHandler(HandlerType handler=defaultCrashHandler)
const KShortcut & begin()
#define KDE_EXPORT
QStringList list(const QString &fileClass)
Service-type factory for building ksycoca.
Definition: kbuildservicetypefactory.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.