Allow building without scintilla

master
Marius Kintel 2014-07-17 15:28:23 -04:00
parent 6b95307ae1
commit 68962e1c01
3 changed files with 11 additions and 19 deletions

View File

@ -304,8 +304,7 @@ src/FontCache.h \
src/CsgInfo.h \
\
src/AutoUpdater.h \
src/legacyeditor.h \
src/scadlexer.h
src/legacyeditor.h
SOURCES += src/version_check.cc \
src/ProgressWidget.cc \
@ -389,9 +388,8 @@ src/FontCache.cc \
\
src/openscad.cc \
src/mainwin.cc \
src/FontListDialog.cc \
src/legacyeditor.cc \
src/scadlexer.cpp
src/FontListDialog.cc \
src/legacyeditor.cc
# ClipperLib
SOURCES += src/polyclipping/clipper.cpp

View File

@ -1,6 +1,7 @@
scintilla {
HEADERS += src/scintillaeditor.h
SOURCES += src/scintillaeditor.cpp
HEADERS += src/scintillaeditor.h src/scadlexer.h
SOURCES += src/scintillaeditor.cpp src/scadlexer.cpp
DEFINES += USE_SCINTILLA_EDITOR
# The qscintilla2.prf which ships with QScintilla is broken for Mac/Windows

View File

@ -169,20 +169,13 @@ MainWindow::MainWindow(const QString &filename)
QString editortype = Preferences::inst()->getValue("editor/editortype").toString();
if(editortype == "Simple Editor")
{
editor = new LegacyEditor(editorDockContents);
} else if(editortype == "QScintilla Editor")
{
editor = new ScintillaEditor(editorDockContents);
}
/*
bool useScintilla = (editortype == "QScintilla Editor");
#ifdef USE_SCINTILLA_EDITOR
editor = new ScintillaEditor(editorDockContents);
#else
editor = new LegacyEditor(editorDockContents);
if (useScintilla) editor = new ScintillaEditor(editorDockContents);
else
#endif
*/
editor = new LegacyEditor(editorDockContents);
editorDockContents->layout()->addWidget(editor);
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);