Changed: Moved CCOMHelper to utils.h/cpp, see #279

This commit is contained in:
kervala 2016-09-21 15:21:26 +02:00
parent 7690729eb3
commit 43c2122f94

View file

@ -80,26 +80,6 @@ bool copyInstallerFiles(const QStringList &files, const QString &destination)
return true;
}
#ifdef Q_OS_WIN
class CCOMHelper
{
bool m_mustUninit;
public:
CCOMHelper()
{
// to fix the bug with QFileDialog::getExistingDirectory hanging under Windows
m_mustUninit = SUCCEEDED(CoInitialize(NULL));
}
~CCOMHelper()
{
// only call CoUninitialize if CoInitialize succeeded
if (m_mustUninit) CoUninitialize();
}
};
#endif
int main(int argc, char *argv[])
{
#if defined(_MSC_VER) && defined(_DEBUG)