Resolved issue #778. Calling Valentina with "-h" option opens information
dialog instead of writing to console. (grafted from 4fb29d9b4e5441c43704005e4776f87d548673e7) --HG-- branch : develop
This commit is contained in:
parent
ef3c60b459
commit
0a66db7184
|
@ -73,6 +73,7 @@
|
||||||
- Fix issue. Curves look too wavy.
|
- Fix issue. Curves look too wavy.
|
||||||
- [#773] Tool Point intersection curve and axis cannot find desired intersection point.
|
- [#773] Tool Point intersection curve and axis cannot find desired intersection point.
|
||||||
- [#776] Valentina cannot recognize translated functions.
|
- [#776] Valentina cannot recognize translated functions.
|
||||||
|
- [#778] Calling Valentina with "-h" option opens information dialog instead of writing to console.
|
||||||
|
|
||||||
# Version 0.5.0 May 9, 2017
|
# Version 0.5.0 May 9, 2017
|
||||||
- [#581] User can now filter input lists by keyword in function wizard.
|
- [#581] User can now filter input lists by keyword in function wizard.
|
||||||
|
|
|
@ -43,6 +43,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
QT_REQUIRE_VERSION(argc, argv, "5.2.0")
|
QT_REQUIRE_VERSION(argc, argv, "5.2.0")
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef Q_OS_MAC // supports natively
|
#ifndef Q_OS_MAC // supports natively
|
||||||
InitHighDpiScaling(argc, argv);
|
InitHighDpiScaling(argc, argv);
|
||||||
#endif //Q_OS_MAC
|
#endif //Q_OS_MAC
|
||||||
|
|
|
@ -48,6 +48,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
QT_REQUIRE_VERSION(argc, argv, "5.2.0")
|
QT_REQUIRE_VERSION(argc, argv, "5.2.0")
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Need to internally move a node inside a piece main path
|
// Need to internally move a node inside a piece main path
|
||||||
qRegisterMetaTypeStreamOperators<VPieceNode>("VPieceNode");
|
qRegisterMetaTypeStreamOperators<VPieceNode>("VPieceNode");
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,24 @@ QUndoStack *VAbstractApplication::getUndoStack() const
|
||||||
return undoStack;
|
return undoStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
void VAbstractApplication::WinAttachConsole()
|
||||||
|
{
|
||||||
|
/* Windows does not really support dual mode applications.
|
||||||
|
* To see console output we need to attach console.
|
||||||
|
* For case of using pipeline we check std output handler.
|
||||||
|
* Original idea: https://stackoverflow.com/a/41701133/3045403
|
||||||
|
*/
|
||||||
|
auto stdout_type = GetFileType(GetStdHandle(STD_OUTPUT_HANDLE));
|
||||||
|
if (stdout_type == FILE_TYPE_UNKNOWN && AttachConsole(ATTACH_PARENT_PROCESS))
|
||||||
|
{
|
||||||
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
Unit VAbstractApplication::patternUnit() const
|
Unit VAbstractApplication::patternUnit() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,6 +111,10 @@ public:
|
||||||
QString GetPPath() const;
|
QString GetPPath() const;
|
||||||
void SetPPath(const QString &value);
|
void SetPPath(const QString &value);
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
static void WinAttachConsole();
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QUndoStack *undoStack;
|
QUndoStack *undoStack;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user