src/lib/src/functions.cpp
/**
 * Shut down computer after a certain period of time.
 * @param	timeout		Time before shutdown in seconds.
 */
Shut down computer after a certain period of time.
@param       timeout         Time before shutdown in seconds.
Shut down computer after a certain period of time . @param timeout Time before shutdown in seconds .
void shutDown(int timeout)
{
	#if !defined(QT_NO_PROCESS)
		#if defined(Q_OS_WIN)
			QProcess::startDetached(QString("shutdown"), QStringList({"-s", "-f", "-t", QString::number(timeout)}));
		#else
			QProcess::startDetached(QString("shutdown"), QStringList({QString::number(timeout)}));
		#endif
	#endif
}
void shutDown ( int timeout ) { #if ! defined ( QT_NO_PROCESS ) #if defined ( Q_OS_WIN ) QProcess :: startDetached ( QString ( " " ) , QStringList ( { " " , " " , " " , QString :: number ( timeout ) } ) ) ; #else QProcess :: startDetached ( QString ( " " ) , QStringList ( { QString :: number ( timeout ) } ) ) ; #endif #endif }
Shut down computer after a certain period of time.
Shut down computer after a certain period of time .