Put LoadUrl for mac back.
This commit is contained in:
parent
0f8ada10d3
commit
abdc2eee2e
@ -8,7 +8,7 @@ class PlatformInterface {
|
|||||||
public:
|
public:
|
||||||
// Called when the application should show itself.
|
// Called when the application should show itself.
|
||||||
virtual void Activate() = 0;
|
virtual void Activate() = 0;
|
||||||
//virtual bool LoadUrl(const QString& url) = 0;
|
virtual bool LoadUrl(const QString& url) = 0;
|
||||||
|
|
||||||
virtual ~PlatformInterface() {}
|
virtual ~PlatformInterface() {}
|
||||||
};
|
};
|
||||||
|
@ -1182,6 +1182,16 @@ void MainWindow::Activate() {
|
|||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MainWindow::LoadUrl(const QString& url) {
|
||||||
|
if (!QFile::exists(url))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
QList<QUrl> urls;
|
||||||
|
urls << QUrl::fromLocalFile(url);
|
||||||
|
AddUrls(true, urls); // Always play now as this was a direct request from Finder.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::CheckForUpdates() {
|
void MainWindow::CheckForUpdates() {
|
||||||
#ifdef Q_OS_DARWIN
|
#ifdef Q_OS_DARWIN
|
||||||
mac::CheckForUpdates();
|
mac::CheckForUpdates();
|
||||||
|
@ -87,7 +87,9 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
void resizeEvent(QResizeEvent* event);
|
void resizeEvent(QResizeEvent* event);
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event);
|
||||||
|
|
||||||
|
// PlatformInterface
|
||||||
void Activate();
|
void Activate();
|
||||||
|
bool LoadUrl(const QString& url);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void FilePathChanged(const QString& path);
|
void FilePathChanged(const QString& path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user