Build fix for non linux in FKeyboard::keyCorrection

This commit is contained in:
Markus Gans 2018-09-26 18:01:44 +02:00
parent 1eff94aead
commit 9671586be0
6 changed files with 34 additions and 26 deletions

View File

@ -6,8 +6,8 @@ First steps with the Final Cut widget toolkit
How to use the library How to use the library
---------------------- ----------------------
At the beginning of this introduction to the Final Cut usage, At the beginning of this introduction to the Final Cut
we start with a little example. we will start with a small example.
It creates an empty 30×10 character dialog. It creates an empty 30×10 character dialog.
@ -73,15 +73,15 @@ The title bar of the dialog box gets the text "A dialog".
dialog.setGeometry (25, 5, 30, 10); dialog.setGeometry (25, 5, 30, 10);
``` ```
The dialog window geometry is set to a width of 30 characters and The dialog window geometry is set to a width of 30 characters and
a height of 10 characters. The window is positioned in the terminal a height of 10 characters. The window in the terminal is positioned
at the positions x=25 and y=5. (Note: x=1 and y=1 represents the upper at the positions x=25 and y=5 (note: x=1 and y=1 represents the upper
left corner ) left corner).
```cpp ```cpp
app.setMainWidget(&dialog); app.setMainWidget(&dialog);
``` ```
The `dialog` object is selected as the main widget for the application. The `dialog` object is selected as the main widget for the application.
When the user closes a main widget, the application exits. When the user closes a main widget, the application will be closed.
```cpp ```cpp
dialog.show(); dialog.show();

View File

@ -515,9 +515,9 @@ int FKeyboard::keyCorrection (const int& keycode)
if ( linux ) if ( linux )
key_correction = linux->modifierKeyCorrection(keycode); key_correction = linux->modifierKeyCorrection(keycode);
else else
key_correction = key; key_correction = keycode;
#else #else
key_correction = key; key_correction = keycode;
#endif #endif
return key_correction; return key_correction;

View File

@ -195,8 +195,6 @@ inline bool FObject::isInstanceOf (const char classname[]) const
inline bool FObject::isTimerInUpdating() const inline bool FObject::isTimerInUpdating() const
{ return timer_modify_lock; } { return timer_modify_lock; }
} // namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Operator functions for timeval // Operator functions for timeval
@ -252,4 +250,6 @@ static inline bool operator < (const timeval& t1, const timeval& t2)
|| (t1.tv_sec == t2.tv_sec && t1.tv_usec < t2.tv_usec); || (t1.tv_sec == t2.tv_sec && t1.tv_usec < t2.tv_usec);
} }
} // namespace finalcut
#endif // FOBJECT_H #endif // FOBJECT_H

View File

@ -199,6 +199,8 @@ void FMouseTest::noArgumentTest()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FMouseTest::doubleClickTest() void FMouseTest::doubleClickTest()
{ {
using finalcut::operator -;
FMouse_protected mouse; FMouse_protected mouse;
CPPUNIT_ASSERT ( mouse.getDblclickInterval() == 500000 ); // 500 ms CPPUNIT_ASSERT ( mouse.getDblclickInterval() == 500000 ); // 500 ms
timeval tv = { 0, 0 }; timeval tv = { 0, 0 };

View File

@ -258,6 +258,7 @@ void FObjectTest::delTest()
*/ */
finalcut::FObject* obj = new finalcut::FObject(); finalcut::FObject* obj = new finalcut::FObject();
finalcut::FObject* child = new finalcut::FObject(obj); finalcut::FObject* child = new finalcut::FObject(obj);
CPPUNIT_ASSERT ( obj->hasChildren() ); CPPUNIT_ASSERT ( obj->hasChildren() );
CPPUNIT_ASSERT ( obj->numOfChildren() == 1 ); CPPUNIT_ASSERT ( obj->numOfChildren() == 1 );
CPPUNIT_ASSERT ( obj->isChild(child) ); CPPUNIT_ASSERT ( obj->isChild(child) );
@ -338,6 +339,11 @@ void FObjectTest::timeTest()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FObjectTest::timerTest() void FObjectTest::timerTest()
{ {
using finalcut::operator +;
using finalcut::operator -;
using finalcut::operator +=;
using finalcut::operator <;
FObject_protected t1; FObject_protected t1;
FObject_protected t2; FObject_protected t2;
int id1, id2; int id1, id2;