Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
main.cpp File Reference

(b273697576c4162595d6d46bcd655311ac65deac)

#include <algorithm>
#include <iostream>
#include <fstream>
#include <string>
#include <string_view>
#include <cstring>
#include <sstream>
#include <filesystem>
#include <unordered_map>
#include <vector>
#include <regex>
#include <map>
#include <set>
#include <stdexcept>
#include <array>
Include dependency graph for main.cpp:

Go to the source code of this file.

Classes

class  utils::DummyOutputStream
class  CommandLineOptions
class  SyncScanner

Namespaces

namespace  utils

Typedefs

using FileStamp = std::filesystem::file_time_type

Enumerations

enum  ErrorCodes {
  NoError = 0 , InvalidArguments , SyncFailed , NoError = 0 ,
  InvalidArguments , SyncFailed
}
enum  HeaderChecks {
  NoChecks = 0 , NamespaceChecks = 1 , PrivateHeaderChecks = 2 , IncludeChecks = 4 ,
  WeMeantItChecks = 8 , PragmaOnceChecks = 16 , CriticalChecks = PrivateHeaderChecks | PragmaOnceChecks , AllChecks = NamespaceChecks | CriticalChecks | IncludeChecks | WeMeantItChecks ,
  NoChecks = 0 , NamespaceChecks = 1 , PrivateHeaderChecks = 2 , IncludeChecks = 4 ,
  WeMeantItChecks = 8 , PragmaOnceChecks = 16 , CriticalChecks = PrivateHeaderChecks | PragmaOnceChecks , AllChecks = NamespaceChecks | CriticalChecks | IncludeChecks | WeMeantItChecks
}
enum  ErrorCodes {
  NoError = 0 , InvalidArguments , SyncFailed , NoError = 0 ,
  InvalidArguments , SyncFailed
}
enum  HeaderChecks {
  NoChecks = 0 , NamespaceChecks = 1 , PrivateHeaderChecks = 2 , IncludeChecks = 4 ,
  WeMeantItChecks = 8 , PragmaOnceChecks = 16 , CriticalChecks = PrivateHeaderChecks | PragmaOnceChecks , AllChecks = NamespaceChecks | CriticalChecks | IncludeChecks | WeMeantItChecks ,
  NoChecks = 0 , NamespaceChecks = 1 , PrivateHeaderChecks = 2 , IncludeChecks = 4 ,
  WeMeantItChecks = 8 , PragmaOnceChecks = 16 , CriticalChecks = PrivateHeaderChecks | PragmaOnceChecks , AllChecks = NamespaceChecks | CriticalChecks | IncludeChecks | WeMeantItChecks
}

Functions

static const std::regex GlobalHeaderRegex ("^q(.*)global\\.h$")
bool MasterHeaderIncludeComparator (const std::string &a, const std::string &b)
std::string utils::asciiToLower (std::string s)
std::string utils::asciiToUpper (std::string s)
bool utils::parseVersion (const std::string &version, int &major, int &minor)
void utils::printInternalError ()
void utils::printFilesystemError (const std::filesystem::filesystem_error &fserr, std::string_view errorMsg)
std::filesystem::path utils::normilizedPath (const std::string &path)
bool utils::createDirectories (const std::string &path, std::string_view errorMsg, bool *exists=nullptr)
int main (int argc, char *argv[])
 [ctor_close]

Variables

constexpr int LinkerScriptCommentAlignment = 55
constexpr std::string_view ErrorMessagePreamble = "ERROR: "
constexpr std::string_view WarningMessagePreamble = "WARNING: "
utils::DummyOutputStream utils::DummyOutput

Typedef Documentation

◆ FileStamp

using FileStamp = std::filesystem::file_time_type

Definition at line 180 of file main.cpp.

Enumeration Type Documentation

◆ ErrorCodes [1/2]

enum ErrorCodes
Enumerator
NoError 
InvalidArguments 
SyncFailed 
NoError 
InvalidArguments 
SyncFailed 

Definition at line 34 of file main.cpp.

◆ ErrorCodes [2/2]

enum ErrorCodes
Enumerator
NoError 
InvalidArguments 
SyncFailed 
NoError 
InvalidArguments 
SyncFailed 

Definition at line 34 of file main.cpp.

◆ HeaderChecks [1/2]

