Skip to content

Commit

Permalink
[urlhandler:5.2] Use albert::openUrl instead of QDesktopServices::ope…
Browse files Browse the repository at this point in the history
…nUrl

QDesktopServices::openUrl fails on wayland

Close albertlauncher/albert#1414
  • Loading branch information
ManuelSchneid3r committed Jul 12, 2024
1 parent 7c995cb commit 82ae64b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion urlhandler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
find_package(Albert REQUIRED)

project(urlhandler VERSION 5.1)
project(urlhandler VERSION 5.2)

albert_plugin(QT Gui)
5 changes: 3 additions & 2 deletions urlhandler/src/plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) 2022-2024 Manuel Schneider

#include <albert/standarditem.h>
#include "plugin.h"
#include <QDesktopServices>
#include <QFile>
#include <QTextStream>
#include <QUrl>
#include <albert/standarditem.h>
#include <albert/util.h>
using namespace albert;
using namespace std;

Expand Down Expand Up @@ -49,7 +50,7 @@ vector<RankItem> Plugin::handleGlobalQuery(const Query *query) const
{
{
"open_url", tr("Open URL"),
[url](){ QDesktopServices::openUrl(url); }
[url](){ openUrl(url); }
}
}
),
Expand Down

0 comments on commit 82ae64b

Please sign in to comment.