CoreCon: Remove incorrect argument from SendFile()
authorAndrew Knight <andrew.knight@digia.com>
Tue, 4 Mar 2014 10:32:14 +0000 (12:32 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 4 Mar 2014 12:56:22 +0000 (13:56 +0100)
This argument is apparently a typo in the MSDN docs. It is not
documented and not present in assembly of actual users of this API.
This change corrects all the users of the API in qttools.

Change-Id: I9cad60b3218a55271d805dad95cda4068aead21a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
src/qtd3dservice/xaphandler.cpp
src/shared/corecon/ccapi.h
src/winrtrunner/xapengine.cpp

index 16fa3f5..a8006ef 100644 (file)
@@ -307,7 +307,7 @@ extern int handleXapDevice(int deviceIndex, const QString &app, const QString &l
                     continue;
                 }
                 // Not found, so let's upload it
-                hr = connection->SendFile(bstr(localControlFile), bstr(remoteControlFile), 2, 2, NULL);
+                hr = connection->SendFile(bstr(localControlFile), bstr(remoteControlFile), CREATE_ALWAYS, NULL);
                 if (FAILED(hr)) {
                     if (hr == 0x8973190e) {
                         // This can happen during normal reinstallation, so continue
@@ -427,7 +427,7 @@ extern int handleXapDevice(int deviceIndex, const QString &app, const QString &l
 
             // All went well, upload the file
             const QString remoteBinary = remoteBinaryPath + shaderFileName;
-            hr = connection->SendFile(bstr(localBinary), bstr(remoteBinary), 2, 2, NULL);
+            hr = connection->SendFile(bstr(localBinary), bstr(remoteBinary), CREATE_ALWAYS, NULL);
             if (FAILED(hr)) {
                 qCWarning(lcD3DService) << "Unable to upload binary:"
                                         << remoteBinary << coreConServer->formatError(hr);
index bbed2d2..e4d35c8 100644 (file)
@@ -144,7 +144,7 @@ struct __declspec(uuid("{CEF4C928-326F-49A9-B7E7-8FE7588B74B5}")) ICcConnection
 {
     virtual HRESULT __stdcall DeviceId(BSTR *deviceId) = 0;
     virtual HRESULT __stdcall GetSystemInfo(SystemInfo *systemInfo) = 0;
-    virtual HRESULT __stdcall SendFile(BSTR desktopFile, BSTR deviceFile, DWORD fileAction, DWORD creationFlags, BSTR customFileAction) = 0;
+    virtual HRESULT __stdcall SendFile(BSTR desktopFile, BSTR deviceFile, DWORD creationFlags, BSTR customFileAction) = 0;
     virtual HRESULT __stdcall ReceiveFile(BSTR deviceFile, BSTR desktopFile, DWORD fileAction) = 0;
     virtual HRESULT __stdcall RemoveFile(BSTR deviceFile) = 0;
     virtual HRESULT __stdcall GetFileInfo(BSTR deviceFile, FileInfo *fileInfo) = 0;
index 5ea5d7d..53c64c6 100644 (file)
@@ -608,7 +608,7 @@ bool XapEngine::sendFile(const QString &localFile, const QString &deviceFile)
     qCDebug(lcWinRtRunner) << __FUNCTION__;
 
     HRESULT hr = d->connection->SendFile(_bstr_t(wchar(localFile)), _bstr_t(wchar(deviceFile)),
-                                         uint(2), uint(2), 0);
+                                         CREATE_ALWAYS, NULL);
     if (FAILED(hr)) {
         qCWarning(lcWinRtRunner) << "Unable to send the file." << coreConServer->formatError(hr);
         return false;