Changed: Used qtmain instead of WinMain under Windows
This commit is contained in:
parent
45812f6de0
commit
b54ed1f2a7
1 changed files with 3 additions and 15 deletions
|
@ -61,7 +61,7 @@ void usage()
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QSize> parseCustomSizeHints(int argc, const char **argv)
|
QMap<QString, QSize> parseCustomSizeHints(int argc, char **argv)
|
||||||
{
|
{
|
||||||
/* from Qt sample */
|
/* from Qt sample */
|
||||||
|
|
||||||
|
@ -100,10 +100,9 @@ QMap<QString, QSize> parseCustomSizeHints(int argc, const char **argv)
|
||||||
# else
|
# else
|
||||||
# define tstring string
|
# define tstring string
|
||||||
# endif
|
# endif
|
||||||
sint WINAPI WinMain(HINSTANCE /* hInstance */, HINSTANCE /* hPrevInstance */, LPSTR lpCmdLine, int /* nCmdShow */)
|
|
||||||
#else
|
|
||||||
sint main(int argc, char **argv)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
sint main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
#if defined(NL_OS_WINDOWS) && !FINAL_VERSION
|
#if defined(NL_OS_WINDOWS) && !FINAL_VERSION
|
||||||
// ensure paths are ok before powering up nel
|
// ensure paths are ok before powering up nel
|
||||||
|
@ -173,17 +172,6 @@ sint main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
|
||||||
std::vector<std::string> argvstd;
|
|
||||||
NLMISC::explode<std::string>(std::string(lpCmdLine), " ", argvstd, true);
|
|
||||||
std::vector<const char *> argvp(argvstd.size() + 1);
|
|
||||||
for (std::vector<std::string>::size_type i = 0; i < argvstd.size(); ++i)
|
|
||||||
argvp[i] = argvstd[i].c_str();
|
|
||||||
argvp[argvstd.size()] = NULL;
|
|
||||||
int argc = argvstd.size();
|
|
||||||
const char **argv = &argvp[0];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
hr = hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
hr = hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||||
|
|
Loading…
Reference in a new issue