summaryrefslogtreecommitdiffstats
path: root/konsole
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2013-10-19 18:25:48 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-10-19 19:17:07 +0200
commit2a5554c07cb144d1df794427863ce19bbfa59155 (patch)
tree33f964906b76059bb2f418d3ea9e6f25b248da8d /konsole
parenta7427e16eff4d367d894abc012de2e732911beb0 (diff)
downloadtdebase-2a5554c07cb144d1df794427863ce19bbfa59155.tar.gz
tdebase-2a5554c07cb144d1df794427863ce19bbfa59155.zip
Cleanup build warnings in konsole
Diffstat (limited to 'konsole')
-rw-r--r--konsole/konsole/TECommon.h8
-rw-r--r--konsole/konsole/TEWidget.cpp40
-rw-r--r--konsole/konsole/TEmuVt102.cpp2
-rw-r--r--konsole/konsole/konsole_part.cpp3
4 files changed, 33 insertions, 20 deletions
diff --git a/konsole/konsole/TECommon.h b/konsole/konsole/TECommon.h
index 94b5ecc3..6b3c6621 100644
--- a/konsole/konsole/TECommon.h
+++ b/konsole/konsole/TECommon.h
@@ -221,14 +221,14 @@ inline bool operator != (ca a, ca b)
inline bool ca::isTransparent(const ColorEntry* base) const
{
- return (b.t == CO_DFT) && base[b.u+0+(b.v?BASE_COLORS:0)].transparent
- || (b.t == CO_SYS) && base[b.u+2+(b.v?BASE_COLORS:0)].transparent;
+ return ((b.t == CO_DFT) && base[b.u+0+(b.v?BASE_COLORS:0)].transparent)
+ || ((b.t == CO_SYS) && base[b.u+2+(b.v?BASE_COLORS:0)].transparent);
}
inline bool ca::isBold(const ColorEntry* base) const
{
- return (f.t == CO_DFT) && base[f.u+0+(f.v?BASE_COLORS:0)].bold
- || (f.t == CO_SYS) && base[f.u+2+(f.v?BASE_COLORS:0)].bold;
+ return ((f.t == CO_DFT) && base[f.u+0+(f.v?BASE_COLORS:0)].bold)
+ || ((f.t == CO_SYS) && base[f.u+2+(f.v?BASE_COLORS:0)].bold);
}
#endif // TECOMMON_H
diff --git a/konsole/konsole/TEWidget.cpp b/konsole/konsole/TEWidget.cpp
index 42695052..927f9ff4 100644
--- a/konsole/konsole/TEWidget.cpp
+++ b/konsole/konsole/TEWidget.cpp
@@ -167,9 +167,11 @@ void TEWidget::setColorTable(const ColorEntry table[])
for (int i = 0; i < TABLE_COLORS; i++) color_table[i] = table[i];
const TQPixmap* pm = backgroundPixmap();
if (!pm)
+ {
if (!argb_visual || (tqAlpha(blend_color) == 0xff))
setBackgroundColor(getDefaultBackColor());
- else {
+ else
+ {
float alpha = tqAlpha(blend_color) / 255.;
int pixel = tqAlpha(blend_color) << 24 |
int(tqRed(blend_color) * alpha) << 16 |
@@ -177,6 +179,7 @@ void TEWidget::setColorTable(const ColorEntry table[])
int(tqBlue(blend_color) * alpha);
setBackgroundColor(TQColor(blend_color, pixel));
}
+ }
update();
}
@@ -628,10 +631,11 @@ void TEWidget::drawAttrStr(TQPainter &paint, TQRect rect,
else
{
if (pm || clear || (blinking && (attr->r & RE_BLINK)) ||
- attr->b == cacol(CO_DFT, colorsSwapped ? DEFAULT_FORE_COLOR : DEFAULT_BACK_COLOR) )
-
+ (attr->b == cacol(CO_DFT, colorsSwapped ? DEFAULT_FORE_COLOR : DEFAULT_BACK_COLOR)) )
+ {
// draw background colors with 75% opacity
- if ( draw_translucent_background_colors && argb_visual && tqAlpha(blend_color) < 0xff ) {
+ if ( draw_translucent_background_colors && argb_visual && tqAlpha(blend_color) < 0xff )
+ {
QRgb col = bColor.rgb();
TQ_UINT8 salpha = 192;
@@ -647,8 +651,10 @@ void TEWidget::drawAttrStr(TQPainter &paint, TQRect rect,
int pixel = a << 24 | (r * a / 255) << 16 | (g * a / 255) << 8 | (b * a / 255);
paint.fillRect(rect, TQColor(col, pixel));
- } else
+ }
+ else
paint.fillRect(rect, bColor);
+ }
}
TQString tmpStr = str.simplifyWhiteSpace();
@@ -844,12 +850,16 @@ void TEWidget::setImage(const ca* const newimg, int lines, int columns)
// Two extra so that we don't have to have to care about start and end conditions
for (x = 0; x < cols; x++)
{
- if ( ( (m_imPreeditLength > 0) && ( ( m_imStartLine == y )
- && ( ( m_imStart < m_imEnd ) && ( ( x > m_imStart ) ) && ( x < m_imEnd ) )
- || ( ( m_imSelStart < m_imSelEnd ) && ( ( x > m_imSelStart ) ) ) ) )
- || ext[x] != lcl[x])
+ if ( ( m_imPreeditLength>0 &&
+ ( ( m_imStartLine==y && m_imStart<m_imEnd && x>m_imStart && x<m_imEnd ) ||
+ ( m_imSelStart<m_imSelEnd && x>m_imSelStart )
+ )
+ )
+ ||
+ (ext[x] != lcl[x])
+ )
{
- dirtyMask[x] = dirtyMask[x+1] = dirtyMask[x+2] = 1;
+ dirtyMask[x] = dirtyMask[x+1] = dirtyMask[x+2] = 1;
}
}
dirtyMask++; // Position correctly
@@ -1441,9 +1451,9 @@ void TEWidget::extendSelection( TQPoint pos )
int selClass;
bool left_not_right = ( here.y() < iPntSelCorr.y() ||
- here.y() == iPntSelCorr.y() && here.x() < iPntSelCorr.x() );
+ (here.y() == iPntSelCorr.y() && here.x() < iPntSelCorr.x()) );
bool old_left_not_right = ( pntSelCorr.y() < iPntSelCorr.y() ||
- pntSelCorr.y() == iPntSelCorr.y() && pntSelCorr.x() < iPntSelCorr.x() );
+ (pntSelCorr.y() == iPntSelCorr.y() && pntSelCorr.x() < iPntSelCorr.x()) );
swapping = left_not_right != old_left_not_right;
// Find left (left_not_right ? from here : from start)
@@ -1516,9 +1526,9 @@ void TEWidget::extendSelection( TQPoint pos )
int selClass;
bool left_not_right = ( here.y() < iPntSelCorr.y() ||
- here.y() == iPntSelCorr.y() && here.x() < iPntSelCorr.x() );
+ (here.y() == iPntSelCorr.y() && here.x() < iPntSelCorr.x()) );
bool old_left_not_right = ( pntSelCorr.y() < iPntSelCorr.y() ||
- pntSelCorr.y() == iPntSelCorr.y() && pntSelCorr.x() < iPntSelCorr.x() );
+ (pntSelCorr.y() == iPntSelCorr.y() && pntSelCorr.x() < iPntSelCorr.x()) );
swapping = left_not_right != old_left_not_right;
// Find left (left_not_right ? from here : from start)
@@ -1559,10 +1569,12 @@ void TEWidget::extendSelection( TQPoint pos )
if (here == ohere) return; // It's not left, it's not right.
if ( actSel < 2 || swapping )
+ {
if ( column_selection_mode && !line_selection_mode && !word_selection_mode )
emit beginSelectionSignal( ohere.x(), ohere.y(), true );
else
emit beginSelectionSignal( ohere.x()-1-offset, ohere.y(), false );
+ }
actSel = 2; // within selection
pntSel = here;
diff --git a/konsole/konsole/TEmuVt102.cpp b/konsole/konsole/TEmuVt102.cpp
index 907e19b3..3f47afc1 100644
--- a/konsole/konsole/TEmuVt102.cpp
+++ b/konsole/konsole/TEmuVt102.cpp
@@ -1262,7 +1262,7 @@ static void hexdump(int* s, int len)
void TEmuVt102::scan_buffer_report()
{
- if (ppos == 0 || ppos == 1 && (pbuf[0] & 0xff) >= 32) return;
+ if (ppos == 0 || (ppos == 1 && (pbuf[0] & 0xff) >= 32)) return;
printf("token: "); hexdump(pbuf,ppos); printf("\n");
}
diff --git a/konsole/konsole/konsole_part.cpp b/konsole/konsole/konsole_part.cpp
index 5263418b..f1b2f28d 100644
--- a/konsole/konsole/konsole_part.cpp
+++ b/konsole/konsole/konsole_part.cpp
@@ -1080,10 +1080,11 @@ bool konsolePart::setPtyFd( int master_pty )
{
kdDebug(1211) << "konsolePart::setPtyFd " << master_pty << endl;
TEPty *pty = new TEPty();
- pty->setPtyFd(master_pty);
+ bool res=pty->setPtyFd(master_pty);
if ( !se )
newSession();
se->setPty(pty);
+ return res;
}
void konsolePart::newSession()