mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-01 11:56:45 +01:00
Put LoadUrl for mac back.
This commit is contained in:
parent
0f8ada10d3
commit
abdc2eee2e
@ -8,7 +8,7 @@ class PlatformInterface {
|
||||
public:
|
||||
// Called when the application should show itself.
|
||||
virtual void Activate() = 0;
|
||||
//virtual bool LoadUrl(const QString& url) = 0;
|
||||
virtual bool LoadUrl(const QString& url) = 0;
|
||||
|
||||
virtual ~PlatformInterface() {}
|
||||
};
|
||||
|
@ -1182,6 +1182,16 @@ void MainWindow::Activate() {
|
||||
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() {
|
||||
#ifdef Q_OS_DARWIN
|
||||
mac::CheckForUpdates();
|
||||
|
@ -87,7 +87,9 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||
void resizeEvent(QResizeEvent* event);
|
||||
void closeEvent(QCloseEvent* event);
|
||||
|
||||
// PlatformInterface
|
||||
void Activate();
|
||||
bool LoadUrl(const QString& url);
|
||||
|
||||
private slots:
|
||||
void FilePathChanged(const QString& path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user