@ -36,6 +36,7 @@
# include <KLocalizedString>
# include <KLocalizedString>
# include <KAboutData>
# include <KAboutData>
# include <KDBusService>
//! COLORS
//! COLORS
@ -50,7 +51,8 @@
inline void configureAboutData ( ) ;
inline void configureAboutData ( ) ;
int main ( int argc , char * * argv )
int main ( int argc , char * * argv )
{ // Devive pixel ratio has some problems in latte (plasmashell) currently.
{
// Devive pixel ratio has some problems in latte (plasmashell) currently.
// - dialog continually expands (347951)
// - dialog continually expands (347951)
// - Text element text is screwed (QTBUG-42606)
// - Text element text is screwed (QTBUG-42606)
// - Panel struts (350614)
// - Panel struts (350614)
@ -82,8 +84,10 @@ int main(int argc, char **argv)
QLockFile lockFile { QDir : : tempPath ( ) + " /latte-dock.lock " } ;
QLockFile lockFile { QDir : : tempPath ( ) + " /latte-dock.lock " } ;
int timeout { 100 } ;
int timeout { 100 } ;
if ( parser . isSet ( QStringLiteral ( " replace " ) ) ) {
if ( parser . isSet ( QStringLiteral ( " replace " ) ) ) {
qint64 pid { - 1 } ;
qint64 pid { - 1 } ;
if ( lockFile . getLockInfo ( & pid , nullptr , nullptr ) ) {
if ( lockFile . getLockInfo ( & pid , nullptr , nullptr ) ) {
kill ( static_cast < __pid_t > ( pid ) , SIGINT ) ;
kill ( static_cast < __pid_t > ( pid ) , SIGINT ) ;
timeout = 3000 ;
timeout = 3000 ;
@ -101,14 +105,14 @@ int main(int argc, char **argv)
qSetMessagePattern ( QStringLiteral (
qSetMessagePattern ( QStringLiteral (
CIGREEN " [%{type} " CGREEN " %{time h:mm:ss.zz} " CIGREEN " ] " CNORMAL
CIGREEN " [%{type} " CGREEN " %{time h:mm:ss.zz} " CIGREEN " ] " CNORMAL
# ifndef QT_NO_DEBUG
# ifndef QT_NO_DEBUG
CIRED " [ " CCYAN " %{function} " CIRED " : " CCYAN " %{line} " CIRED " ] "
CIRED " [ " CCYAN " %{function} " CIRED " : " CCYAN " %{line} " CIRED " ] "
# endif
# endif
CICYAN " - " CNORMAL " %{message} "
CICYAN " - " CNORMAL " %{message} "
CIRED " %{if-fatal} \n %{backtrace depth=8 separator= \" \n \" }%{endif} "
CIRED " %{if-fatal} \n %{backtrace depth=8 separator= \" \n \" }%{endif} "
" %{if-critical} \n %{backtrace depth=8 separator= \" \n \" }%{endif} " CNORMAL ) ) ;
" %{if-critical} \n %{backtrace depth=8 separator= \" \n \" }%{endif} " CNORMAL ) ) ;
} else {
} else {
const auto noMessageOutput = [ ] ( QtMsgType , const QMessageLogContext & , const QString & ) { } ;
const auto noMessageOutput = [ ] ( QtMsgType , const QMessageLogContext & , const QString & ) { } ;
qInstallMessageHandler ( noMessageOutput ) ;
qInstallMessageHandler ( noMessageOutput ) ;
}
}
@ -121,6 +125,8 @@ int main(int argc, char **argv)
std : : signal ( SIGINT , signal_handler ) ;
std : : signal ( SIGINT , signal_handler ) ;
Latte : : DockCorona corona ;
Latte : : DockCorona corona ;
KDBusService service ( KDBusService : : Unique ) ;
return app . exec ( ) ;
return app . exec ( ) ;
}
}