From 8977e0073f0b8f3ad3ab8a7deb8ecda9823d6c50 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Mon, 11 Apr 2011 21:55:34 +0200 Subject: [PATCH] Clean up #include directives: Don't include 'Windows.h' directly, as it's included from 'Global.h' header file. --- src/Config.h | 4 ++-- src/Dialog_About.cpp | 11 +++++++---- src/Dialog_DropBox.cpp | 1 - src/Dialog_LogView.cpp | 3 ++- src/Dialog_Processing.cpp | 2 +- src/Dialog_SplashScreen.cpp | 1 - src/Dialog_Update.cpp | 2 +- src/Dialog_WorkingBanner.cpp | 1 - src/Encoder_Abstract.cpp | 1 - src/Global.cpp | 14 +++----------- src/Global.h | 7 ++++--- src/ShellIntegration.cpp | 1 - src/Targetver.h | 9 ++++++++- src/Thread_DiskObserver.cpp | 1 - src/Thread_Initialization.cpp | 2 -- src/Tool_Abstract.cpp | 3 ++- 16 files changed, 30 insertions(+), 33 deletions(-) diff --git a/src/Config.h b/src/Config.h index 961ee28f..0a10742d 100644 --- a/src/Config.h +++ b/src/Config.h @@ -25,8 +25,8 @@ #define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_LO 2 -#define VER_LAMEXP_BUILD 432 -#define VER_LAMEXP_SUFFIX Alpha-1 +#define VER_LAMEXP_BUILD 436 +#define VER_LAMEXP_SUFFIX Alpha-2 /* * Tools versions diff --git a/src/Dialog_About.cpp b/src/Dialog_About.cpp index fedc3389..583956e3 100644 --- a/src/Dialog_About.cpp +++ b/src/Dialog_About.cpp @@ -25,7 +25,6 @@ #include "Resource.h" #include "Model_Settings.h" -//Qt includes #include #include #include @@ -36,8 +35,7 @@ #include #include -//Win32 includes -#include +#include //Helper macros #define LINK(URL) QString("%2").arg(URL).arg(URL) @@ -95,7 +93,12 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta aboutText += QString("%1

