diff options
| author | Andreas Grois <andi@grois.info> | 2022-10-10 21:30:02 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2022-10-10 21:37:15 +0200 |
| commit | e4ad766315879e1ff05bb111229f073f8f0ed68e (patch) | |
| tree | 4b043ff47c78b2c00c80c94ebda622c32c8b6d3d /src/PassFish.cpp | |
PassFish: Initial Commit
Well, that's a lie. But nobody needs to see all the iterations I decided
to sweep under the rug.
That said, I think the repo is, while not clean, clean enough now, to
not be embarrassed by uploading it to github.
Diffstat (limited to 'src/PassFish.cpp')
| -rw-r--r-- | src/PassFish.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/PassFish.cpp b/src/PassFish.cpp new file mode 100644 index 0000000..80eef2a --- /dev/null +++ b/src/PassFish.cpp @@ -0,0 +1,28 @@ +#include <QtQuick> +#include <sailfishapp.h> +#include <stdio.h> +#include "Bindings.h" +#include "GraphemeCountValidator.h" + +Q_DECL_EXPORT int main(int argc, char *argv[]) +{ + QScopedPointer<QGuiApplication> app{SailfishApp::application(argc,argv)}; + QScopedPointer<QQuickView> view{SailfishApp::createView()}; + + qmlRegisterType<GraphemeCountValidator>("PWM", 1, 0, "GraphemeCountValidator"); + + PasswordMaker maker; + view->rootContext()->setContextProperty("passwordmaker",&maker); + QObject::connect(&maker, + &PasswordMaker::i_say_sexy_things_to_myself_while_im_dancingChanged, + &maker, + [&]() {maker.setI_say_sexy_things_to_myself_while_im_dancing(true);}, + (Qt::ConnectionType)(Qt::AutoConnection | Qt::UniqueConnection) + ); + + view->setSource(SailfishApp::pathTo(QString("qml/PassFish.qml"))); + view->show(); + + return app->exec(); +} + |
