Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
André Pedro
CMake
Commits
7b1c305d
Commit
7b1c305d
authored
17 years ago
by
Bill Hoffman
Browse files
Options
Downloads
Patches
Plain Diff
ENH: make sure html < > & stuff is escaped for the output window
parent
b459ec9f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/QtDialog/CMakeSetupDialog.cxx
+18
-2
18 additions, 2 deletions
Source/QtDialog/CMakeSetupDialog.cxx
Source/QtDialog/CMakeSetupDialog.h
+1
-0
1 addition, 0 deletions
Source/QtDialog/CMakeSetupDialog.h
with
19 additions
and
2 deletions
Source/QtDialog/CMakeSetupDialog.cxx
+
18
−
2
View file @
7b1c305d
...
...
@@ -16,7 +16,6 @@
=========================================================================*/
#include
"CMakeSetupDialog.h"
#include
<QFileDialog>
#include
<QProgressBar>
#include
<QMessageBox>
...
...
@@ -177,7 +176,7 @@ void CMakeSetupDialog::initialize()
QObject
::
connect
(
this
->
CMakeThread
->
cmakeInstance
(),
SIGNAL
(
outputMessage
(
QString
)),
this
->
Output
,
SLOT
(
append
(
QString
)));
this
,
SLOT
(
message
(
QString
)));
QObject
::
connect
(
this
->
Advanced
,
SIGNAL
(
clicked
(
bool
)),
this
->
CacheValues
,
SLOT
(
setShowAdvanced
(
bool
)));
...
...
@@ -467,10 +466,27 @@ void CMakeSetupDialog::error(const QString& message)
QStringList
messages
=
message
.
split
(
'\n'
);
foreach
(
QString
m
,
messages
)
{
// make sure we escape html tags in the cmake messages
m
.
replace
(
QString
(
"&"
),
QString
(
"&"
));
m
.
replace
(
QString
(
"<"
),
QString
(
"<"
));
m
.
replace
(
QString
(
">"
),
QString
(
">"
));
this
->
Output
->
append
(
QString
(
"<b><font color=red>%1</font></b>"
).
arg
(
m
));
}
}
void
CMakeSetupDialog
::
message
(
const
QString
&
message
)
{
QStringList
messages
=
message
.
split
(
'\n'
);
foreach
(
QString
m
,
messages
)
{
// make sure we escape html tags in the cmake messages
m
.
replace
(
QString
(
"&"
),
QString
(
"&"
));
m
.
replace
(
QString
(
"<"
),
QString
(
"<"
));
m
.
replace
(
QString
(
">"
),
QString
(
">"
));
this
->
Output
->
append
(
m
);
}
}
void
CMakeSetupDialog
::
setEnabledState
(
bool
enabled
)
{
// disable parts of the GUI during configure/generate
...
...
This diff is collapsed.
Click to expand it.
Source/QtDialog/CMakeSetupDialog.h
+
1
−
0
View file @
7b1c305d
...
...
@@ -50,6 +50,7 @@ protected slots:
void
finishConfigure
(
int
error
);
void
finishGenerate
(
int
error
);
void
error
(
const
QString
&
message
);
void
message
(
const
QString
&
message
);
void
doSourceBrowse
();
void
doBinaryBrowse
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment