Skip to content

Commit bc37a27

Browse files
author
Uwe Kindler
committed
Fixed placing of drop overlay cross, resizing of floating widget to drop
area rectangle size prior to insertion
1 parent 051c379 commit bc37a27

8 files changed

+970
-895
lines changed

.cproject

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/QtAdvancedDockingSystem/demo}&quot;"/>
3535
<listOptionValue builtIn="false" value="&quot;${QTDIR}/include&quot;"/>
3636
</option>
37+
<option id="gnu.cpp.compiler.option.preprocessor.def.56223209" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols"/>
3738
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1318830536" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
3839
</tool>
3940
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.base.389117097" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.base">
@@ -42,6 +43,7 @@
4243
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/QtAdvancedDockingSystem/src}&quot;"/>
4344
<listOptionValue builtIn="false" value="&quot;${QTDIR}/include&quot;"/>
4445
</option>
46+
<option id="gnu.c.compiler.option.preprocessor.def.symbols.806805509" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols"/>
4547
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1568363924" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
4648
</tool>
4749
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.1734874312" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>

.settings/language.settings.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project>
33
<configuration id="cdt.managedbuild.toolchain.gnu.mingw.base.1119687795" name="Default">
44
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
5-
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
6-
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
7-
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
8-
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="-797032510223863550" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
5+
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="-853214798705706782" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD -std=c++14 &quot;${INPUTS}&quot;" prefer-non-shared="true">
96
<language-scope id="org.eclipse.cdt.core.gcc"/>
107
<language-scope id="org.eclipse.cdt.core.g++"/>
118
</provider>
9+
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
10+
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
11+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
1212
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
1313
</extension>
1414
</configuration>

demo/main.cpp

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
1-
#include <QString>
2-
#include <QFile>
3-
#include <QApplication>
4-
#include <QDebug>
5-
6-
#include "mainwindow.h"
7-
8-
9-
void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
10-
{
11-
QByteArray localMsg = msg.toLocal8Bit();
12-
switch (type) {
13-
case QtDebugMsg:
14-
fprintf(stdout, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
15-
break;
16-
case QtInfoMsg:
17-
fprintf(stdout, "Info: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
18-
break;
19-
case QtWarningMsg:
20-
fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
21-
break;
22-
case QtCriticalMsg:
23-
fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
24-
break;
25-
case QtFatalMsg:
26-
fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
27-
abort();
28-
}
29-
30-
fflush(stderr);
31-
fflush(stdout);
32-
}
33-
34-
int main(int argc, char *argv[])
35-
{
36-
QApplication a(argc, argv);
37-
a.setQuitOnLastWindowClosed(true);
38-
qInstallMessageHandler(myMessageOutput);
39-
qDebug() << "Message handler test";
40-
41-
MainWindow mw;
42-
mw.show();
43-
return a.exec();
44-
}
1+
#include <QString>
2+
#include <QFile>
3+
#include <QApplication>
4+
#include <QDebug>
5+
6+
#include <memory>
7+
8+
#include "mainwindow.h"
9+
10+
11+
void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
12+
{
13+
QByteArray localMsg = msg.toLocal8Bit();
14+
switch (type) {
15+
case QtDebugMsg:
16+
fprintf(stdout, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
17+
break;
18+
case QtInfoMsg:
19+
fprintf(stdout, "Info: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
20+
break;
21+
case QtWarningMsg:
22+
fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
23+
break;
24+
case QtCriticalMsg:
25+
fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
26+
break;
27+
case QtFatalMsg:
28+
fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
29+
abort();
30+
}
31+
32+
fflush(stderr);
33+
fflush(stdout);
34+
}
35+
36+
int main(int argc, char *argv[])
37+
{
38+
std::shared_ptr<int> b;
39+
QApplication a(argc, argv);
40+
a.setQuitOnLastWindowClosed(true);
41+
qInstallMessageHandler(myMessageOutput);
42+
qDebug() << "Message handler test";
43+
44+
MainWindow mw;
45+
mw.show();
46+
return a.exec();
47+
}

0 commit comments

Comments
 (0)