QDesktopServices::openUrl() fails horribly, if we try to explore a folder like "C:\Foo\Bar" while there is a file "C:\Foo\Bar.exe". Going back to ShellExecute() for now.
This commit is contained in:
parent
97170324e3
commit
683b7a82a5
@ -30,7 +30,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 4
|
#define VER_LAMEXP_MINOR_LO 4
|
||||||
#define VER_LAMEXP_TYPE Alpha
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_PATCH 10
|
#define VER_LAMEXP_PATCH 10
|
||||||
#define VER_LAMEXP_BUILD 817
|
#define VER_LAMEXP_BUILD 818
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Tool versions (minimum expected versions!)
|
// Tool versions (minimum expected versions!)
|
||||||
|
@ -848,7 +848,9 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
|
|||||||
case QEvent::MouseButtonPress:
|
case QEvent::MouseButtonPress:
|
||||||
if(dynamic_cast<QMouseEvent*>(event)->button() == Qt::LeftButton)
|
if(dynamic_cast<QMouseEvent*>(event)->button() == Qt::LeftButton)
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl(QString("file:///%1").arg(outputFolderLabel->text()));
|
QString path = outputFolderLabel->text();
|
||||||
|
if(!path.endsWith(QDir::separator())) path.append(QDir::separator());
|
||||||
|
ShellExecuteW(this->winId(), L"explore", QWCHAR(path), NULL, NULL, SW_SHOW);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QEvent::Enter:
|
case QEvent::Enter:
|
||||||
@ -2342,7 +2344,9 @@ void MainWindow::outputFolderContextMenu(const QPoint &pos)
|
|||||||
*/
|
*/
|
||||||
void MainWindow::showFolderContextActionTriggered(void)
|
void MainWindow::showFolderContextActionTriggered(void)
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(m_fileSystemModel->filePath(outputFolderView->currentIndex())));
|
QString path = QDir::toNativeSeparators(m_fileSystemModel->filePath(outputFolderView->currentIndex()));
|
||||||
|
if(!path.endsWith(QDir::separator())) path.append(QDir::separator());
|
||||||
|
ShellExecuteW(this->winId(), L"explore", QWCHAR(path), NULL, NULL, SW_SHOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user