~lubuntu-dev/juffed/trunk

« back to all changes in this revision

Viewing changes to src/lib/FileTypeSettings.cpp

  • Committer: mezomish
  • Date: 2011-03-24 18:57:02 UTC
  • Revision ID: git-v1:1f30102ecae786ef8fc4aca48c419dc3e491bcac
Fix for Pascal, TCL and Fortran lexers

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
 
22
22
QStringList FileTypeSettings::getTypeList() {
23
 
        return Settings::instance()->value("filetypes", "types").toStringList();
 
23
        if ( Settings::instance()->valueExists("filetypes", "types") )
 
24
                return Settings::instance()->value("filetypes", "types").toStringList();
 
25
        else
 
26
                return QStringList();
24
27
}
25
28
 
26
29
QStringList FileTypeSettings::getFileNamePatterns(const QString& type) {
59
62
                else if ( type == "Diff") {
60
63
                        list << "*.diff" << "*.patch";
61
64
                }
 
65
                else if ( type == "Fortran") {
 
66
                        list << "*.f" << "*.f77" << "*.f90";
 
67
                }
62
68
                else if ( type == "Haskell") {
63
69
                        list << "*.hs" << "*.lhs";
64
70
                }
95
101
                else if ( type == "NXC") {
96
102
                        list << "*.nxc";
97
103
                }
 
104
                else if ( type == "Pascal") {
 
105
                        list << "*.p{1,2}" << "*.pa[s345]";
 
106
                }
98
107
                else if ( type == "Perl") {
99
108
                        list << "*.p[lm]";
100
109
                }
104
113
                else if ( type == "PHP") {
105
114
                        list << "*.php*";
106
115
                }
 
116
                else if ( type == "Qore") {
 
117
                        list << "*.q" << "*.qc" << "*.ql";
 
118
                }
 
119
                else if ( type == "Qorus") {
 
120
                        list << "*.qfd" << "*.qwf" << "*.qsd" << "*.qclass";
 
121
                }
107
122
                else if ( type == "Ruby") {
108
123
                        list << "*.rb";
109
124
                }
113
128
                else if ( type == "TeX") {
114
129
                        list << "*.tex";
115
130
                }
 
131
                else if ( type == "TCL") {
 
132
                        list << "*.tcl";
 
133
                }
116
134
                else if ( type == "XML") {
117
135
                        list << "*.xml";
118
136
                }
119
 
                else if ( type == "Fortran") {
120
 
                        list << "*.f" << "*.f77" << "*.f90";
121
 
                }
122
 
                else if ( type == "Qore") {
123
 
                        list << "*.q" << "*.qc" << "*.ql";
124
 
                }
125
 
                else if ( type == "Qorus") {
126
 
                        list << "*.qfd" << "*.qwf" << "*.qsd" << "*.qclass";
127
 
                }
128
137
 
129
138
                return list;
130
139
        }
143
152
                        list << "Index: *";
144
153
                else if ( type == "HTML") 
145
154
                        list << "<!doctype html*" << "<html*";
 
155
                else if ( type == "Pascal") 
 
156
                        list << "program *" << "unit *";
146
157
                else if ( type == "Perl") 
147
158
                        list << "*perl*";
148
159
                else if ( type == "Python")