Fix FTBFS with GCC6

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 52a1b55368
commit 0d8345e6f7

@ -122,7 +122,7 @@ class KateFileLoader
if ((c >= 2) && (m_codec->mibEnum() == 1000) && (m_buffer[1] == 0x00)) if ((c >= 2) && (m_codec->mibEnum() == 1000) && (m_buffer[1] == 0x00))
{ {
// utf16LE, we need to put the decoder in LE mode // utf16LE, we need to put the decoder in LE mode
char reverseUtf16[3] = {0xFF, 0xFE, 0x00}; char reverseUtf16[3] = {'\xFF', '\xFE', '\x00'};
m_decoder->toUnicode(reverseUtf16, 2); m_decoder->toUnicode(reverseUtf16, 2);
} }
@ -917,7 +917,7 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,
} while (textLine->firstChar()==-1); } while (textLine->firstChar()==-1);
kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl; kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl;
TQMemArray<uint> foldingList=textLine->foldingListArray(); TQMemArray<uint> foldingList=textLine->foldingListArray();
while ( (foldingList.size()>0) && ( abs(foldingList[foldingList.size()-2])==1)) { while ( (foldingList.size()>0) && ( labs(foldingList[foldingList.size()-2])==1)) {
foldingList.resize(foldingList.size()-2,TQGArray::SpeedOptim); foldingList.resize(foldingList.size()-2,TQGArray::SpeedOptim);
} }
addIndentBasedFoldingInformation(foldingList,addindent,deindent); addIndentBasedFoldingInformation(foldingList,addindent,deindent);

@ -69,7 +69,9 @@ while (<IN>) {
my $att = $3; my $att = $3;
my $param = $4; my $param = $4;
push(@keys, $key); push(@keys, $key);
push(@values, $val); # values in HashEntry are short but can be unsigned in C++ code
# therefore it is necessary to force the cast in the generated files
push(@values, "(short)".$val);
printf STDERR "WARNING: Number of arguments missing for $key/$val\n" printf STDERR "WARNING: Number of arguments missing for $key/$val\n"
if ( $att =~ m/Function/ && length($param) == 0); if ( $att =~ m/Function/ && length($param) == 0);
push(@attrs, length($att) > 0 ? $att : "0"); push(@attrs, length($att) > 0 ? $att : "0");

@ -265,7 +265,7 @@ TQString Decoder::decode(const char *data, int len)
if (m_codec->mibEnum() == 1000 && c2 == 0x00) if (m_codec->mibEnum() == 1000 && c2 == 0x00)
{ {
// utf16LE, we need to put the decoder in LE mode // utf16LE, we need to put the decoder in LE mode
char reverseUtf16[3] = {0xFF, 0xFE, 0x00}; char reverseUtf16[3] = {'\xFF', '\xFE', '\x00'};
m_decoder->toUnicode(reverseUtf16, 2); m_decoder->toUnicode(reverseUtf16, 2);
} }
} }

@ -61,7 +61,7 @@
#define CONFIGURATION_FILE_SEPARATOR ';' #define CONFIGURATION_FILE_SEPARATOR ';'
KDE_EXPORT KRsync::KRsync (TQObject* parent, const char* name) KDE_EXPORT KRsync::KRsync (TQObject* parent, const char* name)
: TQObject (parent, name), m_progressDialog(false), m_progressDialogExists(false), m_bSettingsLoaded(false), m_bInSpecialSync(false) : TQObject (parent, name), m_progressDialog(0), m_progressDialogExists(false), m_bSettingsLoaded(false), m_bInSpecialSync(false)
{ {
loadSettings(); loadSettings();

@ -671,11 +671,11 @@ void KDialogBase::setButtonStyle( int style )
if( style < 0 || style >= ActionStyleMAX ) { style = ActionStyle0; } if( style < 0 || style >= ActionStyleMAX ) { style = ActionStyle0; }
d->mButton.style = style; d->mButton.style = style;
const int *layout; const unsigned int *layout;
int layoutMax = 0; int layoutMax = 0;
if (mMessageBoxMode) if (mMessageBoxMode)
{ {
static const int layoutRule[5][6] = static const unsigned int layoutRule[5][6] =
{ {
{Details,Stretch,User2|Stretch,User1|Stretch,Cancel|Stretch, Details|Filler}, {Details,Stretch,User2|Stretch,User1|Stretch,Cancel|Stretch, Details|Filler},
{Details,Stretch,User2|Stretch,User1|Stretch,Cancel|Stretch, Details|Filler}, {Details,Stretch,User2|Stretch,User1|Stretch,Cancel|Stretch, Details|Filler},
@ -688,7 +688,7 @@ void KDialogBase::setButtonStyle( int style )
} }
else if (mButtonOrientation == Qt::Horizontal) else if (mButtonOrientation == Qt::Horizontal)
{ {
static const int layoutRule[5][10] = static const unsigned int layoutRule[5][10] =
{ {
{Details,Help,Default,Stretch,User3,User2,User1,Ok,Apply|Try,Cancel|Close}, {Details,Help,Default,Stretch,User3,User2,User1,Ok,Apply|Try,Cancel|Close},
{Details,Help,Default,Stretch,User3,User2,User1,Cancel|Close,Apply|Try,Ok}, {Details,Help,Default,Stretch,User3,User2,User1,Cancel|Close,Apply|Try,Ok},
@ -701,7 +701,7 @@ void KDialogBase::setButtonStyle( int style )
} }
else else
{ {
static const int layoutRule[5][10] = static const unsigned int layoutRule[5][10] =
{ {
{Ok,Apply|Try,User1,User2,User3,Stretch,Default,Cancel|Close,Help, Details}, {Ok,Apply|Try,User1,User2,User3,Stretch,Default,Cancel|Close,Help, Details},
//{Ok,Apply|Try,Cancel|Close,User1,User2,User3,Stretch, Default,Help, Details}, //{Ok,Apply|Try,Cancel|Close,User1,User2,User3,Stretch, Default,Help, Details},

Loading…
Cancel
Save