mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
chore: update the file
This commit is contained in:
parent
348f98317c
commit
02f575b7a0
@ -86,8 +86,7 @@ QStringList ScriptBase::ignoredFiles() const
|
||||
|
||||
void ScriptBase::loadScriptsApp()
|
||||
{
|
||||
QString appDir = QApplication::applicationDirPath();
|
||||
QString dir = appDir + QString("/scripts/") + scriptDir();
|
||||
QString dir = applicationScriptDir();
|
||||
QDir d(dir);
|
||||
if (!d.exists()) {
|
||||
return;
|
||||
@ -107,6 +106,13 @@ void ScriptBase::loadScriptsApp()
|
||||
}
|
||||
}
|
||||
|
||||
QString ScriptBase::applicationScriptDir()
|
||||
{
|
||||
QString appDir = QApplication::applicationDirPath();
|
||||
QString dir = appDir + QString("/scripts/") + scriptDir();
|
||||
return dir;
|
||||
}
|
||||
|
||||
void ScriptBase::loadScriptsUser() {}
|
||||
|
||||
void ScriptBase::onScriptComboBoxCurrentIndexChanged()
|
||||
@ -130,7 +136,6 @@ void ScriptBase::onScriptComboBoxCurrentIndexChanged()
|
||||
|
||||
void ScriptBase::onRunButtonClicked(bool checked)
|
||||
{
|
||||
qInfo() << "ScriptBase::onRunButtonClicked" << checked;
|
||||
ui->toolButtonRun->setEnabled(false);
|
||||
if (checked) {
|
||||
startRunner();
|
||||
@ -152,10 +157,10 @@ void ScriptBase::onNewButtonClicked()
|
||||
txt += '.' + scriptSuffix();
|
||||
}
|
||||
|
||||
QString filePath = QApplication::applicationDirPath();
|
||||
filePath += QString("/scripts/");
|
||||
QString filePath = applicationScriptDir();
|
||||
filePath += "/";
|
||||
filePath += scriptDir();
|
||||
filePath += '/';
|
||||
filePath += "/";
|
||||
filePath += txt;
|
||||
QFile file(filePath);
|
||||
if (file.exists()) {
|
||||
|
||||
@ -46,6 +46,7 @@ protected:
|
||||
|
||||
virtual QStringList ignoredFiles() const;
|
||||
void loadScriptsApp();
|
||||
QString applicationScriptDir();
|
||||
virtual void loadScriptsUser();
|
||||
|
||||
private:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user