(trunk qt) #3930 - "Add URL" - auto-copy links from the clipboard

When opening the "Add URL" dialog, check the clipboard selection & clipboard proper to see if either contains a URL, magnet link, or info hash code. If it has any of those things, put that in the dialog's entry field as the default action. Patch by cantabile.
This commit is contained in:
Jordan Lee
2011-01-21 21:51:50 +00:00
parent d6518b93b8
commit 413c91f4a8
2 changed files with 14 additions and 2 deletions

View File

@@ -40,6 +40,10 @@ class AddData
QByteArray toBase64( ) const;
QString readableName( ) const;
public:
static bool isSupported( const QString& str ) { return AddData(str).type != NONE; }
};
#endif