mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* Fix #604 and #605 Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * clear current prio on color command Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * Fix QTimer threading issues * Call QTimer start() stop() from QEvent Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * send initial color/image to WebUI hide error message when opening webbrowser Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * added streaming timer to update WebUI Preview Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * remove QMetaObject::invokeMethod() Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * added parent to streaming timers Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com> * header cleanup
This commit is contained in:
committed by
brindosch
parent
c419f305f3
commit
24495bbc65
@@ -1,5 +1,6 @@
|
||||
|
||||
#include <list>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QWindow>
|
||||
@@ -128,7 +129,31 @@ void SysTray::closeEvent(QCloseEvent *event)
|
||||
|
||||
void SysTray::settings()
|
||||
{
|
||||
// Hide error messages when opening webbrowser
|
||||
|
||||
int out_pipe[2];
|
||||
int saved_stdout;
|
||||
int saved_stderr;
|
||||
|
||||
// saving stdout and stderr file descriptor
|
||||
saved_stdout = ::dup( STDOUT_FILENO );
|
||||
saved_stderr = ::dup( STDERR_FILENO );
|
||||
|
||||
if(::pipe(out_pipe) == 0)
|
||||
{
|
||||
// redirecting stdout to pipe
|
||||
::dup2(out_pipe[1], STDOUT_FILENO);
|
||||
::close(out_pipe[1]);
|
||||
// redirecting stderr to stdout
|
||||
::dup2(STDOUT_FILENO, STDERR_FILENO);
|
||||
}
|
||||
|
||||
QDesktopServices::openUrl(QUrl("http://localhost:"+QString::number(_webPort)+"/", QUrl::TolerantMode));
|
||||
|
||||
// restoring stdout
|
||||
::dup2(saved_stdout, STDOUT_FILENO);
|
||||
// restoring stderr
|
||||
::dup2(saved_stderr, STDERR_FILENO);
|
||||
}
|
||||
|
||||
void SysTray::setEffect()
|
||||
|
Reference in New Issue
Block a user