mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
remove duplicated code, (fix cmake merge)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22557 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
29d74c47a8
commit
421fa672a7
@ -59,6 +59,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace lyx::support;
|
using namespace lyx::support;
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
template<class Pair>
|
template<class Pair>
|
||||||
vector<typename Pair::second_type> const
|
vector<typename Pair::second_type> const
|
||||||
@ -70,6 +71,7 @@ getSecond(vector<Pair> const & pr)
|
|||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char const * const tex_graphics[] =
|
char const * const tex_graphics[] =
|
||||||
{
|
{
|
||||||
"default", "dvips", "dvitops", "emtex",
|
"default", "dvips", "dvitops", "emtex",
|
||||||
@ -135,6 +137,19 @@ vector<pair<string, lyx::docstring> > pagestyles;
|
|||||||
namespace lyx {
|
namespace lyx {
|
||||||
namespace frontend {
|
namespace frontend {
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
QModelIndex getSelectedIndex(QListView * lv)
|
||||||
|
{
|
||||||
|
QModelIndex retval = QModelIndex();
|
||||||
|
QModelIndexList selIdx =
|
||||||
|
lv->selectionModel()->selectedIndexes();
|
||||||
|
if (!selIdx.empty())
|
||||||
|
retval = selIdx.first();
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
vector<string> getRequiredList(string const & modName)
|
vector<string> getRequiredList(string const & modName)
|
||||||
{
|
{
|
||||||
@ -196,19 +211,6 @@ GuiSelectionManager(availableLV, selectedLV, addPB, delPB,
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
QModelIndex getSelectedIndex(QListView * lv)
|
|
||||||
{
|
|
||||||
QModelIndex retval = QModelIndex();
|
|
||||||
QModelIndexList selIdx =
|
|
||||||
lv->selectionModel()->selectedIndexes();
|
|
||||||
if (!selIdx.empty())
|
|
||||||
retval = selIdx.first();
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ModuleSelMan::updateAddPB()
|
void ModuleSelMan::updateAddPB()
|
||||||
{
|
{
|
||||||
int const arows = availableModel->rowCount();
|
int const arows = availableModel->rowCount();
|
||||||
|
@ -52,6 +52,9 @@ namespace frontend {
|
|||||||
class GuiBranches;
|
class GuiBranches;
|
||||||
class PreambleModule;
|
class PreambleModule;
|
||||||
|
|
||||||
|
///
|
||||||
|
QModelIndex getSelectedIndex(QListView * lv);
|
||||||
|
|
||||||
///
|
///
|
||||||
typedef void const * BufferId;
|
typedef void const * BufferId;
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "GuiSelectionManager.h"
|
#include "GuiSelectionManager.h"
|
||||||
|
#include "GuiDocument.h"
|
||||||
|
|
||||||
#include "support/debug.h"
|
#include "support/debug.h"
|
||||||
|
|
||||||
@ -166,19 +167,6 @@ void GuiSelectionManager::selectedChanged(const QModelIndex & idx, const QModelI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
QModelIndex getSelectedIndex(QListView * lv)
|
|
||||||
{
|
|
||||||
QModelIndex retval = QModelIndex();
|
|
||||||
QModelIndexList selIdx =
|
|
||||||
lv->selectionModel()->selectedIndexes();
|
|
||||||
if (!selIdx.empty())
|
|
||||||
retval = selIdx.first();
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool GuiSelectionManager::insertRowToSelected(int i,
|
bool GuiSelectionManager::insertRowToSelected(int i,
|
||||||
QMap<int, QVariant> const & itemData)
|
QMap<int, QVariant> const & itemData)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user