From d15e6a48476047127ef10ca4cb900c1b24b09ed6 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 16 Aug 2010 17:57:15 +0000 Subject: [PATCH] Blind implementation for auto-shutdown on Windows --- src/misc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/misc.cpp b/src/misc.cpp index 02722285f..43dcff322 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -233,7 +233,9 @@ void misc::shutdownComputer() { AEDisposeDesc(&eventReply); #endif - // TODO: Windows support +#ifdef Q_WS_WIN + InitiateSystemShutdownA(0, qPrintable(tr("qBittorrent will shutdown the computer now because all downloads are complete.")), 10, true, false); +#endif } QString misc::truncateRootFolder(boost::intrusive_ptr t) {