Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrZga-0003i5-Ki for pgadmin-hackers@arkaria.postgresql.org; Wed, 28 Oct 2015 22:59:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZrZgZ-0008UE-NK for pgadmin-hackers@arkaria.postgresql.org; Wed, 28 Oct 2015 22:59:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZrZgZ-0008St-3U for pgadmin-hackers@postgresql.org; Wed, 28 Oct 2015 22:59:15 +0000 Received: from mout.gmx.com ([74.208.4.201]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1ZrZgV-00077m-QW for pgadmin-hackers@postgresql.org; Wed, 28 Oct 2015 22:59:14 +0000 Received: from [92.234.71.108] by 3capp-mailcom-lxa16.server.lan (via HTTP); Wed, 28 Oct 2015 23:59:08 +0100 MIME-Version: 1.0 Message-ID: From: "Prasad Somwanshi" To: pgadmin-hackers Subject: pgadmin4: sleep api Content-Type: multipart/mixed; boundary=kenitramv-4ef29216-735f-4f7f-b8d1-54e003b3a705 Date: Wed, 28 Oct 2015 23:59:08 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K0:Il4paIvFFK6g8La3Up/tqsKuBbnzyqPIB8tCnZBUE8U ko3wNXr/LQAqrO/76/uBdj3KcssjPsUG0yKVlzevSxJoKMfab/ CKfMQLUgh8KFps/DGEK9lvYdyQSHzAP2Aou6n+g20IOeYFBD46 vz8QSCW76Mm9S1JOZOBxOXHt4jsS1HrjIFLlkF3IrbZZ88aN5F zV2ZhBvCbcbAMtJFMtWUjcuEYPnwDFwErdYbxBpTxxfZqzI6uq jS8RShRZi5J+sV/RYRs49I3xyBPhIMKEFd+0Fq/e6OLIWxYgOb Pdx735DH368U905yu40MXrsN+kC X-UI-Out-Filterresults: notjunk:1;V01:K0:XLQ1oaJGYWY=:2Wd5dPBawNpO00O6Wj6ttp 00f7b7xlboGULre1nD2T2qX3ssbjYo/94Uz49x6+cmOGQx5QLFfpjSAOI5Y/NadQeI5wUXJG0 Dz0yVzBoIpWwr8I7Yjx62r/xhI04rFEW0e0SpSYz33dU1YVZLMxJXpVUNjrSiJDv3Cr8kXuLw eEaGR9M4OSAch2DWAAqMAOgxCFeMZpRpHlUpf/VsxPvEFdapIrtQIBiu5nS3PKkWbbMXA5upZ 1MX3Cn9rvK0qj4BYz2v7l4ksB2sR8w15ob/DjVZqluiWhhVc1TpnReQRGII9/XIeOb2dwpyIT chxUFv6llZfW15+KWzam+3QR7P1v8cHC7Qhybo8DKmuvxrh7N1BEdH8mEXdFVN6kjJgwyPs8g m5SsuswURbmOJwiwqIobSTH+Q6gFZOKPsPdWXWhorjoCx73FphUbIXIVgeZpQTJHwG/z4ZoD+ AnFCHs5YBQ== X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --kenitramv-4ef29216-735f-4f7f-b8d1-54e003b3a705 Content-Type: text/html; charset=UTF-8
Hi,
 
sleep api used in pgAdmin4.cpp doesn't seem cross-platform(used from POSIX specific C header). Either need to be replaced by C++11 equivalent or Qt one. QThread::sleep seem appropriate to me.
 
thanks and regards,
Prasad Somwanshi
--kenitramv-4ef29216-735f-4f7f-b8d1-54e003b3a705 Content-Type: text/x-patch Content-Disposition: attachment; filename=sleep.patch diff --git a/runtime/pgAdmin4.cpp b/runtime/pgAdmin4.cpp --- a/runtime/pgAdmin4.cpp +++ b/runtime/pgAdmin4.cpp @@ -61,7 +61,7 @@ int main(int argc, char * argv[]) // This is a hack. Wait a second and then check to see if the server thread // is still running. If it's not, we probably had a startup error - sleep(1); + QThread::sleep(1); // Any errors? if (server->isFinished() || server->getError().length() > 0) @@ -108,7 +108,7 @@ int main(int argc, char * argv[]) exit(1); } - sleep(1); + QThread::sleep(1); } // Create & show the main window --kenitramv-4ef29216-735f-4f7f-b8d1-54e003b3a705 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --kenitramv-4ef29216-735f-4f7f-b8d1-54e003b3a705--