Enumerator
NoChecks 
NamespaceChecks 
PrivateHeaderChecks 
IncludeChecks 
WeMeantItChecks 
PragmaOnceChecks 
CriticalChecks 
AllChecks 
NoChecks 
NamespaceChecks 
PrivateHeaderChecks 
IncludeChecks 
WeMeantItChecks 
PragmaOnceChecks 
CriticalChecks 
AllChecks 

Definition at line 41 of file main.cpp.

◆ HeaderChecks [2/2]

Enumerator
NoChecks 
NamespaceChecks 
PrivateHeaderChecks 
IncludeChecks 
WeMeantItChecks 
PragmaOnceChecks 
CriticalChecks 
AllChecks 
NoChecks 
NamespaceChecks 
PrivateHeaderChecks 
IncludeChecks 
WeMeantItChecks 
PragmaOnceChecks 
CriticalChecks 
AllChecks 

Definition at line 41 of file main.cpp.

Function Documentation

◆ GlobalHeaderRegex()

const std::regex GlobalHeaderRegex ( "^q(.*)global\\.h$" )
static

Referenced by MasterHeaderIncludeComparator(), and SyncScanner::processHeader().

Here is the caller graph for this function:

◆ main()

int main ( int argc,
char * argv[] )

[ctor_close]

[0] [1]

[main_cpp]

[main.cpp body]

The main function for the string list model example.

Create a default directory model and, using the index-based interface to the model and some QLabel widgets, populate the window's layout with the names of objects in the directory.

[0] //! [1]

[1]

[using a custom style]

[4]

[QApplication subclass]

[2]

[21]

[getter functions]

[0]

[3]

[main]

This creates and populates a model with values from a string list then displays the contents of the model using a QListView widget. [0]

[ctor_close]

[printing a custom type]

[printing a custom type] [storing a custom value]

[storing a custom value]

[retrieving a custom value]

[retrieving a custom value]

[0]

[0] [1]

[1]

[0]

[0]

[1]

[1] [2]

[2]

[0]

[0]

[2]

[2]

[22]

[22]

[3]

[3]

[4]

[4]

[10]

[10]

[qcinfo_stream]

[qcinfo_stream]

[11]

[11]

[12]

[12]

[13]

[13]

[qcinfo_printf]

[qcinfo_printf]

[14]

[14]

[15]

[15]

[16]

[16]

[17]

[17]

[0]

[0]

[1]

[1]

[2]

[2]

[Window class using revision]

[Window class using revision]

[0]

[0]

[1]

[1]

[2]

[2]

[write output] [start stream]

[start stream]

[write element]

[write element]

[finish stream]

[finish stream] [write output]

[1]

[1]

[0]

[0]

[0]

[0] //! [1]

[1]

[0]

[0] //! [1]

[1]

[0]

[0] //! [1]

[1] //! [2]

[2]

[0]

[0]

[1]

[1]

[Adding a resource]

[Adding a resource]

[Inserting an image with a cursor]

[Inserting an image with a cursor]

[Inserting an image using HTML]

[Inserting an image using HTML]

[0]

[0] //! [1]

[1]

[1]

[2]

[2]

[3]

[0]

[1]

[1]

Definition at line 1844 of file main.cpp.

References CommandLineOptions::CommandLineOptions(), SyncScanner::SyncScanner(), InvalidArguments, CommandLineOptions::isValid(), NoError, CommandLineOptions::printHelp(), CommandLineOptions::printHelpOnly(), and SyncScanner::sync().

Here is the call graph for this function:

◆ MasterHeaderIncludeComparator()

bool MasterHeaderIncludeComparator ( const std::string & a,
const std::string & b )

Definition at line 62 of file main.cpp.

References GlobalHeaderRegex().

Here is the call graph for this function:

Variable Documentation

◆ ErrorMessagePreamble

std::string_view ErrorMessagePreamble = "ERROR: "
constexpr

Definition at line 57 of file main.cpp.

◆ LinkerScriptCommentAlignment

int LinkerScriptCommentAlignment = 55
constexpr

Definition at line 53 of file main.cpp.

Referenced by SyncScanner::parseVersionScriptContent().

◆ WarningMessagePreamble

std::string_view WarningMessagePreamble = "WARNING: "
constexpr

Definition at line 58 of file main.cpp.