mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 08:26:50 +00:00
Add an entry to the recent files list for unsaved/temp recovery script
This commit is contained in:
@@ -1497,6 +1497,20 @@ QString PythonContext::versionString()
|
||||
return QFormatStr("%1.%2.%3").arg(PY_MAJOR_VERSION).arg(PY_MINOR_VERSION).arg(PY_MICRO_VERSION);
|
||||
}
|
||||
|
||||
QString PythonContext::GetTempFilename(QString filename)
|
||||
{
|
||||
for(QString path : QStandardPaths::standardLocations(QStandardPaths::AppDataLocation))
|
||||
{
|
||||
QDir tmpDir(path);
|
||||
tmpDir.mkpath(lit("pytmp"));
|
||||
tmpDir.cd(lit("pytmp"));
|
||||
if(tmpDir.exists())
|
||||
return tmpDir.absoluteFilePath(filename);
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
void PythonContext::executeString(const QString &filename, const QString &source, bool debugging)
|
||||
{
|
||||
if(!initialised())
|
||||
|
||||
@@ -122,6 +122,8 @@ public:
|
||||
QString tryFunctionCompletion(int line, QString expr);
|
||||
QString typenameForLoc(int line, int col);
|
||||
|
||||
QString GetTempFilename(QString filename);
|
||||
|
||||
void FlushOutput() { outputTick(); }
|
||||
|
||||
void abort() { m_Abort = true; }
|
||||
|
||||
Reference in New Issue
Block a user