mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Even more llvm/clang warnings
Remove lyxview_ member of lyx::Action, fix a prototype in TexStream and comment out a Cursor function.
This commit is contained in:
parent
623d2f9530
commit
ea6240b785
@ -187,7 +187,7 @@ bool bruteFind(Cursor & cursor,
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
/// moves position closest to (x, y) in given box
|
||||
bool bruteFind3(Cursor & cur, int x, int y, bool up)
|
||||
{
|
||||
@ -249,7 +249,7 @@ bool bruteFind3(Cursor & cur, int x, int y, bool up)
|
||||
cur.setCursor(best_cursor);
|
||||
return true;
|
||||
}
|
||||
|
||||
*/
|
||||
} // namespace anon
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
int column() const { return column_; }
|
||||
|
||||
protected:
|
||||
int overflow(int);
|
||||
int_type overflow(int_type);
|
||||
int sync();
|
||||
|
||||
private:
|
||||
@ -52,7 +52,7 @@ TexStreamBuffer::TexStreamBuffer(TexStreamBase *sb, TexRow * texrow)
|
||||
setg(0, 0, 0);
|
||||
}
|
||||
|
||||
int TexStreamBuffer::overflow(int c)
|
||||
TexStreamBuffer::int_type TexStreamBuffer::overflow(TexStreamBuffer::int_type c)
|
||||
{
|
||||
if (c == '\n') {
|
||||
++line_;
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "FuncRequest.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "GuiView.h"
|
||||
#include "LyX.h"
|
||||
#include "qt_helpers.h"
|
||||
|
||||
@ -25,10 +24,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
Action::Action(GuiView * lyxView, QIcon const & icon,
|
||||
Action::Action(QIcon const & icon,
|
||||
QString const & text, FuncRequest const & func,
|
||||
QString const & tooltip, QObject * parent)
|
||||
: QAction(parent), func_(func), lyxView_(lyxView)
|
||||
: QAction(parent), func_(func)
|
||||
{
|
||||
// only Qt/Mac handles that
|
||||
setMenuRole(NoRole);
|
||||
|
@ -22,8 +22,6 @@ class FuncRequest;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
class GuiView;
|
||||
|
||||
/**
|
||||
* Action - Qt interface with LyX' FuncRequest.
|
||||
*
|
||||
@ -34,7 +32,7 @@ class Action : public QAction
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Action(GuiView * lyxView, QIcon const & icon, QString const & text,
|
||||
Action(QIcon const & icon, QString const & text,
|
||||
FuncRequest const & func, QString const & tooltip, QObject * parent);
|
||||
|
||||
void update();
|
||||
@ -48,7 +46,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
FuncRequest const & func_ ;
|
||||
GuiView * lyxView_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -102,8 +102,8 @@ Action * GuiToolbar::addItem(ToolbarItem const & item)
|
||||
if (!bindings.empty())
|
||||
text += " [" + toqstr(bindings.begin()->print(KeySequence::ForGui)) + "]";
|
||||
|
||||
Action * act = new Action(&owner_, getIcon(item.func_, false),
|
||||
text, item.func_, text, this);
|
||||
Action * act = new Action(getIcon(item.func_, false),
|
||||
text, item.func_, text, this);
|
||||
actions_.append(act);
|
||||
return act;
|
||||
}
|
||||
|
@ -1719,7 +1719,7 @@ void Menu::Impl::populate(QMenu & qMenu, MenuDefinition const & menu)
|
||||
subMenu->setEnabled(m->status().enabled());
|
||||
} else {
|
||||
// we have a MenuItem::Command
|
||||
qMenu.addAction(new Action(view, QIcon(), label(*m),
|
||||
qMenu.addAction(new Action(QIcon(), label(*m),
|
||||
m->func(), m->tooltip(), &qMenu));
|
||||
}
|
||||
}
|
||||
@ -1806,7 +1806,7 @@ struct Menus::Impl {
|
||||
BufferView const *) const;
|
||||
|
||||
/// Initialize specific MACOS X menubar
|
||||
void macxMenuBarInit(GuiView * view, QMenuBar * qmb);
|
||||
void macxMenuBarInit(QMenuBar * qmb);
|
||||
|
||||
/// Mac special menu.
|
||||
/** This defines a menu whose entries list the FuncRequests
|
||||
@ -1856,7 +1856,7 @@ MenuDefinition Menus::Impl::mac_special_menu_;
|
||||
that this menubar will be used also when one of LyX' dialogs has
|
||||
focus. (JMarc)
|
||||
*/
|
||||
void Menus::Impl::macxMenuBarInit(GuiView * view, QMenuBar * qmb)
|
||||
void Menus::Impl::macxMenuBarInit(QMenuBar * qmb)
|
||||
{
|
||||
/* Since Qt 4.2, the qt/mac menu code has special code for
|
||||
specifying the role of a menu entry. However, it does not
|
||||
@ -1909,13 +1909,13 @@ void Menus::Impl::macxMenuBarInit(GuiView * view, QMenuBar * qmb)
|
||||
for (size_t i = 0 ; cit != end ; ++cit, ++i) {
|
||||
#if defined(QT_MAC_USE_COCOA) && (QT_MAC_USE_COCOA > 0)
|
||||
if (first_call || entries[i].role != QAction::ApplicationSpecificRole) {
|
||||
Action * action = new Action(view, QIcon(), cit->label(),
|
||||
Action * action = new Action(QIcon(), cit->label(),
|
||||
cit->func(), QString(), qMenu);
|
||||
action->setMenuRole(entries[i].role);
|
||||
qMenu->addAction(action);
|
||||
}
|
||||
#else
|
||||
Action * action = new Action(view, QIcon(), cit->label(),
|
||||
Action * action = new Action(QIcon(), cit->label(),
|
||||
cit->func(), QString(), qMenu);
|
||||
action->setMenuRole(entries[i].role);
|
||||
qMenu->addAction(action);
|
||||
@ -2189,7 +2189,7 @@ void Menus::fillMenuBar(QMenuBar * qmb, GuiView * view, bool initial)
|
||||
// create duplicate items in the application menu. It seems
|
||||
// that Qt does not remove them when the QMenubar is cleared.
|
||||
LYXERR(Debug::GUI, "Creating Mac OS X special menu bar");
|
||||
d->macxMenuBarInit(view, qmb);
|
||||
d->macxMenuBarInit(qmb);
|
||||
#endif
|
||||
} else {
|
||||
// Clear all menubar contents before filling it.
|
||||
|
Loading…
Reference in New Issue
Block a user