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()
bool isReadable() const
static void addCmdLineOptions(const KCmdLineOptions &options, const KLocalizedString &name=KLocalizedString(), const QByteArray &id=QByteArray(), const QByteArray &afterId=QByteArray())
KSycocaFactoryList * factories()
iterator insert(const Key &key, const T &value)
static QStringList existingResourceDirs()
Definition: kbuildsycoca.cpp:594
bool noDisplay() const
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())
virtual bool seek(qint64 pos)
bool remove()
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())
typedef ConstIterator
static QStringList resourceTypes()
Returns all resource types for this service factory.
Definition: kbuildservicegroupfactory.cpp:43
virtual bool open(OpenMode flags=QIODevice::ReadWrite)
KStandardDirs * dirs()
bool contains(const QString &str, Qt::CaseSensitivity cs) const
void defaultCrashHandler(int signal)
QDebug & nospace()
void setApplicationName(const QString &name)
Definition: ksycocaresourcelist.h:32
static KBuildServiceGroupFactory * g_buildServiceGroupFactory
Definition: kbuildsycoca.cpp:72
iterator erase(iterator pos)
QDBusConnection sessionBus()
static void disableAutoRebuild()
virtual KSycocaEntry * createEntry(const QString &file, const char *resource) const =0
bool exists() const
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
Status status() const
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
virtual qint64 pos() const
QString filePath() const
const char * name() const
QString fileName() const
QString errorString() const
void append(const T &value)
static int version()
bool empty() const
Definition: vfolder_menu.h:35
int exec(QFlags< QEventLoop::ProcessEventsFlag > flags)
bool isDir() const
QString fileName() const
Definition: kbuildsycoca.h:39
void setEmergencySaveFunction(HandlerType saveFunction=0)
QDBusMessage createSignal(const QString &path, const QString &interface, const QString &name)
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
bool send(const QDBusMessage &message) const
bool isEmpty() const
int removeAll(const T &value)
const char * constData() const
QString menuId() const
static void fileContentsChanged(const QString &filename)
typedef Iterator
T & front()
quint32 calcResourceHash(const char *type, const QString &filename, SearchOptions options=NoSearchOptions) const
QString language() const
quint32 updateSignature()
QDateTime lastModified() const
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
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
bool atEnd() const
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
void setVersion(int v)
quint32 timeStamp()
static QStringList resourceTypes()
Returns all resource types for this service factory.
Definition: kbuildprotocolinfofactory.cpp:39
iterator end()
const T value(const Key &key) const
QByteArray toLocal8Bit() const
bool exists() const
bool contains(QChar ch, Qt::CaseSensitivity cs) const
bool finalize()
quint32 ctime(const QString &path, const QByteArray &resource) const
Definition: kctimefactory.cpp:37
const_iterator constBegin() const
QStringList resourceDirs(const char *type) const
const_iterator constEnd() const
KLocale * locale()
void addCTime(const QString &path, const QByteArray &resource, quint32 ctime)
Definition: kctimefactory.cpp:31
QByteArray toLatin1() const
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
typedef ConstIterator
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))
int length() const
char * data()
QString left(int n) const
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
QIODevice * device() const
const_iterator constEnd() const
const_iterator constBegin() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
const KShortcut & end()
static KSycoca * self()
iterator begin()
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
QByteArray encodeName(const QString &fileName)
void setCrashHandler(HandlerType handler=defaultCrashHandler)
void setTime_t(uint seconds)
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.