~ubuntu-branches/ubuntu/lucid/kmess/lucid

« back to all changes in this revision

Viewing changes to src/emoticon.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-12-05 21:19:26 UTC
  • mfrom: (1.1.7 upstream) (0.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20091205211926-r26u8j38kysf6o2p
Tags: 2.0.2-1
* New upstream release 
  - Fixes friendly names (LP: #485640)
* Update Homepage: http://kmess.org
* Add Build-Depends: libphonon-dev | libqt4-phonon-dev (ubuntu friendly)
* kmess.1 fix lintian:hyphen-used-as-minus-sign

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
 
268
268
 
269
269
 
 
270
// Return whether a string is suitable for use as an emoticon shortcut
 
271
bool Emoticon::isValidShortcut( const QString &shortcut )
 
272
{
 
273
  // NOTE: If you update this regexp, in dialogs/addemoticondialog.cpp there is
 
274
  // a string which needs to be updated in interfaceChanged().
 
275
  return ! shortcut.contains( QRegExp(
 
276
         "^/.+"         // Shortcuts which start with / interfere with the text commands
 
277
         "|"
 
278
         "\\[[A-Z]+\\]" // [anything] is reserved for text formatting
 
279
         "|"
 
280
         "^.{8,}$"      // Messenger only supports shortcuts long a maximum of 7 chars
 
281
         , Qt::CaseInsensitive ) );
 
282
}
 
283
 
 
284
 
 
285
 
270
286
/**
271
287
 * Change the name of the emoticon picture.
272
288
 *