From 2fc77542126dca1e4b6ab033a87afbbaf8711d3d Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Sun, 12 Nov 2023 11:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B5=8B=E8=AF=95=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 42540c6..df2ceb2 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -410,6 +410,11 @@ void MainWindow::on_actionVMRunlLog_triggered() void MainWindow::on_actionVMTest_triggered() { // 运行 Demo + if(QFile::exists(QCoreApplication::applicationDirPath() + "/test.qcow2")){ + // 优先使用本地的磁盘 + system(("qemu-system-i386 --hda '" + QCoreApplication::applicationDirPath() + "/test.qcow2' -rtc base=localtime > /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1").toUtf8()); + return; + } // 写入 disk 文件 QFile file(":/TestDisk/test.qcow2"); // 计算随机数