예제 #1
0
bool QMakePlugin::DoGetData(const wxString& project, const wxString& conf, QmakePluginData::BuildConfPluginData &bcpd)
{
    wxString errMsg;
    ProjectPtr p = m_mgr->GetWorkspace()->FindProjectByName(project, errMsg);
    if ( p ) {
        wxString rawData = p->GetPluginData(wxT("qmake"));
        QmakePluginData pd( rawData );
        return pd.GetDataForBuildConf(conf, bcpd);
    }
    return false;
}
예제 #2
0
void QMakeTab::Save(IManager *manager, const wxString& projectName, const wxString& confgName)
{
	wxString errMsg;
	ProjectPtr p = manager->GetWorkspace()->FindProjectByName(projectName, errMsg);
	if ( p ) {
		wxString data = p->GetPluginData(wxT("qmake"));
		QmakePluginData pd( data );
		QmakePluginData::BuildConfPluginData bcpd;

		bcpd.m_buildConfName      = confgName;
		bcpd.m_enabled            = m_checkBoxUseQmake->IsChecked();
		bcpd.m_freeText           = m_textCtrlFreeText->GetValue();
		bcpd.m_qmakeConfig        = m_choiceQmakeSettings->GetStringSelection();
		bcpd.m_qmakeExecutionLine = m_textCtrlQmakeExeLine->GetValue();

		pd.SetDataForBuildConf(confgName, bcpd);

		p->SetPluginData(wxT("qmake"), pd.ToString());
	}
}
예제 #3
0
void QMakeTab::Load(IManager* manager, const wxString& projectName, const wxString& confgName)
{
	wxString errMsg;
	ProjectPtr p = manager->GetWorkspace()->FindProjectByName(projectName, errMsg);
	if ( p ) {
		wxString data = p->GetPluginData(wxT("qmake"));
		QmakePluginData pd( data );
		QmakePluginData::BuildConfPluginData bcpd;

		if (pd.GetDataForBuildConf(confgName, bcpd)) {

			m_textCtrlQmakeExeLine->SetValue( bcpd.m_qmakeExecutionLine );
			int where = m_choiceQmakeSettings->FindString( bcpd.m_qmakeConfig );
			if ( where != wxNOT_FOUND ) {
				m_choiceQmakeSettings->SetSelection(where);
			}
			m_textCtrlFreeText->SetValue( bcpd.m_freeText );
			m_checkBoxUseQmake->SetValue( bcpd.m_enabled );
		}
	}
}
예제 #4
0
void CppCheckSettings::LoadProjectSpecificSettings(ProjectPtr project)
{
    wxString rawData;
    wxArrayString definitions, undefines;
    if(project) {
        rawData = project->GetPluginData("CppCheck");
    }

    wxArrayString configurations = wxStringTokenize(rawData, ";", wxTOKEN_RET_EMPTY_ALL);
    if(configurations.GetCount() == 2) { // It'll either be empty or 2
        if(!configurations.Item(0).empty()) {
            definitions = wxStringTokenize(configurations.Item(0), ",");
        }
        if(!configurations.Item(1).empty()) {
            undefines = wxStringTokenize(configurations.Item(1), ",");
        }
    }
    // Note that we set these even if project == NULL, as this will clear any stale values
    SetDefinitions(definitions);
    SetUndefines(undefines);
}