comparison src/MainWindow.cpp @ 387:0649ac148bf7

open -> openPath (for progress, with remote URLs)
author Chris Cannam
date Tue, 09 Sep 2014 16:35:29 +0100
parents 93d63e69b181
children 09aaceb76251
comparison
equal deleted inserted replaced
386:50958c4e88d5 387:0649ac148bf7
1687 1687
1688 QString path = getOpenFileName(FileFinder::AnyFile); 1688 QString path = getOpenFileName(FileFinder::AnyFile);
1689 1689
1690 if (path.isEmpty()) return; 1690 if (path.isEmpty()) return;
1691 1691
1692 FileOpenStatus status = open(path, ReplaceSession); 1692 FileOpenStatus status = openPath(path, ReplaceSession);
1693 1693
1694 if (status == FileOpenFailed) { 1694 if (status == FileOpenFailed) {
1695 QMessageBox::critical(this, tr("Failed to open file"), 1695 QMessageBox::critical(this, tr("Failed to open file"),
1696 tr("<b>File open failed</b><p>File \"%1\" could not be opened").arg(path)); 1696 tr("<b>File open failed</b><p>File \"%1\" could not be opened").arg(path));
1697 } else if (status == FileOpenWrongMode) { 1697 } else if (status == FileOpenWrongMode) {
1717 1717
1718 settings.setValue("lastremote", text); 1718 settings.setValue("lastremote", text);
1719 1719
1720 if (text.isEmpty()) return; 1720 if (text.isEmpty()) return;
1721 1721
1722 FileOpenStatus status = open(text, ReplaceSession); 1722 FileOpenStatus status = openPath(text, ReplaceSession);
1723 1723
1724 if (status == FileOpenFailed) { 1724 if (status == FileOpenFailed) {
1725 QMessageBox::critical(this, tr("Failed to open location"), 1725 QMessageBox::critical(this, tr("Failed to open location"),
1726 tr("<b>Open failed</b><p>URL \"%1\" could not be opened").arg(text)); 1726 tr("<b>Open failed</b><p>URL \"%1\" could not be opened").arg(text));
1727 } else if (status == FileOpenWrongMode) { 1727 } else if (status == FileOpenWrongMode) {
1743 } 1743 }
1744 1744
1745 QString path = action->text(); 1745 QString path = action->text();
1746 if (path == "") return; 1746 if (path == "") return;
1747 1747
1748 FileOpenStatus status = open(path, ReplaceSession); 1748 FileOpenStatus status = openPath(path, ReplaceSession);
1749 1749
1750 if (status == FileOpenFailed) { 1750 if (status == FileOpenFailed) {
1751 QMessageBox::critical(this, tr("Failed to open location"), 1751 QMessageBox::critical(this, tr("Failed to open location"),
1752 tr("<b>Open failed</b><p>File or URL \"%1\" could not be opened").arg(path)); 1752 tr("<b>Open failed</b><p>File or URL \"%1\" could not be opened").arg(path));
1753 } else if (status == FileOpenWrongMode) { 1753 } else if (status == FileOpenWrongMode) {
1781 { 1781 {
1782 if (pane) m_paneStack->setCurrentPane(pane); 1782 if (pane) m_paneStack->setCurrentPane(pane);
1783 1783
1784 for (QStringList::iterator i = uriList.begin(); i != uriList.end(); ++i) { 1784 for (QStringList::iterator i = uriList.begin(); i != uriList.end(); ++i) {
1785 1785
1786 FileOpenStatus status = open(*i, ReplaceSession); 1786 FileOpenStatus status = openPath(*i, ReplaceSession);
1787 1787
1788 if (status == FileOpenFailed) { 1788 if (status == FileOpenFailed) {
1789 QMessageBox::critical(this, tr("Failed to open dropped URL"), 1789 QMessageBox::critical(this, tr("Failed to open dropped URL"),
1790 tr("<b>Open failed</b><p>Dropped URL \"%1\" could not be opened").arg(*i)); 1790 tr("<b>Open failed</b><p>Dropped URL \"%1\" could not be opened").arg(*i));
1791 } else if (status == FileOpenWrongMode) { 1791 } else if (status == FileOpenWrongMode) {