QtBase  v6.3.1
main.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2020 The Qt Company Ltd.
4 ** Copyright (C) 2016 Intel Corporation.
5 ** Contact: https://www.qt.io/licensing/
6 **
7 ** This file is part of the qmake application of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
10 ** Commercial License Usage
11 ** Licensees holding valid commercial Qt licenses may use this file in
12 ** accordance with the commercial license agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and The Qt Company. For licensing terms
15 ** and conditions see https://www.qt.io/terms-conditions. For further
16 ** information use the contact form at https://www.qt.io/contact-us.
17 **
18 ** GNU General Public License Usage
19 ** Alternatively, this file may be used under the terms of the GNU
20 ** General Public License version 3 as published by the Free Software
21 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
22 ** included in the packaging of this file. Please review the following
23 ** information to ensure the GNU General Public License requirements will
24 ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
25 **
26 ** $QT_END_LICENSE$
27 **
28 ****************************************************************************/
29 
30 #include "project.h"
31 #include "property.h"
32 #include "option.h"
33 #include "cachekeys.h"
34 #include "metamakefile.h"
35 #include <qcoreapplication.h>
36 #include <qnamespace.h>
37 #include <qdebug.h>
38 #include <qregularexpression.h>
39 #include <qdir.h>
40 #include <qdiriterator.h>
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <ctype.h>
44 #include <fcntl.h>
45 #include <sys/types.h>
46 #include <sys/stat.h>
47 
48 #if defined(Q_OS_UNIX)
49 #include <errno.h>
50 #include <unistd.h>
51 #endif
52 
53 #ifdef Q_OS_WIN
54 # include <qt_windows.h>
55 #endif
56 
57 using namespace QMakeInternal;
58 
60 
61 #ifdef Q_OS_WIN
62 
63 struct SedSubst {
64  QRegularExpression from;
65  QString to;
66 };
68 
69 static int doSed(int argc, char **argv)
70 {
71  QList<SedSubst> substs;
72  QList<const char *> inFiles;
73  for (int i = 0; i < argc; i++) {
74  if (!strcmp(argv[i], "-e")) {
75  if (++i == argc) {
76  fprintf(stderr, "Error: sed option -e requires an argument\n");
77  return 3;
78  }
79  QString cmd = QString::fromLocal8Bit(argv[i]);
80  for (int j = 0; j < cmd.length(); j++) {
81  QChar c = cmd.at(j);
82  if (c.isSpace())
83  continue;
84  if (c != QLatin1Char('s')) {
85  fprintf(stderr, "Error: unrecognized sed command '%c'\n", c.toLatin1());
86  return 3;
87  }
88  QChar sep = ++j < cmd.length() ? cmd.at(j) : QChar();
89  QRegularExpression::PatternOptions matchcase = QRegularExpression::NoPatternOption;
90  bool escaped = false;
91  int phase = 1;
92  QStringList phases;
93  QString curr;
94  while (++j < cmd.length()) {
95  c = cmd.at(j);
96  if (!escaped) {
97  if (c == QLatin1Char(';'))
98  break;
99  if (c == QLatin1Char('\\')) {
100  escaped = true;
101  continue;
102  }
103  if (c == sep) {
104  phase++;
105  phases << curr;
106  curr.clear();
107  continue;
108  }
109  }
110  if (phase == 1
111  && (c == QLatin1Char('+') || c == QLatin1Char('?') || c == QLatin1Char('|')
112  || c == QLatin1Char('{') || c == QLatin1Char('}')
113  || c == QLatin1Char('(') || c == QLatin1Char(')'))) {
114  // translate sed rx to QRegularExpression
115  escaped ^= 1;
116  }
117  if (escaped) {
118  escaped = false;
119  curr += QLatin1Char('\\');
120  }
121  curr += c;
122  }
123  if (escaped) {
124  fprintf(stderr, "Error: unterminated escape sequence in sed s command\n");
125  return 3;
126  }
127  if (phase != 3) {
128  fprintf(stderr, "Error: sed s command requires three arguments (%d, %c, %s)\n", phase, sep.toLatin1(), qPrintable(curr));
129  return 3;
130  }
131  if (curr.contains(QLatin1Char('i'))) {
132  curr.remove(QLatin1Char('i'));
134  }
135  if (curr != QLatin1String("g")) {
136  fprintf(stderr, "Error: sed s command supports only g & i options; g is required\n");
137  return 3;
138  }
139  SedSubst subst;
140  subst.from = QRegularExpression(phases.at(0), matchcase);
141  subst.to = phases.at(1);
142  subst.to.replace(QLatin1String("\\\\"), QLatin1String("\\")); // QString::replace(rx, sub) groks \1, but not \\.
143  substs << subst;
144  }
145  } else if (argv[i][0] == '-' && argv[i][1] != 0) {
146  fprintf(stderr, "Error: unrecognized sed option '%s'\n", argv[i]);
147  return 3;
148  } else {
149  inFiles << argv[i];
150  }
151  }
152  if (inFiles.isEmpty())
153  inFiles << "-";
154  for (const char *inFile : qAsConst(inFiles)) {
155  FILE *f;
156  if (!strcmp(inFile, "-")) {
157  f = stdin;
158  } else if (!(f = fopen(inFile, "rb"))) {
159  perror(inFile);
160  return 1;
161  }
162  QTextStream is(f);
163  while (!is.atEnd()) {
164  QString line = is.readLine();
165  for (int i = 0; i < substs.size(); i++)
166  line.replace(substs.at(i).from, substs.at(i).to);
167  puts(qPrintable(line));
168  }
169  if (f != stdin)
170  fclose(f);
171  }
172  return 0;
173 }
174 
175 static int doLink(int argc, char **argv)
176 {
177  bool isSymlink = false;
178  bool force = false;
179  QList<const char *> inFiles;
180  for (int i = 0; i < argc; i++) {
181  if (!strcmp(argv[i], "-s")) {
182  isSymlink = true;
183  } else if (!strcmp(argv[i], "-f")) {
184  force = true;
185  } else if (argv[i][0] == '-') {
186  fprintf(stderr, "Error: unrecognized ln option '%s'\n", argv[i]);
187  return 3;
188  } else {
189  inFiles << argv[i];
190  }
191  }
192  if (inFiles.size() != 2) {
193  fprintf(stderr, "Error: this ln requires exactly two file arguments\n");
194  return 3;
195  }
196  if (!isSymlink) {
197  fprintf(stderr, "Error: this ln supports faking symlinks only\n");
198  return 3;
199  }
200  QString target = QString::fromLocal8Bit(inFiles[0]);
201  QString linkname = QString::fromLocal8Bit(inFiles[1]);
202 
203  QDir destdir;
204  QFileInfo tfi(target);
205  QFileInfo lfi(linkname);
206  if (lfi.isDir()) {
207  destdir.setPath(linkname);
208  lfi.setFile(destdir, tfi.fileName());
209  } else {
210  destdir.setPath(lfi.path());
211  }
212  if (!destdir.exists()) {
213  fprintf(stderr, "Error: destination directory %s does not exist\n", qPrintable(destdir.path()));
214  return 1;
215  }
216  tfi.setFile(destdir.absoluteFilePath(tfi.filePath()));
217  if (!tfi.exists()) {
218  fprintf(stderr, "Error: this ln does not support symlinking non-existing targets\n");
219  return 3;
220  }
221  if (tfi.isDir()) {
222  fprintf(stderr, "Error: this ln does not support symlinking directories\n");
223  return 3;
224  }
225  if (lfi.exists()) {
226  if (!force) {
227  fprintf(stderr, "Error: %s exists\n", qPrintable(lfi.filePath()));
228  return 1;
229  }
230  if (!QFile::remove(lfi.filePath())) {
231  fprintf(stderr, "Error: cannot overwrite %s\n", qPrintable(lfi.filePath()));
232  return 1;
233  }
234  }
235  if (!QFile::copy(tfi.filePath(), lfi.filePath())) {
236  fprintf(stderr, "Error: cannot copy %s to %s\n",
237  qPrintable(tfi.filePath()), qPrintable(lfi.filePath()));
238  return 1;
239  }
240 
241  return 0;
242 }
243 
244 #endif
245 
246 static bool setFilePermissions(QFile &file, QFileDevice::Permissions permissions)
247 {
248  if (file.setPermissions(permissions))
249  return true;
250  fprintf(stderr, "Error setting permissions on %s: %s\n",
251  qPrintable(file.fileName()), qPrintable(file.errorString()));
252  return false;
253 }
254 
255 static bool copyFileTimes(QFile &targetFile, const QString &sourceFilePath,
256  bool mustEnsureWritability, QString *errorString)
257 {
258 #ifdef Q_OS_WIN
259  bool mustRestorePermissions = false;
260  QFileDevice::Permissions targetPermissions;
261  if (mustEnsureWritability) {
262  targetPermissions = targetFile.permissions();
263  if (!targetPermissions.testFlag(QFileDevice::WriteUser)) {
264  mustRestorePermissions = true;
265  if (!setFilePermissions(targetFile, targetPermissions | QFileDevice::WriteUser))
266  return false;
267  }
268  }
269 #else
270  Q_UNUSED(mustEnsureWritability);
271 #endif
272  if (!IoUtils::touchFile(targetFile.fileName(), sourceFilePath, errorString))
273  return false;
274 #ifdef Q_OS_WIN
275  if (mustRestorePermissions && !setFilePermissions(targetFile, targetPermissions))
276  return false;
277 #endif
278  return true;
279 }
280 
281 static int installFile(const QString &source, const QString &target, bool exe = false,
282  bool preservePermissions = false)
283 {
284  QFile sourceFile(source);
285  QFile targetFile(target);
286  if (targetFile.exists()) {
287 #ifdef Q_OS_WIN
288  targetFile.setPermissions(targetFile.permissions() | QFile::WriteUser);
289 #endif
291  } else {
292  QDir::root().mkpath(QFileInfo(target).absolutePath());
293  }
294 
295  if (!sourceFile.copy(target)) {
296  fprintf(stderr, "Error copying %s to %s: %s\n", source.toLatin1().constData(), qPrintable(target), qPrintable(sourceFile.errorString()));
297  return 3;
298  }
299 
300  QFileDevice::Permissions targetPermissions = preservePermissions
301  ? sourceFile.permissions()
305  if (exe) {
306  targetPermissions |= QFileDevice::ExeOwner | QFileDevice::ExeUser |
308  }
309  if (!setFilePermissions(targetFile, targetPermissions))
310  return 3;
311 
312  QString error;
313  if (!copyFileTimes(targetFile, sourceFile.fileName(), preservePermissions, &error)) {
314  fprintf(stderr, "%s", qPrintable(error));
315  return 3;
316  }
317 
318  return 0;
319 }
320 
321 static int installFileOrDirectory(const QString &source, const QString &target,
322  bool preservePermissions = false)
323 {
325  if (false) {
326 #if defined(Q_OS_UNIX)
327  } else if (fi.isSymLink()) {
328  QString linkTarget;
329  if (!IoUtils::readLinkTarget(fi.absoluteFilePath(), &linkTarget)) {
330  fprintf(stderr, "Could not read link %s: %s\n", qPrintable(fi.absoluteFilePath()), strerror(errno));
331  return 3;
332  }
334  if (::symlink(linkTarget.toLocal8Bit().constData(), target.toLocal8Bit().constData()) < 0) {
335  fprintf(stderr, "Could not create link: %s\n", strerror(errno));
336  return 3;
337  }
338 #endif
339  } else if (fi.isDir()) {
341 
343  while (it.hasNext()) {
344  const QFileInfo entry = it.nextFileInfo();
345  const QString &entryTarget = target + QDir::separator() + entry.fileName();
346 
347  const int recursionResult = installFileOrDirectory(entry.filePath(), entryTarget, true);
348  if (recursionResult != 0)
349  return recursionResult;
350  }
351  } else {
352  const int fileCopyResult = installFile(source, target, /*exe*/ false, preservePermissions);
353  if (fileCopyResult != 0)
354  return fileCopyResult;
355  }
356  return 0;
357 }
358 
359 static int doQInstall(int argc, char **argv)
360 {
361  bool installExecutable = false;
362  if (argc == 3 && !strcmp(argv[0], "-exe")) {
363  installExecutable = true;
364  --argc;
365  ++argv;
366  }
367 
368  if (argc != 2 && !installExecutable) {
369  fprintf(stderr, "Error: usage: [-exe] source target\n");
370  return 3;
371  }
372 
373  const QString source = QString::fromLocal8Bit(argv[0]);
374  const QString target = QString::fromLocal8Bit(argv[1]);
375 
376  if (installExecutable)
377  return installFile(source, target, /*exe=*/true);
378  return installFileOrDirectory(source, target);
379 }
380 
381 
382 static int doInstall(int argc, char **argv)
383 {
384  if (!argc) {
385  fprintf(stderr, "Error: -install requires further arguments\n");
386  return 3;
387  }
388 #ifdef Q_OS_WIN
389  if (!strcmp(argv[0], "sed"))
390  return doSed(argc - 1, argv + 1);
391  if (!strcmp(argv[0], "ln"))
392  return doLink(argc - 1, argv + 1);
393 #endif
394  if (!strcmp(argv[0], "qinstall"))
395  return doQInstall(argc - 1, argv + 1);
396  fprintf(stderr, "Error: unrecognized -install subcommand '%s'\n", argv[0]);
397  return 3;
398 }
399 
400 
401 #ifdef Q_OS_WIN
402 
403 static int dumpMacros(const wchar_t *cmdline)
404 {
405  // from http://stackoverflow.com/questions/3665537/how-to-find-out-cl-exes-built-in-macros
406  int argc;
407  wchar_t **argv = CommandLineToArgvW(cmdline, &argc);
408  if (!argv)
409  return 2;
410  for (int i = 0; i < argc; ++i) {
411  if (argv[i][0] != L'-' || argv[i][1] != 'D')
412  continue;
413 
414  wchar_t *value = wcschr(argv[i], L'=');
415  if (value) {
416  *value = 0;
417  ++value;
418  } else {
419  // point to the NUL at the end, so we don't print anything
420  value = argv[i] + wcslen(argv[i]);
421  }
422  wprintf(L"#define %Ls %Ls\n", argv[i] + 2, value);
423  }
424  return 0;
425 }
426 
427 #endif // Q_OS_WIN
428 
429 /* This is to work around lame implementation on Darwin. It has been noted that the getpwd(3) function
430  is much too slow, and called much too often inside of Qt (every fileFixify). With this we use a locally
431  cached copy because I can control all the times it is set (because Qt never sets the pwd under me).
432 */
433 static QString pwd;
435 {
436  if(pwd.isNull())
437  pwd = QDir::currentPath();
438  return pwd;
439 }
440 bool qmake_setpwd(const QString &p)
441 {
442  if(QDir::setCurrent(p)) {
443  pwd = QDir::currentPath();
444  return true;
445  }
446  return false;
447 }
448 
449 int runQMake(int argc, char **argv)
450 {
451  qSetGlobalQHashSeed(0);
452 
453  // stderr is unbuffered by default, but stdout buffering depends on whether
454  // there is a terminal attached. Buffering can make output from stderr and stdout
455  // appear out of sync, so force stdout to be unbuffered as well.
456  // This is particularly important for things like QtCreator and scripted builds.
457  setvbuf(stdout, (char *)NULL, _IONBF, 0);
458 
459  // Workaround for inferior/missing command line tools on Windows: make our own!
460  if (argc >= 4 && !strcmp(argv[1], "-qtconf") && !strcmp(argv[3], "-install"))
461  return doInstall(argc - 4, argv + 4);
462  if (argc >= 2 && !strcmp(argv[1], "-install"))
463  return doInstall(argc - 2, argv + 2);
464 
465 #ifdef Q_OS_WIN
466  {
467  // Support running as Visual C++'s compiler
468  const wchar_t *cmdline = _wgetenv(L"MSC_CMD_FLAGS");
469  if (!cmdline || !*cmdline)
470  cmdline = _wgetenv(L"MSC_IDE_FLAGS");
471  if (cmdline && *cmdline)
472  return dumpMacros(cmdline);
473  }
474 #endif
475 
476  QMakeVfs vfs;
477  Option::vfs = &vfs;
478  QMakeGlobals globals;
479  Option::globals = &globals;
480 
481  // parse command line
482  int ret = Option::init(argc, argv);
484  if ((ret & Option::QMAKE_CMDLINE_ERROR) != 0)
485  return 1;
486  return 0;
487  }
488 
489  QString oldpwd = qmake_getpwd();
490 
491  Option::output_dir = oldpwd; //for now this is the output dir
492  if (!Option::output.fileName().isEmpty() && Option::output.fileName() != "-") {
493  // The output 'filename', as given by the -o option, might include one
494  // or more directories, so we may need to rebase the output directory.
496 
498 
499  // Don't treat Xcode project directory as part of OUT_PWD
500  if (dir.dirName().endsWith(QLatin1String(".xcodeproj"))) {
501  // Note: we're intentionally not using cdUp(), as the dir may not exist
502  dir.setPath(QDir::cleanPath(dir.filePath("..")));
503  }
504 
505  Option::output_dir = dir.path();
506  QString absoluteFilePath = QDir::cleanPath(fi.absoluteFilePath());
507  Option::output.setFileName(absoluteFilePath.mid(Option::output_dir.length() + 1));
508  }
509 
510  QMakeProperty prop;
511  switch (Option::qmake_mode) {
518  return 0;
519  default:
520  break;
521  }
522 
523  globals.setQMakeProperty(&prop);
524 
525  ProFileCache proFileCache;
526  Option::proFileCache = &proFileCache;
527  QMakeParser parser(&proFileCache, &vfs, &Option::evalHandler);
529 
530  QMakeProject project;
531  int exit_val = 0;
534  files << "(*hack*)"; //we don't even use files, but we do the for() body once
535  else
537  for(QStringList::Iterator pfile = files.begin(); pfile != files.end(); pfile++) {
540  QString fn = Option::normalizePath(*pfile);
541  if(!QFile::exists(fn)) {
542  fprintf(stderr, "Cannot find file: %s.\n",
543  QDir::toNativeSeparators(fn).toLatin1().constData());
544  exit_val = 2;
545  continue;
546  }
547 
548  //setup pwd properly
549  debug_msg(1, "Resetting dir to: %s",
550  QDir::toNativeSeparators(oldpwd).toLatin1().constData());
551  qmake_setpwd(oldpwd); //reset the old pwd
552  int di = fn.lastIndexOf(QLatin1Char('/'));
553  if(di != -1) {
554  debug_msg(1, "Changing dir to: %s",
556  if(!qmake_setpwd(fn.left(di)))
557  fprintf(stderr, "Cannot find directory: %s\n",
559  fn = fn.right(fn.length() - di - 1);
560  }
561 
563 
564  // read project..
565  if(!project.read(fn)) {
566  fprintf(stderr, "Error processing project file: %s\n",
568  exit_val = 3;
569  continue;
570  }
572  project.dump();
573  continue; //no need to create makefile
574  }
575  }
576 
577  bool success = true;
578  MetaMakefileGenerator *mkfile = MetaMakefileGenerator::createMetaGenerator(&project, QString(), false, &success);
579  if (!success)
580  exit_val = 3;
581 
582  if (mkfile && !mkfile->write()) {
584  fprintf(stderr, "Unable to generate project file.\n");
585  else
586  fprintf(stderr, "Unable to generate makefile for: %s\n",
588  exit_val = 5;
589  }
590  delete mkfile;
591  mkfile = nullptr;
592  }
594  return exit_val;
595 }
596 
598 
599 int main(int argc, char **argv)
600 {
601  // Set name of the qmake application in QCoreApplication instance
602  QT_PREPEND_NAMESPACE(QCoreApplication) app(argc, argv);
603  return QT_PREPEND_NAMESPACE(runQMake)(argc, argv);
604 }
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
#define value
[5]
void qmakeClearCaches()
Definition: option.cpp:625
virtual bool write()=0
static MetaMakefileGenerator * createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true, bool *success=nullptr)
const char * constData() const noexcept
Definition: qbytearray.h:144
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:84
constexpr char toLatin1() const noexcept
Definition: qchar.h:488
The QDir class provides access to directory structures and their contents.
Definition: qdir.h:55
static bool setCurrent(const QString &path)
Definition: qdir.cpp:1982
static QDir root()
Definition: qdir.h:249
QString path() const
Definition: qdir.cpp:646
static QDir current()
Definition: qdir.h:244
static QChar separator()
Definition: qdir.h:234
bool exists() const
Definition: qdir.cpp:1671
bool mkpath(const QString &dirPath) const
Definition: qdir.cpp:1537
static QString cleanPath(const QString &path)
Definition: qdir.cpp:2350
void setPath(const QString &path)
Definition: qdir.cpp:631
static QString toNativeSeparators(const QString &pathName)
Definition: qdir.cpp:916
QString absoluteFilePath(const QString &fileName) const
Definition: qdir.cpp:796
static QString currentPath()
Definition: qdir.cpp:2006
@ Hidden
Definition: qdir.h:70
@ AllEntries
Definition: qdir.h:61
@ NoDotAndDotDot
Definition: qdir.h:79
The QDirIterator class provides an iterator for directory entrylists.
Definition: qdiriterator.h:49
The QFile class provides an interface for reading from and writing to files.
Definition: qfile.h:94
bool setPermissions(Permissions permissionSpec) override
Definition: qfile.cpp:1152
bool copy(const QString &newName)
Definition: qfile.cpp:766
bool remove()
Definition: qfile.cpp:444
void setFileName(const QString &name)
Definition: qfile.cpp:327
QString fileName() const override
Definition: qfile.cpp:302
Permissions permissions() const override
Definition: qfile.cpp:1123
bool exists() const
Definition: qfile.cpp:376
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:57
bool isSymLink() const
Definition: qfileinfo.cpp:1100
QString absoluteFilePath() const
Definition: qfileinfo.cpp:556
bool isDir() const
Definition: qfileinfo.cpp:1048
QString absolutePath() const
Definition: qfileinfo.cpp:599
QString errorString() const
Definition: qiodevice.cpp:2169
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
Definition: qstring.h:84
Definition: qlist.h:108
qsizetype size() const noexcept
Definition: qlist.h:414
bool isEmpty() const noexcept
Definition: qlist.h:418
iterator Iterator
Definition: qlist.h:279
const_reference at(qsizetype i) const noexcept
Definition: qlist.h:457
void dump() const
Definition: project.cpp:153
bool read(const QString &project, LoadFlags what=LoadAll)
Definition: project.cpp:64
int queryProperty(const QStringList &optionProperties=QStringList(), const PropertyPrinter &printer=qmakePropertyPrinter)
Definition: property.cpp:153
int setProperty(const QStringList &optionProperties)
Definition: property.cpp:205
void unsetProperty(const QStringList &optionProperties)
Definition: property.cpp:219
The QRegularExpression class provides pattern matching using regular expressions.
The QString class provides a Unicode character string.
Definition: qstring.h:388
QByteArray toLatin1() const &
Definition: qstring.h:745
QString & replace(qsizetype i, qsizetype len, QChar after)
Definition: qstring.cpp:3450
static QString fromLocal8Bit(QByteArrayView ba)
Definition: qstring.cpp:5563
void clear()
Definition: qstring.h:1240
bool isNull() const
Definition: qstring.h:1078
QString mid(qsizetype position, qsizetype n=-1) const
Definition: qstring.cpp:4994
const QChar at(qsizetype i) const
Definition: qstring.h:1212
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:5143
QByteArray toLocal8Bit() const &
Definition: qstring.h:753
bool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.h:1353
QString & remove(qsizetype i, qsizetype len)
Definition: qstring.cpp:3252
qsizetype length() const
Definition: qstring.h:415
The QStringList class provides a list of strings.
The QTextStream class provides a convenient interface for reading and writing text.
Definition: qtextstream.h:62
int main(int argc, char **argv)
Definition: main.cpp:1
#define NULL
Definition: ftobjs.h:61
parser
Definition: devices.py:74
#define QString()
Definition: parse-defines.h:51
int PRIV() strcmp(PCRE2_SPTR str1, PCRE2_SPTR str2)
EGLOutputLayerEXT EGLint EGLAttrib value
bool qmake_setpwd(const QString &p)
Definition: main.cpp:440
QString qmake_getpwd()
Definition: main.cpp:434
int runQMake(int argc, char **argv)
Definition: main.cpp:449
#define debug_msg
Definition: option.h:46
GLfloat GLfloat f
GLenum target
GLsizei GLsizei GLchar * source
const GLubyte * c
Definition: qopenglext.h:12701
GLuint entry
Definition: qopenglext.h:11002
GLfloat GLfloat p
[1]
Definition: qopenglext.h:12698
int QT_PREPEND_NAMESPACE(QSharedMemoryPrivate)
@ Q_RELOCATABLE_TYPE
Definition: qtypeinfo.h:156
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition: qtypeinfo.h:173
Q_UNUSED(salary)
[21]
void error(const char *msg="Invalid argument")
Definition: main.cpp:78
QFile file
[0]
QFileInfo fi("c:/temp/foo")
[newstuff]
QString dir
[11]
QStringList files
[8]
QApplication app(argc, argv)
[0]
QStringList::Iterator it
static QStringList project_files
Definition: option.h:191
static bool do_preprocess
Definition: option.h:189
static QStringList properties
Definition: option.h:175
static EvalHandler evalHandler
Definition: option.h:71
static QMakeGlobals * globals
Definition: option.h:73
static void prepareProject(const QString &pfile)
Definition: option.cpp:448
static ProFileCache * proFileCache
Definition: option.h:74
static QMakeVfs * vfs
Definition: option.h:75
static QMAKE_MODE qmake_mode
Definition: option.h:164
@ QMAKE_CMDLINE_SUCCESS
Definition: option.h:102
@ QMAKE_CMDLINE_ERROR
Definition: option.h:105
static int init(int argc=0, char **argv=nullptr)
Definition: option.cpp:319
static QMakeParser * parser
Definition: option.h:76
@ QMAKE_GENERATE_MAKEFILE
Definition: option.h:162
@ QMAKE_SET_PROPERTY
Definition: option.h:163
@ QMAKE_QUERY_PROPERTY
Definition: option.h:163
@ QMAKE_UNSET_PROPERTY
Definition: option.h:163
@ QMAKE_GENERATE_PROJECT
Definition: option.h:162
@ QMAKE_GENERATE_PRL
Definition: option.h:162
static QString output_dir
Definition: option.h:168
static QFile output
Definition: option.h:167
static QString normalizePath(const QString &in, bool fix_env=true, bool canonical=true)
Definition: option.h:142
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:53
QWidget * c
Definition: main.cpp:45
int fn(int &i)