Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Fix namespace warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pasnox committed Jun 16, 2013
1 parent d377c17 commit cb489a9
Show file tree
Hide file tree
Showing 29 changed files with 135 additions and 135 deletions.
34 changes: 17 additions & 17 deletions src/Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ namespace Syntax {
class Document;
class Highlighter;
class Model;
};
}

namespace Theme {
class Schema;
};
}

namespace QodeEdit {

Expand All @@ -30,26 +30,26 @@ class Manager : public QObject
{
Q_OBJECT
friend class QodeEdit::ManagerData;

private:
QodeEdit::ManagerData* d;

public:
Manager( QObject* parent = 0 );
virtual ~Manager();

void initialize();
void deinitialize();

QString userSharedDataFilePath( const QString& extended = QString::null ) const;
void setUserSharedDataFilePath( const QString& filePath );

QString userSchemaDefinitionFilePath() const;
QString userSyntaxDefinitionFilePath() const;

QStringList schemaDefinitionFilePaths() const;
QStringList syntaxDefinitionFilePaths() const;

QString mimeTypeForFile( const QString& fileName ) const;
QString mimeTypeForFile( const QFileInfo& fileInfo ) const;
QString mimeTypeForData( const QByteArray& data ) const;
Expand All @@ -58,26 +58,26 @@ class Manager : public QObject
QString mimeTypeForFileNameAndData( const QString& fileName, const QByteArray& data ) const;
QString mimeTypeForUrl( const QUrl& url ) const;
QStringList mimeTypesForFileName( const QString& fileName ) const;

QStringList availableSyntaxesList() const;
QStringList availableSchemasList() const;

QHash<QString, Syntax::Document> availableSyntaxes() const;
Syntax::Document syntax( const QString& name );

QHash<QString, Theme::Schema> availableSchemas() const;
Theme::Schema schema( const QString& name );

Syntax::Model* model( QObject* parent = 0 );

Syntax::Highlighter* highlighter( const QString& syntaxName, TextDocument* textDocument = 0 ) const;
Syntax::Highlighter* highlighterForFilePath( const QString& filePath, TextDocument* textDocument = 0 ) const;
Syntax::Highlighter* highlighterForMimeType( const QString& mimeType, TextDocument* textDocument = 0 ) const;

static QString sharedDataFilePath( const QString& extended = QString::null );
static QString schemaDefinitionFilePath();
static QString syntaxDefinitionFilePath();

static const char* version();
static QString versionString();

Expand All @@ -88,6 +88,6 @@ class Manager : public QObject
void error( const QString& message );
};

}; // QodeEdit
} // QodeEdit

#endif // MANAGER_H
2 changes: 1 addition & 1 deletion src/QodeEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace QodeEdit {
extern const QMetaObject staticMetaObject;
};
}

#include "moc_QodeEdit.cpp"

Expand Down
4 changes: 2 additions & 2 deletions src/QodeEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ QodeEdit {
RegionMarkerStyle,
ErrorStyle
};

const QMetaObject* metaObject();
}; // QodeEdit
} // QodeEdit

#endif // QODEEDIT_H
6 changes: 3 additions & 3 deletions src/Threading.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Syntax {
class Document;
};
}

namespace QodeEdit {

Expand All @@ -16,8 +16,8 @@ namespace Threading
QFuture<QHash<QString, Syntax::Document> > parseSyntaxesFiles( const QStringList& paths );
QFuture<QHash<QString, QString> > bestMatchingMimeTypesIcons( const QHash<QString, QStringList>& mimeTypes, const QString& defaultMimeType );
QFuture<QHash<QString, QPair<QString, QString> > > getFilesContentWithTextCodec( const QStringList& filePaths, const QByteArray& textCodec );
}; // Threading
} // Threading

}; // QodeEdit
} // QodeEdit

#endif // THREADING_H
4 changes: 2 additions & 2 deletions src/Tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ namespace Tools {
static CaseInsensitiveEnumerator rule( mo().enumerator( mo().indexOfEnumerator( "Rule" ) ) );
static CaseInsensitiveEnumerator defaultStyle( mo().enumerator( mo().indexOfEnumerator( "DefaultStyle" ) ) );
static QHash<QString, QSet<QChar> > sets;
}; // Tools
} // Tools

}; // QodeEdit
} // QodeEdit

QString QodeEdit::Tools::rulerToString( QodeEdit::Ruler ruler )
{
Expand Down
16 changes: 8 additions & 8 deletions src/editor/TextDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ class TextBlockUserData;

namespace Syntax {
class Highlighter;
};
}

class TextDocument : public QTextDocument
{
Q_OBJECT
friend class TextDocumentPrivate;

public:
TextDocument( QObject* parent = 0 );
virtual ~TextDocument();

QTextBlock findBlockByContainsPosition(int position);

PlainTextDocumentLayout* layout() const;
void setLayout( PlainTextDocumentLayout* layout );

Syntax::Highlighter* syntaxHighlighter() const;
void setSyntaxHighlighter( Syntax::Highlighter* highlighter );

TextBlockUserData* testUserData( const QTextBlock& block ) const;
TextBlockUserData* userData( QTextBlock& block ) const;

QString text() const;
void setText( const QString& text );

void setInitialText( const QString& text );

int lastUnmodifiedRevision() const;

private:
Expand Down
6 changes: 3 additions & 3 deletions src/syntax/ComboBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ namespace Syntax {
class ComboBox : public QComboBox
{
Q_OBJECT

public:
ComboBox( QWidget* parent = 0 );
virtual ~ComboBox();

QString currentSyntax() const;

public slots:
void setCurrentSyntax( const QString& name );
};

}; // Syntax
} // Syntax

