mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 17:55:45 +08:00
refs #313 Remove any occurence of function or virtual keycode from CKeyboardKey(list)
Justification for native virtual key is, because its not cross platform.
This commit is contained in:
@@ -235,7 +235,6 @@ namespace BlackInput
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_pressedKey.setKey(CKeyMappingLinux::convertToKey(virtualKeyCode));
|
m_pressedKey.setKey(CKeyMappingLinux::convertToKey(virtualKeyCode));
|
||||||
m_pressedKey.setNativeVirtualKey(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -245,7 +244,6 @@ namespace BlackInput
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_pressedKey.setKey(Qt::Key_unknown);
|
m_pressedKey.setKey(Qt::Key_unknown);
|
||||||
m_pressedKey.setNativeVirtualKey(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isFinished = true;
|
isFinished = true;
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ namespace BlackInput
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_pressedKey.setKey(CKeyMappingWindows::convertToKey(vkcode));
|
m_pressedKey.setKey(CKeyMappingWindows::convertToKey(vkcode));
|
||||||
m_pressedKey.setNativeVirtualKey(vkcode);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((event == WM_KEYUP) || (event == WM_SYSKEYUP) )
|
else if ((event == WM_KEYUP) || (event == WM_SYSKEYUP) )
|
||||||
@@ -79,7 +78,6 @@ namespace BlackInput
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_pressedKey.setKey(Qt::Key_unknown);
|
m_pressedKey.setKey(Qt::Key_unknown);
|
||||||
m_pressedKey.setNativeVirtualKey(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isFinished = true;
|
isFinished = true;
|
||||||
|
|||||||
@@ -12,16 +12,11 @@ namespace BlackMisc
|
|||||||
namespace Hardware
|
namespace Hardware
|
||||||
{
|
{
|
||||||
CKeyboardKey::CKeyboardKey() :
|
CKeyboardKey::CKeyboardKey() :
|
||||||
m_qtKey(Qt::Key_unknown), m_nativeVirtualKey(0), m_modifier1(ModifierNone), m_modifier2(ModifierNone), m_function(HotkeyNone)
|
m_qtKey(Qt::Key_unknown), m_modifier1(ModifierNone), m_modifier2(ModifierNone)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CKeyboardKey::CKeyboardKey(HotkeyFunction function) :
|
CKeyboardKey::CKeyboardKey(Qt::Key keyCode, Modifier modifier1, Modifier modifier2) :
|
||||||
m_qtKey(Qt::Key_unknown), m_nativeVirtualKey(0), m_modifier1(ModifierNone), m_modifier2(ModifierNone), m_function(function)
|
m_qtKey(keyCode), m_modifier1(modifier1), m_modifier2(modifier2)
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
CKeyboardKey::CKeyboardKey(Qt::Key keyCode, quint32 nativeVirtualKey, Modifier modifier1, Modifier modifier2, const HotkeyFunction &function) :
|
|
||||||
m_qtKey(keyCode), m_nativeVirtualKey(nativeVirtualKey), m_modifier1(modifier1), m_modifier2(modifier2), m_function(function)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void CKeyboardKey::registerMetadata()
|
void CKeyboardKey::registerMetadata()
|
||||||
@@ -314,47 +309,19 @@ namespace BlackMisc
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CKeyboardKey::getFunctionAsString() const
|
|
||||||
{
|
|
||||||
switch (this->m_function)
|
|
||||||
{
|
|
||||||
case HotkeyNone: return "";
|
|
||||||
case HotkeyPtt: return QCoreApplication::translate("Hotkey", "PTT");
|
|
||||||
case HotkeyOpacity50: return QCoreApplication::translate("Hotkey", "Opacity 50%");
|
|
||||||
case HotkeyOpacity100: return QCoreApplication::translate("Hotkey", "Opacity 100%");
|
|
||||||
case HotkeyToggleCom1: return QCoreApplication::translate("Hotkey", "Toggle COM1");
|
|
||||||
case HotkeyToggleCom2: return QCoreApplication::translate("Hotkey", "Toggle COM2");
|
|
||||||
case HotkeyToogleWindowsStayOnTop: return QCoreApplication::translate("Hotkey", "Toogle Window on top");
|
|
||||||
default:
|
|
||||||
qFatal("Wrong function");
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// force strings for translation in resource files
|
|
||||||
(void)QT_TRANSLATE_NOOP("Hotkey", "PTT");
|
|
||||||
(void)QT_TRANSLATE_NOOP("Hotkey", "Opacity 50%");
|
|
||||||
(void)QT_TRANSLATE_NOOP("Hotkey", "Opacity 100%");
|
|
||||||
(void)QT_TRANSLATE_NOOP("Hotkey", "Toggle COM1");
|
|
||||||
(void)QT_TRANSLATE_NOOP("Hotkey", "Toggle COM2");
|
|
||||||
(void)QT_TRANSLATE_NOOP("Hotkey", "Toogle Window on top");
|
|
||||||
}
|
|
||||||
|
|
||||||
void CKeyboardKey::setKeyObject(const CKeyboardKey &key)
|
void CKeyboardKey::setKeyObject(const CKeyboardKey &key)
|
||||||
{
|
{
|
||||||
this->m_function = key.m_function;
|
|
||||||
this->m_modifier1 = key.m_modifier1;
|
this->m_modifier1 = key.m_modifier1;
|
||||||
this->m_modifier2 = key.m_modifier2;
|
this->m_modifier2 = key.m_modifier2;
|
||||||
this->m_nativeVirtualKey = key.m_nativeVirtualKey;
|
|
||||||
this->m_qtKey = key.m_qtKey;
|
this->m_qtKey = key.m_qtKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CKeyboardKey::equalsWithRelaxedModifiers(const CKeyboardKey &key, bool ignoreFunction) const
|
bool CKeyboardKey::equalsWithRelaxedModifiers(const CKeyboardKey &key) const
|
||||||
{
|
{
|
||||||
if (key == (*this)) return true; // fully equal, not need to bother
|
if (key == (*this)) return true; // fully equal, not need to bother
|
||||||
|
|
||||||
// this can never be true
|
// this can never be true
|
||||||
if (key.m_qtKey != this->m_qtKey) return false;
|
if (key.m_qtKey != this->m_qtKey) return false;
|
||||||
if (!ignoreFunction && key.m_function != this->m_function) return false;
|
|
||||||
if (this->numberOfModifiers() != key.numberOfModifiers()) return false;
|
if (this->numberOfModifiers() != key.numberOfModifiers()) return false;
|
||||||
|
|
||||||
// special modifiers
|
// special modifiers
|
||||||
@@ -365,24 +332,10 @@ namespace BlackMisc
|
|||||||
return CKeyboardKey::equalsModifierReleaxed(this->getModifier1(), key.getModifier1());
|
return CKeyboardKey::equalsModifierReleaxed(this->getModifier1(), key.getModifier1());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CKeyboardKey::equalsWithoutFunction(const CKeyboardKey &key) const
|
|
||||||
{
|
|
||||||
if (key == (*this)) return true;
|
|
||||||
CKeyboardKey k1(*this);
|
|
||||||
CKeyboardKey k2(*this);
|
|
||||||
k1.setFunction(HotkeyNone);
|
|
||||||
k2.setFunction(HotkeyNone);
|
|
||||||
return k1 == k2;
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant CKeyboardKey::propertyByIndex(int index) const
|
QVariant CKeyboardKey::propertyByIndex(int index) const
|
||||||
{
|
{
|
||||||
switch (index)
|
switch (index)
|
||||||
{
|
{
|
||||||
case IndexFunction:
|
|
||||||
return QVariant(this->m_function);
|
|
||||||
case IndexFunctionAsString:
|
|
||||||
return QVariant(this->getFunctionAsString());
|
|
||||||
case IndexModifier1:
|
case IndexModifier1:
|
||||||
return QVariant(static_cast<uint>(this->m_modifier1));
|
return QVariant(static_cast<uint>(this->m_modifier1));
|
||||||
case IndexModifier2:
|
case IndexModifier2:
|
||||||
@@ -418,12 +371,6 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
switch (index)
|
switch (index)
|
||||||
{
|
{
|
||||||
case IndexFunction:
|
|
||||||
{
|
|
||||||
uint f = variant.value<uint>();
|
|
||||||
this->setFunction(static_cast<HotkeyFunction>(f));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case IndexKey:
|
case IndexKey:
|
||||||
case IndexKeyAsString:
|
case IndexKeyAsString:
|
||||||
case IndexKeyAsStringRepresentation:
|
case IndexKeyAsStringRepresentation:
|
||||||
|
|||||||
@@ -33,23 +33,9 @@ namespace BlackMisc
|
|||||||
IndexModifier2,
|
IndexModifier2,
|
||||||
IndexModifier1AsString,
|
IndexModifier1AsString,
|
||||||
IndexModifier2AsString,
|
IndexModifier2AsString,
|
||||||
IndexFunction,
|
|
||||||
IndexFunctionAsString,
|
|
||||||
IndexKeyObject, // just for updates
|
IndexKeyObject, // just for updates
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Function
|
|
||||||
enum HotkeyFunction
|
|
||||||
{
|
|
||||||
HotkeyNone,
|
|
||||||
HotkeyPtt,
|
|
||||||
HotkeyToggleCom1,
|
|
||||||
HotkeyToggleCom2,
|
|
||||||
HotkeyOpacity50,
|
|
||||||
HotkeyOpacity100,
|
|
||||||
HotkeyToogleWindowsStayOnTop
|
|
||||||
};
|
|
||||||
|
|
||||||
//! Modifier
|
//! Modifier
|
||||||
enum Modifier
|
enum Modifier
|
||||||
{
|
{
|
||||||
@@ -70,11 +56,8 @@ namespace BlackMisc
|
|||||||
//! Default constructor
|
//! Default constructor
|
||||||
CKeyboardKey();
|
CKeyboardKey();
|
||||||
|
|
||||||
//! Constructor by function
|
|
||||||
CKeyboardKey(HotkeyFunction function);
|
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CKeyboardKey(Qt::Key keyCode, quint32 nativeVirtualKey, Modifier modifier1 = ModifierNone, Modifier modifier2 = ModifierNone, const HotkeyFunction &function = HotkeyNone);
|
CKeyboardKey(Qt::Key keyCode, Modifier modifier1 = ModifierNone, Modifier modifier2 = ModifierNone);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
~CKeyboardKey() {}
|
~CKeyboardKey() {}
|
||||||
@@ -133,12 +116,6 @@ namespace BlackMisc
|
|||||||
//! Set key code
|
//! Set key code
|
||||||
void setKey(int key) { this->m_qtKey = static_cast<Qt::Key>(key); }
|
void setKey(int key) { this->m_qtKey = static_cast<Qt::Key>(key); }
|
||||||
|
|
||||||
//! Native virtual key
|
|
||||||
void setNativeVirtualKey(quint32 virtualKey) { this->m_nativeVirtualKey = virtualKey; }
|
|
||||||
|
|
||||||
//! Native virtual key
|
|
||||||
quint32 getNativeVirtualKey() const { return this->m_nativeVirtualKey; }
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Add modifier
|
* Add modifier
|
||||||
* \param modifier
|
* \param modifier
|
||||||
@@ -156,9 +133,6 @@ namespace BlackMisc
|
|||||||
//! number of modifiers
|
//! number of modifiers
|
||||||
int numberOfModifiers() const;
|
int numberOfModifiers() const;
|
||||||
|
|
||||||
//! Function (optional)
|
|
||||||
HotkeyFunction getFunction() const { return this->m_function; }
|
|
||||||
|
|
||||||
//! Modifier 1
|
//! Modifier 1
|
||||||
Modifier getModifier1() const { return this->m_modifier1; }
|
Modifier getModifier1() const { return this->m_modifier1; }
|
||||||
|
|
||||||
@@ -230,20 +204,11 @@ namespace BlackMisc
|
|||||||
//! Order Modifiers
|
//! Order Modifiers
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|
||||||
//! Function (optional)
|
|
||||||
QString getFunctionAsString() const;
|
|
||||||
|
|
||||||
//! Set key object
|
//! Set key object
|
||||||
void setKeyObject(const BlackMisc::Hardware::CKeyboardKey &key);
|
void setKeyObject(const BlackMisc::Hardware::CKeyboardKey &key);
|
||||||
|
|
||||||
//! Set function
|
|
||||||
void setFunction(const HotkeyFunction &function) { this->m_function = function; }
|
|
||||||
|
|
||||||
//! CTRL will be consider equal CTRL-left/reigt, ALT = ALT-left/right ..
|
//! CTRL will be consider equal CTRL-left/reigt, ALT = ALT-left/right ..
|
||||||
bool equalsWithRelaxedModifiers(const CKeyboardKey &key, bool ignoreFunction = false) const;
|
bool equalsWithRelaxedModifiers(const CKeyboardKey &key) const;
|
||||||
|
|
||||||
//! Equal, but function value ignored
|
|
||||||
bool equalsWithoutFunction(const CKeyboardKey &key) const;
|
|
||||||
|
|
||||||
//! \copydoc CValueObject::setPropertyByIndex
|
//! \copydoc CValueObject::setPropertyByIndex
|
||||||
virtual void setPropertyByIndex(const QVariant &variant, int index);
|
virtual void setPropertyByIndex(const QVariant &variant, int index);
|
||||||
@@ -292,16 +257,13 @@ namespace BlackMisc
|
|||||||
private:
|
private:
|
||||||
BLACK_ENABLE_TUPLE_CONVERSION(CKeyboardKey)
|
BLACK_ENABLE_TUPLE_CONVERSION(CKeyboardKey)
|
||||||
Qt::Key m_qtKey; //!< code similar to Qt::Key
|
Qt::Key m_qtKey; //!< code similar to Qt::Key
|
||||||
quint32 m_nativeVirtualKey; //!< virtual key code TODO: Risk in platform independent comparisons
|
|
||||||
Modifier m_modifier1;
|
Modifier m_modifier1;
|
||||||
Modifier m_modifier2;
|
Modifier m_modifier2;
|
||||||
HotkeyFunction m_function;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
} // class
|
} // class
|
||||||
} // BlackMisc
|
} // BlackMisc
|
||||||
|
|
||||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Hardware::CKeyboardKey, (o.m_qtKey, o.m_nativeVirtualKey, o.m_modifier1, o.m_modifier2, o.m_function))
|
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Hardware::CKeyboardKey, (o.m_qtKey, o.m_modifier1, o.m_modifier2))
|
||||||
Q_DECLARE_METATYPE(BlackMisc::Hardware::CKeyboardKey)
|
Q_DECLARE_METATYPE(BlackMisc::Hardware::CKeyboardKey)
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
@@ -22,22 +22,6 @@ namespace BlackMisc
|
|||||||
CSequence<CKeyboardKey>(baseClass)
|
CSequence<CKeyboardKey>(baseClass)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/*
|
|
||||||
* Contains this hotkey function?
|
|
||||||
*/
|
|
||||||
bool CKeyboardKeyList::containsFunction(CKeyboardKey::HotkeyFunction function) const
|
|
||||||
{
|
|
||||||
return CSequence::contains(&CKeyboardKey::getFunction, function);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Key for function
|
|
||||||
*/
|
|
||||||
CKeyboardKey CKeyboardKeyList::keyForFunction(CKeyboardKey::HotkeyFunction function) const
|
|
||||||
{
|
|
||||||
return this->findBy(&CKeyboardKey::getFunction, function).frontOrDefault({ CKeyboardKey::HotkeyNone });
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register metadata
|
* Register metadata
|
||||||
*/
|
*/
|
||||||
@@ -51,19 +35,5 @@ namespace BlackMisc
|
|||||||
qDBusRegisterMetaType<CKeyboardKeyList>();
|
qDBusRegisterMetaType<CKeyboardKeyList>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Hotkey list
|
|
||||||
*/
|
|
||||||
void CKeyboardKeyList::initAsHotkeyList(bool reset)
|
|
||||||
{
|
|
||||||
if (reset) this->clear();
|
|
||||||
if (!this->containsFunction(CKeyboardKey::HotkeyPtt)) this->push_back(CKeyboardKey(CKeyboardKey::HotkeyPtt));
|
|
||||||
if (!this->containsFunction(CKeyboardKey::HotkeyOpacity50)) this->push_back(CKeyboardKey(CKeyboardKey::HotkeyOpacity50));
|
|
||||||
if (!this->containsFunction(CKeyboardKey::HotkeyOpacity100)) this->push_back(CKeyboardKey(CKeyboardKey::HotkeyOpacity100));
|
|
||||||
if (!this->containsFunction(CKeyboardKey::HotkeyToggleCom1)) this->push_back(CKeyboardKey(CKeyboardKey::HotkeyToggleCom1));
|
|
||||||
if (!this->containsFunction(CKeyboardKey::HotkeyToggleCom2)) this->push_back(CKeyboardKey(CKeyboardKey::HotkeyToggleCom2));
|
|
||||||
if (!this->containsFunction(CKeyboardKey::HotkeyToogleWindowsStayOnTop)) this->push_back(CKeyboardKey(CKeyboardKey::HotkeyToogleWindowsStayOnTop));
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -34,20 +34,8 @@ namespace BlackMisc
|
|||||||
//! \copydoc CValueObject::toQVariant
|
//! \copydoc CValueObject::toQVariant
|
||||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||||
|
|
||||||
//! Contains given hotkey function?
|
|
||||||
bool containsFunction(CKeyboardKey::HotkeyFunction function) const;
|
|
||||||
|
|
||||||
//! Key for given function
|
|
||||||
CKeyboardKey keyForFunction(CKeyboardKey::HotkeyFunction function) const;
|
|
||||||
|
|
||||||
//! Register metadata
|
//! Register metadata
|
||||||
static void registerMetadata();
|
static void registerMetadata();
|
||||||
|
|
||||||
/*!
|
|
||||||
* Fill the list with hotkeys
|
|
||||||
* \param reset true, list will be be reset, otherwise values will not be overridde
|
|
||||||
*/
|
|
||||||
void initAsHotkeyList(bool reset = true);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace
|
} //namespace
|
||||||
|
|||||||
@@ -23,13 +23,11 @@ namespace BlackMiscTest
|
|||||||
void CTestHardware::keyboardKey()
|
void CTestHardware::keyboardKey()
|
||||||
{
|
{
|
||||||
// Test equal operator
|
// Test equal operator
|
||||||
CKeyboardKey key = CKeyboardKey(Qt::Key_5, '5', CKeyboardKey::ModifierAltLeft, CKeyboardKey::ModifierCtrlLeft, CKeyboardKey::HotkeyPtt);
|
CKeyboardKey key = CKeyboardKey(Qt::Key_5, CKeyboardKey::ModifierAltLeft, CKeyboardKey::ModifierCtrlLeft);
|
||||||
CKeyboardKey key2;
|
CKeyboardKey key2;
|
||||||
key2.setKey(Qt::Key_5);
|
key2.setKey(Qt::Key_5);
|
||||||
key2.setModifier1(CKeyboardKey::ModifierAltLeft);
|
key2.setModifier1(CKeyboardKey::ModifierAltLeft);
|
||||||
key2.setModifier2(CKeyboardKey::ModifierCtrlLeft);
|
key2.setModifier2(CKeyboardKey::ModifierCtrlLeft);
|
||||||
key2.setFunction(CKeyboardKey::HotkeyPtt);
|
|
||||||
key2.setNativeVirtualKey('5');
|
|
||||||
QVERIFY2(key == key2, "CKeyboardKey::operator== failed!");
|
QVERIFY2(key == key2, "CKeyboardKey::operator== failed!");
|
||||||
|
|
||||||
key = CKeyboardKey();
|
key = CKeyboardKey();
|
||||||
@@ -55,19 +53,13 @@ namespace BlackMiscTest
|
|||||||
QVERIFY2(key.getModifier1() == CKeyboardKey::ModifierAltLeft, "Expected modifier to be ModifierAltLeft");
|
QVERIFY2(key.getModifier1() == CKeyboardKey::ModifierAltLeft, "Expected modifier to be ModifierAltLeft");
|
||||||
QVERIFY2(key.getModifier2() == CKeyboardKey::ModifierNone, "Expected modifier to be ModifierAltLeft");
|
QVERIFY2(key.getModifier2() == CKeyboardKey::ModifierNone, "Expected modifier to be ModifierAltLeft");
|
||||||
|
|
||||||
|
|
||||||
// relaxed checks
|
// relaxed checks
|
||||||
key = CKeyboardKey(Qt::Key_1, 0, CKeyboardKey::ModifierCtrlLeft, CKeyboardKey::ModifierNone, CKeyboardKey::HotkeyPtt);
|
key = CKeyboardKey(Qt::Key_1, CKeyboardKey::ModifierCtrlLeft, CKeyboardKey::ModifierNone);
|
||||||
key2 = CKeyboardKey(Qt::Key_1, 0, CKeyboardKey::ModifierCtrlLeft, CKeyboardKey::ModifierNone, CKeyboardKey::HotkeyOpacity50);
|
key2 = CKeyboardKey(Qt::Key_1, CKeyboardKey::ModifierCtrlLeft, CKeyboardKey::ModifierNone);
|
||||||
|
|
||||||
QVERIFY2(key != key2, "Function differs, values shall be unequal");
|
|
||||||
QVERIFY2(key.equalsWithoutFunction(key2), "Function differs, values shall be equal without function");
|
|
||||||
key2 = key;
|
key2 = key;
|
||||||
key2.setModifier1(CKeyboardKey::ModifierCtrlAny);
|
key2.setModifier1(CKeyboardKey::ModifierCtrlAny);
|
||||||
QVERIFY2(key != key2, "Modifiers differs, values shall be unequal");
|
QVERIFY2(key != key2, "Modifiers differs, values shall be unequal");
|
||||||
QVERIFY2(key.equalsWithRelaxedModifiers(key2), "Modifiers are relaxed easy, values shall be equal");
|
QVERIFY2(key.equalsWithRelaxedModifiers(key2), "Modifiers are relaxed easy, values shall be equal");
|
||||||
key2.setFunction(CKeyboardKey::HotkeyToggleCom2);
|
|
||||||
QVERIFY2(key.equalsWithRelaxedModifiers(key2, true), "Modifiers are relaxed easy, function ignored, value shall be equal without function");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user