Resolve removal of the rest of BCC-affected

Make changes based on feedback provided by vadz.
This commit is contained in:
PB
2020-10-14 20:11:58 +02:00
parent 6ba1b8c78c
commit caab5dda00
6 changed files with 10 additions and 40 deletions

View File

@@ -6,7 +6,7 @@
The formats below are disabled because wxWidgets doesn't support these The formats below are disabled because wxWidgets doesn't support these
compilers any longer (although bakefile still does). compilers any longer (although bakefile still does).
--> -->
<disable-formats>dmars,dmars_smake,msvc6prj,watcom</disable-formats> <disable-formats>borland,dmars,dmars_smake,msvc6prj,watcom</disable-formats>
<!-- These wildcards match all .bkl files in wxWidgets tree: --> <!-- These wildcards match all .bkl files in wxWidgets tree: -->

View File

@@ -346,15 +346,8 @@ void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) WX_ATTRIBUT
#define WXDEBUG_DUMPDELAYCOUNTER #define WXDEBUG_DUMPDELAYCOUNTER
// Borland C++ Builder 6 seems to have troubles with inline functions (see bug #define wxTrace(fmt)
// 819700) #define wxTraceLevel(l, fmt)
#if 0
inline void wxTrace(const wxChar *WXUNUSED(fmt)) {}
inline void wxTraceLevel(int WXUNUSED(level), const wxChar *WXUNUSED(fmt)) {}
#else
#define wxTrace(fmt)
#define wxTraceLevel(l, fmt)
#endif
#define WXTRACE true ? (void)0 : wxTrace #define WXTRACE true ? (void)0 : wxTrace
#define WXTRACELEVEL true ? (void)0 : wxTraceLevel #define WXTRACELEVEL true ? (void)0 : wxTraceLevel

View File

@@ -50,16 +50,12 @@ extern WXDLLIMPEXP_CORE int
#define wxIMPLEMENT_WXWIN_MAIN \ #define wxIMPLEMENT_WXWIN_MAIN \
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \ extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
HINSTANCE hPrevInstance, \ HINSTANCE hPrevInstance, \
wxCmdLineArgType WXUNUSED(lpCmdLine), \ wxCmdLineArgType lpCmdLine, \
int nCmdShow) \ int nCmdShow) \
{ \ { \
wxDISABLE_DEBUG_SUPPORT(); \ wxDISABLE_DEBUG_SUPPORT(); \
\ \
/* NB: We pass NULL in place of lpCmdLine to behave the same as */ \ return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow); \
/* Borland-specific wWinMain() above. If it becomes needed */ \
/* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \
/* wWinMain() above too. */ \
return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \
} }
#endif // wxUSE_GUI #endif // wxUSE_GUI

View File

@@ -1181,7 +1181,7 @@ wxAppDerivedClass& wxGetApp();
Notice that this function is only available if @c wxUSE_ON_FATAL_EXCEPTION Notice that this function is only available if @c wxUSE_ON_FATAL_EXCEPTION
is 1 and under Windows platform this requires a compiler with support for is 1 and under Windows platform this requires a compiler with support for
SEH (structured exception handling) which currently means only Microsoft SEH (structured exception handling) which currently means only Microsoft
Visual C++ or a recent Borland C++ version. Visual C++.
@header{wx/app.h} @header{wx/app.h}
*/ */

View File

@@ -70,9 +70,6 @@ static wxString FilterOutValue(const wxString& str);
static wxString FilterInEntryName(const wxString& str); static wxString FilterInEntryName(const wxString& str);
static wxString FilterOutEntryName(const wxString& str); static wxString FilterOutEntryName(const wxString& str);
// get the name to use in wxFileConfig ctor
static wxString GetAppName(const wxString& appname);
// ============================================================================ // ============================================================================
// private classes // private classes
// ============================================================================ // ============================================================================
@@ -351,7 +348,8 @@ wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
const wxString& strLocal, const wxString& strGlobal, const wxString& strLocal, const wxString& strGlobal,
long style, long style,
const wxMBConv& conv) const wxMBConv& conv)
: wxConfigBase(::GetAppName(appName), vendorName, : wxConfigBase(( !appName && wxTheApp ) ? wxTheApp->GetAppName() : appName,
vendorName,
strLocal, strGlobal, strLocal, strGlobal,
style), style),
m_fnLocalFile(strLocal), m_fnLocalFile(strLocal),
@@ -2095,14 +2093,4 @@ static wxString FilterOutEntryName(const wxString& str)
return strResult; return strResult;
} }
// we can't put ?: in the ctor initializer list because it confuses some
// broken compilers (Borland C++)
static wxString GetAppName(const wxString& appName)
{
if ( !appName && wxTheApp )
return wxTheApp->GetAppName();
else
return appName;
}
#endif // wxUSE_CONFIG #endif // wxUSE_CONFIG

View File

@@ -1060,13 +1060,6 @@ wxFileName wxGenericFileCtrl::DoGetFileName() const
return fn; return fn;
} }
// helper used in DoGetFilenames() and needed because Borland can't compile
// operator?: inline
static inline wxString GetFileNameOrPath(const wxFileName& fn, bool fullPath)
{
return fullPath ? fn.GetFullPath() : fn.GetFullName();
}
void void
wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const
{ {
@@ -1081,7 +1074,7 @@ wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const
if ( fn.IsRelative() ) if ( fn.IsRelative() )
fn.MakeAbsolute(dir); fn.MakeAbsolute(dir);
filenames.push_back(GetFileNameOrPath(fn, fullPath)); filenames.push_back(fullPath ? fn.GetFullPath() : fn.GetFullName());
return; return;
} }
@@ -1105,7 +1098,7 @@ wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const
m_list->GetItem(item); m_list->GetItem(item);
const wxFileName fn(dir, item.m_text); const wxFileName fn(dir, item.m_text);
filenames.push_back(GetFileNameOrPath(fn, fullPath)); filenames.push_back(fullPath ? fn.GetFullPath() : fn.GetFullName());
} }
} }