Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Marco Bubke
flatpak-qt-creator
Commits
f77d9dc9
Commit
f77d9dc9
authored
14 years ago
by
hjk
Browse files
Options
Downloads
Patches
Plain Diff
debugger: fix style after previous merge
parent
356130a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/debugger/debuggertooltip.cpp
+9
-11
9 additions, 11 deletions
src/plugins/debugger/debuggertooltip.cpp
with
9 additions
and
11 deletions
src/plugins/debugger/debuggertooltip.cpp
+
9
−
11
View file @
f77d9dc9
...
@@ -33,15 +33,15 @@
...
@@ -33,15 +33,15 @@
#include
<QtCore/QtDebug>
#include
<QtCore/QtDebug>
#include
<QtGui/QApplication>
#include
<QtGui/QApplication>
#include
<QtGui/QDesktopWidget>
#include
<QtGui/QHBoxLayout>
#include
<QtGui/QHBoxLayout>
#include
<QtGui/QHeaderView>
#include
<QtGui/QHeaderView>
#include
<QtGui/QKeyEvent>
#include
<QtGui/QKeyEvent>
#include
<QtGui/QLabel>
#include
<QtGui/QLabel>
#include
<QtGui/QScrollBar>
#include
<QtGui/QTreeView>
#include
<QtGui/QTreeView>
#include
<QtGui/QVBoxLayout>
#include
<QtGui/QVBoxLayout>
#include
<QtGui/QWidget>
#include
<QtGui/QWidget>
#include
<QtGui/QScrollBar>
#include
<QtGui/QDesktopWidget>
namespace
Debugger
{
namespace
Debugger
{
...
@@ -101,9 +101,8 @@ bool ToolTipWidget::eventFilter(QObject *ob, QEvent *ev)
...
@@ -101,9 +101,8 @@ bool ToolTipWidget::eventFilter(QObject *ob, QEvent *ev)
return
true
;
return
true
;
break
;
break
;
case
QEvent
::
KeyPress
:
case
QEvent
::
KeyPress
:
if
(
static_cast
<
QKeyEvent
*>
(
ev
)
->
key
()
==
Qt
::
Key_Escape
)
{
if
(
static_cast
<
QKeyEvent
*>
(
ev
)
->
key
()
==
Qt
::
Key_Escape
)
return
true
;
return
true
;
}
break
;
break
;
case
QEvent
::
KeyRelease
:
case
QEvent
::
KeyRelease
:
if
(
static_cast
<
QKeyEvent
*>
(
ev
)
->
key
()
==
Qt
::
Key_Escape
)
{
if
(
static_cast
<
QKeyEvent
*>
(
ev
)
->
key
()
==
Qt
::
Key_Escape
)
{
...
@@ -129,7 +128,7 @@ int ToolTipWidget::computeHeight(const QModelIndex &index) const
...
@@ -129,7 +128,7 @@ int ToolTipWidget::computeHeight(const QModelIndex &index) const
return
s
;
return
s
;
}
}
Q_SLOT
void
ToolTipWidget
::
computeSize
()
void
ToolTipWidget
::
computeSize
()
{
{
int
columns
=
0
;
int
columns
=
0
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
...
@@ -138,8 +137,9 @@ Q_SLOT void ToolTipWidget::computeSize()
...
@@ -138,8 +137,9 @@ Q_SLOT void ToolTipWidget::computeSize()
}
}
int
rows
=
computeHeight
(
QModelIndex
());
int
rows
=
computeHeight
(
QModelIndex
());
//Fit tooltip to screen, showing/hiding scrollbars as needed
// Fit tooltip to screen, showing/hiding scrollbars as needed.
//Add a bit of space to account for tooltip border, and not touch the border of the screen
// Add a bit of space to account for tooltip border, and not
// touch the border of the screen.
QPoint
pos
(
x
(),
y
());
QPoint
pos
(
x
(),
y
());
QRect
desktopRect
=
QApplication
::
desktop
()
->
availableGeometry
(
pos
);
QRect
desktopRect
=
QApplication
::
desktop
()
->
availableGeometry
(
pos
);
const
int
maxWidth
=
desktopRect
.
right
()
-
pos
.
x
()
-
5
-
5
;
const
int
maxWidth
=
desktopRect
.
right
()
-
pos
.
x
()
-
5
-
5
;
...
@@ -152,16 +152,14 @@ Q_SLOT void ToolTipWidget::computeSize()
...
@@ -152,16 +152,14 @@ Q_SLOT void ToolTipWidget::computeSize()
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
rows
=
maxHeight
;
rows
=
maxHeight
;
columns
+=
verticalScrollBar
()
->
width
();
columns
+=
verticalScrollBar
()
->
width
();
}
}
else
{
else
{
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
}
}
if
(
columns
>
maxWidth
)
{
if
(
columns
>
maxWidth
)
{
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
columns
=
maxWidth
;
columns
=
maxWidth
;
}
}
else
{
else
{
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
}
}
...
...
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