#endif // COMBOBOX_H
8 changes: 4 additions & 4 deletions src/syntax/Comment.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class Comment
{
private:
QExplicitlySharedDataPointer<Syntax::CommentData> d;

public:
typedef QList<Syntax::Comment> List;

QE_DECL_SHARED_CLASS( Comment, Syntax );

// Required
QE_DECL_MEMBER( QString, name ); ///< Name of the item data
QE_DECL_MEMBER( QString, start ); ///< Comment start string
Expand All @@ -45,6 +45,6 @@ class Comment
QE_DECL_MEMBER( QString, position ); // enum: afterwhitespace
};

}; // Syntax
} // Syntax

#endif // COMMENT_H
6 changes: 3 additions & 3 deletions src/syntax/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ class Configuration
{
private:
QExplicitlySharedDataPointer<Syntax::ConfigurationData> d;

public:
QE_DECL_SHARED_CLASS( Configuration, Syntax );

// Required
// Optional
QE_DECL_MEMBER( QString, encodingReplacementPolicy ); // enum: EncodeAlways, EncodeWhenPresent, EncodeNever,
};

}; // Syntax
} // Syntax

#endif // CONFIGURATION_H
10 changes: 5 additions & 5 deletions src/syntax/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class Context
{
private:
QExplicitlySharedDataPointer<Syntax::ContextData> d;

public:
typedef QHash<QString, Syntax::Context> Hash;
typedef QList<Syntax::Context> List;

QE_DECL_SHARED_CLASS( Context, Syntax );

// Required
QE_DECL_MEMBER( QString, attribute );
QE_DECL_MEMBER( QString, lineEndContext );
Expand All @@ -49,10 +49,10 @@ class Context
QE_DECL_MEMBER( bool, noIndentationBasedFolding );
// Others
QE_DECL_MEMBER( Syntax::Rule::List, rules ); ///< Rules of the context

bool isNull() const;
};

}; // Syntax
} // Syntax

#endif // CONTEXT_H
8 changes: 4 additions & 4 deletions src/syntax/ContextStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ class ContextStack
Syntax::ContextStack& operator=( const Syntax::ContextStack& other );
bool operator==( const Syntax::ContextStack& other ) const;
bool operator!=( const Syntax::ContextStack& other ) const;

Syntax::Context currentContext() const;
QStringList currentContextMatches() const;

Syntax::ContextStack pop( int count ) const;
Syntax::ContextStack append( const Syntax::Context& context, const QStringList& matches ) const;

static Syntax::ContextStack create( const Syntax::Document& syntax );

private:
Syntax::ContextStackData* d;
};

}; //Syntax
} //Syntax

#endif // CONTEXTSTACK_H
4 changes: 2 additions & 2 deletions src/syntax/ContextSwitcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ class ContextSwitcher
ContextSwitcher& operator=( const ContextSwitcher& other );
bool operator==( const ContextSwitcher& other ) const;
bool operator!=( const ContextSwitcher& other ) const;

Syntax::ContextStack nextContextStack( const Syntax::ContextStack& contextStack, const QStringList& matches = QStringList() ) const;

private:
Syntax::ContextSwitcherData* d;
};

}; // Syntax
} // Syntax

#endif // CONTEXTSWITCHER_H
16 changes: 8 additions & 8 deletions src/syntax/Document.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class Document
{
private:
QExplicitlySharedDataPointer<Syntax::DocumentData> d;

public:
typedef QList<Syntax::Document> List;

QE_DECL_SHARED_CLASS( Document, Syntax );
virtual bool operator<( const Syntax::Document& other ) const;

// Required
QE_DECL_MEMBER( QString, name ); ///< Name of the syntax document (ie: Asm6502)
QE_DECL_MEMBER( QString, section ); ///< Submenu section (ie: Assembly)
Expand All @@ -56,18 +56,18 @@ class Document
//QE_DECL_MEMBER( QString, identifier ); // ?
QE_DECL_MEMBER( QSet<QChar>, defaultDeliminator );
QE_DECL_MEMBER( QString, localizedName ); ///< Translated display name

QE_DECL_MEMBER( bool, finalyzed ); ///< Tell if the document has been totally parsed and built

QE_DECL_MEMBER( Syntax::Highlighting, highlighting );
QE_DECL_MEMBER( Syntax::General, general );
QE_DECL_MEMBER( Syntax::SpellChecking, spellChecking );

bool open( const QString& filePath, QString* error = 0 );

static QHash<QString, Syntax::Document> open( const QStringList& filePaths, QString* error = 0 );
};

}; // Syntax
} // Syntax

#endif // DOCUMENT_H
6 changes: 3 additions & 3 deletions src/syntax/DocumentBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class DocumentBuilder
{
private:
QExplicitlySharedDataPointer<Syntax::DocumentBuilderData> d;

public:
QE_DECL_SHARED_CLASS( DocumentBuilder, Syntax );

void buildDocuments( const QHash<QString, Syntax::Document>& documents );
};

}; //Syntax
} //Syntax

#endif // DOCUMENTBUILDER_H
8 changes: 4 additions & 4 deletions src/syntax/EmptyLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ class EmptyLine
{
private:
QExplicitlySharedDataPointer<Syntax::EmptyLineData> d;

public:
typedef QList<Syntax::EmptyLine> List;

QE_DECL_SHARED_CLASS( EmptyLine, Syntax );

// Required
QE_DECL_MEMBER( QString, regExpr );
// Optional
QE_DECL_MEMBER( bool, caseSensitive );
};

}; // Syntax
} // Syntax

#endif // EMPTYLINE_H
Loading

0 comments on commit cb489a9

Please sign in to comment.