").arg(versionStr); aboutText += QString("%1
").arg(tr("Please visit %1 for news and updates!").arg(LINK(lamexp_website_url()))); - if(lamexp_version_demo()) + if(LAMEXP_DEBUG) + { + int daysLeft = max(QDate::currentDate().daysTo(lamexp_version_expires()), 0); + aboutText += QString("
!!! %3 DEBUG BUILD %3 Expires at: %1 %3 Days left: %2 %3 DEBUG BUILD %3 !!!").arg(lamexp_version_expires().toString(Qt::ISODate), QString::number(daysLeft), "−−−"); + } + else if(lamexp_version_demo()) { int daysLeft = max(QDate::currentDate().daysTo(lamexp_version_expires()), 0); aboutText += QString("
%1").arg(tr("Note: This demo (pre-release) version of LameXP will expire at %1. Still %2 days left.").arg(lamexp_version_expires().toString(Qt::ISODate), QString::number(daysLeft))); diff --git a/src/Dialog_DropBox.cpp b/src/Dialog_DropBox.cpp index 721407d1..eb849cc0 100644 --- a/src/Dialog_DropBox.cpp +++ b/src/Dialog_DropBox.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #define EPS (1.0E-5) #define SET_FONT_BOLD(WIDGET,BOLD) { QFont _font = WIDGET.font(); _font.setBold(BOLD); WIDGET.setFont(_font); } diff --git a/src/Dialog_LogView.cpp b/src/Dialog_LogView.cpp index 62b320d6..9e3514a1 100644 --- a/src/Dialog_LogView.cpp +++ b/src/Dialog_LogView.cpp @@ -21,9 +21,10 @@ #include "Dialog_LogView.h" +#include "Global.h" + #include #include -#include LogViewDialog::LogViewDialog(QWidget *parent) : diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp index dc177005..91b61fe3 100644 --- a/src/Dialog_Processing.cpp +++ b/src/Dialog_Processing.cpp @@ -56,7 +56,7 @@ #include #include -#include +#include //////////////////////////////////////////////////////////// diff --git a/src/Dialog_SplashScreen.cpp b/src/Dialog_SplashScreen.cpp index 1c8455d9..b2e542af 100644 --- a/src/Dialog_SplashScreen.cpp +++ b/src/Dialog_SplashScreen.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #define EPS (1.0E-5) diff --git a/src/Dialog_Update.cpp b/src/Dialog_Update.cpp index 2381ac3e..f0b2f7bb 100644 --- a/src/Dialog_Update.cpp +++ b/src/Dialog_Update.cpp @@ -38,8 +38,8 @@ #include #include -#include #include +#include /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Dialog_WorkingBanner.cpp b/src/Dialog_WorkingBanner.cpp index 03e38fd4..971cf35b 100644 --- a/src/Dialog_WorkingBanner.cpp +++ b/src/Dialog_WorkingBanner.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #define EPS (1.0E-5) diff --git a/src/Encoder_Abstract.cpp b/src/Encoder_Abstract.cpp index e7e0120a..791dcd6e 100644 --- a/src/Encoder_Abstract.cpp +++ b/src/Encoder_Abstract.cpp @@ -22,7 +22,6 @@ #include "Encoder_Abstract.h" #include "Global.h" -#include AbstractEncoder::AbstractEncoder(void) { diff --git a/src/Global.cpp b/src/Global.cpp index 1e14a7fc..32d8d3ec 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -46,24 +46,16 @@ #include "Resource.h" #include "LockedFile.h" -//Windows includes -#include - //CRT includes -#include #include #include #include +//COM includes +#include + //Debug only includes #ifdef _DEBUG -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif -#if(_WIN32_WINNT < 0x0501) -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif #include #endif //_DEBUG diff --git a/src/Global.h b/src/Global.h index 88abdc08..9685d50e 100644 --- a/src/Global.h +++ b/src/Global.h @@ -21,14 +21,15 @@ #pragma once -//MSVC +//Target version #include "Targetver.h" -//Stdlib +//inlcude C standard library #include #include -//Win32 +//Windows includes +#define WIN32_LEAN_AND_MEAN #include //Declarations diff --git a/src/ShellIntegration.cpp b/src/ShellIntegration.cpp index e02583e5..56dfdc22 100644 --- a/src/ShellIntegration.cpp +++ b/src/ShellIntegration.cpp @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/src/Targetver.h b/src/Targetver.h index fc44dd70..3a0c248f 100644 --- a/src/Targetver.h +++ b/src/Targetver.h @@ -26,9 +26,16 @@ // your application. The macros work by enabling all features available on platform versions up to and // including the version specified. +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include + // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows 2000. -#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target other versions of Windows. +#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif + +#include diff --git a/src/Thread_DiskObserver.cpp b/src/Thread_DiskObserver.cpp index edf172d3..a58259de 100644 --- a/src/Thread_DiskObserver.cpp +++ b/src/Thread_DiskObserver.cpp @@ -24,7 +24,6 @@ #include "Global.h" #include -#include #define MIN_DISKSPACE 104857600LL //100 MB diff --git a/src/Thread_Initialization.cpp b/src/Thread_Initialization.cpp index cc34d3e2..981daec3 100644 --- a/src/Thread_Initialization.cpp +++ b/src/Thread_Initialization.cpp @@ -32,8 +32,6 @@ #include #include -#include - //////////////////////////////////////////////////////////// // TOOLS //////////////////////////////////////////////////////////// diff --git a/src/Tool_Abstract.cpp b/src/Tool_Abstract.cpp index a037524d..ad02a5bd 100644 --- a/src/Tool_Abstract.cpp +++ b/src/Tool_Abstract.cpp @@ -21,11 +21,12 @@ #include "Tool_Abstract.h" +#include "Global.h" + #include #include #include #include -#include /* * Win32 API definitions