comparison widgets/SubdividingMenu.cpp @ 807:e4773943c9c1 warnfix_no_size_t

More unsigned/long and warning fixes
author Chris Cannam
date Tue, 17 Jun 2014 15:55:27 +0100
parents 1a0dfcbffaf1
children 4a578a360011
comparison
equal deleted inserted replaced
806:4c8ca536b54f 807:e4773943c9c1
20 #include "base/Debug.h" 20 #include "base/Debug.h"
21 21
22 using std::set; 22 using std::set;
23 using std::map; 23 using std::map;
24 24
25 SubdividingMenu::SubdividingMenu(size_t lowerLimit, size_t upperLimit, 25 SubdividingMenu::SubdividingMenu(int lowerLimit, int upperLimit,
26 QWidget *parent) : 26 QWidget *parent) :
27 QMenu(parent), 27 QMenu(parent),
28 m_lowerLimit(lowerLimit ? lowerLimit : 14), 28 m_lowerLimit(lowerLimit ? lowerLimit : 14),
29 m_upperLimit(upperLimit ? upperLimit : (m_lowerLimit * 5) / 2), 29 m_upperLimit(upperLimit ? upperLimit : (m_lowerLimit * 5) / 2),
30 m_entriesSet(false) 30 m_entriesSet(false)
31 { 31 {
32 } 32 }
33 33
34 SubdividingMenu::SubdividingMenu(const QString &title, size_t lowerLimit, 34 SubdividingMenu::SubdividingMenu(const QString &title, int lowerLimit,
35 size_t upperLimit, QWidget *parent) : 35 int upperLimit, QWidget *parent) :
36 QMenu(title, parent), 36 QMenu(title, parent),
37 m_lowerLimit(lowerLimit ? lowerLimit : 14), 37 m_lowerLimit(lowerLimit ? lowerLimit : 14),
38 m_upperLimit(upperLimit ? upperLimit : (m_lowerLimit * 5) / 2), 38 m_upperLimit(upperLimit ? upperLimit : (m_lowerLimit * 5) / 2),
39 m_entriesSet(false) 39 m_entriesSet(false)
40 { 40 {
51 void 51 void
52 SubdividingMenu::setEntries(const std::set<QString> &entries) 52 SubdividingMenu::setEntries(const std::set<QString> &entries)
53 { 53 {
54 m_entriesSet = true; 54 m_entriesSet = true;
55 55
56 size_t total = entries.size(); 56 int total = entries.size();
57 57
58 if (total < m_upperLimit) return; 58 if (total < m_upperLimit) return;
59 59
60 size_t count = 0; 60 int count = 0;
61 QMenu *chunkMenu = new QMenu(); 61 QMenu *chunkMenu = new QMenu();
62 chunkMenu->setTearOffEnabled(isTearOffEnabled()); 62 chunkMenu->setTearOffEnabled(isTearOffEnabled());
63 63
64 QString firstNameInChunk; 64 QString firstNameInChunk;
65 QChar firstInitialInChunk; 65 QChar firstInitialInChunk;