mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
FindAdv: Amend d09f5ce1
: Added new debug level :findverbose
Fix the GUI handling for the new value using now 'unsigned long long' instead of 'int'
This commit is contained in:
parent
c7b6bf4519
commit
3b7a79f137
@ -51,7 +51,7 @@ GuiProgressView::~GuiProgressView()
|
||||
|
||||
|
||||
namespace{
|
||||
typedef pair<int, QString> DebugMap;
|
||||
typedef pair<unsigned long long, QString> DebugMap;
|
||||
typedef vector<DebugMap> DebugVector;
|
||||
|
||||
bool DebugSorter(DebugMap const & a, DebugMap const & b)
|
||||
@ -106,7 +106,7 @@ GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
|
||||
for (; dit != den; ++dit) {
|
||||
QTreeWidgetItem * item = new QTreeWidgetItem(widget_->debugMessagesTW);
|
||||
item->setText(0, dit->second);
|
||||
item->setData(0, Qt::UserRole, int(dit->first));
|
||||
item->setData(0, Qt::UserRole, dit->first);
|
||||
item->setText(1, qt_("No"));
|
||||
}
|
||||
widget_->debugMessagesTW->resizeColumnToContents(0);
|
||||
@ -152,11 +152,12 @@ void GuiProgressView::debugMessageActivated(QTreeWidgetItem * item, int)
|
||||
|
||||
void GuiProgressView::levelChanged()
|
||||
{
|
||||
unsigned int level = Debug::NONE;
|
||||
unsigned long long level = Debug::NONE;
|
||||
QTreeWidgetItemIterator it(widget_->debugMessagesTW);
|
||||
while (*it) {
|
||||
if ((*it)->text(1) == qt_("Yes"))
|
||||
level |= (*it)->data(0, Qt::UserRole).toInt();
|
||||
if ((*it)->text(1) == qt_("Yes")) {
|
||||
level |= (*it)->data(0, Qt::UserRole).toULongLong();
|
||||
}
|
||||
++it;
|
||||
}
|
||||
dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>(level)));
|
||||
|
@ -129,7 +129,7 @@ Debug::Type Debug::value(string const & val)
|
||||
break;
|
||||
// Is it a number?
|
||||
if (isStrInt(tmp))
|
||||
l |= static_cast<Type>(convert<int>(tmp));
|
||||
l |= static_cast<Type>(convert<unsigned long long>(tmp));
|
||||
else
|
||||
// Search for an explicit name
|
||||
for (DebugErrorItem const & item : errorTags)
|
||||
|
@ -32,12 +32,15 @@ typedef basic_streambuf<char, char_traits<char> > streambuf;
|
||||
#endif
|
||||
|
||||
|
||||
// Make sure at compile time that sizeof(unsigned long long) >= 8
|
||||
typedef char p__LINE__[ (sizeof(unsigned long long) > 7) ? 1 : -1];
|
||||
|
||||
namespace lyx {
|
||||
|
||||
/// This is all the different debug levels that we have.
|
||||
namespace Debug {
|
||||
///
|
||||
typedef uint64_t base_type;
|
||||
typedef unsigned long long base_type;
|
||||
enum Type : base_type {
|
||||
///
|
||||
NONE = 0,
|
||||
@ -106,7 +109,7 @@ namespace Debug {
|
||||
///
|
||||
FINDVERBOSE= (1u << 31),
|
||||
///
|
||||
DEBUG = (1L << 32),
|
||||
DEBUG = (1ULL << 32),
|
||||
///
|
||||
ANY = 0x1ffffffff
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user