Windows: fix depreceation warnings
- winsock2.h should be included before windows.h
- QProcess::execute('name') -> QProcess::execute('name', args);
This commit is contained in:
@@ -153,7 +153,7 @@ bool DownloadThread::_openAndPrepareDevice()
|
||||
qDebug() << "Removing partition table from Windows drive #" << _nr << "(" << _filename << ")";
|
||||
|
||||
QProcess proc;
|
||||
proc.start("diskpart");
|
||||
proc.start("diskpart", QStringList());
|
||||
proc.waitForStarted();
|
||||
proc.write("select disk "+_nr+"\r\n"
|
||||
"clean\r\n"
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
* Copyright (C) 2020 Raspberry Pi Ltd
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
#include <QFile>
|
||||
|
||||
@@ -48,7 +48,7 @@ void DriveFormatThread::run()
|
||||
"select partition 1\r\n"
|
||||
"set id=0e\r\n"
|
||||
"assign\r\n";
|
||||
proc.start("diskpart");
|
||||
proc.start("diskpart", QStringList());
|
||||
proc.waitForStarted();
|
||||
proc.write(diskpartCmds);
|
||||
proc.closeWriteChannel();
|
||||
|
||||
+1
-1
@@ -3,9 +3,9 @@
|
||||
* Copyright (C) 2020 Raspberry Pi Ltd
|
||||
*/
|
||||
|
||||
#include "downloadextractthread.h"
|
||||
#include "imagewriter.h"
|
||||
#include "drivelistitem.h"
|
||||
#include "downloadextractthread.h"
|
||||
#include "dependencies/drivelist/src/drivelist.hpp"
|
||||
#include "dependencies/sha256crypt/sha256crypt.h"
|
||||
#include "driveformatthread.h"
|
||||
|
||||
Reference in New Issue
Block a user