File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,7 @@ void WinExtras::removeFileAssociationFromRegistry()
330
330
SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0 , 0 );
331
331
}
332
332
333
+ // This functions works only with QT6 and newer C++
333
334
const wchar_t *convertCharArrayToLPCWSTR (const char *charArray)
334
335
{
335
336
wchar_t *wString = new wchar_t [1024 ];
@@ -351,8 +352,13 @@ bool WinExtras::elevateAntiMicro()
351
352
char *tempfile = ba.data ();
352
353
tempverb[5 ] = ' \0 ' ;
353
354
tempfile[antiProgramLocation.length ()] = ' \0 ' ;
355
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
354
356
sei.lpVerb = convertCharArrayToLPCWSTR (tempverb);
355
357
sei.lpFile = convertCharArrayToLPCWSTR (tempfile);
358
+ #else
359
+ sei.lpVerb = tempverb;
360
+ sei.lpFile = tempfile;
361
+ #endif
356
362
sei.hwnd = NULL ;
357
363
sei.nShow = SW_NORMAL;
358
364
BOOL result = ShellExecuteEx (&sei);
You can’t perform that action at this time.
0 commit comments