[libcalamares] Apply coding style

- minor space issues
 - drop a blank line after moc-warnings.h to avoid if being sorted
   downwards, after the MOC file it's protecting
This commit is contained in:
Adriaan de Groot 2020-03-31 23:19:51 +02:00
parent 1765412b61
commit d8ecd302e1
6 changed files with 10 additions and 8 deletions

View File

@ -65,9 +65,9 @@ mount( const std::string& device_path,
const std::string& options )
{
return CalamaresUtils::Partition::mount( QString::fromStdString( device_path ),
QString::fromStdString( mount_point ),
QString::fromStdString( filesystem_name ),
QString::fromStdString( options ) );
QString::fromStdString( mount_point ),
QString::fromStdString( filesystem_name ),
QString::fromStdString( options ) );
}

View File

@ -94,8 +94,7 @@ private:
}
};
QDebug&
operator <<( QDebug& s, const Calamares::ModuleSystem::InstanceKey& i );
QDebug& operator<<( QDebug& s, const Calamares::ModuleSystem::InstanceKey& i );
} // namespace ModuleSystem
} // namespace Calamares

View File

@ -138,4 +138,5 @@ ModuleSystemTests::testBadFromStringCases()
QTEST_GUILESS_MAIN( ModuleSystemTests )
#include "utils/moc-warnings.h"
#include "Tests.moc"

View File

@ -286,4 +286,5 @@ Manager::asynchronousGet( const QUrl& url, const CalamaresUtils::Network::Reques
} // namespace CalamaresUtils
#include "utils/moc-warnings.h"
#include "Manager.moc"

View File

@ -47,6 +47,7 @@ NetworkTests::testPing()
using namespace CalamaresUtils::Network;
Logger::setupLogLevel( Logger::LOGVERBOSE );
auto& nam = Manager::instance();
auto canPing_www_kde_org = nam.synchronousPing( QUrl( "https://www.kde.org" ), RequestOptions( RequestOptions::FollowRedirect ) );
auto canPing_www_kde_org
= nam.synchronousPing( QUrl( "https://www.kde.org" ), RequestOptions( RequestOptions::FollowRedirect ) );
QVERIFY( canPing_www_kde_org );
}

View File

@ -24,14 +24,14 @@
#include <type_traits>
/// @brief Convenience to zero out and deleteLater of any QObject-derived-class
template< typename T >
template < typename T >
struct cqDeleter
{
T*& p;
~cqDeleter()
{
static_assert( std::is_base_of<QObject, T>::value, "Not a QObject-class" );
static_assert( std::is_base_of< QObject, T >::value, "Not a QObject-class" );
if ( p )
{
p->deleteLater();