Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions HtmlEncodedString.h

This file was deleted.

22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Gist: this is an MIT license. Act accordingly (basically, do whatever you want).
It would be nice to get an email from you if you use this, but if not that's also cool.

Copyright (c) 2010 Reilly Watson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3 changes: 0 additions & 3 deletions README

This file was deleted.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[![Qt Pods](http://qt-pods.org/assets/logo.png "Qt Pods")](http://qt-pods.org)

# Usage
HTML encode QStrings. You can use it like so: HtmlEncodedString("mywackyunencodedinput"), or like so: HtmlEncodedString::encodeString("mywackyunencodedinput").

That's really about all there is to it.

# How to install

qthtmlencodedstring is available via qt-pods. See here for reference:
https://github.com/cybercatalyst/qt-pods

Alternatively, you can just copy the files into your source tree. They don't have any dependencies beyond Qt Core.

5 changes: 4 additions & 1 deletion HtmlEncodedString.cpp → htmlencodedstring.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "HtmlEncodedString.h"
// Own includes
#include "htmlencodedstring.h"

// Qt includes
#include <QChar>
#include <QtAlgorithms>

Expand Down
10 changes: 10 additions & 0 deletions htmlencodedstring.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

// Qt includes
#include <QString>

class HtmlEncodedString : public QString {
public:
HtmlEncodedString(const QString& text);
static QString encodedString(const QString& text);
};
5 changes: 5 additions & 0 deletions qthtmlencode.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INCLUDEPATH += \
$$PWD

LIBS += \
-L../qthtmlencode -lqthtmlencode
10 changes: 10 additions & 0 deletions qthtmlencode.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TEMPLATE = lib

CONFIG += staticlib
TARGET = qthtmlencode

SOURCES += \
htmlencodedstring.cpp

HEADERS += \
htmlencodedstring.h