Skip to content

Commit

Permalink
Merge pull request #56 from ra3xdh/issue39fix
Browse files Browse the repository at this point in the history
Issue #39 fix
  • Loading branch information
guitorri committed Oct 2, 2014
2 parents 7144084 + 43f157f commit 7b02940
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 9 additions & 5 deletions qucs/qucs-lib/qucslib_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ inline bool getCompLineIntegers(const QString& s,
// into a schematic
//
// returns an empty string if it couldn't be constructed
inline int makeModelString (QString libname, QString compname, QString compstring, QString &modelstring)
inline int makeModelString (QString libname, QString compname, QString compstring, QString &modelstring, bool default_sym = false)
{

if (!getSection("Model", compstring, modelstring))
Expand All @@ -134,9 +134,13 @@ inline int makeModelString (QString libname, QString compname, QString compstrin
// The model wasn't a single line so we have to pick through the
// symbol definition to get the ID for the model string
QString symbolSection;
if (!getSection("Symbol", compstring, symbolSection))
{
return QUCS_COMP_LIB_CORRUPT;
if (default_sym) { // Default Symbol presents
symbolSection = compstring;
} else { // We need to find and process <Symbol> section
if (!getSection("Symbol", compstring, symbolSection))
{
return QUCS_COMP_LIB_CORRUPT;
}
}

QStringList symbolstringLines = symbolSection.split ("\n");
Expand Down Expand Up @@ -284,7 +288,7 @@ inline int parseComponentLibrary (QString filename, ComponentLibrary &library)
}
else
{
int result = makeModelString (library.name, component.name, library.defaultSymbol, component.modelString);
int result = makeModelString (library.name, component.name, library.defaultSymbol, component.modelString, true);
if (result != QUCS_COMP_LIB_OK) return result;
}

Expand Down
1 change: 1 addition & 0 deletions qucs/qucs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ")

# For some reason, on Windows QT_LIBRARIES point to static(?) .a libs
# which do not provide the needed symbols. They are found on
Expand Down

0 comments on commit 7b02940

Please sign in to comment.