Permalink
Browse files

make UniqueApplication argc,argv forwarding work on windows

  • Loading branch information...
1 parent 92bd870 commit 363e5de85b9070b941319f0c7d6dfa789b3497f9 @dougma committed Sep 4, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/unicorn/UniqueApplication.cpp
@@ -39,7 +39,7 @@ class UniqueApplicationWidget : public QWidget
Q_ASSERT(msg->hwnd == winId());
COPYDATASTRUCT *data = (COPYDATASTRUCT*)msg->lParam;
- QString message = QString::fromLatin1( (char*)data->lpData, data->cbData / 2 );
+ QString message = QString::fromLatin1( (const char*)data->lpData, data->cbData );
emit app->arguments( message.split( QChar('\0') ) );
@@ -193,7 +193,7 @@ UniqueApplication::forward( const QStringList& args )
COPYDATASTRUCT data;
data.dwData = 0;
- data.cbData = message.length()+1;
+ data.cbData = message.length();
data.lpData = message.data();
DWORD result;
LRESULT res = SendMessageTimeoutA( m_hwnd,

0 comments on commit 363e5de

Please sign in to comment.