diff --git a/HtmlEncodedString.h b/HtmlEncodedString.h deleted file mode 100644 index 806dd03..0000000 --- a/HtmlEncodedString.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __HTML_ENCODED_STRING_H__ -#define __HTML_ENCODED_STRING_H__ - -#include - -class HtmlEncodedString : public QString -{ -public: - HtmlEncodedString (const QString& text); - static QString encodedString(const QString& text); -}; -#endif diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2e90774 --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README b/README deleted file mode 100644 index 7359417..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..a3f67f5 --- /dev/null +++ b/README.md @@ -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. + diff --git a/HtmlEncodedString.cpp b/htmlencodedstring.cpp similarity index 99% rename from HtmlEncodedString.cpp rename to htmlencodedstring.cpp index b1efa99..4070662 100644 --- a/HtmlEncodedString.cpp +++ b/htmlencodedstring.cpp @@ -1,4 +1,7 @@ -#include "HtmlEncodedString.h" +// Own includes +#include "htmlencodedstring.h" + +// Qt includes #include #include diff --git a/htmlencodedstring.h b/htmlencodedstring.h new file mode 100644 index 0000000..7ac333d --- /dev/null +++ b/htmlencodedstring.h @@ -0,0 +1,10 @@ +#pragma once + +// Qt includes +#include + +class HtmlEncodedString : public QString { +public: + HtmlEncodedString(const QString& text); + static QString encodedString(const QString& text); +}; diff --git a/qthtmlencode.pri b/qthtmlencode.pri new file mode 100644 index 0000000..90e139d --- /dev/null +++ b/qthtmlencode.pri @@ -0,0 +1,5 @@ +INCLUDEPATH += \ + $$PWD + +LIBS += \ + -L../qthtmlencode -lqthtmlencode diff --git a/qthtmlencode.pro b/qthtmlencode.pro new file mode 100644 index 0000000..2677b98 --- /dev/null +++ b/qthtmlencode.pro @@ -0,0 +1,10 @@ +TEMPLATE = lib + +CONFIG += staticlib +TARGET = qthtmlencode + +SOURCES += \ + htmlencodedstring.cpp + +HEADERS += \ + htmlencodedstring.h