Skip to content

Commit

Permalink
moved windows debugging code
Browse files Browse the repository at this point in the history
 -incremented patch version
  • Loading branch information
someretical committed Jan 17, 2022
1 parent 21a8b48 commit c6ba3ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

// https:// stackoverflow.com/a/41701133
#ifdef _WIN32
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
freopen("CONIN$", "r", stdin);
}
#endif

#include <QtCore>
#include <string>

Expand All @@ -40,6 +31,16 @@ Q_DECLARE_METATYPE(td::CalendarButtonData)

int main(int argc, char **argv)
{
// https:// stackoverflow.com/a/41701133
// Basically allows debugging output on Windows.
#ifdef _WIN32
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
freopen("CONIN$", "r", stdin);
}
#endif

// Make sure only 1 instance of the app is running at all times. Courtesy of https://stackoverflow.com/a/28172162
RunGuard guard("theoreticaldiary");
if (!guard.try_to_run()) {
Expand Down
2 changes: 1 addition & 1 deletion text/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.4
2.3.5

0 comments on commit c6ba3ed

Please sign in to comment.