mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-11 02:15:38 -05:00
Fix some issues with the filewatcher
This commit is contained in:
@@ -127,6 +127,7 @@ private:
|
||||
bool m_hasUnsavedDataChanges = false;
|
||||
bool m_needsHealLocation = false;
|
||||
bool m_scriptsLoaded = false;
|
||||
bool m_loggedScriptsFileError = false;
|
||||
|
||||
QMap<Event::Group, QList<Event *>> m_events;
|
||||
QSet<Event *> m_ownedEvents; // for memory management
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
static int getScriptLineNumber(const QString &filePath, const QString &scriptLabel);
|
||||
static int getRawScriptLineNumber(QString text, const QString &scriptLabel);
|
||||
static int getPoryScriptLineNumber(QString text, const QString &scriptLabel);
|
||||
static QStringList getGlobalScriptLabels(const QString &filePath);
|
||||
static QStringList getGlobalScriptLabels(const QString &filePath, QString *error = nullptr);
|
||||
static QStringList getGlobalRawScriptLabels(QString text);
|
||||
static QStringList getGlobalPoryScriptLabels(QString text);
|
||||
static QString removeStringLiterals(QString text);
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Util {
|
||||
QString toDefineCase(QString input);
|
||||
QString toHexString(uint32_t value, int minLength = 0);
|
||||
QString toHtmlParagraph(const QString &text);
|
||||
QString stripPrefix(const QString &s, const QString &prefix);
|
||||
Qt::Orientations getOrientation(bool xflip, bool yflip);
|
||||
QString replaceExtension(const QString &path, const QString &newExtension);
|
||||
void setErrorStylesheet(QLineEdit *lineEdit, bool isError);
|
||||
|
||||
@@ -294,6 +294,8 @@ private:
|
||||
// We can't display these layouts to the user, but we want to preserve the data when they save.
|
||||
QList<QJsonObject> failedLayoutsData;
|
||||
|
||||
QSet<QString> failedFileWatchPaths;
|
||||
|
||||
const QRegularExpression re_gbapalExtension;
|
||||
const QRegularExpression re_bppExtension;
|
||||
|
||||
@@ -322,8 +324,8 @@ private:
|
||||
void setNewLayoutBlockdata(Layout *layout);
|
||||
void setNewLayoutBorder(Layout *layout);
|
||||
|
||||
void watchFile(const QString &filename);
|
||||
void watchFiles(const QStringList &filenames);
|
||||
bool watchFile(const QString &filename);
|
||||
bool watchFiles(const QStringList &filenames);
|
||||
void ignoreWatchedFileTemporarily(const QString &filepath);
|
||||
void ignoreWatchedFilesTemporarily(const QStringList &filepaths);
|
||||
void recordFileChange(const QString &filepath);
|
||||
|
||||
Reference in New Issue
Block a user