Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
e33debcb
Commit
e33debcb
authored
Mar 11, 2014
by
Mark Morschhäuser
Browse files
Changed C to Qt file handling. VC warns because fopen may be unsafe.
parent
ed5f02bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/main.cpp
View file @
e33debcb
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
***************************************************************************/
***************************************************************************/
#include
<QApplication>
#include
<QApplication>
#include
<QFile>
#include
<QTextStream>
#include
<QTextCodec>
#include
<QTextCodec>
#include
<QtPlugin>
#include
<QtPlugin>
#include
<QTranslator>
#include
<QTranslator>
...
@@ -28,7 +30,6 @@
...
@@ -28,7 +30,6 @@
#include
<QIcon>
#include
<QIcon>
#include
<QDir>
#include
<QDir>
#include
<QDesktopServices>
#include
<QDesktopServices>
#include
<stdio.h>
#include
"main.h"
#include
"main.h"
#include
"window_main.h"
#include
"window_main.h"
...
@@ -56,11 +57,11 @@ QString translationPath = QString();
...
@@ -56,11 +57,11 @@ QString translationPath = QString();
void
myMessageOutput
(
QtMsgType
/*type*/
,
const
char
*
msg
)
void
myMessageOutput
(
QtMsgType
/*type*/
,
const
char
*
msg
)
{
{
static
FILE
*
f
=
NULL
;
QFile
file
(
"qdebug.txt"
)
;
if
(
!
f
)
file
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
);
f
=
fopen
(
"qdebug.txt"
,
"w"
);
QTextStream
out
(
&
file
);
fprintf
(
f
,
"%s
\n
"
,
msg
)
;
out
<<
msg
<<
"
\n
"
;
f
flush
(
f
);
f
ile
.
close
(
);
}
}
void
installNewTranslator
()
void
installNewTranslator
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment