1
0
Fork 0

Fix FromUTF8 usage with wxWidgets 3.0

This commit is contained in:
wangqr 2019-10-17 16:14:21 -04:00
parent f92abc863e
commit 41bb13cff2
2 changed files with 6 additions and 2 deletions

View File

@ -63,7 +63,7 @@ script:
export LIBS="-lgcov";
./autogen.sh;
./configure --enable-debug || cat config.log;
make -j2;
make -j2 || travis_terminate 1;
make test || travis_terminate 1;
coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null;
else
@ -71,7 +71,7 @@ script:
mkdir build-dir;
cd build-dir;
cmake -DCMAKE_CXX_FLAGS='-Wall -Wextra -Wno-unused-parameter -pedantic' -DCMAKE_C_FLAGS='-Wall' -DWITH_STARTUPLOG=ON -DWITH_TEST=ON ..;
make -j2;
make -j2 || travis_terminate 1;
make test || travis_terminate 1;
fi

View File

@ -54,7 +54,11 @@ TextFileWriter::~TextFileWriter() {
file->Close();
}
catch (agi::fs::FileSystemError const&e) {
#if wxCHECK_VERSION (3, 1, 0)
wxString m = wxString::FromUTF8(e.GetMessage());
#else
wxString m = wxString::FromUTF8(e.GetMessage().c_str(), e.GetMessage().size());
#endif
if (!m.empty())
wxMessageBox(m, "Exception in agi::io::Save", wxOK | wxCENTRE | wxICON_ERROR);
else