- fix: editor's inproject property not correctly setted (and may cause devcpp to crash when close project)
This commit is contained in:
parent
e6d4bdd43c
commit
ec458a880a
1
NEWS.md
1
NEWS.md
|
@ -25,6 +25,7 @@ Version 0.6.0
|
||||||
- fix: editors disappeared when close/close all
|
- fix: editors disappeared when close/close all
|
||||||
- implement: config shortcuts
|
- implement: config shortcuts
|
||||||
- implement: handle windows logout message
|
- implement: handle windows logout message
|
||||||
|
- fix: editor's inproject property not correctly setted (and may cause devcpp to crash when close project)
|
||||||
|
|
||||||
Version 0.5.0
|
Version 0.5.0
|
||||||
- enhancement: support C++ using type alias;
|
- enhancement: support C++ using type alias;
|
||||||
|
|
|
@ -2794,6 +2794,7 @@ void Editor::setInProject(bool newInProject)
|
||||||
{
|
{
|
||||||
if (mInProject == newInProject)
|
if (mInProject == newInProject)
|
||||||
return;
|
return;
|
||||||
|
mInProject = newInProject;
|
||||||
if (mInProject) {
|
if (mInProject) {
|
||||||
initParser();
|
initParser();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -29,6 +29,8 @@ public:
|
||||||
bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result){
|
bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result){
|
||||||
MSG * pMsg = static_cast<MSG *>(message);
|
MSG * pMsg = static_cast<MSG *>(message);
|
||||||
if (pMsg->message == WM_QUERYENDSESSION) {
|
if (pMsg->message == WM_QUERYENDSESSION) {
|
||||||
|
if (pMsg->lParam == 0
|
||||||
|
|| (pMsg->lParam & ENDSESSION_LOGOFF)) {
|
||||||
if (!pMainWindow->close()) {
|
if (!pMainWindow->close()) {
|
||||||
*result = 0;
|
*result = 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -36,6 +38,7 @@ bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray &eventType, voi
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue