WinGui: Tidy up code warnings.

This commit is contained in:
sr55 2025-12-03 20:29:48 +00:00
parent 4748370f98
commit ae41c6bf60
No known key found for this signature in database
GPG Key ID: ECE911849A3E21A5
10 changed files with 17 additions and 16 deletions

View File

@ -17,4 +17,12 @@
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> <GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;CS0649</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;CS0649</NoWarn>
</PropertyGroup>
</Project> </Project>

View File

@ -93,7 +93,7 @@ namespace HandBrake.Interop.Interop
try try
{ {
return false; // This feature has been deprecated by Intel. return false; // This feature has been deprecated by Intel.
return IsQsvAvailable && QsvHyperEncode > 0; // return IsQsvAvailable && QsvHyperEncode > 0;
} }
catch (Exception) catch (Exception)
{ {

View File

@ -81,7 +81,7 @@ namespace HandBrakeWPF.Commands
throw e.InnerException; throw e.InnerException;
} }
throw e; throw;
} }
} }
} }

View File

@ -30,10 +30,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>bin\Debug</OutputPath> <OutputPath>bin\Debug</OutputPath>
<WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors>
<NoWarn>1701;1702;CS0067</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>bin\Release</OutputPath> <OutputPath>bin\Release</OutputPath>
<WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors>
<NoWarn>1701;1702;CS0067</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -59,7 +63,6 @@
<PackageReference Include="gong-wpf-dragdrop" Version="4.0.0" /> <PackageReference Include="gong-wpf-dragdrop" Version="4.0.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" /> <PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" /> <PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageReference Include="System.Drawing.Common" Version="10.0.0" />
<PackageReference Include="System.Management" Version="10.0.0" /> <PackageReference Include="System.Management" Version="10.0.0" />
</ItemGroup> </ItemGroup>

View File

@ -61,7 +61,6 @@ namespace HandBrakeWPF.Instance
get get
{ {
throw new NotImplementedException("This method is not implemented yet"); throw new NotImplementedException("This method is not implemented yet");
return 0;
} }
} }

View File

@ -228,8 +228,6 @@ namespace HandBrakeWPF.Services.Queue.Model
{ {
return Resources.QueueView_NotAvailable; return Resources.QueueView_NotAvailable;
} }
return string.Empty;
} }
} }

View File

@ -11,6 +11,7 @@ namespace HandBrakeWPF.Utilities
{ {
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization; using System.Globalization;
using System.Management; using System.Management;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -176,6 +177,7 @@ namespace HandBrakeWPF.Utilities
catch (Exception exc) catch (Exception exc)
{ {
// Nothing to do. Just don't display the warnings. // Nothing to do. Just don't display the warnings.
Debug.WriteLine(exc);
} }
}); });
} }

View File

@ -1754,6 +1754,7 @@ namespace HandBrakeWPF.ViewModels
catch (Exception exc) catch (Exception exc)
{ {
// Nothing to do. Just don't display the warnings. // Nothing to do. Just don't display the warnings.
Debug.WriteLine(exc);
} }
}); });
} }

View File

@ -50,11 +50,7 @@
<application xmlns="urn:schemas-microsoft-com:asm.v3"> <application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings> <windowsSettings>
<!-- The combination of below two tags have the following effect :
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness> <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings> </windowsSettings>
</application> </application>

View File

@ -26,12 +26,6 @@
"resolved": "1.1.135", "resolved": "1.1.135",
"contentHash": "r8qBEXmQfORso2+MVHnt8PSH4761zJ0SIxgQTSEDVLU97EN2FZdG6/ZCYUPhQy+OrPKgnpYBCAs3PS6Bs7wRsg==" "contentHash": "r8qBEXmQfORso2+MVHnt8PSH4761zJ0SIxgQTSEDVLU97EN2FZdG6/ZCYUPhQy+OrPKgnpYBCAs3PS6Bs7wRsg=="
}, },
"System.Drawing.Common": {
"type": "Direct",
"requested": "[10.0.0, )",
"resolved": "10.0.0",
"contentHash": "kohT9ZZlkB5R5ifihCBnPJLdIUQGiTj1ZI6z4LKatr+F4MmIJJu7qQpBkqt9280ivtnSvlTx9qZEY+CpJ0zMkA=="
},
"System.Management": { "System.Management": {
"type": "Direct", "type": "Direct",
"requested": "[10.0.0, )", "requested": "[10.0.0, )",