Fix (hopefully) library dependency resolution.
Installing libs is now enabled, hardcoded. Enable -Wall for all builds. Fix many warnings and latent bugs.
This commit is contained in:
@ -58,18 +58,6 @@ struct KCategorizedView::Private::Item
|
||||
|
||||
struct KCategorizedView::Private::Block
|
||||
{
|
||||
Block()
|
||||
: topLeft ( QPoint() )
|
||||
, height ( -1 )
|
||||
, firstIndex ( QModelIndex() )
|
||||
, quarantineStart ( QModelIndex() )
|
||||
, items ( QList<Item>() )
|
||||
, outOfQuarantine ( false )
|
||||
, alternate ( false )
|
||||
, collapsed ( false )
|
||||
{
|
||||
}
|
||||
|
||||
bool operator!= ( const Block &rhs ) const
|
||||
{
|
||||
return firstIndex != rhs.firstIndex;
|
||||
@ -83,7 +71,7 @@ struct KCategorizedView::Private::Block
|
||||
}
|
||||
|
||||
QPoint topLeft;
|
||||
int height;
|
||||
int height = -1;
|
||||
QPersistentModelIndex firstIndex;
|
||||
// if we have n elements on this block, and we inserted an element at position i. The quarantine
|
||||
// will start at index (i, column, parent). This means that for all elements j where i <= j <= n, the
|
||||
@ -97,25 +85,16 @@ struct KCategorizedView::Private::Block
|
||||
// this affects the whole block, not items separately. items contain the topLeft point relative
|
||||
// to the block. Because of insertions or removals a whole block can be moved, so the whole block
|
||||
// will enter in quarantine, what is faster than moving all items in absolute terms.
|
||||
bool outOfQuarantine;
|
||||
bool outOfQuarantine = false;
|
||||
|
||||
// should we alternate its color ? is just a hint, could not be used
|
||||
bool alternate;
|
||||
bool collapsed;
|
||||
bool alternate = false;
|
||||
bool collapsed = false;
|
||||
};
|
||||
|
||||
KCategorizedView::Private::Private ( KCategorizedView *q )
|
||||
: q ( q )
|
||||
, proxyModel ( 0 )
|
||||
, categoryDrawer ( 0 )
|
||||
, categorySpacing ( 5 )
|
||||
, alternatingBlockColors ( false )
|
||||
, collapsibleBlocks ( false )
|
||||
, hoveredBlock ( new Block() )
|
||||
, hoveredIndex ( QModelIndex() )
|
||||
, pressedPosition ( QPoint() )
|
||||
, rubberBandRect ( QRect() )
|
||||
, constantItemWidth( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -137,14 +137,15 @@ public:
|
||||
*/
|
||||
void _k_slotCollapseOrExpandClicked(QModelIndex);
|
||||
|
||||
KCategorizedView *q;
|
||||
KCategorizedSortFilterProxyModel *proxyModel;
|
||||
KCategoryDrawer *categoryDrawer;
|
||||
int categorySpacing;
|
||||
bool alternatingBlockColors;
|
||||
bool collapsibleBlocks;
|
||||
bool constantItemWidth;
|
||||
KCategorizedView *q = nullptr;
|
||||
KCategorizedSortFilterProxyModel *proxyModel = nullptr;
|
||||
KCategoryDrawer *categoryDrawer = nullptr;
|
||||
int categorySpacing = 5;
|
||||
bool alternatingBlockColors = false;
|
||||
bool collapsibleBlocks = false;
|
||||
bool constantItemWidth = false;
|
||||
|
||||
// FIXME: this is some really weird logic. Investigate.
|
||||
Block *hoveredBlock;
|
||||
QString hoveredCategory;
|
||||
QModelIndex hoveredIndex;
|
||||
|
@ -42,9 +42,9 @@ public:
|
||||
~Private()
|
||||
{
|
||||
}
|
||||
KCategorizedView *view;
|
||||
int leftMargin;
|
||||
int rightMargin;
|
||||
KCategorizedView *view;
|
||||
};
|
||||
|
||||
KCategoryDrawer::KCategoryDrawer(KCategorizedView *view)
|
||||
|
@ -79,7 +79,6 @@ void band::readData(int expectedLength)
|
||||
|
||||
// Read one value to see what it might be.
|
||||
int XB = _meta_default;
|
||||
int cp1 = 0, cp2 = 0;
|
||||
if (!is_BYTE1)
|
||||
{
|
||||
// must be a variable-length coding
|
||||
@ -109,7 +108,6 @@ void band::readData(int expectedLength)
|
||||
{
|
||||
// Skip over the escape value.
|
||||
u->rp = xvs.rp;
|
||||
cp1 = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ struct bytes
|
||||
bytes res;
|
||||
res.ptr = ptr + beg;
|
||||
res.len = end - beg;
|
||||
assert(res.len == 0 || inBounds(res.ptr) && inBounds(res.limit() - 1));
|
||||
assert(res.len == 0 ||(inBounds(res.ptr) && inBounds(res.limit() - 1)));
|
||||
return res;
|
||||
}
|
||||
// building C strings inside byte buffers:
|
||||
|
@ -121,7 +121,6 @@ coding *coding::init()
|
||||
this->min = this->umin = 0;
|
||||
if (S != 0 && range != 0)
|
||||
{
|
||||
int Smask = (1 << S) - 1;
|
||||
int64_t maxPosCode = range - 1;
|
||||
int64_t maxNegCode = range - 1;
|
||||
while (IS_NEG_CODE(S, maxPosCode))
|
||||
|
@ -483,10 +483,6 @@ void unpacker::putu1ref(entry *e)
|
||||
putu1_at(put_space(1), oidx);
|
||||
}
|
||||
|
||||
static int total_cp_size[] = {0, 0};
|
||||
static int largest_cp_ref[] = {0, 0};
|
||||
static int hash_probes[] = {0, 0};
|
||||
|
||||
// Allocation of small and large blocks.
|
||||
|
||||
enum
|
||||
@ -705,7 +701,7 @@ void unpacker::read_file_header()
|
||||
unpack_abort("impossible archive size"); // bad input data
|
||||
return;
|
||||
}
|
||||
if (archive_size < header_size_1)
|
||||
if (archive_size < (size_t)header_size_1)
|
||||
{
|
||||
unpack_abort("too much read-ahead"); // somehow we pre-fetched too much?
|
||||
return;
|
||||
@ -1316,8 +1312,6 @@ void unpacker::read_signature_values(entry *cpMap, int len)
|
||||
// Cf. PackageReader.readConstantPool
|
||||
void unpacker::read_cp()
|
||||
{
|
||||
byte *rp0 = rp;
|
||||
|
||||
int i;
|
||||
|
||||
for (int k = 0; k < (int)N_TAGS_IN_ORDER; k++)
|
||||
@ -1596,7 +1590,6 @@ band **unpacker::attr_definitions::buildBands(unpacker::layout_definition *lo)
|
||||
const char *unpacker::attr_definitions::parseIntLayout(const char *lp, band *&res, byte le_kind,
|
||||
bool can_be_signed)
|
||||
{
|
||||
const char *lp0 = lp;
|
||||
band *b = U_NEW(band, 1);
|
||||
char le = *lp++;
|
||||
int spec = UNSIGNED5_spec;
|
||||
@ -1638,7 +1631,6 @@ const char *unpacker::attr_definitions::parseIntLayout(const char *lp, band *&re
|
||||
|
||||
const char *unpacker::attr_definitions::parseNumeral(const char *lp, int &res)
|
||||
{
|
||||
const char *lp0 = lp;
|
||||
bool sgn = false;
|
||||
if (*lp == '0')
|
||||
{
|
||||
@ -1703,7 +1695,6 @@ band **unpacker::attr_definitions::popBody(int bs_base)
|
||||
|
||||
const char *unpacker::attr_definitions::parseLayout(const char *lp, band **&res, int curCble)
|
||||
{
|
||||
const char *lp0 = lp;
|
||||
int bs_base = band_stack.length();
|
||||
bool top_level = (bs_base == 0);
|
||||
band *b;
|
||||
@ -3135,8 +3126,6 @@ unpacker::read_bcs()
|
||||
|
||||
void unpacker::read_bands()
|
||||
{
|
||||
byte *rp0 = rp;
|
||||
|
||||
read_file_header();
|
||||
|
||||
if (cp.nentries == 0)
|
||||
@ -3312,7 +3301,7 @@ void constant_pool::initMemberIndexes()
|
||||
|
||||
// Get the pre-existing indexes:
|
||||
int nclasses = tag_count[CONSTANT_Class];
|
||||
entry *classes = tag_base[CONSTANT_Class] + entries;
|
||||
// entry *classes = tag_base[CONSTANT_Class] + entries; // UNUSED
|
||||
int nfields = tag_count[CONSTANT_Fieldref];
|
||||
entry *fields = tag_base[CONSTANT_Fieldref] + entries;
|
||||
int nmethods = tag_count[CONSTANT_Methodref];
|
||||
@ -3563,8 +3552,6 @@ void unpacker::start(void *packptr, size_t len)
|
||||
|
||||
void unpacker::check_options()
|
||||
{
|
||||
const char *strue = "true";
|
||||
const char *sfalse = "false";
|
||||
if (deflate_hint_or_zero != 0)
|
||||
{
|
||||
bool force_deflate_hint = (deflate_hint_or_zero > 0);
|
||||
|
@ -97,8 +97,6 @@ static int read_magic(unpacker *u, char peek[], int peeklen)
|
||||
void unpack_200(std::string input_path, std::string output_path)
|
||||
{
|
||||
unpacker u;
|
||||
int status = 0;
|
||||
|
||||
FILE *input = fopen(input_path.c_str(), "rb");
|
||||
if (!input)
|
||||
{
|
||||
|
@ -1173,7 +1173,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
|
||||
if (password != NULL)
|
||||
{
|
||||
int i;
|
||||
s->pcrc_32_tab = get_crc_table();
|
||||
s->pcrc_32_tab = (const unsigned long*) get_crc_table();
|
||||
init_keys(password,s->keys,s->pcrc_32_tab);
|
||||
if (ZSEEK(s->z_filefunc, s->filestream,
|
||||
s->pfile_in_zip_read->pos_in_zipfile +
|
||||
|
@ -903,7 +903,7 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
|
||||
unsigned char bufHead[RAND_HEAD_LEN];
|
||||
unsigned int sizeHead;
|
||||
zi->ci.encrypt = 1;
|
||||
zi->ci.pcrc_32_tab = get_crc_table();
|
||||
zi->ci.pcrc_32_tab = (const unsigned long*) get_crc_table();
|
||||
/*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/
|
||||
|
||||
crcForCrypting = (uLong)zi->ci.dosDate << 16; // ATTANTION! Without this row, you don't unpack your password protected archive in other app.
|
||||
|
@ -33,6 +33,11 @@
|
||||
class LIBSETTINGS_EXPORT Keyring
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief virtual dtor
|
||||
*/
|
||||
virtual ~Keyring() {};
|
||||
|
||||
/**
|
||||
* @brief the System Keyring instance
|
||||
* @return the Keyring instance
|
||||
|
@ -24,6 +24,11 @@
|
||||
class StubKeyring : public Keyring
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief virtual dtor
|
||||
*/
|
||||
virtual ~StubKeyring() {};
|
||||
|
||||
virtual bool storePassword(QString service, QString username, QString password);
|
||||
virtual QString getPassword(QString service, QString username);
|
||||
virtual bool hasPassword(QString service, QString username);
|
||||
|
Reference in New Issue
Block a user