Change copyright and format the code using clang-format
This commit is contained in:
+21
-19
@@ -1,5 +1,5 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014-2016 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Copyright (C) 2014-2017 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -36,10 +36,10 @@
|
||||
#endif
|
||||
|
||||
#if _WIN32
|
||||
#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
|
||||
#pragma comment( linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup" )
|
||||
#endif
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
qRegisterMetaType<PlaYUVerStreamInfoVector>();
|
||||
qRegisterMetaTypeStreamOperators<PlaYUVerStreamInfoVector>();
|
||||
@@ -48,7 +48,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
QApplication application( argc, argv );
|
||||
QApplication::setApplicationName( "PlaYUVer" );
|
||||
QApplication::setApplicationVersion (PLAYUVER_VERSION_STRING);
|
||||
QApplication::setApplicationVersion( PLAYUVER_VERSION_STRING );
|
||||
QApplication::setOrganizationName( "PixLRA" );
|
||||
|
||||
#ifdef USE_QTDBUS
|
||||
@@ -56,10 +56,9 @@ int main( int argc, char *argv[] )
|
||||
* use dbus, if available
|
||||
* allows for resuse of running Kate instances
|
||||
*/
|
||||
QDBusConnectionInterface * const sessionBusInterface = QDBusConnection::sessionBus().interface();
|
||||
QDBusConnectionInterface* const sessionBusInterface = QDBusConnection::sessionBus().interface();
|
||||
if( sessionBusInterface )
|
||||
{
|
||||
|
||||
Bool force_new = false;
|
||||
QStringList filenameList;
|
||||
for( Int i = 1; i < argc; i++ )
|
||||
@@ -71,7 +70,7 @@ int main( int argc, char *argv[] )
|
||||
force_new = true;
|
||||
}
|
||||
|
||||
//check again if service is still running
|
||||
// check again if service is still running
|
||||
bool foundRunningService = false;
|
||||
if( !force_new )
|
||||
{
|
||||
@@ -82,8 +81,9 @@ int main( int argc, char *argv[] )
|
||||
if( foundRunningService )
|
||||
{
|
||||
// open given session
|
||||
QDBusMessage m = QDBusMessage::createMethodCall( PLAYUVER_DBUS_SESSION_NAME, QStringLiteral( PLAYUVER_DBUS_PATH ),
|
||||
QStringLiteral( PLAYUVER_DBUS_SESSION_NAME ), QStringLiteral( "activate" ) );
|
||||
QDBusMessage m =
|
||||
QDBusMessage::createMethodCall( PLAYUVER_DBUS_SESSION_NAME, QStringLiteral( PLAYUVER_DBUS_PATH ),
|
||||
QStringLiteral( PLAYUVER_DBUS_SESSION_NAME ), QStringLiteral( "activate" ) );
|
||||
|
||||
QDBusConnection::sessionBus().call( m );
|
||||
|
||||
@@ -93,25 +93,26 @@ int main( int argc, char *argv[] )
|
||||
QStringList tokens;
|
||||
|
||||
// open given files...
|
||||
foreach(const QString & file, filenameList)
|
||||
foreach( const QString& file, filenameList )
|
||||
{
|
||||
QDBusMessage m = QDBusMessage::createMethodCall(PLAYUVER_DBUS_SESSION_NAME,
|
||||
QStringLiteral(PLAYUVER_DBUS_PATH), QStringLiteral(PLAYUVER_DBUS_SESSION_NAME), QStringLiteral("loadFile"));
|
||||
QDBusMessage m = QDBusMessage::createMethodCall(
|
||||
PLAYUVER_DBUS_SESSION_NAME, QStringLiteral( PLAYUVER_DBUS_PATH ),
|
||||
QStringLiteral( PLAYUVER_DBUS_SESSION_NAME ), QStringLiteral( "loadFile" ) );
|
||||
|
||||
QList<QVariant> dbusargs;
|
||||
dbusargs.append( file );
|
||||
m.setArguments(dbusargs);
|
||||
m.setArguments( dbusargs );
|
||||
|
||||
QDBusMessage res = QDBusConnection::sessionBus().call(m);
|
||||
if (res.type() == QDBusMessage::ReplyMessage)
|
||||
QDBusMessage res = QDBusConnection::sessionBus().call( m );
|
||||
if( res.type() == QDBusMessage::ReplyMessage )
|
||||
{
|
||||
if (res.arguments().count() == 1)
|
||||
if( res.arguments().count() == 1 )
|
||||
{
|
||||
QVariant v = res.arguments()[0];
|
||||
if (v.isValid())
|
||||
if( v.isValid() )
|
||||
{
|
||||
QString s = v.toString();
|
||||
if ((!s.isEmpty()) && (s != QStringLiteral("ERROR")))
|
||||
if( ( !s.isEmpty() ) && ( s != QStringLiteral( "ERROR" ) ) )
|
||||
{
|
||||
tokens << s;
|
||||
}
|
||||
@@ -137,7 +138,8 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
#ifdef USE_FERVOR
|
||||
FvUpdater::sharedUpdater()->SetFeedURL( "http://192.168.96.201/share/PlaYUVerProject/PlaYUVerUpdate-" UPDATE_CHANNEL ".xml" );
|
||||
FvUpdater::sharedUpdater()->SetFeedURL( "http://192.168.96.201/share/PlaYUVerProject/PlaYUVerUpdate-" UPDATE_CHANNEL
|
||||
".xml" );
|
||||
FvUpdater::sharedUpdater()->SetDependencies( "ALL" );
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user