summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.ui3
-rw-r--r--src/modinfodialogfiletree.cpp5
-rw-r--r--src/processrunner.cpp9
-rw-r--r--src/processrunner.h5
-rw-r--r--src/usvfsconnector.cpp3
5 files changed, 18 insertions, 7 deletions
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 85be22b3..0520db84 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -1073,9 +1073,6 @@ p, li { white-space: pre-wrap; }
<property name="uniformRowHeights">
<bool>true</bool>
</property>
- <property name="animated">
- <bool>true</bool>
- </property>
<attribute name="headerDefaultSectionSize">
<number>400</number>
</attribute>
diff --git a/src/modinfodialogfiletree.cpp b/src/modinfodialogfiletree.cpp
index 79ed4cba..00471a72 100644
--- a/src/modinfodialogfiletree.cpp
+++ b/src/modinfodialogfiletree.cpp
@@ -140,7 +140,10 @@ void FileTreeTab::onOpen()
return;
}
- shell::Open(m_fs->filePath(selection));
+ core().processRunner()
+ .setFromFile(parentWidget(), m_fs->filePath(selection))
+ .setWaitForCompletion()
+ .run();
}
void FileTreeTab::onPreview()
diff --git a/src/processrunner.cpp b/src/processrunner.cpp
index 89777072..b6167706 100644
--- a/src/processrunner.cpp
+++ b/src/processrunner.cpp
@@ -498,6 +498,10 @@ ProcessRunner& ProcessRunner::setFromFile(QWidget* parent, const QFileInfo& targ
default:
{
m_shellOpen = targetInfo.absoluteFilePath();
+
+ // picked up by postRun()
+ m_sp.hooked = false;
+
break;
}
}
@@ -722,6 +726,11 @@ ProcessRunner::Results ProcessRunner::postRun()
{
const bool mustWait = (m_waitFlags & ForceWait);
+ if (!m_sp.hooked && !mustWait) {
+ // the process wasn't hooked and there's no force wait, don't lock
+ return Running;
+ }
+
if (mustWait && m_lockReason == UILocker::NoReason) {
// never lock the ui without an escape hatch for the user
log::debug(
diff --git a/src/processrunner.h b/src/processrunner.h
index c61d6b70..a5099136 100644
--- a/src/processrunner.h
+++ b/src/processrunner.h
@@ -42,8 +42,9 @@ public:
// the ui will be refreshed once the process has completed
Refresh = 0x01,
- // the process will be waited for even if locking is disabled
- ForceWait = 0x02
+ // the process will be waited for even if locking is disabled or the
+ // process is not hooked
+ ForceWait = 0x02,
};
using WaitFlags = QFlags<WaitFlag>;
diff --git a/src/usvfsconnector.cpp b/src/usvfsconnector.cpp
index 3c8c355b..59880754 100644
--- a/src/usvfsconnector.cpp
+++ b/src/usvfsconnector.cpp
@@ -181,10 +181,11 @@ UsvfsConnector::~UsvfsConnector()
void UsvfsConnector::updateMapping(const MappingType &mapping)
{
- QProgressDialog progress;
+ QProgressDialog progress(qApp->activeWindow());
progress.setLabelText(tr("Preparing vfs"));
progress.setMaximum(static_cast<int>(mapping.size()));
progress.show();
+
int value = 0;
int files = 0;
int dirs = 0;