mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
get rid of a boost::signals::connection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21695 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a37a73e3c9
commit
02a7584d5a
@ -191,24 +191,17 @@ SyntheticMouseEvent::SyntheticMouseEvent()
|
||||
|
||||
|
||||
|
||||
// All the below connection objects are needed because of a bug in some
|
||||
// versions of GCC (<=2.96 are on the suspects list.) By having and assigning
|
||||
// to these connections we avoid a segfault upon startup, and also at exit.
|
||||
// (Lgb)
|
||||
|
||||
static boost::signals::connection timecon;
|
||||
|
||||
|
||||
GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & lv)
|
||||
: buffer_view_(new BufferView(buffer)), lyx_view_(&lv),
|
||||
cursor_visible_(false), cursor_timeout_(400),
|
||||
cursor_visible_(false),
|
||||
need_resize_(false), schedule_redraw_(false),
|
||||
preedit_lines_(1)
|
||||
{
|
||||
buffer.workAreaManager().add(this);
|
||||
// Setup the signals
|
||||
timecon = cursor_timeout_.timeout
|
||||
.connect(boost::bind(&GuiWorkArea::toggleCursor, this));
|
||||
cursor_timeout_.setInterval(400);
|
||||
connect(&cursor_timeout_, SIGNAL(timeout()),
|
||||
this, SLOT(toggleCursor()));
|
||||
|
||||
cursor_timeout_.start();
|
||||
|
||||
@ -292,7 +285,7 @@ void GuiWorkArea::stopBlinkingCursor()
|
||||
void GuiWorkArea::startBlinkingCursor()
|
||||
{
|
||||
showCursor();
|
||||
cursor_timeout_.restart();
|
||||
cursor_timeout_.start();
|
||||
}
|
||||
|
||||
|
||||
@ -467,8 +460,6 @@ void GuiWorkArea::toggleCursor()
|
||||
// to the rest of LyX.
|
||||
ForkedcallsController & fcc = ForkedcallsController::get();
|
||||
fcc.handleCompletedProcesses();
|
||||
|
||||
cursor_timeout_.restart();
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,6 +140,8 @@ private Q_SLOTS:
|
||||
void adjustViewWithScrollBar(int action = 0);
|
||||
/// timer to limit triple clicks
|
||||
void doubleClickTimeout();
|
||||
/// toggle the cursor's visibility
|
||||
void toggleCursor();
|
||||
|
||||
/// close this work area.
|
||||
/// Slot for Buffer::closing signal.
|
||||
@ -195,8 +197,6 @@ private:
|
||||
void hideCursor();
|
||||
/// show the cursor if it is not visible
|
||||
void showCursor();
|
||||
/// toggle the cursor's visibility
|
||||
void toggleCursor();
|
||||
///
|
||||
void updateScrollbar();
|
||||
|
||||
@ -208,7 +208,7 @@ private:
|
||||
bool cursor_visible_;
|
||||
|
||||
///
|
||||
Timeout cursor_timeout_;
|
||||
QTimer cursor_timeout_;
|
||||
///
|
||||
SyntheticMouseEvent synthetic_mouse_event_;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user