forked from qt-creator/qt-creator
QmlDesigner: Add source path watcher
The watcher is only watching directories and then searches for file stat changes. It is compressing signals too. So if files are changes in a very short time frame they are compressed to one change. Task-number: QDS-4776 Change-Id: I90052a0d5dba01467b505070fb58b04ea5576294 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -36,8 +36,10 @@
|
||||
#include <clangtools/clangtoolsdiagnostic.h>
|
||||
#include <debugger/analyzer/diagnosticlocation.h>
|
||||
#include <modelnode.h>
|
||||
#include <projectstorage/projectstoragepathwatchertypes.h>
|
||||
#include <projectstorage/projectstoragetypes.h>
|
||||
#include <projectstorage/sourcepathcachetypes.h>
|
||||
#include <sqlite.h>
|
||||
#include <sqlitesessionchangeset.h>
|
||||
#include <sqlitevalue.h>
|
||||
#include <tooltipinfo.h>
|
||||
@@ -46,8 +48,6 @@
|
||||
#include <variantproperty.h>
|
||||
#include <qmldesigner/designercore/imagecache/imagecachestorageinterface.h>
|
||||
|
||||
#include <sqlite.h>
|
||||
|
||||
void PrintTo(const Utf8String &text, ::std::ostream *os)
|
||||
{
|
||||
*os << text;
|
||||
@@ -932,6 +932,43 @@ std::ostream &operator<<(std::ostream &out, const Diagnostic &diag) {
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
const char *sourceTypeToText(SourceType sourceType)
|
||||
{
|
||||
switch (sourceType) {
|
||||
case SourceType::Qml:
|
||||
return "Qml";
|
||||
case SourceType::QmlUi:
|
||||
return "QmlUi";
|
||||
case SourceType::QmlDir:
|
||||
return "QmlDir";
|
||||
case SourceType::QmlTypes:
|
||||
return "QmlTypes";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, SourceType sourceType)
|
||||
{
|
||||
return out << sourceTypeToText(sourceType);
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const ProjectChunkId &id)
|
||||
{
|
||||
return out << "(" << id.id << ", " << id.sourceType << ")";
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const IdPaths &idPaths)
|
||||
{
|
||||
return out << idPaths.id << ", " << idPaths.sourceIds << ")";
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const WatcherEntry &entry)
|
||||
{
|
||||
return out << "(" << entry.sourceId << ", " << entry.sourceContextId << ", " << entry.id << ", "
|
||||
<< entry.lastModified << ")";
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const ModelNode &node)
|
||||
{
|
||||
if (!node.isValid())
|
||||
|
||||
Reference in New Issue
Block a user