Merge pull request #16 from Gurkengewuerz/dev

almost broke the repo
This commit is contained in:
Niklas 2020-06-01 19:18:55 +02:00 committed by GitHub
commit 317513d5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Maintainer: Gurkengewuerz <niklas@mc8051.de> # Maintainer: Gurkengewuerz <niklas@mc8051.de>
pkgname=kshare-git pkgname=kshare-git
pkgver=v5.0.3+dev pkgver=v5.0.4+dev
pkgrel=1 pkgrel=1
pkgdesc="The free and open source and cross platform screen sharing software." pkgdesc="The free and open source and cross platform screen sharing software."
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -15,7 +15,7 @@ sha1sums=('SKIP')
pkgver() { pkgver() {
cd KShare cd KShare
echo "v5.0.3+dev" echo "v5.0.4+dev"
} }
prepare() { prepare() {

View File

@ -1,6 +1,6 @@
# Maintainer: Gurkengewuerz <niklas@mc8051.de> # Maintainer: Gurkengewuerz <niklas@mc8051.de>
pkgname=kshare pkgname=kshare
pkgver=v5.0.3 pkgver=v5.0.4
pkgrel=1 pkgrel=1
conflicts=("kshare-git") conflicts=("kshare-git")
pkgdesc="The free and open source and cross platform screen sharing software." pkgdesc="The free and open source and cross platform screen sharing software."

View File

@ -74,7 +74,7 @@ int main(int argc, char *argv[]) {
a.setQuitOnLastWindowClosed(false); a.setQuitOnLastWindowClosed(false);
a.setApplicationName("KShare"); a.setApplicationName("KShare");
a.setOrganizationName("ArsenArsen"); a.setOrganizationName("ArsenArsen");
a.setApplicationVersion("5.0.3"); a.setApplicationVersion("5.0.4");
QString locale = QLocale::system().name(); QString locale = QLocale::system().name();
if (locale != "en_US") loadTranslation(locale); if (locale != "en_US") loadTranslation(locale);

View File

@ -7,6 +7,8 @@
#include <QApplication> #include <QApplication>
#include <QMediaPlayer> #include <QMediaPlayer>
QMediaPlayer *mediaPlayer = nullptr;
void notifications::notify(QString title, QString body, QSystemTrayIcon::MessageIcon icon) { void notifications::notify(QString title, QString body, QSystemTrayIcon::MessageIcon icon) {
if (!MainWindow::inst() || !MainWindow::inst()->valid()) return; if (!MainWindow::inst() || !MainWindow::inst()->valid()) return;
notifyNolog(title, body, icon); notifyNolog(title, body, icon);
@ -28,7 +30,9 @@ void notifications::playSound(notifications::Sound soundType) {
if(!settings::settings().value("playSound", true).toBool()) return; if(!settings::settings().value("playSound", true).toBool()) return;
try { try {
QMediaPlayer*mediaPlayer = new QMediaPlayer(MainWindow::inst()); if (mediaPlayer == nullptr) {
mediaPlayer = new QMediaPlayer(MainWindow::inst());
}
switch (soundType) { switch (soundType) {
case notifications::Sound::CAPTURE: case notifications::Sound::CAPTURE: