From 2964f29139081fe28c1f7c6b2240220f37a314e2 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sun, 30 Jul 2023 11:40:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/myx-example-features/main.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/myx-example-features/main.cpp b/src/myx-example-features/main.cpp index 7a2f35c..cba9c85 100644 --- a/src/myx-example-features/main.cpp +++ b/src/myx-example-features/main.cpp @@ -38,8 +38,7 @@ int slowFunction() constexpr int size = 16 * 1024; double a[size]; - for ( int i = 0; i < size; i++ ) - { + for ( int i = 0; i < size; i++ ) { a[i] = QRandomGenerator::global()->bounded( 4 ); for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] ); a[0] += a[i]; @@ -56,8 +55,7 @@ int fastFunction() constexpr int size = 8 * 1024; double a[size]; - for ( int i = 0; i < size; i++ ) - { + for ( int i = 0; i < size; i++ ) { a[i] = QRandomGenerator::global()->bounded( 4 ); for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] ); a[0] += a[i]; @@ -80,21 +78,18 @@ int main( int argc, char** argv ) QList< int > il; il << 111 << 222; - Q_FOREACH ( int i, il ) - { + Q_FOREACH ( int i, il ) { qDebug() << i; } QStringList sl; - sl << QStringLiteral("111") << QStringLiteral("222"); - for ( const auto &s: qAsConst(sl) ) - { + sl << QStringLiteral( "111" ) << QStringLiteral( "222" ); + for ( const auto& s: qAsConst( sl ) ) { qDebug() << s; } - for ( auto s: qAsConst( sl ) ) - { + for ( auto s: qAsConst( sl ) ) { s.append( "0" ); } @@ -104,7 +99,7 @@ int main( int argc, char** argv ) QFile* f = new QFile(); Processor p; - QObject::connect( &app, &QCoreApplication::aboutToQuit, &p, &Processor::process); + QObject::connect( &app, &QCoreApplication::aboutToQuit, &p, &Processor::process ); QTimer::singleShot( 100, &app, SLOT(quit())); #ifdef PROFILE